예제 #1
0
        public void LoadFiles(string[] fileNames)
        {
            _logger.Info("Loading files into existing LogTabWindow");
            LogTabWindow logWin = this.windowList[this.windowList.Count - 1];

            logWin.Invoke(new MethodInvoker(logWin.SetForeground));
            logWin.LoadFiles(fileNames);
        }
예제 #2
0
 public void NewWindow(string[] fileNames)
 {
     if (_firstLogTabWindow.IsDisposed)
     {
         Logger.logWarn("first GUI thread window is disposed. Setting a new one.");
         // may occur if a window is closed because of unhandled exception.
         // Determine a new 'firstWindow'. If no window is left, start a new one.
         RemoveWindow(_firstLogTabWindow);
         if (_windowList.Count == 0)
         {
             Logger.logInfo("No windows left. New created window will be the new 'first' GUI window");
             LoadFiles(fileNames);
         }
         else
         {
             _firstLogTabWindow = _windowList[_windowList.Count - 1];
             NewWindow(fileNames);
         }
     }
     else
     {
         _firstLogTabWindow.Invoke(new Action <string[]>(NewWindowWorker), new object[] { fileNames });
     }
 }