private void OnClosing(object sender, System.ComponentModel.CancelEventArgs e) { if (this.WindowState != FormWindowState.Normal) { return; } // frmMain(this.Parent)._mdi; if (Settings.IsMdiLayout) { return; } var dialogname = this.Text; if (dialogname.IndexOf("(", StringComparison.Ordinal) != -1) { dialogname = f.HeadFromList(ref dialogname, "("); } var reg = new DRegistry(); reg.WriteProfileString(DRegistry.TRegistryKey.HKEY_CURRENT_USER, "Software\\Twr\\RVDV\\Dialog\\" + dialogname, "width", Width.ToString()); reg.WriteProfileString(DRegistry.TRegistryKey.HKEY_CURRENT_USER, "Software\\Twr\\RVDV\\Dialog\\" + dialogname, "height", Height.ToString()); }
private void cmdOK_Click(object sender, System.EventArgs e) { this.Ok = true; Settings.Jahr = lbDatei.SelectedItem.ToString(); var reg = new DRegistry(); reg.WriteProfileString(DRegistry.TRegistryKey.HKEY_CURRENT_USER, "Software\\Twr\\Sport", "Datei", Settings.Jahr); this.Close(); }
private void frmGProtokoll_Load(object sender, System.EventArgs e) { OnInitial(); var dialogname = this.Text; if (dialogname.IndexOf("(", StringComparison.Ordinal) != -1) { dialogname = f.HeadFromList(ref dialogname, "("); } var reg = new DRegistry(); var width = f.ConvertToInt(reg.GetProfileString(DRegistry.TRegistryKey.HKEY_CURRENT_USER, "Software\\Twr\\RVDV\\Dialog\\" + dialogname, "width")); if (width == 0) { this.Width = 960; } if (width > 100) { this.Width = width; } var height = f.ConvertToInt(reg.GetProfileString(DRegistry.TRegistryKey.HKEY_CURRENT_USER, "Software\\Twr\\RVDV\\Dialog\\" + dialogname, "height")); if (height == 0) { height = 720; } if (height > 100) { this.Height = height; } var fontsize = f.ConvertToInt(reg.GetProfileString(DRegistry.TRegistryKey.HKEY_CURRENT_USER, "Software\\Twr\\RVDV\\Dialog\\" + dialogname, "fontsize")); if (fontsize < 4) { _FontSize = 10; } else { _FontSize = fontsize; } this.MaximizeBox = true; this.MinimizeBox = true; OnResize(null, null); }
public void frmProtokollOhneGrid_Load(object sender, System.EventArgs e) { richTextBox.Visible = false; OnInitial(); // label.Refresh(); var dialogname = this.Text; if (dialogname.IndexOf("(", StringComparison.Ordinal) != -1) { dialogname = f.HeadFromList(ref dialogname, "("); } var reg = new DRegistry(); var width = f.ConvertToInt(reg.GetProfileString(DRegistry.TRegistryKey.HKEY_CURRENT_USER, "Software\\Twr\\RVDV\\Dialog\\" + dialogname, "width")); if (width > 100) { this.Width = width; } var height = f.ConvertToInt(reg.GetProfileString(DRegistry.TRegistryKey.HKEY_CURRENT_USER, "Software\\Twr\\RVDV\\Dialog\\" + dialogname, "height")); if (height > 100) { this.Height = height; } this.MaximizeBox = true; this.MinimizeBox = true; richTextBox.Text = ""; for (var i = 0; i < _aData.Count; i++) { richTextBox.Text += _aData[i].ToString().Substring(0, 100) + "\r\n"; //SetData } var line = ""; line = richTextBox.Text; line = line.TrimEnd(); line = line.Replace("\n", "\r\n"); line += "\r\n"; richTextBox.Text = ""; for (; ;) { if (line.IndexOf("\r\n", StringComparison.Ordinal) == -1) { break; } var tmp = f.HeadFromList(ref line, "\r\n", false); tmp += " "; tmp = tmp.Substring(0, 100); richTextBox.Text += tmp += "\r\n"; } for (var i = 0; i < _aColor.Count; i++) { var color = (SColor)_aColor[i]; richTextBox.SelectionStart = color._y * 100 + color._y + color._x; richTextBox.SelectionLength = color._l; richTextBox.SelectionColor = color._color; } // richTextBox.Select(0,100); // richTextBox.SelectionColor=Color.FromArgb(255,180,80); richTextBox.Select(0, 0); richTextBox.Visible = true; OnResize(null, null); }
public Sport() { var reg = new DRegistry(); this.Jahr = reg.GetProfileString(DRegistry.TRegistryKey.HKEY_CURRENT_USER, "SOFTWARE\\TWR\\Sport", "Datei", ""); }
private static void CheckRegistryStatus() { // Make sure the local app data path exists in registry if (!DRegistry.isRegistered(new Setting("LocalAppDataPath"))) { DRegistry.Register(new Setting("LocalAppdataPath", Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\DeadByDaylight")); } // Make sure the steam root directory exists in registry if (!DRegistry.isRegistered(new Setting("RootPath"))) { MessageBox.Show("ERROR: Steam root directory not found!\nPlease Specify the location: "); CommonOpenFileDialog dialog = new CommonOpenFileDialog { Title = "Please specify your Steam root directory (Example: 'C:/Program Files(x86)/Steam')", IsFolderPicker = true }; if (dialog.ShowDialog() == CommonFileDialogResult.Ok && !string.IsNullOrWhiteSpace(dialog.FileName)) { DRegistry.Register(new Setting("RootPath", dialog.FileName)); } } // Make sure the steam library directory exists in registry if (!DRegistry.isRegistered(new Setting("LibraryPath"))) { MessageBox.Show("ERROR: Steam library directory not found!\n('../Steam/steamapps/common' folder)" + "\nPlease Specify the location: "); CommonOpenFileDialog dialog = new CommonOpenFileDialog { Title = "Please specify your Steam library directory (Example: 'C:/Program Files(x86)/Steam/steamapps/common')", IsFolderPicker = true }; if (dialog.ShowDialog() == CommonFileDialogResult.Ok && !string.IsNullOrWhiteSpace(dialog.FileName)) { DRegistry.Register(new Setting("LibraryPath", dialog.FileName)); } } // Make sure the fullscreen registry entry exists if (!DRegistry.isRegistered(new Setting("Fullscreen"))) { DRegistry.Register(new Setting("Fullscreen", "false")); } // Make sure the windowed registry entry exists if (!DRegistry.isRegistered(new Setting("Windowed"))) { DRegistry.Register(new Setting("Windowed", "false")); } // Make sure the V-Sync registry entry exists if (!DRegistry.isRegistered(new Setting("V-Sync"))) { DRegistry.Register(new Setting("V-Sync", "false")); } // Make sure the FrameRateCap registry entry exists if (!DRegistry.isRegistered(new Setting("FrameRateCap"))) { DRegistry.Register(new Setting("FrameRateCap", "60")); } // Make sure the Width registry entry exists if (!DRegistry.isRegistered(new Setting("Width"))) { DRegistry.Register(new Setting("Width", "1920")); } // Make sure the Height registry entry exists if (!DRegistry.isRegistered(new Setting("Height"))) { DRegistry.Register(new Setting("Height", "1080")); } }