омилка", MessageBoxButton.OK, MessageBoxImage.Error); = true;
}
} = true; (File.Exists (path + "Students.xaml"))
{
{= new FileStream (path + "Students.xaml", FileMode.Open, FileAccess.Read); = System.Windows.Markup.XamlReader.Load (fs) as Students;. Close ( );
}
}
} = true; (nodata)
{. Clear ();. Clear ();
} (textFind.Text);
}
void Window_Closing (object sender, System.ComponentModel.CancelEventArgs e)
{; = new RsTS ();. t = this.Top;. l = this.Left;. h = this.Height;. w = this.Width;. w0 = dataGrid.Columns [0]. Width;. w1 = dataGrid.Columns [1]. Width;. w2 = dataGrid.Columns [2]. Width;. w3 = dataGrid.Columns [3]. Width; path = ExtractFileDir (Application.ResourceAssembly. Location) + "Data "; (! Directory.Exists (path)) Directory.CreateDirectory (path);
(System.IO.File.Exists (path + "Settings.xaml")) System.IO.File.Delete (path + "Settings.xaml"); = new FileStream (path + "Settings.xaml", FileMode.CreateNew, FileAccess.Write);. Windows.Markup.XamlWriter.Save (settings, fs);. Close ();. Clear (); (Room r in rooms)
{= ""; (int i in r.Students) st + = i.ToString () + ";";. Add (new RTS (r.Max, st) );
} (System.IO.File.Exists (path + "Rooms.xaml")) System.IO.File.Delete (path + "Rooms.xaml"); = new FileStream ( path + "Rooms.xaml", FileMode.CreateNew, FileAccess.Write);. Windows.Markup.XamlWriter.Save (rs, fs);. Close (); (System.IO.File.Exists (path + " Students.xaml ")) System.IO.File.Delete (path +" Students.xaml "); = new FileStream (path +" Students.xaml ", FileMode.CreateNew, FileAccess.Write);. Windows.Markup . XamlWriter.Save (students, fs);. Close ();
} void dataGrid_MouseDoubleClick (object sender, MouseButtonEventArgs e)
{_Click (null, null);
} void ClearRoom_Click (object sender, RoutedEventArgs e)
{(dataGrid.SelectedIndex <0) № "+ (dataGrid.SelectedItem as DGRoom). Number +"? "," ", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
{= (dataGrid.SelectedItem as DGRoom). ID; (int j = 0; j
{. RemoveAt (rooms [selind]. Students [j]); (int i = rooms [selind]. Students [j]; i
{[students [i]. Room]. Students.Remove (i + 1); [students [i]. Room]. Students.Add (i);
}
} [selind]. Students.Clear (); (textFind.Text);
}
} void dataGrid_PreviewKeyUp (objec...