/// <summary>
        /// Button_Save_Click
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Button_Save_Click(object sender, RoutedEventArgs e)
        {
            Debug.WriteLine("Button_Save_Click");

            LST.SaveList(LST.OToL <Course>(Courses), AppDomain.CurrentDomain.BaseDirectory + "Courses.xml");
            LST.SaveList(LST.OToL <Student>(Students), AppDomain.CurrentDomain.BaseDirectory + "Students.xml");
            LST.SaveList(LST.OToL <Binding>(Bindings), AppDomain.CurrentDomain.BaseDirectory + "Bindings.xml");

            Message = "We save Courses.xml, Students.xml and Bindings.xml";
        }
示例#2
0
        /// <summary>
        /// SaveMessageFileCommandCF
        /// </summary>
        private void SaveMessageFileCommandCF()
        {
            MdiChild tw = GetTopMDIWindow();

            if (tw == null)
            {
                _logger.Info("Nothing to save!!");
                return;
            }

            if (String.IsNullOrEmpty(((UserControlTCPMDIChild)tw.Content).MessageFileName) || ((UserControlTCPMDIChild)tw.Content).MessageFileName.Contains("New MessageFile"))
            {
                SaveMessageFileAsCommandCF();
                return;
            }

            LST.SaveList <Message>(((UserControlTCPMDIChild)tw.Content).MessageList, ((UserControlTCPMDIChild)tw.Content).MessageFileName);
            _logger.Info(String.Format("Save MessageFile File {0}", (((UserControlTCPMDIChild)tw.Content).MessageFileName)));
        }
示例#3
0
        /// <summary>
        /// SaveMessageFileAsCommandCF
        /// </summary>
        private void SaveMessageFileAsCommandCF()
        {
            MdiChild tw = GetTopMDIWindow();

            if (tw == null)
            {
                _logger.Info("Nothing to save!!");
                return;
            }

            string messageFileName = LST.SaveFileDialog("Cmm Datein (*.cmm)|*.cmm;|Alle Dateien (*.*)|*.*\"");

            if (String.IsNullOrEmpty(messageFileName))
            {
                return;
            }

            ((UserControlTCPMDIChild)tw.Content).MessageFileName = messageFileName;
            LST.SaveList <Message>(((UserControlTCPMDIChild)tw.Content).MessageList, messageFileName);
            _logger.Info(String.Format("Save MessageFile File As {0}", messageFileName));
        }