SaveLog() public static method

Writes the Log to a *.txt File. Writing Style: Server = Database : KeyVariableName = Attribute = PathwayToElement = TimeRange
public static SaveLog ( string Filename ) : void
Filename string The path to the file location.
return void
コード例 #1
0
 //Matlab
 /// <summary>
 /// Checks to see if Matlab is still open and asks to Reload the logged data and reopens matlab.
 /// </summary>
 /// <param name="showDialog"> Whether to show a dialog with yes or no.</param>
 public void checkMatlab(bool showDialog)
 {
     if (showDialog)
     {
         bool hasMatlab = MatlabAccess.isMatlabOpen();
         if (!hasMatlab && !checkedMatlab)
         {
             DialogResult result1 = MessageBox.Show(" Matlab has been closed. Do you want to reopen Matlab and load with Logged inputs? To start with an empty workspace, click No.", "Matlab has Closed", MessageBoxButtons.YesNoCancel);
             if (result1 == DialogResult.Yes)
             {
                 MatlabAccess.MatlabStartup();
                 LogSystem.SaveLog("temp.txt");
                 LogSystem.Clear();
                 importLog("temp.txt");
                 checkedMatlab = false;
             }
             else if (result1 == DialogResult.No)
             {
                 MatlabAccess.MatlabStartup();
             }
             else
             {
                 checkedMatlab = true;
             }
         }
     }
     else
     {
         MatlabAccess.MatlabStartup();
         LogSystem.SaveLog("temp.txt");
         LogSystem.Clear();
         importLog("temp.txt");
         checkedMatlab = false;
     }
 }
コード例 #2
0
 // Save Logs
 /// <summary>
 /// Calls the LogSystem.Save method.
 /// </summary>
 /// <param name="filePath">The path to where the file will be written.</param>
 public void saveCurrentLog(string filePath)
 {
     LogSystem.SaveLog(filePath);
 }