public void ShowForm() { if (!form.Visible) { form.Show(Program.MainForm); form.BringToFront(); } }
public void ShowForm() { if (!form.Visible) { form.Show(); form.BringToFront(); } }
/// <summary> /// Show the LocoIO inspector form /// </summary> private void ShowLog() { if (logForm == null) { logForm = new LogForm(); logForm.FormClosed += (s, x) => logForm = null; } logForm.Initialize(appState.RailwayState); logForm.Show(this); }
private void button1_Click(object sender, EventArgs e) { Debug.Assert(_logForm.InvokeRequired); _logForm.BeginInvoke(delegate { if (!_logForm.Visible) { _logForm.Show(); } _logForm.Activate(); }); }
public void Show() { if (_logForm.InvokeRequired) { ParamlesDelegate paramlesDelegate = Show; _logForm.Invoke(paramlesDelegate); } else { if (!_logForm.Visible) { _logForm.Show(); } } }
private void ConnectToLog(string readerName, string initialisationString) { string displayString; IMessageReader reader; try { if (initialisationString == null) { initialisationString = _modules.GetInitialisationString(readerName); } displayString = initialisationString ?? readerName; // Create the message reader and set its initialisation string, prompting the user if necessary. reader = _modules.CreateMessageReader(readerName, initialisationString); } catch (Exception ex) { throw new ApplicationException(string.Format("Failed to initialise a '{0}' message reader" + " using configuration string '{1}'.", readerName, initialisationString), ex); } // Not found - create and show a new log form for the message reader. var form = new LogForm { MdiParent = this }; #if DEBUG form.Closed += logForm_Closed; #endif string displayText = displayString + " (" + _modules.GetDisplayName(readerName) + ")"; string fullConfigurationString = readerName + "|" + displayString + "|" + initialisationString; form.ConfigurationString = fullConfigurationString; form.Initialise(reader, displayText); form.Show(); _recentlyUsed.ItemUsed(fullConfigurationString, displayText); using (new LongRunningMonitor(this)) { form.AutoStart(); // Now that the form is visible populate it with messages. } }
private void simpleButtonLog_Click(object sender, EventArgs e) { var sp = DevExpressHelper.GetSelectedRecord <SalePoint>(gridViewSalePoints); if (sp != null) { try { var clientService = Protocol.CreateClientProxy(sp.IP); LogForm.Show(this, sp, clientService.GetLog()); } catch (Exception ex) { ErrorHelper.ShowError <ErrorForm>(null, ex); } } }
public static void Main(string[] args) { string v = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //Application.Run(new Form1()); form = new Form1(); logform = new LogForm(); form.logform = logform; logform.Show(); form.Statusbar = "Ready.."; form.Text = "Usenet Speedtest " + v; Application.Run(form); }
private void ToggleLogging() { if (logging == null) { logging = new LogForm(); logging.MdiParent = this; logging.WindowState = FormWindowState.Maximized; logging.Show(); } else { logging.Close(); logging.Dispose(); logging = null; } LoggingMenuItem.Checked = (logging != null); }
private void ShowLogForm(string logPath) { if (logForm != null) { logForm.Activate(); } else { logForm = new LogForm(logPath); logForm.Show(); logForm.Activate(); logForm.FormClosed += (s, e) => { logForm.Dispose(); logForm = null; Utils.ReleaseMemory(true); }; } }
public Form1() { InitializeComponent(); ZhangSimulationForm simfrm = new ZhangSimulationForm(); simfrm.Show(dockPanel1); LogForm logform = new LogForm(); logform.Show(simfrm.Pane, DockAlignment.Bottom, .2); CameraInfoWindow cifo = new CameraInfoWindow(); cifo.Show(simfrm.Pane, DockAlignment.Right, .5); CameraSimulationFrm cfrm = new CameraSimulationFrm(); cfrm.Show(cifo.Pane, DockAlignment.Bottom, .35); CameraInfoWindow cifo2 = new CameraInfoWindow(); cifo2.Show(cifo.Pane, DockAlignment.Right, .5); PinholeCamera c = PinholeCamera.getTestCamera(); cifo.Camera = c; simfrm.InitialCameraWindow = cifo; simfrm.CalibratedCameraWindow = cifo2; simfrm.cameraFrm = cfrm; Log.AddReader(logform); }
public void showForm() { logForm.Show(); }
private void buttonLog_Click(object sender, EventArgs e) { _logForm.Show(); }
private void InitializeLog() { _log = new LogForm(); _log.Show(); _log.Hide(); }
private void OnDicomLogClicked(object sender, LinkLabelLinkClickedEventArgs e) { _log.Show(); _log.Focus(); }
protected override void OnStarted() { Global.MainForm.BeginInvoke(() => _form.Show()); }
private void buttonFirstLog_Click(object sender, System.EventArgs e) { _logFormFirst.Show(); }
private static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Idle += ApplicationIdle; ActiveClientForm = new ClientForm(); ActiveLogForm = new LogForm(); Log.Reporter = ActiveLogForm; ApplicationContext = new ApplicationContext(); ApplicationContext.MainForm = new LoginForm(); ChatManager = new ChatManager(); DiceManager = new DiceManager(); Socket = new Network(); ActiveLogForm.Show(); Application.Run(ApplicationContext); }
private void logTimeViewToolStripMenuItem_Click(object sender, EventArgs e) { logForm.Show(); }
private void buttonSecondLog_Click(object sender, System.EventArgs e) { _logFormSecond.Show(); }
public static void ShowLog() { if (frm == null) { frm = new LogForm(); frm.Show(); } else { if (!frm.Visible) { frm.Visible = true; frm.Activate(); } } lock (TextLog) { frm.LogText = TextLog.ToString(); } }
/// <summary> /// 載入視窗設定 /// </summary> private void LoadLayout() { int[] bounds = Array.ConvertAll(Utility.Load <string>("FORM", "LOCATION").Split(','), (input) => { int re = default(int); int.TryParse(input, out re); return(re); }); if (!File.Exists(m_DockLayoutFile)) { SettingForm.Show(dockPanel1, DockState.DockRight); OrderSettingForm.Show(SettingForm.Pane, SettingForm); LogForm.Show(dockPanel1, DockState.DockBottomAutoHide); frmTick tick = Core.Instance.CreateTickForm(string.Empty); if (tick != null) { tick.Show(dockPanel1); } OrderForm.Show(tick.Pane, DockAlignment.Right, 0.6); MatchForm.Show(OrderForm.Pane, DockAlignment.Bottom, 0.5); } else { dockPanel1.LoadFromXml(m_DockLayoutFile, delegate(string persistString) { if (persistString == typeof(frmSetting).ToString()) { return(SettingForm); } if (persistString == typeof(frmLog).ToString()) { return(LogForm); } if (persistString == typeof(frmOrder).ToString()) { return(OrderForm); } if (persistString == typeof(frmSummary).ToString()) { return(SummaryForm); } if (persistString == typeof(frmMatch).ToString()) { return(MatchForm); } if (persistString == typeof(frmErr).ToString()) { return(ErrForm); } if (persistString == typeof(frmCancel).ToString()) { return(CancelForm); } if (persistString == typeof(frmPosition).ToString()) { return(PositionForm); } if (persistString == typeof(frmOrderSetting).ToString()) { return(OrderSettingForm); } if (persistString == typeof(frmTick).ToString()) { return(Core.Instance.CreateTickForm(string.Empty)); } return(null); }); } if (bounds.Length == 4) { SetBounds(bounds[0], bounds[1], bounds[2], bounds[3]); } }
private void PrepareNameServerLogForm() { NameServerLogForm = new LogForm(_nameServer); NameServerLogForm.Text = "Name Server Log"; NameServerLogForm.Show(); }