Example #1
0
		public ToolArgsDialog(LogTabWindow logTabWin, Form parent)
		{
			this.logTabWin = logTabWin;
			parent.AddOwnedForm(this);
			this.TopMost = parent.TopMost;
			InitializeComponent();
		}
Example #2
0
 public ToolArgsDialog(LogTabWindow logTabWin, Form parent)
 {
     this.logTabWin = logTabWin;
     parent.AddOwnedForm(this);
     this.TopMost = parent.TopMost;
     InitializeComponent();
 }
Example #3
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);
        }
Example #4
0
        public void Instantiate_JsonFile_BuildCorrectColumnizer(string fileName, Type columnizerType)
        {
            LogTabWindow logTabWindow = new LogTabWindow(null, 0, false);
            LogWindow    logWindow    =
                new LogWindow(logTabWindow, fileName, false, false);

            Assert.AreEqual(columnizerType, logWindow.CurrentColumnizer.GetType());
        }
Example #5
0
        public void NewWindowWorker(string[] fileNames)
        {
            _logger.Info("Creating new LogTabWindow");
            LogTabWindow logWin = new LogTabWindow(fileNames.Length > 0 ? fileNames : null, logWindowIndex++, true);

            logWin.LogExpertProxy = this;
            AddWindow(logWin);
            logWin.Show();
            logWin.Activate();
        }
Example #6
0
        public void Instantiate_AnyFile_NotCrash(string fileName)
        {
            PluginRegistry.GetInstance().RegisteredColumnizers.Add(new Log4jXmlColumnizer());

            LogTabWindow logTabWindow = new LogTabWindow(null, 0, false);
            LogWindow    logWindow    =
                new LogWindow(logTabWindow, fileName, false, false);

            Assert.True(true);
        }
Example #7
0
 public void WindowClosed(LogTabWindow logWin)
 {
     RemoveWindow(logWin);
     if (this.windowList.Count == 0)
     {
         _logger.Info("Last LogTabWindow was closed");
         PluginRegistry.GetInstance().CleanupPlugins();
         OnLastWindowClosed();
     }
     else
     {
         if (this.firstLogTabWindow == logWin)
         {
             // valid firstLogTabWindow is needed for the Invoke()-Calls in NewWindow()
             this.firstLogTabWindow = this.windowList[this.windowList.Count - 1];
         }
     }
 }
Example #8
0
 public void NewWindow(string[] fileNames)
 {
     if (this.firstLogTabWindow.IsDisposed)
     {
         _logger.Warn("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(this.firstLogTabWindow);
         if (this.windowList.Count == 0)
         {
             _logger.Info("No windows left. New created window will be the new 'first' GUI window");
             LoadFiles(fileNames);
         }
         else
         {
             this.firstLogTabWindow = this.windowList[this.windowList.Count - 1];
             NewWindow(fileNames);
         }
     }
     else
     {
         this.firstLogTabWindow.Invoke(new NewWindowFx(NewWindowWorker), new object[] { fileNames });
     }
 }
Example #9
0
		public SettingsDialog(Preferences prefs, LogTabWindow logTabWin, int tabToOpen)
			: this(prefs, logTabWin)
		{
			this.tabControl1.SelectedIndex = tabToOpen;
		}
Example #10
0
		public SettingsDialog(Preferences prefs, LogTabWindow logTabWin)
		{
			this.Preferences = prefs;
			this.logTabWin = logTabWin;
			InitializeComponent();
		}
Example #11
0
 public SettingsDialog(Preferences prefs, LogTabWindow logTabWin, int tabToOpen)
     : this(prefs, logTabWin)
 {
     this.tabControl1.SelectedIndex = tabToOpen;
 }
Example #12
0
 public SettingsDialog(Preferences prefs, LogTabWindow logTabWin)
 {
     this.preferences = prefs;
     this.logTabWin   = logTabWin;
     InitializeComponent();
 }
Example #13
0
 public LogExpertProxy(LogTabWindow logTabWindow)
 {
     AddWindow(logTabWindow);
     logTabWindow.LogExpertProxy = this;
     firstLogTabWindow           = logTabWindow;
 }
Example #14
0
 private void RemoveWindow(LogTabWindow window)
 {
     _logger.Info("Removing window from list");
     this.windowList.Remove(window);
 }
Example #15
0
 private void AddWindow(LogTabWindow window)
 {
     _logger.Info("Adding window to list");
     this.windowList.Add(window);
 }
 public LogExpertApplicationContext(LogExpertProxy proxy, LogTabWindow firstLogWin)
 {
     this.proxy = proxy;
     this.proxy.LastWindowClosed += new LogExpertProxy.LastWindowClosedEventHandler(proxy_LastWindowClosed);
     firstLogWin.Show();
 }