Skip to content

Commit

Permalink
ЗАКОНЧИЛ! Добавил задержку в 1 сек (намеренная задержка, чтобы все ба…
Browse files Browse the repository at this point in the history
…йты были отправлены с сервера)
  • Loading branch information
MilkRen committed May 31, 2024
1 parent fa45c32 commit 1d5f276
Show file tree
Hide file tree
Showing 14 changed files with 371 additions and 136 deletions.
2 changes: 1 addition & 1 deletion LauncherDM/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<userSettings>
<LauncherDM.Properties.SettingsApp>
<setting name="Ip" serializeAs="String">
<value>127.0.0.1</value>
<value>185.119.58.142</value>
</setting>
<setting name="Port" serializeAs="String">
<value>25590</value>
Expand Down
2 changes: 2 additions & 0 deletions LauncherDM/LauncherDM.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<UseWindowsForms>true</UseWindowsForms>
<LangVersion>latest</LangVersion>
<ApplicationIcon>Source\Images\Logo\OnlyLogoTwo.ico</ApplicationIcon>
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -66,6 +67,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Aspose.Zip" Version="24.5.0" />
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.77" />
</ItemGroup>

Expand Down
11 changes: 10 additions & 1 deletion LauncherDM/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions LauncherDM/Properties/Resources.en.resx
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,7 @@
<data name="Run" xml:space="preserve">
<value>RUN</value>
</data>
<data name="DontDownload" xml:space="preserve">
<value>DOWNLOAD IS NOT AVAILABLE</value>
</data>
</root>
3 changes: 3 additions & 0 deletions LauncherDM/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -298,4 +298,7 @@
<data name="Run" xml:space="preserve">
<value>ЗАПУСТИТЬ</value>
</data>
<data name="DontDownload" xml:space="preserve">
<value>СКАЧИВАНИЕ НЕ ДОСТУПНО</value>
</data>
</root>
2 changes: 1 addition & 1 deletion LauncherDM/Properties/SettingsApp.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion LauncherDM/Properties/SettingsApp.settings
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Profiles />
<Settings>
<Setting Name="Ip" Type="System.String" Scope="User">
<Value Profile="(Default)">127.0.0.1</Value>
<Value Profile="(Default)">185.119.58.142</Value>
</Setting>
<Setting Name="Port" Type="System.String" Scope="User">
<Value Profile="(Default)">25590</Value>
Expand Down
79 changes: 79 additions & 0 deletions LauncherDM/Properties/app.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- Параметры манифеста UAC
Если вы хотите изменить уровень контроля учетных записей Windows, замените узел
requestedExecutionLevel на один из следующих.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
При указании элемента requestedExecutionLevel будет отключена виртуализация файлов и реестра.
Удалите этот элемент, если виртуализация требуется приложению для обратной
совместимости.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>

<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Список версий Windows, на которых это приложение было протестировано
и будет работать. Раскомментируйте соответствующие элементы, чтобы ОС Windows
автоматически выбрала наиболее совместимое окружение. -->

<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->

<!-- Windows 7 -->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->

<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->

<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->

<!-- Windows 10 -->
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->

</application>
</compatibility>

<!-- Указывает, что приложение поддерживает определение DPI и не будет автоматически масштабироваться Windows при более высоких
значениях DPI. Приложения Windows Presentation Foundation (WPF) по умолчанию поддерживают определение DPI, им не нужно
специально включать параметр для этого. Для приложений Windows Forms на платформе .NET Framework 4.6, для которых задан этот параметр, необходимо
также задать для "EnableWindowsFormsHighDpiAutoResizing" значение "true" в файле app.config.
При этом приложение начинает учитывать длинные пути. Дополнительные сведения см. на странице https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation.-->
<!--
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
-->

<!-- Включите темы для общих элементов управления и диалоговых окон Windows (Windows XP и более поздние версии) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->

</assembly>
5 changes: 3 additions & 2 deletions LauncherDM/Services/ServerRequestService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Windows.Forms.VisualStyles;
using ServerTCP;
using LauncherDM.Properties;
using static ServerTCP.MessageLanguages;
Expand Down Expand Up @@ -40,7 +41,7 @@ public MessageHeader SendMessageRequest(object data, MessageHeader.MessageType m
byte[] headerBytes = messageHeader.MessageToArray(loadToken);
NetworkStream tcpStream = tcpClient.GetStream();
tcpStream.Write(headerBytes);

System.Threading.Thread.Sleep(1000);
do
{
var getBytes = new byte[tcpClient.ReceiveBufferSize];
Expand Down Expand Up @@ -81,7 +82,7 @@ public MessageHeader SendMessageRequest(MessageHeader.MessageType messageType, b
byte[] headerBytes = messageHeader.MessageToArray(loadToken);
NetworkStream tcpStream = tcpClient.GetStream();
tcpStream.Write(headerBytes);

System.Threading.Thread.Sleep(1000); // Todo: Костыль с получениями байтов, намеренная задержка, чтобы все байты были отправлены
do
{
var getBytes = new byte[tcpClient.ReceiveBufferSize];
Expand Down
15 changes: 15 additions & 0 deletions LauncherDM/Styles/Other/ButtonStyle.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -635,4 +635,19 @@
</Style.Triggers>
</Style>

<Style x:Key="ButtonDont" TargetType="Button">
<Setter Property="FontFamily" Value="#Cascadia Mono SemiLight"/>
<Setter Property="Background" Value="DarkRed" />
<Setter Property="Template" >
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border CornerRadius="3" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>

</Style>

</ResourceDictionary>
Loading

0 comments on commit 1d5f276

Please sign in to comment.