/// <summary> /// OpenMessageFileCommandCF /// </summary> private void OpenMessageFileCommandCF() { MdiChild tw = GetTopMDIWindow(); if (tw == null) { return; } string messageFileName = LST.OpenFileDialog("Cmm Datein (*.cmm)|*.cmm;|Alle Dateien (*.*)|*.*\""); if (String.IsNullOrEmpty(messageFileName)) { return; } ((UserControlTCPMDIChild)tw.Content).MessageList = LST.LoadList <Message>(messageFileName); ((UserControlTCPMDIChild)tw.Content).MessageFileName = messageFileName; if (((UserControlTCPMDIChild)tw.Content).MessageList.Count > 0) { ((UserControlTCPMDIChild)tw.Content).FocusMessageIndex = 0; ((UserControlTCPMDIChild)tw.Content).FocusMessage = ((UserControlTCPMDIChild)tw.Content).MessageList[0]; } _logger.Info(String.Format("Lode MessageFile File {0}", messageFileName)); }
/// <summary> /// Button_Load_Click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Button_Load_Click(object sender, RoutedEventArgs e) { Debug.WriteLine("Button_Load_Click"); Courses = LST.LToO <Course>(LST.LoadList <Course>(AppDomain.CurrentDomain.BaseDirectory + "Courses.xml")); Students = LST.LToO <Student>(LST.LoadList <Student>(AppDomain.CurrentDomain.BaseDirectory + "Students.xml")); Bindings = LST.LToO <Binding>(LST.LoadList <Binding>(AppDomain.CurrentDomain.BaseDirectory + "Bindings.xml")); _bindingsWindow.Bindings = Bindings; Message = "We load Courses.xml, Students.xml and Bindings.xml"; }