Beispiel #1
0
 public static void WriteToFile(string fileName, Manik data)
 {
     using (var fileStream = File.Create(fileName))
     {
         Xs.Serialize(fileStream, data);
     }
 }
Beispiel #2
0
 private void SetModel(Mannik.Manik info)
 {
     textBox1.Text = info.Name;
     textBox2.Text = info.PhoneNumber.ToString();
     textBox3.Text = info.Date;
     listBox1.Items.Clear();
     foreach (var i in info.addService)
     {
         listBox1.Items.Add(i);
     }
 }
Beispiel #3
0
 private void Service_Get(Mannik.Manik i)
 {
     if (i.ServiceManicure.Equals(TypesManicure.Manicure))
     {
         radioButton1.Checked = true;
     }
     if (i.ServiceManicure.Equals(TypesManicure.Covering))
     {
         radioButton2.Checked = true;
     }
     if (i.ServiceManicure.Equals(TypesManicure.Cut))
     {
         radioButton3.Checked = true;
     }
 }
Beispiel #4
0
 private void Service_Saver(Mannik.Manik i)
 {
     if (radioButton1.Checked)
     {
         i.ServiceManicure = TypesManicure.Manicure;
     }
     if (radioButton2.Checked)
     {
         i.ServiceManicure = TypesManicure.Covering;
     }
     if (radioButton3.Checked)
     {
         i.ServiceManicure = TypesManicure.Cut;
     }
 }
Beispiel #5
0
 private void Style_getter(Mannik.Manik info)
 {
     if (info.Manicure == StyleManicure.однотипно)
     {
         comboBox1.SelectedIndex = 0;
     }
     if (info.Manicure == StyleManicure.френч)
     {
         comboBox1.SelectedIndex = 1;
     }
     if (info.Manicure == StyleManicure.градиент)
     {
         comboBox1.SelectedIndex = 2;
     }
 }
Beispiel #6
0
 private void Style_saver(Mannik.Manik info)
 {
     if (comboBox1.SelectedIndex == 0)
     {
         info.Manicure = StyleManicure.однотипно;
     }
     if (comboBox1.SelectedIndex == 1)
     {
         info.Manicure = StyleManicure.френч;
     }
     if (comboBox1.SelectedIndex == 2)
     {
         info.Manicure = StyleManicure.градиент;
     }
 }