Example #1
0
        private void ShowServerBrowserWindow()
        {
            if (serverBrowserWindow == null || !serverBrowserWindow.IsActive)
            {
                serverBrowserWindow = new Server_Browser.MainWindow(new Procedure(delegate
                {
                    // Has the server browser window requested that the program be closed?
                    if (serverBrowserWindow.CloseProgram == true)
                    {
                        Close();
                        return;
                    }

                    Show();
                    canOpenDemo      = true;
                    serverWindowOpen = false;
                }));
            }

            try
            {
                canOpenDemo      = false;
                serverWindowOpen = true;
                Hide();
                serverBrowserWindow.Show();
            }
            catch (Exception ex)
            {
                serverBrowserWindow.Close();
                Show();
                canOpenDemo      = true;
                serverWindowOpen = false;
                Common.Message(this, "Server Browser window error.", ex, MessageWindow.Flags.Error);
            }
        }
Example #2
0
        private void ShowServerBrowserWindow()
        {
            if (serverBrowserWindow == null || !serverBrowserWindow.IsActive)
            {
                serverBrowserWindow = new Server_Browser.MainWindow(new Procedure(delegate
                {
                    // Has the server browser window requested that the program be closed?
                    if (serverBrowserWindow.CloseProgram == true)
                    {
                        Close();
                        return;
                    }

                    Show();
                    canOpenDemo = true;
                    serverWindowOpen = false;
                }));
            }

            try
            {
                canOpenDemo = false;
                serverWindowOpen = true;
                Hide();
                serverBrowserWindow.Show();
            }
            catch (Exception ex)
            {
                serverBrowserWindow.Close();
                Show();
                canOpenDemo = true;
                serverWindowOpen = false;
                Common.Message(this, "Server Browser window error.", ex, MessageWindow.Flags.Error);
            }
        }