isLogEmpty() public static method

Returns whether not the Log is empty.
public static isLogEmpty ( ) : bool
return bool
コード例 #1
0
 private void PItoMatlabForm_Closing(object sender, FormClosingEventArgs e)
 {
     //Allow saving prior to exiting. Only allows .txt files save
     if (!LogSystem.isLogEmpty())
     {
         DialogResult result1 = MessageBox.Show("Do you want to save your work?", "Save your work before exiting", MessageBoxButtons.YesNoCancel);
         if (result1 == DialogResult.Yes)
         {
             saveExports();
         }
         if (result1 == DialogResult.Cancel)
         {
             e.Cancel = true;
         }
     }
 }
コード例 #2
0
 private void deleteAllLogInputsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (!LogSystem.isLogEmpty())
     {
         DialogResult result1 = MessageBox.Show("Delete all Logged Values", "Are you sure you want to delete all logged exports?", MessageBoxButtons.OKCancel);
         if (result1 == DialogResult.OK)
         {
             foreach (ListViewItem item in lv_LogDialog.Items)
             {
                 string selected = item.Text;
                 DeleteListItem(selected);
                 item.Remove();
             }
         }
     }
 }