private void ReadUserSettings() { try { //Now read user settings, ReadAppSettings() must be called first Sempra.IniFile iniFile = new Sempra.IniFile(Sempra.Ops.GetUserIniFileName(settingsDir)); this.StartPosition = FormStartPosition.Manual; this.Top = iniFile.ReadValue(FORM_NAME, "Top", 200); this.Left = iniFile.ReadValue(FORM_NAME, "Left", 300); this.Width = 384; this.Height = 240; } catch (Exception error) { XtraMessageBox.Show("An error occurred while reading the user settings file." + Environment.NewLine + "Error CNF-399 in " + FORM_NAME + ".ReadUserSettings(): " + error.Message, FORM_ERROR_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void button8_Click(object sender, System.EventArgs e) { iniFile = new Sempra.IniFile(textBox3.Text); StringCollection list = iniFile.ReadValue("List"); listBox1.Items.Clear(); for (int i = 0; i < list.Count; i++) { listBox1.Items.Add(list[i]); } }
private void ReadUserSettings() { try { //Now read user settings, ReadAppSettings() must be called first Sempra.IniFile iniFile = new Sempra.IniFile(Sempra.Ops.GetUserIniFileName(settingsDir)); this.StartPosition = FormStartPosition.Manual; this.Top = iniFile.ReadValue(FORM_NAME, "Top", 200); this.Left = iniFile.ReadValue(FORM_NAME, "Left", 300); this.Width = 384; this.Height = 240; } catch (Exception error) { XtraMessageBox.Show("An error occurred while reading the user settings file." + Environment.NewLine + "Error CNF-399 in " + FORM_NAME + ".ReadUserSettings(): " + error.Message, FORM_ERROR_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void button8_Click(object sender, System.EventArgs e) { iniFile = new Sempra.IniFile(textBox3.Text); StringCollection list = iniFile.ReadValue( "List" ); listBox1.Items.Clear(); for( int i = 0; i < list.Count; i++ ) listBox1.Items.Add( list[i] ); }
private void button6_Click(object sender, System.EventArgs e) { iniFile = new Sempra.IniFile(textBox3.Text); numericUpDown2.Value = iniFile.ReadValue( "Int", "test", 42 ); }
private void button4_Click(object sender, System.EventArgs e) { iniFile = new Sempra.IniFile(textBox3.Text); checkBox2.Checked = iniFile.ReadValue( "Bool", "test", true ); }
private void button2_Click(object sender, System.EventArgs e) { iniFile = new Sempra.IniFile(textBox3.Text); textBox2.Text = iniFile.ReadValue( "Text", "test", "default" ); }
private void button6_Click(object sender, System.EventArgs e) { iniFile = new Sempra.IniFile(textBox3.Text); numericUpDown2.Value = iniFile.ReadValue("Int", "test", 42); }
private void button4_Click(object sender, System.EventArgs e) { iniFile = new Sempra.IniFile(textBox3.Text); checkBox2.Checked = iniFile.ReadValue("Bool", "test", true); }
private void button2_Click(object sender, System.EventArgs e) { iniFile = new Sempra.IniFile(textBox3.Text); textBox2.Text = iniFile.ReadValue("Text", "test", "default"); }