Пример #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (!BookStyle.Exists(tbnewname.Text))
     {
         BookStyle bs = new BookStyle(tbnewname.Text);
         bs.Save();
         LoadBsList();
     }
 }
Пример #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            if (lbbookstyles.SelectedIndex < 0) return;
            string name = (string)lbbookstyles.Items[lbbookstyles.SelectedIndex];

            if (MessageBox.Show("Opravdu vymazat styl zpìvníku " + name + "?", "Zpìvníkátor", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                BookStyle bs = new BookStyle(name);
                File.Delete(bs.FileName);
                LoadBsList();
            }
        }
Пример #3
0
 public static bool Exists(string name)
 {
     BookStyle bs = new BookStyle(name);
     return File.Exists(bs.FileName);
 }
Пример #4
0
 public static BookStyle LoadBookStyle(string name)
 {
     BookStyle res = new BookStyle(name);
     res.Load();
     return res;
 }