diff --git a/QueryMaster/QueryMaster.csproj b/QueryMaster/QueryMaster.csproj index fa6f23d..9b8871a 100644 --- a/QueryMaster/QueryMaster.csproj +++ b/QueryMaster/QueryMaster.csproj @@ -38,13 +38,17 @@ bin\Release\QueryMaster.xml + + ..\Solution\packages\DotNetZip.1.10.1\lib\net20\DotNetZip.dll + True + False ExternalBin\Ionic.BZip2.dll - - False - ExternalBin\Newtonsoft.Json.dll + + ..\Solution\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll + True @@ -184,6 +188,7 @@ + Always diff --git a/QueryMaster/packages.config b/QueryMaster/packages.config new file mode 100644 index 0000000..f4c767b --- /dev/null +++ b/QueryMaster/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/Squad.Admin.Console/Forms/frmMainConsole.cs b/Squad.Admin.Console/Forms/frmMainConsole.cs index b4785c8..fc511ad 100644 --- a/Squad.Admin.Console/Forms/frmMainConsole.cs +++ b/Squad.Admin.Console/Forms/frmMainConsole.cs @@ -298,11 +298,21 @@ private void EnableLoginControls(bool enable) /// private void LoadAutocompleteCommands() { + string commandFilePath = AppDomain.CurrentDomain.BaseDirectory + "Assets\\Commands.dat"; + List commands; AutoCompleteStringCollection commandList = new AutoCompleteStringCollection(); - string[] commands = File.ReadAllLines(AppDomain.CurrentDomain.BaseDirectory + "Commands.dat"); + try + { + commands = new List(File.ReadAllLines(commandFilePath)); + } + catch (Exception ex) + { + MessageBox.Show("Error occurred trying to open the Commands file!\r\nError: " + ex.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); + return; + } - for (int i = 0; i < commands.Length; i++) + for (int i = 0; i < commands.Count; i++) { commandList.Add(commands[i].Trim()); } @@ -315,10 +325,11 @@ private void LoadAutocompleteCommands() /// private void LoadContextMenuItems() { + string reasonsFilePath = AppDomain.CurrentDomain.BaseDirectory + "Assets\\MenuReasons.xml"; // Load the xml file with the menu reasons try { - menuReasons = XDocument.Load(@"MenuReasons.xml"); + menuReasons = XDocument.Load(reasonsFilePath); } catch(Exception ex) { diff --git a/Squad.Admin.Console/Squad.Admin.Console.csproj b/Squad.Admin.Console/Squad.Admin.Console.csproj index 20af2de..f127cd2 100644 --- a/Squad.Admin.Console/Squad.Admin.Console.csproj +++ b/Squad.Admin.Console/Squad.Admin.Console.csproj @@ -62,10 +62,10 @@ Squad.Admin.Console_TemporaryKey.pfx - true + false - true + false @@ -140,7 +140,9 @@ Resources.resx True - + + PreserveNewest + SettingsSingleFileGenerator @@ -170,7 +172,9 @@ - + + PreserveNewest +