示例#1
0
        public void Save(object sender, RoutedEventArgs e)
        {
#if DEMO
            MessageBox.Show("This free demo version can't save data.", "Cannot save", MessageBoxButton.OK, MessageBoxImage.Warning);
#else
            if (rawData.Length > 0)
            {
                foreach (TabItem item in mainTabs.Items)
                {
                    stopEdit((DataGrid)item.Content);   //f*****g WPF
                }
                Microsoft.Win32.SaveFileDialog dlg = new Microsoft.Win32.SaveFileDialog();
                string fileName = openFile.Split('\\').Last();
                dlg.DefaultExt = ".sav";                    // Default file extension
                dlg.Filter     = "SOTS1 saved games|*.sav"; // Filter files by extension

                // Process save file dialog box results
                if (dlg.ShowDialog() == true)
                {
                    parser.updateRawData(ref rawData);
                    Gzip.Compress(dlg.FileName, rawData);
                    load(dlg.FileName);
                }
            }
            else
            {
                MessageBox.Show("No data loaded.", "Cannot save", MessageBoxButton.OK, MessageBoxImage.Warning);
            }
#endif
        }
示例#2
0
        public static void writeCompressedHex(string fileName)
        {
            byte[] unc = read(fileName);
            Gzip.Compress(fileName + ".temp", unc);
            byte[] compressed = Gzip.read(fileName + ".temp");
            string res        = "0x" + BitConverter.ToString(compressed).Replace("-", ",0x");

            write(fileName + ".compressed", System.Text.Encoding.ASCII.GetBytes(res));
        }
示例#3
0
        public void showHelp(object sender, RoutedEventArgs e)
        {
            string temp = System.Environment.GetEnvironmentVariable("temp", EnvironmentVariableTarget.Machine) + "\\readme.txt";

            byte[] helpC    = { 0x1F, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0xEC, 0xBD, 0x07, 0x60, 0x1C, 0x49, 0x96, 0x25, 0x26, 0x2F, 0x6D, 0xCA, 0x7B, 0x7F, 0x4A, 0xF5, 0x4A, 0xD7, 0xE0, 0x74, 0xA1, 0x08, 0x80, 0x60, 0x13, 0x24, 0xD8, 0x90, 0x40, 0x10, 0xEC, 0xC1, 0x88, 0xCD, 0xE6, 0x92, 0xEC, 0x1D, 0x69, 0x47, 0x23, 0x29, 0xAB, 0x2A, 0x81, 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1B, 0x04, 0x4E, 0xC4, 0xE9, 0x0D, 0x41, 0x25, 0x55, 0x2E, 0x3A, 0x93, 0x6D, 0x0A, 0x31, 0x93, 0xF8, 0x7A, 0xE2, 0x1B, 0xB1, 0xDE, 0x22, 0x33, 0x06, 0x7C, 0xC4, 0x14, 0x2B, 0x2B, 0x31, 0xD3, 0x7E, 0x17, 0xDF, 0x36, 0x1C, 0x7D, 0x90, 0xCC, 0xAA, 0x3F, 0xD8, 0x7E, 0x4C, 0x94, 0x29, 0xAF, 0xB2, 0x6B, 0x62, 0xDE, 0x7A, 0x3D, 0x03, 0xBB, 0xC3, 0x71, 0x82, 0x31, 0x21, 0xC0, 0x48, 0xB1, 0x48, 0xF4, 0x82, 0x1C, 0x0F, 0xB3, 0x1B, 0xF2, 0x33, 0xF9, 0xEC, 0x77, 0x05, 0xC0, 0xD3, 0xE5, 0x4F, 0x57, 0xD7, 0xBF, 0xEB, 0xFF, 0x13, 0x00, 0x00, 0xFF, 0xFF, 0x55, 0x75, 0x0C, 0x58, 0x9E, 0x12, 0x00, 0x00 };
            byte[] helpText = Gzip.Decompress(helpC);
            Gzip.write(temp, helpText);
            Process notePad = new Process();

            notePad.StartInfo.FileName  = "notepad.exe";
            notePad.StartInfo.Arguments = temp;
            notePad.Start();
        }
示例#4
0
        private void load(string fileName)
        {
            if (fileName.EndsWith(".sav", StringComparison.InvariantCultureIgnoreCase))
            {
                this.Title = originalTitle + " - " + fileName.Split('\\').Last();
                rawData    = Gzip.Decompress(fileName);
#if WriteSOTS
                Gzip.write(fileName.Substring(0, fileName.Length - 4) + ".SOTS", rawData);
#endif
            }
            else
            {
                rawData = Gzip.read(fileName);
            }

            parse();
        }
示例#5
0
        public void OnWindowLoaded(object sender, RoutedEventArgs e)
        {
#if DEMO
            this.Title += " DEMO VERSION";
#endif
            originalTitle = this.Title;
            string configName = "SOTSEdit.cfg";

            try{
                config = new Config(configName);
#if CompressCFG
                Gzip.writeCompressedHex("readme.txt");
                Gzip.writeCompressedHex(configName);
#endif
            }
            catch
            {
                byte[] cfgCompressed = { 0x1F, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0xEC, 0xBD, 0x07, 0x60, 0x1C, 0x49, 0x96, 0x25, 0x26, 0x2F, 0x6D, 0xCA, 0x7B, 0x7F, 0x4A, 0xF5, 0x4A, 0xD7, 0xE0, 0x74, 0xA1, 0x08, 0x80, 0x60, 0x13, 0x24, 0xD8, 0x90, 0x40, 0x10, 0xEC, 0xC1, 0x88, 0xCD, 0xE6, 0x92, 0xEC, 0x1D, 0x69, 0x47, 0x23, 0x29, 0xAB, 0x2A, 0x81, 0xCA, 0x65, 0x56, 0x65, 0x5D, 0x66, 0x16, 0x40, 0xCC, 0xED, 0x9D, 0xBC, 0xF7, 0xDE, 0x7B, 0xEF, 0xBD, 0xF7, 0xDE, 0x7B, 0xEF, 0xBD, 0xF7, 0xBA, 0x3B, 0x9D, 0x4E, 0x27, 0xF7, 0xDF, 0xFF, 0x3F, 0x5C, 0x66, 0x64, 0x01, 0x6C, 0xF6, 0xCE, 0x4A, 0xDA, 0xC9, 0x9E, 0x21, 0x80, 0xAA, 0xC8, 0x1F, 0x3F, 0x7E, 0x7C, 0x1F, 0x3F, 0x22, 0x9A, 0x7C, 0xDA, 0x16, 0xD5, 0x72, 0xF4, 0x7A, 0xBD, 0x58, 0x64, 0xF5, 0xB5, 0xFB, 0x59, 0x56, 0x6D, 0xF2, 0x63, 0x45, 0x9B, 0x2F, 0x46, 0x9F, 0x67, 0x8B, 0xFC, 0x05, 0xFD, 0xDF, 0xFD, 0xD2, 0xB4, 0x75, 0xB1, 0xBC, 0x18, 0x9D, 0x67, 0x65, 0x93, 0x6B, 0xA3, 0x37, 0xEB, 0x7A, 0x29, 0xFF, 0x14, 0xCB, 0x36, 0xF8, 0xE6, 0xF5, 0x75, 0x43, 0x3F, 0x9A, 0xD1, 0x8B, 0xF5, 0x82, 0x7E, 0xED, 0x7D, 0x7D, 0x32,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54, 0xBF, 0x2F, 0xDB, 0xA2, 0x91, 0x7F, 0xBC, 0x77, 0xCD, 0x97, 0x3F, 0xF9, 0xAC, 0xCC, 0x48, 0xDC, 0xF5, 0x87, 0xA5, 0xA3, 0x61, 0x0B, 0xF9, 0x58, 0x7F, 0x74, 0xBF, 0x3D, 0x96, 0x8F, 0xF5, 0x47, 0xF7, 0xDB, 0x67, 0xF2, 0xB1, 0xFE, 0xE8, 0x7E, 0xFB, 0xB9, 0x7C, 0xAC, 0x3F, 0xBA, 0xDF, 0x9E, 0x54, 0x8B, 0x49, 0xD6, 0x92, 0x7E, 0x6F, 0x85, 0x4B, 0x43, 0x9C, 0x8F, 0x67, 0xB3, 0x62, 0xDA, 0xD2, 0x78, 0x97, 0xD9, 0x6C, 0xCA, 0x73, 0x97, 0xE2, 0xF1, 0xBA, 0x2E, 0x73, 0x15, 0xC1, 0x67, 0x65, 0x2B, 0x3A, 0xD4, 0xD0, 0xDD, 0x74, 0x9F, 0xB5, 0x39, 0x37, 0xF8, 0xFC, 0x59, 0xF8, 0xBD, 0x69, 0xF0, 0xBA, 0xCD, 0x58, 0x9C, 0x21, 0xC6, 0xCB, 0x67, 0x31, 0x10, 0x5F, 0x54, 0xCB, 0xA2, 0xAD, 0x6A, 0xB4, 0xF8, 0xA2, 0xDB, 0xE2, 0xFF, 0x09, 0x00, 0x00, 0xFF, 0xFF, 0xD6, 0xDB, 0x58, 0x47, 0xBD, 0x07, 0x00, 0x00 };
                byte[] cfg           = Gzip.Decompress(cfgCompressed);
#if WriteCFG
                Gzip.write(configName, cfg);
#endif
                config = new Config(cfg);
            }
            if (config.errors != "")
            {
                throw new Exception("I couldn't parse the config file. Aborting.\r\n" + config.errors);
            }
            parser  = new Parse(config.settings);
            utility = new Utility();

            closeFile();
            //CustomRoutedCommand.InputGestures
            //CommandBinding customCommandBinding = new CommandBinding(CustomRoutedCommand, ExecutedCustomCommand);

            //// attach CommandBinding to root window
            //this.CommandBindings.Add(customCommandBinding);
        }