Exemple #1
0
        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);
            }
        }
Exemple #2
0
        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]);
            }
        }
Exemple #3
0
        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);
            }
        }
Exemple #4
0
		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] );
		}
Exemple #5
0
		private void button6_Click(object sender, System.EventArgs e)
		{
			iniFile = new Sempra.IniFile(textBox3.Text);
			numericUpDown2.Value = iniFile.ReadValue( "Int", "test", 42 );		
		}
Exemple #6
0
		private void button4_Click(object sender, System.EventArgs e)
		{
			iniFile = new Sempra.IniFile(textBox3.Text);
			checkBox2.Checked = iniFile.ReadValue( "Bool", "test", true );
		}
Exemple #7
0
		private void button2_Click(object sender, System.EventArgs e)
		{
			iniFile = new Sempra.IniFile(textBox3.Text);
			textBox2.Text = iniFile.ReadValue( "Text", "test", "default" );
		}
Exemple #8
0
 private void button6_Click(object sender, System.EventArgs e)
 {
     iniFile = new Sempra.IniFile(textBox3.Text);
     numericUpDown2.Value = iniFile.ReadValue("Int", "test", 42);
 }
Exemple #9
0
 private void button4_Click(object sender, System.EventArgs e)
 {
     iniFile           = new Sempra.IniFile(textBox3.Text);
     checkBox2.Checked = iniFile.ReadValue("Bool", "test", true);
 }
Exemple #10
0
 private void button2_Click(object sender, System.EventArgs e)
 {
     iniFile       = new Sempra.IniFile(textBox3.Text);
     textBox2.Text = iniFile.ReadValue("Text", "test", "default");
 }