private void btnSECRET_Click(object sender, EventArgs e)
 {
     /* SAVE SETTINGS PROCEDURE */
     Xml Memorizza = new Xml();
     Memorizza.SetValue("Option Group", "Purge Check", this.checkPURGE.CheckState);
     Memorizza.SetValue("Option Group", "Multiple Check", this.checkMULTIPLE.CheckState);
     Memorizza.SetValue("Option Group", "Voice Check", this.checkNOVOICE.CheckState);
     Memorizza.SetValue("Option Group", "Main Grid", this.radioMAIN.Checked);
     Memorizza.SetValue("Option Group", "Beta Grid", this.radioBETA.Checked);
     Memorizza.SetValue("Option Group", "SL Viewer", this.radioSLVIEWER.Checked);
     Memorizza.SetValue("Option Group", "PHOENIX Viewer", this.radioFIRESTORM.Checked);
     Memorizza.SetValue("Option Group", "CPU 32bit", this.radio32bit.Checked);
     Memorizza.SetValue("Option Group", "CPU 64bit", this.radio64bit.Checked);
     /* */
     Memorizza.SetValue("Client Path", "Phoenix Viewer 32bit", @"C:\Program Files\Firestorm-Releasex64\Firestorm-bin.exe");
     Memorizza.SetValue("Client Path", "Phoenix Viewer 64bit", @"C:\Program Files\Firestorm-Releasex64\Firestorm-bin.exe");
     Memorizza.SetValue("Client Path", "SL Viewer 32bit", @"C:\Program Files (x86)\SecondLifeViewer\SecondLifeViewer.exe");
     Memorizza.SetValue("Client Path", "SL Viewer 64bit", @"C:\Program Files (x86)\SecondLifeViewer\SecondLifeViewer.exe");
     /* */
     Memorizza.SetValue("Odin", "Thor", "Procedura Creata con Secret Button");
     /* */
     /* /. SAVE SETTINGS PROCEDURE */
     Timer t = new Timer();
     t.Interval = 5000;
     timer1.Enabled = true;
     timer1.Tick += new System.EventHandler(OnTimerEvent);
 }
Exemple #2
0
        void IConfigReader.CreateDefaultConfig()
        {
            if (System.IO.File.Exists(TnSystemFileName.PARAMS))
            {
                return;
            }
            Xml xml;
            xml = new Xml(TnSystemFileName.PARAMS);
            string year = DateTime.Today.Year.ToString();
            using (xml.Buffer(true))
            {
                xml.RootName = "params";
                xml.SetValue(year, TnConfig.Param.ChoPhepApGia, 1);
                //--pnndt--
                xml.SetValue(year, TnConfig.Param.K2MatTien, 1.2);
                xml.SetValue(year, TnConfig.Param.K3MatTien, 1.3);
                xml.SetValue(year, TnConfig.Param.K4MatTien, 1.4);
                xml.SetValue(year, TnConfig.Param.GToiThieuDoThiLoai4, 100000);
                xml.SetValue(year, TnConfig.Param.GToiThieuDoThiLoai5, 80000);
                xml.SetValue(year, TnConfig.Param.PDatSau50mMatTien, 0.3);
                xml.SetValue(year, TnConfig.Param.PHemChinhRongDuoi3_5m, 0.2);
                xml.SetValue(year, TnConfig.Param.PHemChinhRongTren3_5m, 0.3);
                xml.SetValue(year, TnConfig.Param.PHemChinhRongTren6m, 0.4);
                xml.SetValue(year, TnConfig.Param.PHemPhuRongDuoi3_5m, 0.4);
                xml.SetValue(year, TnConfig.Param.PHemPhuRongTren3_5m, 0.6);
                xml.SetValue(year, TnConfig.Param.PHemPhuRongTren6m, 0.7);
                xml.SetValue(year, TnConfig.Param.PHemSauDuoi100m, 1);
                xml.SetValue(year, TnConfig.Param.PHemSauDuoi200m, 0.8);
                xml.SetValue(year, TnConfig.Param.PHemSauTren200m, 0.6);
                xml.SetValue(year, TnConfig.Param.DKhoangCach50mMatTien, 50);
                xml.SetValue(year, TnConfig.Param.DBufferMathem, 1);
                xml.SetValue(year, TnConfig.Param.DBufferMattien, 1);

                //--pnnnt--
                xml.SetValue(year, TnConfig.Param.PPnnNtDuoi100m, 1);
                xml.SetValue(year, TnConfig.Param.PPnnNtTren100m, 0.5);
                xml.SetValue(year, TnConfig.Param.DVt2Kv1, 1000);
                xml.SetValue(year, TnConfig.Param.DCachRgTmdv_dl_cn_cx_ktck, 500);
                xml.SetValue(year, TnConfig.Param.DCachDmgt_chodm, 500);
                xml.SetValue(year, TnConfig.Param.DBKUbnd_truong_cho_tramyt, 500);
                xml.SetValue(year, TnConfig.Param.BTinhThuaDoiDien, 1);
                xml.SetValue(year, TnConfig.Param.DBufferMepDuongPnntVt1,1);
                xml.SetValue(year, TnConfig.Param.DBufferMepDuongPnntVt2, 1);
                xml.SetValue(year, TnConfig.Param.DBkTimKdcttKv2, 100);
                xml.SetValue(year, TnConfig.Param.DBkTimKdcttKv3, 100);
                //--nong nghiep
                xml.SetValue(year, TnConfig.Param.DRongDuongVitri1Nn, 9);
                xml.SetValue(year, TnConfig.Param.DRongDuongVitri2Nn, 9);
                xml.SetValue(year, TnConfig.Param.DSauDuongVitri1Nn, 100);
                xml.SetValue(year, TnConfig.Param.DSauDuongVitri2Nn, 100);
                xml.SetValue(year, TnConfig.Param.DSauDuongVitri2Nn2, 200);
                xml.SetValue(year, TnConfig.Param.DBufferMepDuongNnVt1, 1);
                xml.SetValue(year, TnConfig.Param.DBufferMepDuongNnVt2, 1);

                //--giapranh--
                xml.SetValue(year, TnConfig.Param.DGrDatNn, 300);
                xml.SetValue(year, TnConfig.Param.DGrDatPnnDt, 100);
                xml.SetValue(year, TnConfig.Param.DGrDatPnnNt, 200);
            }
        }
Exemple #3
0
 public vMixPreferences()
 {
     InitializeComponent();
     settings = new Xml (Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\vMixScheduler\\Settings.xml");
     ud_vMixPort.Value = _vMixPort = settings.GetValue("vMixScheduler", "vMixPort", 8088);
     ud_preload.Value = _vMixPreload = settings.GetValue("vMixScheduler", "MediaPreload", 5);
     ud_linger.Value = _vMixLinger = settings.GetValue("vMixScheduler", "MediaLinger", 5);
     cb_autoload.Checked = _vMixAutoLoad = settings.GetValue("vMixScheduler", "AutoLoad", false);
 }
Exemple #4
0
 public ConfigHelper(string path)
 {
     Logger.InfoFormat("Inizializzazione ConfigHelper da {0}", path);
     _cachedValues = new Map();
     var cfg = new Xml(path);
     using (cfg.Buffer()) {
         foreach (string section in cfg.GetSectionNames()) {
             var map = new Map();
             _cachedValues[section] = map;
             foreach (string key in cfg.GetEntryNames(section))
                 map[key] = cfg.GetValue(section, key);
         }
         _cachedValues["ModelloDatabase"] = cfg.GetValue("Settings", "ModelloDatabase", ServerFacade.SqlServer);
         _cachedValues["StringaDiConnessione"] = Crypto.FastDecrypt(cfg.GetValue("Settings", "StringaDiConnessione", Crypto.FastEncrypt("")));
         _cachedValues["MainTimer"] = cfg.GetValue("Settings", "MainTimer", 60);
     }
 }
 private void btnSAVE_Click(object sender, EventArgs e)
 {
     /* SAVE SETTINGS PROCEDURE */
     Xml Memorizza = new Xml();
     Memorizza.SetValue("Option Group", "Purge Check", this.checkPURGE.CheckState);
     Memorizza.SetValue("Option Group", "Multiple Check", this.checkMULTIPLE.CheckState);
     Memorizza.SetValue("Option Group", "Voice Check", this.checkNOVOICE.CheckState);
     Memorizza.SetValue("Option Group", "Main Grid", this.radioMAIN.Checked);
     Memorizza.SetValue("Option Group", "Beta Grid", this.radioBETA.Checked);
     Memorizza.SetValue("Option Group", "SL Viewer", this.radioSLVIEWER.Checked);
     Memorizza.SetValue("Option Group", "PHOENIX Viewer", this.radioFIRESTORM.Checked);
     Memorizza.SetValue("Option Group", "CPU 32bit", this.radio32bit.Checked);
     Memorizza.SetValue("Option Group", "CPU 64bit", this.radio64bit.Checked);
     /* */
     Memorizza.SetValue("Client Path", "Phoenix Viewer 32bit", @"C:\Program Files\Firestorm-Releasex64\Firestorm-bin.exe");
     Memorizza.SetValue("Client Path", "Phoenix Viewer 64bit", @"C:\Program Files\Firestorm-Releasex64\Firestorm-bin.exe");
     Memorizza.SetValue("Client Path", "SL Viewer 32bit", @"C:\Program Files\Firestorm-Releasex64\Firestorm-bin.exe");
     Memorizza.SetValue("Client Path", "SL Viewer 64bit", @"C:\Program Files\Firestorm-Releasex64\Firestorm-bin.exe");
     /* /. SAVE SETTINGS PROCEDURE */
 }
Exemple #6
0
        private List<Sheet> ImportSheet(String filename)
        {
            List<Sheet> sheets = new List<Sheet>();
            Xml ImportFile = new Xml(filename);
            try
            {
                ImportFile.RootName = "notesheet";

                string[] sheetsecs = ImportFile.GetSectionNames();
                String name, content;
                foreach (String sheetname in sheetsecs)
                {
                    name = ImportFile.GetValue(sheetname, "name", "[Noname]");
                    content = ImportFile.GetValue(sheetname, "content", "");
                    sheets.Add(new Sheet(name, content));
                }
            }
            finally
            {
            }
            return sheets;
        }        
Exemple #7
0
        public void Load()
        {
            Xml profile = new Xml(GetSettingsPath());

            string style_xml = profile.GetValue(SECTION, "Style", "MS");

            CodeStyle styleGet = (CodeStyle)Enum.Parse(typeof(CodeStyle), style_xml);
            style = styleGet;
            identUseTab = profile.GetValue(SECTION, "IdentUseTab", true);
            identNumber = profile.GetValue(SECTION, "IdentNumber", 4);
            addSpaceAfterCtrlWord = profile.GetValue(SECTION, "AddSpaceAfterCtrlWord", false);
            autoCompleteBracket = profile.GetValue(SECTION, "AutoCompleteBracket", false);
            try
            {
                removeBlankLine = (BlankLineOption)profile.GetValue(BLACKLINE, "RemoveBlankLine", 1);
            }
            catch (System.Exception e)
            {

            }
            keepBlankLineCount = profile.GetValue(BLACKLINE, "KeepBlankLineCount", 2);
            MaxBlankLine = profile.GetValue(BLACKLINE, "MaxBlankLine", 2);
        }
Exemple #8
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            this.Icon = Icon.ExtractAssociatedIcon(System.Reflection.Assembly.GetEntryAssembly().Location);

            int i;
            SettingsFile = new Xml("gecko.xml");
            SettingsFile.RootName = "gecko";

            gamename = "";
            gecko = new USBGecko();
            gecko.chunkUpdate += transfer;

            exceptionHandling = new ExceptionHandler(this);

            if (!Directory.Exists("DumpHistory"))
                Directory.CreateDirectory("DumpHistory");

            search = new MemSearch(gecko, SearchResults,
                PrvPage, NxtPage, ResList, UpDownSearchResultPage, exceptionHandling);

            viewer = new MemoryViewer(gecko, ValidMemory.ValidAreas[0].low, memViewGrid,
                memViewPAddress, memViewPValue, MemViewFPValue, exceptionHandling);

#if MONO
            disassembler = new Disassembly(gecko, "./vdappc", DisAssBox, DisScroll,
                DisRegion, AsAddress, AsText, exceptionHandling);
#else
            disassembler = new Disassembly(gecko, "vdappc.exe", DisAssBox, DisScroll,
                DisRegion, AsAddress, AsText, exceptionHandling);
#endif

            bpHandler = new Breakpoints(gecko, BPList, this, disassembler, BPDiss, BPClassic, BPCondList, exceptionHandling);
            //bpHandler = new Breakpoints(gecko, BPList, this, disassembler, richTextBox1, BPClassic, BPCondList, exceptionHandling);
            foreach (String reg in BPList.longRegNames)
                BPConditionRegSelect.Items.Add(reg.Trim());
            BPConditionRegSelect.Items.Add("VoA");

            BPConditionRegSelect.SelectedIndex = 0;
            BPConditionCompare.SelectedIndex = 0;

            bpHandler.BPSkip += BPSkipped;

            watcher = new WatchList(gecko, WatchList, WatchIntervalSet, exceptionHandling);
            addWatchDialog = null;
            watchValueInput = null;

            fst = new FST(gecko, FSTTreeView, FSTCodeData, FSTSetAsSource, FSTSetAsTarget,
                FSTGenSwap, FSTFileSource, FSTFileTarget, FSTSwapCode, FSTSwapNow, exceptionHandling);

            GCTCodeContents = new CodeController(GCTCodeList, GCTCodeValues);
            GCTCodeContents.codesModified += GCTModified;

            bpHandler.BPStop += BPStopped;

            for (i = 0; i < ValidMemory.ValidAreas.Length; i++)
            {
                memRange.Items.Add(
                    GlobalFunctions.toHex(ValidMemory.ValidAreas[i].id, 2));
                MemViewARange.Items.Add(
                    GlobalFunctions.toHex(ValidMemory.ValidAreas[i].id, 2));
                ToolsDumpRegions.Items.Add(
                    GlobalFunctions.toHex(ValidMemory.ValidAreas[i].id, 2));
            }

            codeWizard = new GCTWizard(GCTCodeContents);

            memRange.SelectedIndex = 0;
            MemViewARange.SelectedIndex = 0;
            MemViewShowMode.SelectedIndex = 0;
            MemViewSearchType.SelectedIndex = 0;
            ToolsDumpRegions.SelectedIndex = 0;

            comboBoxSearchDataType.SelectedIndex = 2;

            //UpperEnable.SelectedIndex = 0;


            //BPType.SelectedIndex = 0;
            comboBoxDisplayType.SelectedIndex = 0;

            WasAlreadyDisabled = new List<Control>();
            searchComparisons = new List<SearchComparisonInfo>();
            searchComparisons.Add(new SearchComparisonInfo());
            comboBoxComparisonType.SelectedIndex = 0;
            comboBoxComparisonRHS.SelectedIndex = 0;
            buttonCancelSearch.Enabled = false;
            SteppingOut = false;
            buttonUndoSearch.Enabled = search.CanUndo();

            TabLock = null;
            BPStepLogWriter = null;

            comboBoxPokeOperation.SelectedIndex = 0;

            SetComboboxValue("Screenshots", "Format", 0, ImgFormat);
            SetComboboxValue("Screenshots", "Sizing", 0, ShotSizingType);

            int value = SettingsFile.GetValue("Screenshots", "JPEGQuality", 85);
            if (value < 0 || value > 100)
                value = 85;
            JPGQual.Value = value;

            multiPokeAddr = new List<UInt32>();

            FormStop(false);
            CUSBGecko.Enabled = true;

            codesModified = false;

            AbtText.Text = "gecko dotNET Beta 0.63 by Link and dcx2\n\n"
                          + "Special thanks to:\n\n"
                          + "kenobi: for original WiiRd GUI!\n"
                          + "Nuke: for the USB Gecko!\n"
                          + "brkirch: for continuing Gecko OS!\n"
                          + "Y.S.: for the original code handler!\n"
                          + "Team Twiizers for bringing homebrew to the Wii\n"
                          + "DevKitPro team: No homebrew without them!\n"
                          + "Frank Wille: vdappc developer!\n"
                          + "various beta testers!\n"
                          + "and you!";

            notes = new NoteSheets();

            //Set MEM2 upper to 93400000
            MEM2UpperBoundary.SelectedIndex = 0;

            // Restore previous settings
            checkBoxAlwaysOnTop.Checked = GeckoApp.Properties.Settings.Default.AlwaysOnTop;
            numericUpDownFPS.Value = GeckoApp.Properties.Settings.Default.FPS;
            BPAddress.Text = GeckoApp.Properties.Settings.Default.BPAddr;
            memViewAValue.Text = GeckoApp.Properties.Settings.Default.MemViewAddr;
            BPType.SelectedIndex = GeckoApp.Properties.Settings.Default.BPType;
            checkBoxBPNext.Checked = GeckoApp.Properties.Settings.Default.BPNext;
            checkBoxPauseCodes.Checked = GeckoApp.Properties.Settings.Default.PauseCodes;
            Size = GeckoApp.Properties.Settings.Default.LastSize;
            int oldSplitter = GeckoApp.Properties.Settings.Default.LastSplitterSize;
            // The splitter gets moved when the breakpoint page is entered
            // so artificially force it to move
            MainControl.SelectedTab = BreakpointPage;
            MainControl.SelectedTab = searchPage;
            splitContainerRegASM.SplitterDistance = oldSplitter;
            toolStripTextBoxMemViewFontSize.Text = GeckoApp.Properties.Settings.Default.MemViewFontSize.ToString();
            toolStripTextBoxMemViewFontSize_KeyDown(null, new KeyEventArgs(Keys.Enter));
            viewFloatsInHexToolStripMenuItem.Checked = GeckoApp.Properties.Settings.Default.ViewFloatsInHex;
            //addressTextBox1.CopyStringToHistory(GeckoApp.Properties.Settings.Default.addressHistory);
            //addressTextBox1.AutoHistory = true;

        }
 private PropertyManager()
 {
     configFile = new Xml();
 }
Exemple #10
0
 void IUserInfo.SetInfo(string fileName)
 {
     string pass4File = "";
     using (IEncrypt encrypt = new TnEncrypt())
     {
         string _key = "tn";
         pass4File = encrypt.Encrypt(this._pass, _key, true);
     }
     Xml sdeUserInfo = new Xml(TnSystemFileName.UserInfoFile);
     using (sdeUserInfo.Buffer(true))
     {
         sdeUserInfo.SetValue(TnConfig.Sde.Name, TnConfig.Sde.Server, this._server);
         sdeUserInfo.SetValue(TnConfig.Sde.Name, TnConfig.Sde.User, this._user);
         sdeUserInfo.SetValue(TnConfig.Sde.Name, TnConfig.Sde.Pass, pass4File);
         sdeUserInfo.SetValue(TnConfig.Sde.Name, TnConfig.Sde.Instance, this._instance);
         sdeUserInfo.SetValue(TnConfig.Sde.Name, TnConfig.Sde.Database, this._db);
         sdeUserInfo.SetValue(TnConfig.Sde.Name, TnConfig.Sde.Version, this._version);
         sdeUserInfo.SetValue(TnConfig.Sde.Name, TnConfig.Sde.ServiceName, this._sde_service);
         sdeUserInfo.SetValue(TnConfig.Sde.Name, TnConfig.Sde.SavePass, this._savePass);
     }
 }
Exemple #11
0
 private void SaveProfile()
 {
     // Save user profile information such as window position, selected units, etc
     Xml profile = new Xml();
     profile.Name = "scaleview-settings.xml";
     profile.SetValue("Program", "Version", Application.ProductVersion);
     profile.SetValue("MainWindow", "Left", this.Left);
     profile.SetValue("MainWindow", "Top", this.Top);
     profile.SetValue("Unit", "lb\\oz", radioLboz.Checked);
     profile.SetValue("Unit", "ounces", radioOunces.Checked);
     profile.SetValue("Unit", "grams", radioGrams.Checked);
     profile.SetValue("Settings", "AutoCopy", chkAutoCopy.Checked);
     profile.SetValue("Settings", "RoundOz", chkRoundOz.Checked);
     profile.SetValue("Settings", "CopyUnit", chkCopyUnit.Checked);
 }
Exemple #12
0
 private void LoadProfile()
 {
     // Load user profile information such as window position, selected units, etc
         Xml profile = new Xml();
         profile.Name = "scaleview-settings.xml";
         if (profile.HasSection("MainWindow"))
         {
             this.Left = Convert.ToInt16(profile.GetValue("MainWindow", "Left"));
             this.Top = Convert.ToInt16(profile.GetValue("MainWindow", "Top"));
             radioGrams.Checked = Convert.ToBoolean(profile.GetValue("Unit", "grams"));
             radioLboz.Checked = Convert.ToBoolean(profile.GetValue("Unit", "lb\\oz"));
             radioOunces.Checked = Convert.ToBoolean(profile.GetValue("Unit", "ounces"));
             chkAutoCopy.Checked = Convert.ToBoolean(profile.GetValue("Settings", "AutoCopy"));
             chkCopyUnit.Checked = Convert.ToBoolean(profile.GetValue("Settings", "CopyUnit"));
             chkRoundOz.Checked = Convert.ToBoolean(profile.GetValue("Settings", "RoundOz"));
         }
         else
         {
             this.StartPosition = FormStartPosition.WindowsDefaultLocation;
             radioGrams.Checked = false;
             radioLboz.Checked = true;
             radioOunces.Checked = false;
             chkAutoCopy.Checked = false;
             chkCopyUnit.Checked = true;
             chkRoundOz.Checked = false;
         }
 }
Exemple #13
0
        private void Form1_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'login_characters_DataSet._00_Characters_Name_Pass' table. You can move, or remove it, as needed.
            this._00_Characters_Name_PassTableAdapter.Fill(this.login_characters_DataSet._00_Characters_Name_Pass);
            // TODO: This line of code loads data into the 'environmentsDS._01_Environment' table. You can move, or remove it, as needed.
            this._01_EnvironmentTableAdapter.Fill(this.environmentsDS._01_Environment);
            /* */
            /* */
            /* */
            Xml LeggiXml = new Xml();
            VariabiliGlobali.Globals.SLviewerPath64 = LeggiXml.GetValue("Client Path", "SL Viewer 64bit").ToString();
            VariabiliGlobali.Globals.SLviewerPath32 = LeggiXml.GetValue("Client Path", "SL Viewer 32bit").ToString();
            VariabiliGlobali.Globals.PhoenixViewerPath64 = LeggiXml.GetValue("Client Path", "Phoenix Viewer 64bit").ToString();
            VariabiliGlobali.Globals.PhoenixViewerPath32 = LeggiXml.GetValue("Client Path", "Phoenix Viewer 32bit").ToString();
            //VariabiliGlobali.Globals.StartStringFullPhoenix64 = LeggiXml.GetValue("Starter String", "64bit").ToString();

            string StatoPURGE = LeggiXml.GetValue("Option Group", "Purge Check").ToString();
            string StatoNOVOICE = LeggiXml.GetValue("Option Group", "Voice Check").ToString();
            string StatoMULTIPLE = LeggiXml.GetValue("Option Group", "Multiple Check").ToString();

            string StatoMAINGRID = LeggiXml.GetValue("Option Group", "Main Grid").ToString();
            string StatoBETAGRID = LeggiXml.GetValue("Option Group", "Beta Grid").ToString();
            string StatoSLVIEWER = LeggiXml.GetValue("Option Group", "SL Viewer").ToString();
            string StatoPHOENIXVIEWER = LeggiXml.GetValue("Option Group", "PHOENIX Viewer").ToString();
            string StatoCPU32BIT = LeggiXml.GetValue("Option Group", "CPU 32bit").ToString();
            string StatoCPU64BIT = LeggiXml.GetValue("Option Group", "CPU 64bit").ToString();
            /* */
            if (StatoPURGE == "Checked") { this.checkPURGE.Checked = true; } else if (StatoPURGE == "Unchecked") { this.checkPURGE.Checked = false; }
            /* */
            if (StatoMULTIPLE == "Checked") { this.checkMULTIPLE.Checked = true; } else if (StatoMULTIPLE == "Unchecked") { this.checkMULTIPLE.Checked = false; }
            /* */
            if (StatoNOVOICE == "Checked") { this.checkNOVOICE.Checked = true; } else if (StatoNOVOICE == "Unchecked") { this.checkNOVOICE.Checked = false; }
            /* */
            if (StatoMAINGRID == "True") { this.radioMAIN.Checked = true; } else if (StatoMAINGRID == "False") { this.radioMAIN.Checked = false; }
            /* */
            if (StatoBETAGRID == "True") { this.radioBETA.Checked = true; } else if (StatoBETAGRID == "False") { this.radioBETA.Checked = false; }
            /* */
            if (StatoSLVIEWER == "True") { this.radioSLVIEWER.Checked = true; } else if (StatoSLVIEWER == "False") { this.radioSLVIEWER.Checked = false; }
            /* */
            if (StatoPHOENIXVIEWER == "True") { this.radioFIRESTORM.Checked = true; } else if (StatoPHOENIXVIEWER == "False") { this.radioFIRESTORM.Checked = false; }
            /* */
            if (StatoCPU32BIT == "True") { this.radio32bit.Checked = true; } else if (StatoCPU32BIT == "False") { this.radio32bit.Checked = false; }
            /* */
            if (StatoCPU64BIT == "True") { this.radio64bit.Checked = true; } else if (StatoCPU64BIT == "False") { this.radio64bit.Checked = false; }
            /* */
            this.Text = "SL Multi PG Starter";
            label1.Text = this.Text + " Mk II ~|.:.|~ ver. " + Application.ProductVersion;
            notifyIcon1.ShowBalloonTip(1000, label1.Text, "Ma che culo...",ToolTipIcon.Info);
            notifyIcon1.Text = label1.Text;
        }
Exemple #14
0
        public void Save()
        {
            Xml profile = new Xml(GetSettingsPath());
            profile.SetValue(SECTION, "Style", style.ToString());
            profile.SetValue(SECTION, "IdentUseTab", identUseTab);
            profile.SetValue(SECTION, "IdentNumber", identNumber);
            profile.SetValue(SECTION, "AddSpaceAfterCtrlWord", addSpaceAfterCtrlWord);
            profile.SetValue(SECTION, "AutoCompleteBracket", autoCompleteBracket);

            profile.SetValue(BLACKLINE, "RemoveBlankLine", (int)removeBlankLine);
            profile.SetValue(BLACKLINE, "KeepBlankLineCount", (int)KeepBlankLineCount);
            profile.SetValue(BLACKLINE, "MaxBlankLine", (int)MaxBlankLine);
        }
Exemple #15
0
 private string LoadLastAgent()
 {
     string name = "";
     Xml config = new Xml();
     name = (String)config.GetValue("CharacterParams", "LastCharacter");
     return name;
 }
Exemple #16
0
        void IUserInfo.GetInfo(string fileName)
        {
            //ITnUtilitiesFile fileUtil = new UtilitiesBox();
            Xml userProfile;
            userProfile = new Xml(fileName);

            this._server = (String)userProfile.GetValue(TnConfig.Sde.Name, TnConfig.Sde.Server, "server");
            this._user = (String)userProfile.GetValue(TnConfig.Sde.Name, TnConfig.Sde.User,"username");
            this._pass = (String)userProfile.GetValue(TnConfig.Sde.Name, TnConfig.Sde.Pass,"pass");
            this._db = (String)userProfile.GetValue(TnConfig.Sde.Name, TnConfig.Sde.Database,"database");
            this._instance = (String)userProfile.GetValue(TnConfig.Sde.Name, TnConfig.Sde.Instance,"instance");
            this._version = (String)userProfile.GetValue(TnConfig.Sde.Name, TnConfig.Sde.Version,"sde.DEFAULT");
            this._sde_service = (String)userProfile.GetValue(TnConfig.Sde.Name, TnConfig.Sde.ServiceName,"sde");
            this._savePass = (String)userProfile.GetValue(TnConfig.Sde.Name, TnConfig.Sde.SavePass,"false");
            //TnConnectionInfo.CallMe.SetUserInfo(server, user, pass, db, instance, version);
        }
Exemple #17
0
 private void SetLastAgent(string characterName)
 {
     Xml config = new Xml();
     config.SetValue("CharacterParams", "LastCharacter", characterName);
 }
Exemple #18
0
 /// <summary>
 ///   Initializes a new instance of the Xml class based on another Xml object. </summary>
 /// <param name="xml">
 ///   The Xml object whose properties and events are used to initialize the object being constructed. </param>
 public Xml(Xml xml)
     : base(xml)
 {
     m_rootName = xml.m_rootName;
 }
Exemple #19
0
        public bool LoadFromFile(String fileName,bool merge)
        {
            if (!File.Exists(fileName))
                return false;

            Xml watchList = new Xml(fileName);
            watchList.RootName = "watchlist";
            String[] sections = watchList.GetSectionNames();

            if (sections.Length == 0)
                return false;

            if(!merge)
                Clear();

            Array.Sort(sections);
            String sectionName, name, addressString;
            int sizeInt;
            WatchDataSize dataSize;
            UInt32[] address;

            for (int i = 0; i < sections.Length; i++)
            {
                sectionName = sections[i];
                if(!watchList.HasEntry(sections[i],"name"))
                    continue;
                if(!watchList.HasEntry(sections[i],"address"))
                    continue;

                name = watchList.GetValue(sections[i], "name", "Name");
                addressString = watchList.GetValue(sections[i], "address", "80000000");
                if (!TryStrToAddressList(addressString, out address))
                    continue;

                sizeInt = watchList.GetValue(sections[i], "size", 2);
                switch (sizeInt)
                {
                    case 0:
                        dataSize = WatchDataSize.Bit8;
                        break;
                    case 1:
                        dataSize = WatchDataSize.Bit16;
                        break;
                    case 3:
                        dataSize = WatchDataSize.SingleFp;
                        break;
                    default:
                        dataSize = WatchDataSize.Bit32;
                        break;
                }

                AddWatch(name, address, dataSize);
            }

            return true;
        }
Exemple #20
0
        void IConfigReader.WriteOut(string fileName,string nam)
        {
            Xml xml;
            xml = new Xml(TnSystemFileName.PARAMS);
            string year = nam;//DateTime.Today.Year.ToString();
            using (xml.Buffer(true))
            {
                xml.RootName = "params";
                xml.SetValue(year, TnConfig.Param.ChoPhepApGia, _config.ChoPhepApGia);
                //--pnndt--
                xml.SetValue(year, TnConfig.Param.K2MatTien, _config.K2MatTien);
                xml.SetValue(year, TnConfig.Param.K3MatTien, _config.K3MatTien);
                xml.SetValue(year, TnConfig.Param.K4MatTien, _config.K4MatTien);
                xml.SetValue(year, TnConfig.Param.GToiThieuDoThiLoai4, _config.GToiThieuDoThiLoai4);
                xml.SetValue(year, TnConfig.Param.GToiThieuDoThiLoai5, _config.GToiThieuDoThiLoai5);
                xml.SetValue(year, TnConfig.Param.PDatSau50mMatTien, _config.PDatSau50mMatTien);
                xml.SetValue(year, TnConfig.Param.PHemChinhRongDuoi3_5m, _config.PHemChinhRongDuoi3_5m);
                xml.SetValue(year, TnConfig.Param.PHemChinhRongTren3_5m, _config.PHemChinhRongTren3_5m);
                xml.SetValue(year, TnConfig.Param.PHemChinhRongTren6m, _config.PHemChinhRongTren6m);
                xml.SetValue(year, TnConfig.Param.PHemPhuRongDuoi3_5m, _config.PHemPhuRongDuoi3_5m);
                xml.SetValue(year, TnConfig.Param.PHemPhuRongTren3_5m, _config.PHemPhuRongTren3_5m);
                xml.SetValue(year, TnConfig.Param.PHemPhuRongTren6m, _config.PHemPhuRongTren6m);
                xml.SetValue(year, TnConfig.Param.PHemSauDuoi100m, _config.PHemSauDuoi100m);
                xml.SetValue(year, TnConfig.Param.PHemSauDuoi200m, _config.PHemSauDuoi200m);
                xml.SetValue(year, TnConfig.Param.PHemSauTren200m, _config.PHemSauTren200m);
                xml.SetValue(year, TnConfig.Param.DKhoangCach50mMatTien, _config.DKhoangCach50mMatTien);
                xml.SetValue(year, TnConfig.Param.DBufferMathem, _config.DBufferMathem);
                xml.SetValue(year, TnConfig.Param.DBufferMattien, _config.DBufferMattien);
                //--pnnnt--
                xml.SetValue(year, TnConfig.Param.PPnnNtDuoi100m, _config.PPnnNtDuoi100m);
                xml.SetValue(year, TnConfig.Param.PPnnNtTren100m, _config.PPnnNtTren100m);
                xml.SetValue(year, TnConfig.Param.DVt2Kv1, _config.DVt2Kv1);
                xml.SetValue(year, TnConfig.Param.DCachRgTmdv_dl_cn_cx_ktck, _config.DCachRgTmdv_dl_cn_cx_ktck);
                xml.SetValue(year, TnConfig.Param.DCachDmgt_chodm, _config.DCachDmgt_chodm);
                xml.SetValue(year, TnConfig.Param.DBKUbnd_truong_cho_tramyt, _config.DBKUbnd_truong_cho_tramyt);
                xml.SetValue(year, TnConfig.Param.BTinhThuaDoiDien, _config.BTinhThuaDoiDien);
                xml.SetValue(year, TnConfig.Param.DBufferMepDuongPnntVt1, _config.DBufferMepDuongPnntVt1);
                xml.SetValue(year, TnConfig.Param.DBufferMepDuongPnntVt2, _config.DBufferMepDuongPnntVt2);
                xml.SetValue(year, TnConfig.Param.DBkTimKdcttKv2, _config.DBkTimKdcttKv2);
                xml.SetValue(year, TnConfig.Param.DBkTimKdcttKv3, _config.DBkTimKdcttKv3);
                //--nong nghiep
                xml.SetValue(year, TnConfig.Param.DRongDuongVitri1Nn, _config.DRongDuongVitri1Nn);
                xml.SetValue(year, TnConfig.Param.DRongDuongVitri2Nn, _config.DRongDuongVitri2NnMax);
                xml.SetValue(year, TnConfig.Param.DSauDuongVitri1Nn, _config.DSauDuongVitri1Nn);
                xml.SetValue(year, TnConfig.Param.DSauDuongVitri2Nn, _config.DSauDuongVitri2Nn);
                xml.SetValue(year, TnConfig.Param.DSauDuongVitri2Nn2, _config.DSauDuongVitri2Nn2);
                xml.SetValue(year, TnConfig.Param.DBufferMepDuongNnVt1, _config.DBufferMepDuongNnVt1);
                xml.SetValue(year, TnConfig.Param.DBufferMepDuongNnVt2, _config.DBufferMepDuongNnVt2);

                //--giapranh--
                xml.SetValue(year, TnConfig.Param.DGrDatNn, _config.DGrDatNn);
                xml.SetValue(year, TnConfig.Param.DGrDatPnnDt, _config.DGrDatPnnDt);
                xml.SetValue(year, TnConfig.Param.DGrDatPnnNt, _config.DGrDatPnnNt);
            }
            //MessageBox.Show()
        }
Exemple #21
0
        public void SaveToFile(String fileName)
        {
            if (File.Exists(fileName))
                File.Delete(fileName);

            Xml watchList = new Xml(fileName);
            watchList.RootName = "watchlist";

            WatchEntry current;
            String section;
            for (int i = 0; i < addressWatchList.Count; i++)
            {
                current = addressWatchList[i];
                section = "watch" + String.Format("{0:000}", i);
                watchList.SetValue(section, "name", current.name);
                watchList.SetValue(section, "address", 
                    addressToString(current.address));
                switch (current.dataSize)
                {
                    case WatchDataSize.Bit8:
                        watchList.SetValue(section, "size", 0);
                        break;
                    case WatchDataSize.Bit16:
                        watchList.SetValue(section, "size", 1);
                        break;
                    case WatchDataSize.SingleFp:
                        watchList.SetValue(section, "size", 3);
                        break;
                    default:
                        watchList.SetValue(section, "size", 2);
                        break;
                }                
            }
        }
Exemple #22
0
        void IConfigReader.Read(string fileName,string nam)
        {
            //SdeConnection conn = new SdeConnection();
            //ISdeConnectionInfo sdeConn = conn as ISdeConnectionInfo;
            //if (sdeConn == null || sdeConn.Workspace==null)
            //{
            //    return;
            //}
            //IFeatureWorkspace fw = (IFeatureWorkspace)sdeConn.Workspace;
            //ITnTableName _tblName = new TnTableName(sdeConn.Workspace);
            //string paramTableName = DataNameTemplate.Thong_So + "_" + nam;
            //ITable paramTable = fw.OpenTable(paramTableName);
            //IQueryFilter q = new QueryFilterClass();
            //q.WhereClause = "";
            //ICursor parCursor = paramTable.Search(q, false);
            //IRow parRow = null;
            //try
            //{
            //    while ((parRow = parCursor.NextRow()) != null)
            //    {
            //        string parName = parRow.get_Value(parRow.Fields.FindField(_tblName.THONG_SO.TEN_THONG_SO)).ToString();
            //        object parVal = parRow.get_Value(parRow.Fields.FindField(_tblName.THONG_SO.GIA_TRI));
            //        _config.SetValue(parName, parVal);
            //    }
            //}
            //catch (Exception) { }
            //finally
            //{
            //    Marshal.ReleaseComObject(parCursor);
            //}

            Xml fileConfig = new Xml(fileName);
            string year = nam;//DateTime.Today.Year.ToString();
            this._config.NamApDung = year;
            using (fileConfig.Buffer(true))
            {
                this._config.ChoPhepApGia = fileConfig.GetValue(year, TnConfig.Param.ChoPhepApGia, 0);
                this._config.BTinhThuaDoiDien = fileConfig.GetValue(year, TnConfig.Param.BTinhThuaDoiDien, 1);
                this._config.DBKUbnd_truong_cho_tramyt = fileConfig.GetValue(year, TnConfig.Param.DBKUbnd_truong_cho_tramyt, 0);
                this._config.DCachDmgt_chodm = fileConfig.GetValue(year, TnConfig.Param.DCachDmgt_chodm, 0.1);
                this._config.DCachRgTmdv_dl_cn_cx_ktck = fileConfig.GetValue(year, TnConfig.Param.DCachRgTmdv_dl_cn_cx_ktck, 0.1);
                this._config.DGrDatNn = fileConfig.GetValue(year, TnConfig.Param.DGrDatNn, 0.1);
                this._config.DGrDatPnnDt = fileConfig.GetValue(year, TnConfig.Param.DGrDatPnnDt, 0.1);
                this._config.DGrDatPnnNt = fileConfig.GetValue(year, TnConfig.Param.DGrDatPnnNt, 0.1);
                this._config.DKhoangCach50mMatTien = fileConfig.GetValue(year, TnConfig.Param.DKhoangCach50mMatTien, 0.1);
                this._config.DRongDuongVitri1Nn = fileConfig.GetValue(year, TnConfig.Param.DRongDuongVitri1Nn, 0.1);
                this._config.DRongDuongVitri2NnMax = fileConfig.GetValue(year, TnConfig.Param.DRongDuongVitri2Nn, 0.1);
                this._config.DSauDuongVitri1Nn = fileConfig.GetValue(year, TnConfig.Param.DSauDuongVitri1Nn, 0.1);
                this._config.DSauDuongVitri2Nn = fileConfig.GetValue(year, TnConfig.Param.DSauDuongVitri2Nn, 0.1);
                this._config.DSauDuongVitri2Nn2 = fileConfig.GetValue(year, TnConfig.Param.DSauDuongVitri2Nn2, 0.1);
                this._config.DVt2Kv1 = fileConfig.GetValue(year, TnConfig.Param.DVt2Kv1, 0);
                this._config.GToiThieuDoThiLoai4 = fileConfig.GetValue(year, TnConfig.Param.GToiThieuDoThiLoai4, 0.1);
                this._config.GToiThieuDoThiLoai5 = fileConfig.GetValue(year, TnConfig.Param.GToiThieuDoThiLoai5, 0.1);
                this._config.K2MatTien = fileConfig.GetValue(year, TnConfig.Param.K2MatTien, 0.1);
                this._config.K3MatTien = fileConfig.GetValue(year, TnConfig.Param.K3MatTien, 0.1);
                this._config.K4MatTien = fileConfig.GetValue(year, TnConfig.Param.K4MatTien, 0.1);

                this._config.PDatSau50mMatTien = fileConfig.GetValue(year, TnConfig.Param.PDatSau50mMatTien, 0.1);
                this._config.PHemChinhRongDuoi3_5m = fileConfig.GetValue(year, TnConfig.Param.PHemChinhRongDuoi3_5m, 0.1);
                this._config.PHemChinhRongTren3_5m = fileConfig.GetValue(year, TnConfig.Param.PHemChinhRongTren3_5m, 0.1);
                this._config.PHemChinhRongTren6m = fileConfig.GetValue(year, TnConfig.Param.PHemChinhRongTren6m, 0.1);
                this._config.PHemPhuRongDuoi3_5m = fileConfig.GetValue(year, TnConfig.Param.PHemPhuRongDuoi3_5m, 0.1);
                this._config.PHemPhuRongTren3_5m = fileConfig.GetValue(year, TnConfig.Param.PHemPhuRongTren3_5m, 0.1);
                this._config.PHemPhuRongTren6m = fileConfig.GetValue(year, TnConfig.Param.PHemPhuRongTren6m, 0.1);
                this._config.PHemSauDuoi100m = fileConfig.GetValue(year, TnConfig.Param.PHemSauDuoi100m, 0.1);
                this._config.PHemSauDuoi200m = fileConfig.GetValue(year, TnConfig.Param.PHemSauDuoi200m, 0.1);
                this._config.PHemSauTren200m = fileConfig.GetValue(year, TnConfig.Param.PHemSauTren200m, 0.1);
                this._config.PPnnNtDuoi100m = fileConfig.GetValue(year, TnConfig.Param.PPnnNtDuoi100m, 0.1);
                this._config.PPnnNtTren100m = fileConfig.GetValue(year, TnConfig.Param.PPnnNtTren100m, 0.1);
            }
            //MessageBox.Show(string.Format("line 64-configreader:{0}",this._config.DGrDatNn));
        }
Exemple #23
0
        private void NoteSheets_FormClosing(object sender, FormClosingEventArgs e)
        {
            char delim = Path.DirectorySeparatorChar;
            String filename = "notes" + delim + gId + ".xml";
            if (File.Exists(filename))
                File.Delete(filename);
            Xml ExportFile = new Xml(filename);
            try
            {
                ExportFile.RootName = "notesheet";

                String secname;
                int pagecount = SheetSelection.TabPages.Count;
                for (int i = 0; i < pagecount; i++)
                {
                    Sheet sheet = (Sheet)SheetSelection.TabPages[i].Tag;
                    secname = "sheet" + (i + 1).ToString();
                    ExportFile.SetValue(secname, "name", sheet.title);
                    ExportFile.SetValue(secname, "content", sheet.content);
                }
            }
            finally
            {
                e.Cancel = true;
                Hide();
            }
        }
Exemple #24
0
 /// <summary>
 ///   Initializes a new instance of the Xml class based on another Xml object. </summary>
 /// <param name="xml">
 ///   The Xml object whose properties and events are used to initialize the object being constructed. </param>
 public Xml(Xml xml) :
     base(xml)
 {
     m_rootName = xml.m_rootName;
 }
Exemple #25
0
 private void getParams()
 {
     ICurrentConfig conf = CurrentConfig.CallMe();
     Xml fileConfig = new Xml(TnSystemFileName.PARAMS);
     string year = "2011";//DateTime.Today.Year.ToString();
     using (fileConfig.Buffer(true))
     {
         conf.ChoPhepApGia = fileConfig.GetValue(year, TnConfig.Param.ChoPhepApGia, 0);
         conf.BTinhThuaDoiDien = fileConfig.GetValue(year, TnConfig.Param.BTinhThuaDoiDien, 1);
         conf.DBKUbnd_truong_cho_tramyt = fileConfig.GetValue(year, TnConfig.Param.DBKUbnd_truong_cho_tramyt, 0);
         conf.DCachDmgt_chodm = fileConfig.GetValue(year, TnConfig.Param.DCachDmgt_chodm, 0.1);
         conf.DCachRgTmdv_dl_cn_cx_ktck = fileConfig.GetValue(year, TnConfig.Param.DCachRgTmdv_dl_cn_cx_ktck, 0.1);
         conf.DGrDatNn = fileConfig.GetValue(year, TnConfig.Param.DGrDatNn, 0.1);
         conf.DGrDatPnnDt = fileConfig.GetValue(year, TnConfig.Param.DGrDatPnnDt, 0.1);
         conf.DGrDatPnnNt = fileConfig.GetValue(year, TnConfig.Param.DGrDatPnnNt, 0.1);
         conf.DKhoangCach50mMatTien = fileConfig.GetValue(year, TnConfig.Param.DKhoangCach50mMatTien, 0.1);
         conf.DRongDuongVitri1Nn = fileConfig.GetValue(year, TnConfig.Param.DRongDuongVitri1Nn, 0.1);
         conf.DRongDuongVitri2NnMax = fileConfig.GetValue(year, TnConfig.Param.DRongDuongVitri2Nn, 0.1);
         conf.DSauDuongVitri1Nn = fileConfig.GetValue(year, TnConfig.Param.DSauDuongVitri1Nn, 0.1);
         conf.DSauDuongVitri2Nn = fileConfig.GetValue(year, TnConfig.Param.DSauDuongVitri2Nn, 0.1);
         conf.DSauDuongVitri2Nn2 = fileConfig.GetValue(year, TnConfig.Param.DSauDuongVitri2Nn2, 0.1);
         conf.DVt2Kv1 = fileConfig.GetValue(year, TnConfig.Param.DVt2Kv1, 0);
         conf.GToiThieuDoThiLoai4 = fileConfig.GetValue(year, TnConfig.Param.GToiThieuDoThiLoai4, 0.1);
         conf.GToiThieuDoThiLoai5 = fileConfig.GetValue(year, TnConfig.Param.GToiThieuDoThiLoai5, 0.1);
         conf.K2MatTien = fileConfig.GetValue(year, TnConfig.Param.K2MatTien, 0.1);
         conf.K3MatTien = fileConfig.GetValue(year, TnConfig.Param.K3MatTien, 0.1);
         conf.K4MatTien = fileConfig.GetValue(year, TnConfig.Param.K4MatTien, 0.1);
         conf.NamApDung = fileConfig.GetValue(year, TnConfig.Param.NamApDung, "2011");
         conf.PDatSau50mMatTien = fileConfig.GetValue(year, TnConfig.Param.PDatSau50mMatTien, 0.1);
         conf.PHemChinhRongDuoi3_5m = fileConfig.GetValue(year, TnConfig.Param.PHemChinhRongDuoi3_5m, 0.1);
         conf.PHemChinhRongTren3_5m = fileConfig.GetValue(year, TnConfig.Param.PHemChinhRongTren3_5m, 0.1);
         conf.PHemChinhRongTren6m = fileConfig.GetValue(year, TnConfig.Param.PHemChinhRongTren6m, 0.1);
         conf.PHemPhuRongDuoi3_5m = fileConfig.GetValue(year, TnConfig.Param.PHemPhuRongDuoi3_5m, 0.1);
         conf.PHemPhuRongTren3_5m = fileConfig.GetValue(year, TnConfig.Param.PHemPhuRongTren3_5m, 0.1);
         conf.PHemPhuRongTren6m = fileConfig.GetValue(year, TnConfig.Param.PHemPhuRongTren6m, 0.1);
         conf.PHemSauDuoi100m = fileConfig.GetValue(year, TnConfig.Param.PHemSauDuoi100m, 0.1);
         conf.PHemSauDuoi200m = fileConfig.GetValue(year, TnConfig.Param.PHemSauDuoi200m, 0.1);
         conf.PHemSauTren200m = fileConfig.GetValue(year, TnConfig.Param.PHemSauTren200m, 0.1);
         conf.PPnnNtDuoi100m = fileConfig.GetValue(year, TnConfig.Param.PPnnNtDuoi100m, 0.1);
         conf.PPnnNtTren100m = fileConfig.GetValue(year, TnConfig.Param.PPnnNtTren100m, 0.1);
     }
 }