Exemplo n.º 1
0
        private void LogForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            timer.Stop();
            controller.TrafficChanged -= controller_TrafficChanged;
            LogViewerConfig config = controller.GetConfigurationCopy().logViewer;

            if (config == null)
            {
                config = new LogViewerConfig();
            }
            config.topMost      = topMostTrigger;
            config.wrapText     = wrapTextTrigger;
            config.toolbarShown = toolbarTrigger;
            config.SetFont(LogMessageTextBox.Font);
            config.SetBackgroundColor(LogMessageTextBox.BackColor);
            config.SetTextColor(LogMessageTextBox.ForeColor);
            if (!(config.maximized = WindowState == FormWindowState.Maximized))
            {
                config.top    = Top;
                config.left   = Left;
                config.height = Height;
                config.width  = Width;
            }
            controller.SaveLogViewerConfig(config);
        }
Exemplo n.º 2
0
        private void LogForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            var config = _controller.GetConfiguration().logViewer;

            config.Font        = logTextBox.Font;
            config.AlwaysOnTop = TopMost;
            config.WrapText    = logTextBox.WordWrap;

            _controller.SaveLogViewerConfig(config);
        }
Exemplo n.º 3
0
        private void LogForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            timer.Stop();
            LogViewerConfig config = controller.GetConfigurationCopy().logViewer;

            if (config == null)
            {
                config = new LogViewerConfig();
            }
            config.topMost      = topMostTrigger;
            config.wrapText     = wrapTextTrigger;
            config.toolbarShown = toolbarTrigger;
            config.SetFont(LogMessageTextBox.Font);
            config.SetBackgroundColor(LogMessageTextBox.BackColor);
            config.SetTextColor(LogMessageTextBox.ForeColor);
            controller.SaveLogViewerConfig(config);
        }
Exemplo n.º 4
0
        private void LogForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            timer.Stop();
            controller.TrafficChanged -= controller_TrafficChanged;
            LogViewerConfig config = controller.GetFreshConfiguration().logViewer;

            config.topMost         = topMostTrigger;
            config.wrapText        = wrapTextTrigger;
            config.toolbarShown    = toolbarTrigger;
            config.Font            = LogMessageTextBox.Font;
            config.BackgroundColor = LogMessageTextBox.BackColor;
            config.TextColor       = LogMessageTextBox.ForeColor;
            if (WindowState != FormWindowState.Minimized && !(config.Maximized = WindowState == FormWindowState.Maximized))
            {
                config.Top    = Top;
                config.Left   = Left;
                config.Height = Height;
                config.Width  = Width;
            }
            controller.SaveLogViewerConfig(config);
        }