Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

c# - master reset (clear listview items and remove all data from XML file)

[es] :: .NET :: c# - master reset (clear listview items and remove all data from XML file)

[ Pregleda: 1169 | Odgovora: 0 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

Cal Lightman

Član broj: 317851
Poruke: 88
*.dynamic.sbb.rs.



+13 Profil

icon c# - master reset (clear listview items and remove all data from XML file)26.11.2013. u 23:06 - pre 125 meseci
Pozdrav svima.

Pokušavam da napravim button koji će, uz autentifikaciju, uraditi nešto kao master reset - pre svega clear listview i izbrisati sve iz XML file-a - kao da se program prvi put pali. Svi moji pokušaji završili su neslavno, pa sam ostao zaglavljen ovde:

Code (csharp):

private void button1_Click(object sender, EventArgs e)
        {
            if (txtUsername.Text == Properties.Settings.Default.MyUsername && txtPassword.Text == Properties.Settings.Default.MyPassword)
            {
                listView.Clear;
                // ???????????
            }
            else
            {
                DialogResult dialogResult = MessageBox.Show("Wrong password! Do you want to try again?", "Warning", MessageBoxButtons.RetryCancel, MessageBoxIcon.Warning);
                if (dialogResult == DialogResult.Retry)
                {
                    return;
                }
                else if (dialogResult == DialogResult.Cancel)
                {
                    this.Close();
                }
            }
        }
 


Ima li neko ideju?
 
Odgovor na temu

[es] :: .NET :: c# - master reset (clear listview items and remove all data from XML file)

[ Pregleda: 1169 | Odgovora: 0 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.