Добавьте файлы проекта.
This commit is contained in:
6
.old 4/dtlauncher-client-win/App.config
Normal file
6
.old 4/dtlauncher-client-win/App.config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
</configuration>
|
||||
166
.old 4/dtlauncher-client-win/App.xaml
Normal file
166
.old 4/dtlauncher-client-win/App.xaml
Normal file
@@ -0,0 +1,166 @@
|
||||
<Application x:Class="dtlauncher_client_win.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:dtlauncher_client_win"
|
||||
StartupUri="LoginWindow.xaml">
|
||||
<Application.Resources>
|
||||
<ControlTemplate x:Key="myScrollBar" TargetType="{x:Type ScrollBar}">
|
||||
<Grid x:Name="Bg" SnapsToDevicePixels="True">
|
||||
<Border BorderBrush="Transparent" BorderThickness="0"
|
||||
Background="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1"/>
|
||||
<Track x:Name="PART_Track" IsDirectionReversed="True" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Row="1">
|
||||
<Track.Thumb>
|
||||
<Thumb>
|
||||
<Thumb.Style>
|
||||
<Style TargetType="{x:Type Thumb}">
|
||||
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
||||
<Setter Property="IsTabStop" Value="False"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Border x:Name="rectangle" CornerRadius="2" Background="#FF9A9FC5" Height="{TemplateBinding Height}" SnapsToDevicePixels="True" Width="{TemplateBinding Width}"/>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" TargetName="rectangle" Value="#FF9A9FC5"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsDragging" Value="True">
|
||||
<Setter Property="Background" TargetName="rectangle" Value="#FF515ED1"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Thumb.Style>
|
||||
</Thumb>
|
||||
</Track.Thumb>
|
||||
</Track>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
<ControlTemplate x:Key="myScrollViewer" TargetType="{x:Type ScrollViewer}">
|
||||
<Grid x:Name="Grid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Rectangle x:Name="Corner" Grid.Column="1" Fill="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" Grid.Row="1"/>
|
||||
<ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="0" Margin="{TemplateBinding Padding}" Grid.Row="0"/>
|
||||
<ScrollBar Template="{DynamicResource myScrollBar}" Background="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}" x:Name="PART_VerticalScrollBar" AutomationProperties.AutomationId="VerticalScrollBar" Cursor="Arrow" Grid.Column="1" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Grid.Row="0" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}"/>
|
||||
<ScrollBar Template="{DynamicResource myScrollBar}" Background="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}" x:Name="PART_HorizontalScrollBar" AutomationProperties.AutomationId="HorizontalScrollBar" Cursor="Arrow" Grid.Column="0" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Orientation="Horizontal" Grid.Row="1" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}"/>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
<ControlTemplate x:Key="myTabControl" TargetType="{x:Type TabControl}">
|
||||
<Grid KeyboardNavigation.TabNavigation="Local">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TabPanel
|
||||
Name="HeaderPanel"
|
||||
Grid.Row="0"
|
||||
Panel.ZIndex="1"
|
||||
Margin="0,0,4,0"
|
||||
IsItemsHost="True"
|
||||
KeyboardNavigation.TabIndex="1"
|
||||
Background="Transparent" />
|
||||
<Border
|
||||
Name="Border"
|
||||
Grid.Row="1"
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
BorderThickness="0"
|
||||
CornerRadius="2"
|
||||
KeyboardNavigation.TabNavigation="Local"
|
||||
KeyboardNavigation.DirectionalNavigation="Contained"
|
||||
KeyboardNavigation.TabIndex="2" >
|
||||
<ContentPresenter
|
||||
Name="PART_SelectedContentHost"
|
||||
Margin="4"
|
||||
ContentSource="SelectedContent"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Foreground" Value="#FFF0F0F0" />
|
||||
<Setter TargetName="Border" Property="BorderBrush" Value="Transparent" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
<ControlTemplate x:Key="myTabItem" TargetType="{x:Type TabItem}">
|
||||
<Grid>
|
||||
<Border
|
||||
x:Name="Border"
|
||||
Margin="0,0,-4,0"
|
||||
Background="#FF4D4D4D"
|
||||
BorderBrush="#FF73C300"
|
||||
BorderThickness="2,2,2,2"
|
||||
CornerRadius="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}" >
|
||||
<ContentPresenter x:Name="ContentSite"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
ContentSource="Header"
|
||||
Margin="12,2,12,2"
|
||||
RecognizesAccessKey="True"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Panel.ZIndex" Value="100" />
|
||||
<Setter TargetName="Border" Property="Background" Value="#FF0A11A2" />
|
||||
<Setter TargetName="Border" Property="BorderThickness" Value="3,3,3,3" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="Border" Property="Background" Value="Transparent" />
|
||||
<Setter TargetName="Border" Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="Foreground" Value="white" />
|
||||
</Trigger>
|
||||
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
<ControlTemplate x:Key="myTextBox" TargetType="{x:Type TextBoxBase}">
|
||||
<Border
|
||||
Name="Border"
|
||||
Padding="2"
|
||||
Background="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
BorderBrush="Transparent"
|
||||
BorderThickness="1" >
|
||||
<ScrollViewer Margin="0" x:Name="PART_ContentHost" Template="{DynamicResource myScrollViewer}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="Border" Property="Background" Value="Black"/>
|
||||
<Setter TargetName="Border" Property="BorderBrush" Value="White"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
<ControlTemplate x:Key="roundedButton" TargetType="Button">
|
||||
<Border x:Name="Border"
|
||||
Background="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
BorderBrush="{Binding Foreground, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
CornerRadius="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}">
|
||||
<ContentPresenter Margin="2" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" RecognizesAccessKey="True"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter TargetName="Border" Property="Background" Value="#FF4E4E59"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter TargetName="Border" Property="Background" Value="#FF38384F"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
11
.old 4/dtlauncher-client-win/App.xaml.cs
Normal file
11
.old 4/dtlauncher-client-win/App.xaml.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System.Windows;
|
||||
|
||||
namespace dtlauncher_client_win
|
||||
{
|
||||
/// <summary>
|
||||
/// Логика взаимодействия для App.xaml
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
}
|
||||
98
.old 4/dtlauncher-client-win/LauncherWindow.xaml
Normal file
98
.old 4/dtlauncher-client-win/LauncherWindow.xaml
Normal file
@@ -0,0 +1,98 @@
|
||||
<Window x:Class="dtlauncher_client_win.LauncherWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:dtlauncher_client_win"
|
||||
mc:Ignorable="d"
|
||||
Title="LauncherWindow" Icon="dtscript.ico" Width="800" Height="500" MinWidth="800" MinHeight="500" Background="#FF232328">
|
||||
<Grid x:Name="MainGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="10"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="10"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="10"/>
|
||||
<RowDefinition Height="40"/>
|
||||
<RowDefinition Height="8"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="10"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Rectangle Fill="#FF474747" Grid.Row="2" Grid.ColumnSpan="3" Margin="0,5,0,0"/>
|
||||
<Grid Grid.Column="1" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="8"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="8"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button x:Name="HomeButton" Content="Home" FontWeight="Bold" FontFamily="Unispace" FontSize="20"
|
||||
Grid.Column="0" Background="Transparent" Foreground="#FF2CDA11"
|
||||
BorderThickness="3" Template="{DynamicResource roundedButton}" Tag="14"/>
|
||||
<Button x:Name="LogButton" Content="Log" FontWeight="Bold" FontFamily="Unispace" FontSize="20"
|
||||
Grid.Column="2" Background="Transparent" Foreground="#FFF0F0F0"
|
||||
BorderThickness="3" Template="{DynamicResource roundedButton}" Tag="14"/>
|
||||
<Button x:Name="SettingsButton" Content="Settings" FontWeight="Bold" FontFamily="Unispace" FontSize="20"
|
||||
Grid.Column="4" Background="Transparent" Foreground="#FFF0F0F0"
|
||||
BorderThickness="3" Template="{DynamicResource roundedButton}" Tag="14"/>
|
||||
|
||||
</Grid>
|
||||
<Grid x:Name="HomeGrid" Visibility="Visible" Grid.Row="3" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="240"/>
|
||||
<ColumnDefinition Width="10"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="10"/>
|
||||
<ColumnDefinition Width="200"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Rectangle Fill="#FF474747" Grid.Column="1" Margin="3,0,3,-10"/>
|
||||
<Rectangle Fill="#FF474747" Grid.Column="3" Margin="3,0,3,-10"/>
|
||||
<ScrollViewer x:Name="ProgramsScrollViever" Template="{DynamicResource myScrollViewer}"
|
||||
Grid.Column="0" Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<StackPanel x:Name="ProgramsPanel">
|
||||
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
<Image x:Name="BackgroundImage" Grid.Column="2" HorizontalAlignment="Stretch" Stretch="Fill" Margin="0,40,0,0" />
|
||||
<Label x:Name="NameLabel" Grid.Column="2" Grid.Row="0" Margin="0,0,0,361"
|
||||
FontSize="16" FontWeight="Bold" FontFamily="Unispace" Foreground="#FFF0F0F0"/>
|
||||
<Button x:Name="InstallButton" Content="Install" FontWeight="Bold" FontFamily="Unispace" FontSize="17"
|
||||
Grid.Column="2" Background="#FFB97523" Foreground="#FFF0F0F0"
|
||||
BorderThickness="3" Template="{DynamicResource roundedButton}" Tag="14" Margin="0,72,162,0"
|
||||
HorizontalAlignment="Right" Width="123" Height="37" VerticalAlignment="Top"/>
|
||||
<Button x:Name="LaunchButton" Content="Launch" FontWeight="Bold" FontFamily="Unispace" FontSize="17"
|
||||
Grid.Column="2" Background="#FFB97523" Foreground="#FFF0F0F0"
|
||||
BorderThickness="3" Template="{DynamicResource roundedButton}" Tag="14" Margin="0,72,20,0"
|
||||
HorizontalAlignment="Right" Width="123" Height="37" VerticalAlignment="Top"/>
|
||||
<TextBox x:Name="DescriptionBox" Template="{DynamicResource myTextBox}" Opacity="0.8"
|
||||
VerticalScrollBarVisibility="Auto" TextWrapping="Wrap" BorderThickness="0"
|
||||
Background="#FF141419" Foreground="#FFF0F0F0" SelectionBrush="#FF3E759E"
|
||||
FontSize="14" IsReadOnly="True" Grid.Column="2" Grid.Row="0" Margin="0,160,0,0"/>
|
||||
<Border BorderBrush="#FF141419" BorderThickness="1" Grid.Column="2" Grid.Row="0" Margin="0,160,0,0"/>
|
||||
<ScrollViewer x:Name="DownloadsScrollViever" Template="{DynamicResource myScrollViewer}" VerticalContentAlignment="Top"
|
||||
Grid.Column="4" Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<StackPanel x:Name="DownloadsPanel">
|
||||
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
</Grid>
|
||||
<Grid x:Name="LogGrid" Visibility="Hidden" Grid.Row="3" Grid.Column="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="34"/>
|
||||
<RowDefinition Height="10*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label x:Name="LogfileLabel" Content="logfile" Grid.Column="0" Grid.Row="0"
|
||||
FontSize="20" FontWeight="Bold" FontFamily="Unispace" Foreground="#FFF0F0F0"/>
|
||||
<TextBox x:Name="LogBox" Template="{DynamicResource myTextBox}"
|
||||
VerticalScrollBarVisibility="Auto" TextWrapping="Wrap" BorderThickness="0"
|
||||
Background="#FF141419" Foreground="#FFF0F0F0" SelectionBrush="#FF3E759E"
|
||||
FontSize="14" IsReadOnly="True" Grid.Column="0" Grid.Row="1"/>
|
||||
</Grid>
|
||||
<Grid x:Name="SettingsGrid" Visibility="Hidden" Grid.Row="3" Grid.Column="1">
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
||||
102
.old 4/dtlauncher-client-win/LauncherWindow.xaml.cs
Normal file
102
.old 4/dtlauncher-client-win/LauncherWindow.xaml.cs
Normal file
@@ -0,0 +1,102 @@
|
||||
using DTLib;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net.Sockets;
|
||||
using System.Windows;
|
||||
|
||||
namespace dtlauncher_client_win
|
||||
{
|
||||
/// <summary>
|
||||
/// Логика взаимодействия для LauncherWindow.xaml
|
||||
/// </summary>
|
||||
public partial class LauncherWindow : Window
|
||||
{
|
||||
public Socket mainSocket;
|
||||
string logfile;
|
||||
public delegate void LaunchDel();
|
||||
public LaunchDel Launch = () => { };
|
||||
public delegate void InstallDel();
|
||||
public LaunchDel Install = () => { };
|
||||
public ProgramLabel[] programsArray;
|
||||
public int PreviousProgramNum = 0;
|
||||
|
||||
public LauncherWindow(Socket _socket, string _logfile, string _log)
|
||||
{
|
||||
InitializeComponent();
|
||||
try
|
||||
{
|
||||
mainSocket = _socket;
|
||||
logfile = _logfile;
|
||||
LogBox.Text += _log;
|
||||
PublicLog.LogDel += Log;
|
||||
// переключение вкладок кнопками
|
||||
var green = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(44, 220, 17));
|
||||
var white = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(240, 240, 240));
|
||||
HomeButton.Click += (s, e) =>
|
||||
{
|
||||
LogGrid.Visibility = Visibility.Hidden;
|
||||
SettingsGrid.Visibility = Visibility.Hidden;
|
||||
HomeGrid.Visibility = Visibility.Visible;
|
||||
LogButton.Foreground = white;
|
||||
SettingsButton.Foreground = white;
|
||||
HomeButton.Foreground = green;
|
||||
};
|
||||
LogButton.Click += (s, e) =>
|
||||
{
|
||||
HomeGrid.Visibility = Visibility.Hidden;
|
||||
SettingsGrid.Visibility = Visibility.Hidden;
|
||||
LogGrid.Visibility = Visibility.Visible;
|
||||
HomeButton.Foreground = white;
|
||||
SettingsButton.Foreground = white;
|
||||
LogButton.Foreground = green;
|
||||
};
|
||||
SettingsButton.Click += (s, e) =>
|
||||
{
|
||||
HomeGrid.Visibility = Visibility.Hidden;
|
||||
LogGrid.Visibility = Visibility.Hidden;
|
||||
SettingsGrid.Visibility = Visibility.Visible;
|
||||
HomeButton.Foreground = white;
|
||||
LogButton.Foreground = white;
|
||||
SettingsButton.Foreground = green;
|
||||
};
|
||||
// считывание дескрипторов программ
|
||||
var descriptors = Directory.GetFiles("descroptors", "*.desc");
|
||||
programsArray = new ProgramLabel[descriptors.Length];
|
||||
Log(descriptors.Length + " descriptors found\n");
|
||||
for (int i = 0; i < descriptors.Length; i++)
|
||||
{
|
||||
programsArray[i] = new ProgramLabel(descriptors[i], i, this);
|
||||
ProgramsPanel.Children.Add(programsArray[i]);
|
||||
Log(programsArray[i].Text + " added to ProgramsPanel\n");
|
||||
}
|
||||
LaunchButton.Click += (s, e) => Launch();
|
||||
InstallButton.Click += (s, e) => Install();
|
||||
//mainSocket.FSP_Download(new FSP_FileObject("share\\file.arc", "downloads\\file.arc"));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log("error:\n" + e.Message + "\n" + e.StackTrace + '\n');
|
||||
}
|
||||
}
|
||||
|
||||
public void Log(string msg)
|
||||
{
|
||||
|
||||
if (LogBox.Text[LogBox.Text.Length - 1] == '\n') msg = "[" + DateTime.Now.ToString() + "]: " + msg;
|
||||
FileWork.Log(logfile, msg);
|
||||
LogBox.Text += msg;
|
||||
}
|
||||
|
||||
public void Log(params string[] input)
|
||||
{
|
||||
if (input.Length % 2 == 0)
|
||||
{
|
||||
string str = "";
|
||||
for (ushort i = 0; i < input.Length; i++)
|
||||
str += input[++i];
|
||||
Log(str);
|
||||
}
|
||||
else throw new Exception("error in Log(): every text string must have color string before");
|
||||
}
|
||||
}
|
||||
}
|
||||
45
.old 4/dtlauncher-client-win/LoginWindow.xaml
Normal file
45
.old 4/dtlauncher-client-win/LoginWindow.xaml
Normal file
@@ -0,0 +1,45 @@
|
||||
<Window x:Class="dtlauncher_client_win.LoginWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:dtlauncher_client_win"
|
||||
mc:Ignorable="d"
|
||||
Title="DTLauncher login" Width="500" Height="350" Background="#FF232328" MinWidth="500" MinHeight="350">
|
||||
<Grid ScrollViewer.VerticalScrollBarVisibility="Disabled" Margin="0" MinWidth="492" MinHeight="320">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="20*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="25*"/>
|
||||
<RowDefinition Height="174*"/>
|
||||
<RowDefinition Height="23*"/>
|
||||
<RowDefinition Height="72*"/>
|
||||
<RowDefinition Height="25*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Canvas Height="200" Margin="20,14,20,8" Width="450" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.ColumnSpan="3" Grid.RowSpan="3">
|
||||
<TextBox x:Name="LoginBox" HorizontalAlignment="Center" Height="30" TextWrapping="Wrap" Text="" VerticalAlignment="Center" Width="300" RenderTransformOrigin="0.534,-0.193" Background="#FF4B4B5A" Foreground="#FFF0F0F0" SelectionBrush="#FF2E628B" FontSize="17" BorderThickness="2" IsUndoEnabled="False" MaxLength="25" MaxLines="1" BorderBrush="#FFF0F0F0" MinWidth="300" MinHeight="29" Canvas.Left="130" Canvas.Top="21"/>
|
||||
<PasswordBox x:Name="PasswBox" HorizontalAlignment="Center" VerticalAlignment="Center" Width="300" Height="30" FontSize="17" Background="#FF4B4B5A" Foreground="#FFF0F0F0" SelectionBrush="#FF2E628B" MaxLength="25" BorderThickness="2" BorderBrush="#FFF0F0F0" MinWidth="300" MinHeight="30" Canvas.Left="130" Canvas.Top="83"/>
|
||||
<Label Content="login:" HorizontalAlignment="Center" VerticalAlignment="Center" Height="40" Width="90" Foreground="#FFF0F0F0" FontSize="20" FontWeight="Bold" RenderTransformOrigin="0.764,0.578" FontFamily="Unispace" MinWidth="74" MinHeight="40" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Canvas.Left="34" Canvas.Top="17"/>
|
||||
<Label Content="password:" HorizontalAlignment="Center" VerticalAlignment="Center" Height="40" Width="119" Foreground="#FFF0F0F0" FontSize="20" FontWeight="Bold" FontFamily="Unispace" MinHeight="40" MinWidth="111" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Canvas.Left="1" Canvas.Top="77"/>
|
||||
<Button x:Name="RegisterButton" Content="register" Width="117" Height="40" FontSize="20"
|
||||
FontWeight="Bold" Foreground="#FFF0F0F0" Background="#FF383844"
|
||||
FontFamily="Unispace" BorderThickness="3" MinHeight="40" MinWidth="117" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" Canvas.Left="71" Canvas.Top="138" Template="{DynamicResource roundedButton}" Tag="10"/>
|
||||
<Button x:Name="LoginButton" Content="login" Width="117" Height="40" FontSize="20" FontWeight="Bold"
|
||||
Foreground="#FFF0F0F0" Background="#FFB97523" FontFamily="Unispace"
|
||||
BorderThickness="3" MinHeight="40" MinWidth="117" HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Canvas.Left="272" Canvas.Top="138" Template="{DynamicResource roundedButton}" Tag="10"/>
|
||||
<Label Name="ConnectingLabel" Content="CONNECTING TO THE MAIN SERVER..." Foreground="#ACF" FontSize="25"
|
||||
Background="#FF0F0F11" Opacity="0.8" Height="200" Width="450" HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center" Visibility="Hidden"/>
|
||||
</Canvas>
|
||||
<TextBox x:Name="LogBox" Template="{DynamicResource myTextBox}"
|
||||
VerticalScrollBarVisibility="Auto" TextWrapping="Wrap" BorderThickness="0"
|
||||
Background="Transparent" Foreground="#FFF0F0F0" SelectionBrush="#FF3E759E"
|
||||
FontSize="14" IsReadOnly="True" Grid.Column="1" Grid.Row="3"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
142
.old 4/dtlauncher-client-win/LoginWindow.xaml.cs
Normal file
142
.old 4/dtlauncher-client-win/LoginWindow.xaml.cs
Normal file
@@ -0,0 +1,142 @@
|
||||
using DTLib;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net.Sockets;
|
||||
using System.Windows;
|
||||
|
||||
namespace dtlauncher_client_win
|
||||
{
|
||||
/// <summary>
|
||||
/// Логика взаимодействия для LoginWindow.xaml
|
||||
/// </summary>
|
||||
public partial class LoginWindow : Window
|
||||
{
|
||||
public Socket mainSocket { private set; get; } = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||
public string logfile { private set; get; } = $"logs\\client-{DateTime.Now}.log".Replace(':', '-').Replace(' ', '_');
|
||||
|
||||
public LoginWindow()
|
||||
{
|
||||
try
|
||||
{
|
||||
InitializeComponent();
|
||||
FileWork.DirCreate("logs");
|
||||
FileWork.DirCreate("downloads");
|
||||
PublicLog.LogDel += Log;
|
||||
LoginButton.Click += Login;
|
||||
RegisterButton.Click += Register;
|
||||
Closed += CloseWindow;
|
||||
Log("[" + DateTime.Now.ToString() + "]: launcher is starting\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log("error:\n" + e.Message + "\n" + e.StackTrace + '\n');
|
||||
}
|
||||
}
|
||||
|
||||
void Log(string msg)
|
||||
{
|
||||
lock (new object())
|
||||
{
|
||||
if (LogBox.Text.Length - 1 >= 0 && LogBox.Text[LogBox.Text.Length - 1] == '\n') msg = "[" + DateTime.Now.ToString() + "]: " + msg;
|
||||
FileWork.Log(logfile, msg);
|
||||
LogBox.Text += msg;
|
||||
}
|
||||
}
|
||||
|
||||
void Log(params string[] input)
|
||||
{
|
||||
if (input.Length % 2 == 0)
|
||||
{
|
||||
string str = "";
|
||||
for (ushort i = 0; i < input.Length; i++)
|
||||
str += input[++i];
|
||||
Log(str);
|
||||
}
|
||||
else throw new Exception("error in Log(): every text string must have color string before");
|
||||
}
|
||||
|
||||
void Register(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
string login = LoginBox.Text;
|
||||
string password = PasswBox.Password;
|
||||
string filename = $"register-{login}.req";
|
||||
var hasher = new Hasher();
|
||||
if (File.Exists(filename)) File.Delete(filename);
|
||||
var writer = File.CreateText(filename);
|
||||
writer.Write(login + " $" +
|
||||
hasher.HashCycled(password.ToBytes(), login.ToBytes(), 4096)
|
||||
.HashToString());
|
||||
writer.Close();
|
||||
Log($"request file created:{Directory.GetCurrentDirectory()}\\{filename}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log("registration error: " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
void Login(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
ConnectingLabel.Visibility = Visibility.Visible;
|
||||
/*// пересоздание сокета
|
||||
if (mainSocket.Connected)
|
||||
{
|
||||
mainSocket.Shutdown(SocketShutdown.Both);
|
||||
mainSocket.Close();
|
||||
mainSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||
}
|
||||
// подключение к серверу
|
||||
Log("connecting to the main server...");
|
||||
mainSocket.Connect(new IPEndPoint(Dns.GetHostAddresses(
|
||||
FileWork.ReadFromConfig("client.cfg", "central server ip"))[0],
|
||||
Convert.ToInt32(FileWork.ReadFromConfig("client.cfg", "central server port"))));
|
||||
mainSocket.ReceiveTimeout = 2000;
|
||||
string recieved = mainSocket.Request("new user connection try").ToStr();
|
||||
if (recieved != "new user connection created")
|
||||
throw new Exception("can't connect to the main server");
|
||||
Log("connected to the main server");
|
||||
//NetWork.RequestServersList(mainSocket);
|
||||
var hasher = new SecureHasher(256);
|
||||
// подключение к серверу
|
||||
mainSocket.Connect(new IPEndPoint(Dns.GetHostAddresses("m1net.keenetic.pro")[0], 20008));
|
||||
mainSocket.ReceiveTimeout = 5000;
|
||||
// авторизация
|
||||
string login = LoginBox.Text;
|
||||
string password = PasswBox.Password;
|
||||
string recievedString = NetWork.Request(mainSocket, login).ToStr();
|
||||
if (recievedString != "2e9b7473ce473cdbb9b9e68aa444f5146b1b415a05917aceecd3861804cc2fd8")
|
||||
throw new Exception("incorrect login\n");recievedString = NetWork.Request(mainSocket,hasher.HashSaltCycled(password.ToBytes(), login.ToBytes(), 4096)).ToStr();
|
||||
if (recievedString != "82c8e541601e0883ea189a285e514adfa6c2da05c83285359bbcf73bd3a8518b")
|
||||
throw new Exception("incorrect password");*/
|
||||
ConnectingLabel.Visibility = Visibility.Hidden;
|
||||
Log("succesfully login\n");
|
||||
// вызов нового окна
|
||||
var lauWin = new LauncherWindow(mainSocket, logfile, LogBox.Text);
|
||||
lauWin.Show();
|
||||
Hide();
|
||||
PublicLog.LogDel -= Log;
|
||||
lauWin.Closed += CloseWindow;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log("login error: " + ex.Message + '\n' + ex.StackTrace);
|
||||
}
|
||||
}
|
||||
|
||||
void CloseWindow(object sender, EventArgs e)
|
||||
{
|
||||
if (mainSocket.Connected)
|
||||
{
|
||||
mainSocket.Shutdown(SocketShutdown.Both);
|
||||
mainSocket.Close();
|
||||
}
|
||||
Log("DTchat closed");
|
||||
Close();
|
||||
App.Current.Shutdown();
|
||||
}
|
||||
}
|
||||
}
|
||||
33
.old 4/dtlauncher-client-win/ProgramLabel.xaml
Normal file
33
.old 4/dtlauncher-client-win/ProgramLabel.xaml
Normal file
@@ -0,0 +1,33 @@
|
||||
<UserControl x:Class="dtlauncher_client_win.ProgramLabel"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:dtlauncher_client_win"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="25" d:DesignWidth="140" BorderThickness="0">
|
||||
<UserControl.Template>
|
||||
<ControlTemplate TargetType="UserControl">
|
||||
<ContentPresenter />
|
||||
</ControlTemplate>
|
||||
</UserControl.Template>
|
||||
<Grid x:Name="grid" Background="#FF232328" MouseLeftButtonDown="ProgramShow">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="25"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border x:Name="Border" Grid.ColumnSpan="2"
|
||||
Background="{Binding Background, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:ProgramLabel}}}"
|
||||
BorderBrush="{Binding BorderBrush, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:ProgramLabel}}}"
|
||||
BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:ProgramLabel}}}"
|
||||
CornerRadius="{Binding CornerRadius, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:ProgramLabel}}}"/>
|
||||
<Image x:Name="IconImage" Grid.Column="0" Stretch="Fill" Margin="3,2,2,3" Width="20" Height="20"
|
||||
Source="{Binding Icon, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:ProgramLabel}}}"/>
|
||||
<Label Name="NameLabel" Grid.Column="1" VerticalContentAlignment="Center"
|
||||
Content="{Binding Text, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:ProgramLabel}}}"
|
||||
FontSize="{Binding FontSize, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:ProgramLabel}}}"
|
||||
FontFamily="{Binding FontFamily,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:ProgramLabel}}}"
|
||||
FontWeight="{Binding FontWeight, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:ProgramLabel}}}"
|
||||
Foreground="{Binding Foreground, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:ProgramLabel}}}"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
115
.old 4/dtlauncher-client-win/ProgramLabel.xaml.cs
Normal file
115
.old 4/dtlauncher-client-win/ProgramLabel.xaml.cs
Normal file
@@ -0,0 +1,115 @@
|
||||
using DTLib;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace dtlauncher_client_win
|
||||
{
|
||||
/// <summary>
|
||||
/// Логика взаимодействия для ProgramLabel.xaml
|
||||
/// </summary>
|
||||
public partial class ProgramLabel : UserControl
|
||||
{
|
||||
public static DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(ProgramLabel));
|
||||
public string Text
|
||||
{
|
||||
get { return (string)GetValue(TextProperty); }
|
||||
set { SetValue(TextProperty, value); }
|
||||
}
|
||||
|
||||
public static DependencyProperty IconProperty = DependencyProperty.Register("Icon", typeof(System.Windows.Media.Imaging.BitmapImage), typeof(ProgramLabel));
|
||||
public System.Windows.Media.Imaging.BitmapImage Icon
|
||||
{
|
||||
get { return (System.Windows.Media.Imaging.BitmapImage)GetValue(IconProperty); }
|
||||
set { SetValue(IconProperty, value); }
|
||||
}
|
||||
|
||||
public static DependencyProperty CornerRadiusProperty = DependencyProperty.Register("CornerRadius", typeof(CornerRadius), typeof(ProgramLabel));
|
||||
public CornerRadius CornerRadius
|
||||
{
|
||||
get { return (CornerRadius)GetValue(CornerRadiusProperty); }
|
||||
set { SetValue(CornerRadiusProperty, value); }
|
||||
}
|
||||
|
||||
public string BackgroundImage;
|
||||
public string Script;
|
||||
public string InstallDir;
|
||||
public string LaunchFile;
|
||||
public string Arguments;
|
||||
public string Description;
|
||||
public int Number;
|
||||
LauncherWindow Window;
|
||||
|
||||
public ProgramLabel()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public ProgramLabel(string descriptorPath, int number, LauncherWindow window)
|
||||
{
|
||||
try
|
||||
{
|
||||
InitializeComponent();
|
||||
Window = window;
|
||||
Number = number;
|
||||
FontSize = 14;
|
||||
Foreground = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(240, 240, 240));
|
||||
Text = FileWork.ReadFromConfig(descriptorPath, "name");
|
||||
NameLabel.Content = FileWork.ReadFromConfig(descriptorPath, "name");
|
||||
IconImage.Source = new System.Windows.Media.Imaging.BitmapImage(new Uri(Directory.GetCurrentDirectory() + "\\descroptors\\" + FileWork.ReadFromConfig(descriptorPath, "icon"), UriKind.Absolute));
|
||||
BackgroundImage = Directory.GetCurrentDirectory() + "\\descroptors\\" + FileWork.ReadFromConfig(descriptorPath, "background");
|
||||
Script = FileWork.ReadFromConfig(descriptorPath, "script");
|
||||
InstallDir = FileWork.ReadFromConfig(descriptorPath, "installdir");
|
||||
LaunchFile = FileWork.ReadFromConfig(descriptorPath, "launchfile");
|
||||
Arguments = FileWork.ReadFromConfig(descriptorPath, "arguments");
|
||||
Description = FileWork.ReadFromConfig(descriptorPath, "description").Replace("\\n", "\n");
|
||||
//Window.Log(Text + " " + Icon + " " + Number);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Window.Log("error:\n" + e.Message + "\n" + e.StackTrace + '\n');
|
||||
}
|
||||
}
|
||||
|
||||
void ProgramShow(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
Window.programsArray[Window.PreviousProgramNum].Foreground = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(240, 240, 240));
|
||||
Window.programsArray[Window.PreviousProgramNum].FontWeight = FontWeights.Normal;
|
||||
Window.programsArray[Window.PreviousProgramNum].FontSize = 14;
|
||||
Window.PreviousProgramNum = Number;
|
||||
Foreground = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(170, 170, 240));
|
||||
FontWeight = FontWeights.Bold;
|
||||
FontSize = 13;
|
||||
Window.NameLabel.Content = Text;
|
||||
Window.DescriptionBox.Text = Description;
|
||||
Window.BackgroundImage.Source = new System.Windows.Media.Imaging.BitmapImage(new Uri(BackgroundImage, UriKind.Absolute));
|
||||
Window.Launch = () =>
|
||||
{
|
||||
var startInfo = new ProcessStartInfo()
|
||||
{
|
||||
FileName = LaunchFile,
|
||||
Arguments = Arguments,
|
||||
};
|
||||
Process.Start(startInfo);
|
||||
};
|
||||
Window.Install = () =>
|
||||
{
|
||||
var scriptrunner = new DTScript.ScriptRunner
|
||||
{
|
||||
debug = false,
|
||||
mainSocket = Window.mainSocket
|
||||
};
|
||||
scriptrunner.RunScriptFile(Directory.GetCurrentDirectory() + "\\scripts\\" + Script);
|
||||
};
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Window.Log("error:\n" + ex.Message + "\n" + ex.StackTrace + '\n');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
53
.old 4/dtlauncher-client-win/Properties/AssemblyInfo.cs
Normal file
53
.old 4/dtlauncher-client-win/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
|
||||
// Общие сведения об этой сборке предоставляются следующим набором
|
||||
// набор атрибутов. Измените значения этих атрибутов, чтобы изменить сведения,
|
||||
// связанные со сборкой.
|
||||
[assembly: AssemblyTitle("dtlauncher-client-win")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("dtlauncher-client-win")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
|
||||
// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
|
||||
// из модели COM, установите атрибут ComVisible для этого типа в значение true.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
//Чтобы начать создание локализуемых приложений, задайте
|
||||
//<UICulture>CultureYouAreCodingWith</UICulture> в файле .csproj
|
||||
//в <PropertyGroup>. Например, при использовании английского (США)
|
||||
//в своих исходных файлах установите <UICulture> в en-US. Затем отмените преобразование в комментарий
|
||||
//атрибута NeutralResourceLanguage ниже. Обновите "en-US" в
|
||||
//строка внизу для обеспечения соответствия настройки UICulture в файле проекта.
|
||||
|
||||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
||||
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //где расположены словари ресурсов по конкретным тематикам
|
||||
//(используется, если ресурс не найден на странице,
|
||||
// или в словарях ресурсов приложения)
|
||||
ResourceDictionaryLocation.SourceAssembly //где расположен словарь универсальных ресурсов
|
||||
//(используется, если ресурс не найден на странице,
|
||||
// в приложении или в каких-либо словарях ресурсов для конкретной темы)
|
||||
)]
|
||||
|
||||
|
||||
// Сведения о версии для сборки включают четыре следующих значения:
|
||||
//
|
||||
// Основной номер версии
|
||||
// Дополнительный номер версии
|
||||
// Номер сборки
|
||||
// Номер редакции
|
||||
//
|
||||
// Можно задать все значения или принять номера сборки и редакции по умолчанию
|
||||
// используя "*", как показано ниже:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
70
.old 4/dtlauncher-client-win/Properties/Resources.Designer.cs
generated
Normal file
70
.old 4/dtlauncher-client-win/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,70 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Этот код был создан программным средством.
|
||||
// Версия среды выполнения: 4.0.30319.42000
|
||||
//
|
||||
// Изменения в этом файле могут привести к неправильному поведению и будут утрачены, если
|
||||
// код создан повторно.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace dtlauncher_client_win.Properties
|
||||
{
|
||||
/// <summary>
|
||||
/// Класс ресурсов со строгим типом для поиска локализованных строк и пр.
|
||||
/// </summary>
|
||||
// Этот класс был автоматически создан при помощи StronglyTypedResourceBuilder
|
||||
// класс с помощью таких средств, как ResGen или Visual Studio.
|
||||
// Для добавления или удаления члена измените файл .ResX, а затем перезапустите ResGen
|
||||
// с параметром /str или заново постройте свой VS-проект.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Возврат кэшированного экземпляра ResourceManager, используемого этим классом.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("dtlauncher_client_win.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Переопределяет свойство CurrentUICulture текущего потока для всех
|
||||
/// подстановки ресурсов с помощью этого класса ресурсов со строгим типом.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
117
.old 4/dtlauncher-client-win/Properties/Resources.resx
Normal file
117
.old 4/dtlauncher-client-win/Properties/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
29
.old 4/dtlauncher-client-win/Properties/Settings.Designer.cs
generated
Normal file
29
.old 4/dtlauncher-client-win/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,29 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace dtlauncher_client_win.Properties
|
||||
{
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
125
.old 4/dtlauncher-client-win/dtlauncher-client-win.csproj
Normal file
125
.old 4/dtlauncher-client-win/dtlauncher-client-win.csproj
Normal file
@@ -0,0 +1,125 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{367793EE-4757-4ADD-BF7E-960DC9EB6DF9}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>dtlauncher_client_win</RootNamespace>
|
||||
<AssemblyName>dtlauncher-client-win</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Build|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject>dtlauncher_client_win.App</StartupObject>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>dtscript.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xaml">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Page Include="LauncherWindow.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="LoginWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Compile Include="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="LauncherWindow.xaml.cs">
|
||||
<DependentUpon>LauncherWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="LoginWindow.xaml.cs">
|
||||
<DependentUpon>LoginWindow.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Page Include="ProgramLabel.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ProgramLabel.xaml.cs">
|
||||
<DependentUpon>ProgramLabel.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\DTLib\DTLib.csproj">
|
||||
<Project>{ce793497-2d5c-42d8-b311-e9b32af9cdfb}</Project>
|
||||
<Name>DTLib</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\dtscript\dtscript.csproj">
|
||||
<Project>{e02ea967-fd29-47d2-b25b-ba684b784aee}</Project>
|
||||
<Name>dtscript</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="dtscript.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>del /f /q dtlauncher-client-win.exe.config</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
BIN
.old 4/dtlauncher-client-win/dtscript.ico
Normal file
BIN
.old 4/dtlauncher-client-win/dtscript.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
Reference in New Issue
Block a user