windows 10 pro office 2019 pro office 365 pro windows 10 home windows 10 enterprise office 2019 home and business office 2016 pro windows 10 education visio 2019 microsoft project 2019 microsoft project 2016 visio professional 2016 windows server 2012 windows server 2016 windows server 2019 Betriebssysteme office software windows server https://softhier.com/ instagram takipçi instagram beğeni instagram görüntüleme instagram otomatik beğeni facebook beğeni facebook sayfa beğenisi facebook takipçi twitter takipçi twitter beğeni twitter retweet youtube izlenme youtube abone instagram

when opening a new form 2, it shows the settings that i have set

Asked By: Anonymous

enter image description here

In this section is all of the Form 2 code.Please help me

public void Setting_Load(object sender, EventArgs e)
{

        DefaulSetting();
        GetDefaulSetting();
                             
    }

    private void btnClose_Click(object sender, EventArgs e)
    {
        this.Close();
    }

Button Save Setting

public void btnSave_Click(object sender, EventArgs e)
{          
    GetDefaulSetting();                      
    MessageBox.Show("Setting save successfully");            
    this.Close();
}

radio button

    public void radioButton1_CheckedChanged(object sender, EventArgs e)
    {
        if (ReportEnable.Checked)
        {
            (this.Owner as Form1).tabControl1.TabPages[4].Enabled = true;             
            ReportDisable.Enabled = true;
            
        }
        else
        {
            ReportDisable.Enabled = true;
            
        }
    }

    public void radioButton1_CheckedChanged_1(object sender, EventArgs e)
    {
        if (ReportDisable.Checked)
        {
            (this.Owner as Form1).tabControl1.TabPages[4].Enabled = false;
            ReportEnable.Enabled = true;               
        }
        else
        {
            (this.Owner as Form1).tabControl1.TabPages[4].Enabled = true;
            ReportEnable.Enabled = true;
            
        }
    }

    public void EnableDataTable_CheckedChanged(object sender, EventArgs e)
    {
        if (EnableDataTable.Checked)
        {
            (this.Owner as Form1).tabControl1.TabPages[3].Enabled = true;
            EnableDataTable.Enabled = true;
            
        }
        else
        {                
            EnableDataTable.Enabled = true;
            
        }
    }

    public void DisableDataTable_CheckedChanged(object sender, EventArgs e)
    {
        if (DisableDataTable.Checked)
        {
            (this.Owner as Form1).tabControl1.TabPages[3].Enabled = false;
            DisableDataTable.Enabled = true;
            
        }
        else
        {
            (this.Owner as Form1).tabControl1.TabPages[3].Enabled = true;
            DisableDataTable.Enabled = true;
            
        }
    }

    public void EnableSerialWrite_CheckedChanged(object sender, EventArgs e)
    {
        if (EnableSerialWrite.Checked)
        {
            (this.Owner as Form1).tabControl1.TabPages[1].Enabled = true;
            EnableSerialWrite.Enabled = true;
            
        }
        else
        {
            EnableSerialWrite.Enabled = true;
            
        }
    }

    public void DisableSerialWrite_CheckedChanged(object sender, EventArgs e)
    {
        if (DisableSerialWrite.Checked)
        {
            (this.Owner as Form1).tabControl1.TabPages[1].Enabled = false;
            DisableSerialWrite.Enabled = true;
        }
        else
        {
            DisableSerialWrite.Enabled = true;
        }
    }

    public void EnableSerialChart_CheckedChanged(object sender, EventArgs e)
    {
        if (EnableSerialChart.Checked)
        {
            (this.Owner as Form1).tabControl1.TabPages[2].Enabled = true;
            (this.Owner as Form1).chart1.Show();
            EnableSerialChart.Enabled = true;
        }
        else
        {
            EnableSerialChart.Enabled = true;
        }
    }

    public void DisableSerialChart_CheckedChanged(object sender, EventArgs e)
    {
        if (DisableSerialChart.Checked)
        {
            (this.Owner as Form1).tabControl1.TabPages[2].Enabled = false;
            (this.Owner as Form1).chart1.Hide();
            DisableSerialChart.Enabled = true;
        }
        else
        {
            (this.Owner as Form1).tabControl1.TabPages[2].Enabled = true;
            (this.Owner as Form1).chart1.Show();
            (this.Owner as Form1).chart1.Enabled = true;
            DisableSerialChart.Enabled = true;
        }
    }

    public void EnableSerialRead_CheckedChanged(object sender, EventArgs e)
    {
        if (EnableSerialRead.Checked)
        {
            (this.Owner as Form1).tabControl1.TabPages[0].Enabled = true;
            EnableSerialRead.Enabled = true;
        }
        else
        {
            EnableSerialRead.Enabled = true;
        }
    }

    public void DisableSerialRead_CheckedChanged(object sender, EventArgs e)
    {
        if (DisableSerialRead.Checked)
        {
            (this.Owner as Form1).tabControl1.TabPages[0].Enabled = false;
            DisableSerialRead.Enabled = true;
        }
        else
        {
            (this.Owner as Form1).tabControl1.TabPages[0].Enabled = true;
            DisableSerialRead.Enabled = true;
        }
    }

    public void btnCancel_Click(object sender, EventArgs e)
    {
        EnableSerialChart.Checked = true;
        EnableDataTable.Checked = true;
        EnableSerialRead.Checked = true;
        EnableSerialWrite.Checked = true;
        ReportEnable.Checked = true;
        
    }

    private void Setting_FormClosed(object sender, FormClosedEventArgs e)
    {           
        
    }

    public void DefaulSetting()
    {
        Settings1.Default.SerialRead = EnableSerialRead.Text;
        Settings1.Default.SerialWrtite = EnableSerialWrite.Text;
        Settings1.Default.SerialChart = EnableSerialChart.Text;
        Settings1.Default.DataTable = EnableDataTable.Text;
        Settings1.Default.Report = ReportEnable.Text;
    }
    public void GetDefaulSetting()
    {           
        EnableSerialRead.Text = Settings1.Default.SerialRead;
        EnableSerialWrite.Text = Settings1.Default.SerialWrtite;
        EnableSerialChart.Text = Settings1.Default.SerialChart;
        EnableDataTable.Text = Settings1.Default.DataTable;
        ReportEnable.Text = Settings1.Default.Report;
        Settings1.Default.Save();
    }
}

And this is my form 1 code when hitting the Setting button.

public void btnSetting_Click(object sender, EventArgs e)
        {
            Setting frm = new Setting();
            frm.Owner = this;        
            frm.ShowDialog();          
        }

Solution

Answered By: Anonymous

Move Settings1.Default.Save(); to the DefaulSetting method, call GetDefaulSetting in the form load event, and call DefaulSetting in the form close event.

You might also consider renaming the methods ReadSettings and WriteSettings so you don’t confuse yourself.

techinplanet staff

Porno Gratuit Porno Français Adulte XXX Brazzers Porn College Girls Film érotique Hard Porn Inceste Famille Porno Japonais Asiatique Jeunes Filles Porno Latin Brown Femmes Porn Mobile Porn Russe Porn Stars Porno Arabe Turc Porno caché Porno de qualité HD Porno Gratuit Porno Mature de Milf Porno Noir Regarder Porn Relations Lesbiennes Secrétaire de Bureau Porn Sexe en Groupe Sexe Gay Sexe Oral Vidéo Amateur Vidéo Anal

Windows 10 Kaufen Windows 10 Pro Office 2019 Kaufen Office 365 Lizenz Windows 10 Home Lizenz Office 2019 Home Business Kaufen windows office 365 satın al follower kaufen instagram follower kaufen porno
524 Origin Time-out

524 Origin Time-out


cloudflare-nginx