public ViewManager(RegClientInfor clientInfor) { _clientInfor = clientInfor; _components = new System.ComponentModel.Container(); _notifyIcon = new System.Windows.Forms.NotifyIcon(_components) { ContextMenuStrip = new ContextMenuStrip(), Icon = FileTracking.Client.Application.Properties.Resources.NotReadyIcon, Text = "File Tracking", Visible = true, }; _notifyIcon.ContextMenuStrip.Opening += ContextMenuStrip_Opening; _notifyIcon.DoubleClick += notifyIcon_DoubleClick; _notifyIcon.MouseUp += notifyIcon_MouseUp; _hiddenWindow = new System.Windows.Window(); _hiddenWindow.Hide(); _frmLog = new frmLogging(); _frmLog.LoggingText = ""; InitConnect(); checkWebSocketTimer = new System.Timers.Timer(); checkWebSocketTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent); checkWebSocketTimer.Interval = 60000; checkWebSocketTimer.Enabled = true; }
private void btLogging_Click(object sender, EventArgs e) { using (frmLogging form = new frmLogging()) { form.ShowDialog(); } }
private void ShowLogFrom_Click(object sender, EventArgs e) { if ((_frmLog == null) || (!_frmLog.Visible)) { _frmLog = new frmLogging(); _frmLog.Show(); } }
private void LogMessage(string message) { if (_frmLog == null) { _frmLog = new frmLogging(); } _frmLog.LoggingText = message; }
private IDockContent GetContentFromPersistString(string persistString) { if (persistString == typeof(frmLogging).ToString()) { loggingForm = new frmLogging(); Log("Loading Logging Window"); loggingToolStripMenuItem.Checked = true; return(loggingForm); } return(null); }
private void loggingToolStripMenuItem_Click(object sender, EventArgs e) { if (loggingToolStripMenuItem.Checked) { loggingForm.Close(); loggingForm = null; } else { if (loggingForm == null) { loggingForm = new frmLogging(); loggingForm.Show(dockPanel, DockState.DockBottom); Log("Loading Logging Window"); } } loggingToolStripMenuItem.Checked = !loggingToolStripMenuItem.Checked; // Toggle the check state }