diff --git a/src/CSAuto/CSAuto.csproj b/src/CSAuto/CSAuto.csproj index 6bf0d5d..0308509 100644 --- a/src/CSAuto/CSAuto.csproj +++ b/src/CSAuto/CSAuto.csproj @@ -62,7 +62,7 @@ Icons\main.ico - app.manifest + csauto.manifest @@ -220,7 +220,7 @@ Strings.ru.Designer.cs - + SettingsSingleFileGenerator DebugSettings.Designer.cs @@ -274,9 +274,7 @@ 4.5.0 - - - + rmdir /q /s $(ProjectDir)$(OutDir)resource diff --git a/src/CSAuto/GUIWindow.xaml b/src/CSAuto/GUIWindow.xaml index ce397ae..a3b961a 100644 --- a/src/CSAuto/GUIWindow.xaml +++ b/src/CSAuto/GUIWindow.xaml @@ -353,18 +353,22 @@ - + + + + + - + - - + + diff --git a/src/CSAuto/MainApp.xaml.cs b/src/CSAuto/MainApp.xaml.cs index cfc1ddb..9a1bcf2 100644 --- a/src/CSAuto/MainApp.xaml.cs +++ b/src/CSAuto/MainApp.xaml.cs @@ -43,7 +43,7 @@ public partial class MainApp : Window #region Constants public const string VER = "2.1.3"; public const string FULL_VER = VER + (DEBUG_REVISION == "" ? "" : " REV "+ DEBUG_REVISION); - const string DEBUG_REVISION = "2"; + const string DEBUG_REVISION = "3"; const string GAME_PROCCES_NAME = "cs2"; const string GAME_WINDOW_NAME = "Counter-Strike 2"; const string GAME_CLASS_NAME = "SDL_app"; diff --git a/src/CSAuto/NotifyIcon/NativeMethods.cs b/src/CSAuto/NotifyIcon/NativeMethods.cs index f97c3bd..f7f623e 100644 --- a/src/CSAuto/NotifyIcon/NativeMethods.cs +++ b/src/CSAuto/NotifyIcon/NativeMethods.cs @@ -4,7 +4,6 @@ using System; using System.Runtime.InteropServices; using System.Runtime.Versioning; -using System.Text; // ReSharper disable InconsistentNaming @@ -53,46 +52,6 @@ public class NotifyIconData [ResourceExposure(ResourceScope.None)] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool Shell_NotifyIcon(int message, NotifyIconData pnId); - [DllImport("user32.dll", CharSet = CharSet.Auto)] - public extern static bool DestroyIcon(IntPtr handle); - [DllImport("Shell32.dll", SetLastError = false)] - public static extern Int32 SHGetStockIconInfo(SHSTOCKICONID siid, SHGSI uFlags, ref SHSTOCKICONINFO psii); - - public enum SHSTOCKICONID : uint - { - SIID_SHIELD = 77 - } - - [Flags] - public enum SHGSI : uint - { - SHGSI_ICON = 0x000000100, - SHGSI_SMALLICON = 0x000000001 - } - - [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Unicode)] - public struct SHSTOCKICONINFO - { - public UInt32 cbSize; - public IntPtr hIcon; - public Int32 iSysIconIndex; - public Int32 iIcon; - - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)] - public string szPath; - } - public delegate void WinEventDelegate(IntPtr hWinEventHook, uint eventType, IntPtr hwnd, int idObject, int idChild, uint dwEventThread, uint dwmsEventTime); - - [DllImport("user32.dll")] - static public extern IntPtr SetWinEventHook(uint eventMin, uint eventMax, IntPtr hmodWinEventProc, WinEventDelegate lpfnWinEventProc, uint idProcess, uint idThread, uint dwFlags); - - public const uint WINEVENT_OUTOFCONTEXT = 0; - public const uint EVENT_SYSTEM_FOREGROUND = 3; - - [DllImport("user32.dll")] - static public extern IntPtr GetForegroundWindow(); - - [DllImport("user32.dll")] - static public extern int GetWindowText(IntPtr hWnd, StringBuilder text, int count); + } } diff --git a/src/CSAuto/app.manifest b/src/CSAuto/csauto.manifest similarity index 100% rename from src/CSAuto/app.manifest rename to src/CSAuto/csauto.manifest diff --git a/src/Updater/App.xaml.cs b/src/Updater/App.xaml.cs index e7c9fb1..ed3531b 100644 --- a/src/Updater/App.xaml.cs +++ b/src/Updater/App.xaml.cs @@ -18,6 +18,11 @@ public partial class App : Application { protected override void OnStartup(StartupEventArgs e) { + if(e.Args.Length == 0) + { + MessageBox.Show("Not enough arguments supplied","Error",MessageBoxButton.OK,MessageBoxImage.Error); + return; + } if (e.Args[0] == "--cleanup") { string[] files = Directory.GetFiles(Log.WorkPath + "\\..", "*.dll"); diff --git a/src/Updater/MainWindow.xaml b/src/Updater/MainWindow.xaml index 8bd0685..c9ad422 100644 --- a/src/Updater/MainWindow.xaml +++ b/src/Updater/MainWindow.xaml @@ -5,7 +5,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:Updater" mc:Ignorable="d" - Title="CSAuto updater" Height="80" Width="300"> + Title="CSAuto updater" Height="80" Width="300" ResizeMode="NoResize"> diff --git a/src/Updater/Updater.csproj b/src/Updater/Updater.csproj index 1ae65b7..a8aa5aa 100644 --- a/src/Updater/Updater.csproj +++ b/src/Updater/Updater.csproj @@ -34,6 +34,9 @@ prompt 4 + + updater.manifest + @@ -88,6 +91,7 @@ ResXFileCodeGenerator Resources.Designer.cs + SettingsSingleFileGenerator diff --git a/src/Updater/updater.manifest b/src/Updater/updater.manifest new file mode 100644 index 0000000..897208d --- /dev/null +++ b/src/Updater/updater.manifest @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +