Пример #1
0
 private void AnAddCommentBtn_Click(object sender, RoutedEventArgs e)
 {
     //add comments and save it
     string CommentFileName;
     Comment cm = new Comment();
     cm.CommentsText = comments;//if any
     bool? dres = cm.ShowDialog();
     if (dres == true)
         comments = cm.CommentsText;
     if (AnFileName != "")
     {
         CommentFileName = AnFileName + ".txt";
         FileSubs fs = new FileSubs();
         fs.SaveComment(comments, CommentFileName);
     }
     else
         comments = "";
 }
Пример #2
0
 private void ChartSaveDataBtn_Click(object sender, RoutedEventArgs e)
 {
     FileSubs fs = new FileSubs();
     ChartSaveDataBtn.IsEnabled = false;
     if (SaveType == 0 || SaveType == 2)
     {
         if (DisplayMode == 1)//time mode
         {
             SavedFileName = fs.SaveTimeData(tempstorage, NumberOfRuns, seldet, true, "");
         }
         else if (DisplayMode == 0)//spatial mode
         {
             SavedFileName = fs.SavePXEFile(savefilecnt, 1, DataStorage, true, "");
         }
         if (comments != "" && SavedFileName != "")
         {
             fs.SaveComment(comments, SavedFileName + ".txt");
         }
     }
     if (SaveType == 1 || SaveType == 2)
     {//binary
         if (DisplayMode == 1)//time mode
             SavedFileName = fs.SaveBinary(tempstorage, comments, NumberOfRuns, DisplayMode, true, "");
         else
             SavedFileName = fs.SaveBinary(DataStorage, comments, 1, DisplayMode, true, "");
     }
     SaveLocation = 1;
     timercnt = 0;
     dispatcherTimer.Start();
 }