Exemplo n.º 1
0
        public void ShowForm()
        {
            if (!form.Visible)
            {
                form.Show(Program.MainForm);

                form.BringToFront();
            }
        }
Exemplo n.º 2
0
        public void ShowForm()
        {
            if (!form.Visible)
            {
                form.Show();

                form.BringToFront();
            }
        }
Exemplo n.º 3
0
 /// <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);
 }
Exemplo n.º 4
0
 private void button1_Click(object sender, EventArgs e)
 {
     Debug.Assert(_logForm.InvokeRequired);
     _logForm.BeginInvoke(delegate
     {
         if (!_logForm.Visible)
         {
             _logForm.Show();
         }
         _logForm.Activate();
     });
 }
Exemplo n.º 5
0
 public void Show()
 {
     if (_logForm.InvokeRequired)
     {
         ParamlesDelegate paramlesDelegate = Show;
         _logForm.Invoke(paramlesDelegate);
     }
     else
     {
         if (!_logForm.Visible)
         {
             _logForm.Show();
         }
     }
 }
Exemplo n.º 6
0
        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.
            }
        }
Exemplo n.º 7
0
        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);
                }
            }
        }
Exemplo n.º 8
0
    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);
    }
Exemplo n.º 9
0
 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);
 }
Exemplo n.º 10
0
 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);
         };
     }
 }
Exemplo n.º 11
0
        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);
        }
Exemplo n.º 12
0
 public void showForm()
 {
     logForm.Show();
 }
Exemplo n.º 13
0
 private void buttonLog_Click(object sender, EventArgs e)
 {
     _logForm.Show();
 }
Exemplo n.º 14
0
 private void InitializeLog()
 {
     _log = new LogForm();
     _log.Show();
     _log.Hide();
 }
Exemplo n.º 15
0
 private void OnDicomLogClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     _log.Show();
     _log.Focus();
 }
Exemplo n.º 16
0
 protected override void OnStarted()
 {
     Global.MainForm.BeginInvoke(() => _form.Show());
 }
Exemplo n.º 17
0
 private void buttonFirstLog_Click(object sender, System.EventArgs e)
 {
     _logFormFirst.Show();
 }
Exemplo n.º 18
0
        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);
        }
Exemplo n.º 19
0
 private void logTimeViewToolStripMenuItem_Click(object sender, EventArgs e)
 {
     logForm.Show();
 }
Exemplo n.º 20
0
 private void buttonSecondLog_Click(object sender, System.EventArgs e)
 {
     _logFormSecond.Show();
 }
Exemplo n.º 21
0
 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();
     }
 }
Exemplo n.º 22
0
        /// <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]);
            }
        }
Exemplo n.º 23
0
 private void PrepareNameServerLogForm()
 {
     NameServerLogForm      = new LogForm(_nameServer);
     NameServerLogForm.Text = "Name Server Log";
     NameServerLogForm.Show();
 }