public void save() { RegistryKey key = Registry.CurrentUser; key = key.CreateSubKey(KEY); key.SetValue("TextEncoding", _textEncoding); key.SetValue("Language", _language); key.SetValue("DatVersion", _datVersion.ToString()); key.SetValue("UseTray", _useTray); key.SetValue("MinimizeOnStart", _miniOnStart); key.SetValue("LineageDirectory", _lineageDirectory); key.SetValue("SaveBakFile", _saveBakFile); key.SetValue("FileToRun", _fileToRun); key.SetValue("ListR", _colorEditor.R); key.SetValue("ListG", _colorEditor.G); key.SetValue("ListB", _colorEditor.B); RegistryKey subkey = null; foreach (String keys in _columnSize.Keys) { subkey = key.CreateSubKey("ColumnSizes\\" + keys); if (_columnSize.ContainsKey(keys)) { foreach (String key2 in _columnSize[keys].Keys) { subkey.SetValue(key2, _columnSize[keys][key2]); } } } key.DeleteSubKey("LastFolders\\", false); subkey = key.CreateSubKey("LastFolders\\"); int i = 0; foreach (String last in _lastFolders) { subkey.SetValue("Folder" + i, last); i++; } }
private void Forms_Init(Boolean isReload) { // Set Form Title this.Text = Application.ProductName + " Ver." + Application.ProductVersion.Substring(0, 6) + " - " + Program.config.LineAgeDirectory; if (isReload) { // Set FileNameCombo this.FileNameCombo.Items.Clear(); if (Directory.Exists(Program.config.LineAgeDirectory)) { DirectoryInfo current = new DirectoryInfo(Program.config.LineAgeDirectory); foreach (FileInfo info in current.GetFiles("*.dat")) { foreach (String name in Enum.GetNames(typeof(DatFileType))) { String FileName = Path.GetFileNameWithoutExtension(info.FullName); if (FileName.ToLower().StartsWith(name.ToLower())) { this.FileNameCombo.Items.Add(info.Name.ToLower()); break; } } } } // Set Localization Program.language.setLocalization(this); } // Set Buttons this.SaveBtn.Enabled = false; this.ExpBtn.Enabled = false; this.LoadBtn.Enabled = false; this.ImpBtn.Enabled = false; // Set StatusBars this.StatusLabel.Text = Program.language.getMessage(MsgList.ChronicleSetting) + selectedDatVersion.ToString() + " " + Program.language.getMessage(MsgList.TextEncoding) + Program.config.TextEncoding.ToUpper(); this.StatusProgress.Minimum = 0; this.StatusProgress.Maximum = 100; this.StatusProgress.Value = 0; this.StatusProgress.Visible = false; // Set Datas this.DatInfo_init(); }