Ejemplo n.º 1
0
 public override void ShowChildWindow(IParentWindow parentWindow = null)
 {
     //if (ParentWindow != null)
     //    ParentWindow.RegisterChildWindow(this);
     if (SelectedNotifier != null)
     {
         LogFileNotifier       thisNotifier  = (LogFileNotifier)SelectedNotifier;
         LogFileNotifierConfig currentConfig = (LogFileNotifierConfig)thisNotifier.AgentConfig;
         if (File.Exists(currentConfig.GetCurrentLogFileName()))
         {
             try
             {
                 System.Diagnostics.Process p = new System.Diagnostics.Process();
                 p.StartInfo = new System.Diagnostics.ProcessStartInfo()
                 {
                     FileName = currentConfig.GetCurrentLogFileName()
                 };
                 p.Start();
             }
             catch { }
         }
         else
         {
             System.Windows.Forms.MessageBox.Show("Log file not found or it might be empty!", "Log file", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Exclamation);
         }
     }
 }