Beispiel #1
0
 public AccCar(Main1 w4)
 {
     wnd4 = w4;
     InitializeComponent();
     try
     {
         using (FileStream fs = new FileStream(@"../../acc.txt", FileMode.OpenOrCreate, FileAccess.Read))
         {
             string[]     data;
             Accesories   accs;
             StreamReader sr = new StreamReader(fs, Encoding.Default);
             while (!sr.EndOfStream)
             {
                 data = sr.ReadLine().Split(' ');
                 accs = new Accesories(data[0]);
                 acc.Add(accs);
             }
             sr.Close();
             fs.Close();
         }
     }catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
     foreach (Accesories accs in acc)
     {
         accList.Items.Add(accs);
     }
 }
Beispiel #2
0
 public AddCarNow(Main1 w)
 {
     wnd = w;
     InitializeComponent();
 }
Beispiel #3
0
        private void add1Car_Click(object sender, RoutedEventArgs e)
        {
            Main1 wnd1 = new Main1(this);

            wnd1.Show();
        }