示例#1
0
 private void button3_Click(object sender, EventArgs e)  //przycisk edycji nazwy
 {
     if (listBox1.SelectedIndex < 0)
     {
         MessageBox.Show("Wybierz użytkownika!");
     }
     else
     {
         string username;
         username = listBox1.SelectedItem.ToString();
         try
         {
             Information info = new Information();
             info.Data1 = username;
             XMLSave.SaveData(info, "temp_username.xml");
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message);
         }
         users_change(listBox1.SelectedIndex);
         userchangewindow openwindow = new userchangewindow();
         this.Hide();
         listBox1.Items.Clear();
         openwindow.ShowDialog();
         Form1_reload();
         this.Show();
     }
 }
示例#2
0
        private void button3_Click(object sender, EventArgs e)  //przycisk edycji nazwy
        {
            string username;

            username = listBox1.SelectedItem.ToString();
            try
            {
                Information info = new Information();
                info.Data1 = username;
                XMLSave.SaveData(info, "temp_username.xml");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            users_change(listBox1.SelectedIndex);
            userchangewindow openwindow = new userchangewindow();

            openwindow.ShowDialog();
        }