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", ""); }