/// <summary> /// Will hide 'ele' windows and will show Main Menu Window /// </summary> /// <param name="wind"></param> public void HideWindowShowMain(GUIElement ele) { RedifineWindows(); ele.Hide(); _mainMenuWindow.Show(); }
public void GoToMainMenu() { MainMenuWindow mainmenu = new MainMenuWindow(); Application.Current.Windows[0].Close(); mainmenu.Show(); }
public static void login(string l, string p) { try { const String AuthText = "!OK"; var request = runHttp("vtmanager_login.php"); var post = "btn_auth=True"; post += "&login="******"&password=" + EncodingUtils.encode(p); var dat = Encoding.ASCII.GetBytes(post); request.ContentLength = dat.Length; using (var stream = request.GetRequestStream()) { stream.Write(dat, 0, dat.Length); } var response = (HttpWebResponse)request.GetResponse(); var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd(); if (responseString.Contains(AuthText)) { AuthWindow.ThisWindow.Close(); MainMenuWindow mmw = new MainMenuWindow(); mmw.Show(); } else { error_msg.dialog_label.Content = Messages._ERROR_MESSAGE; error_msg.contained_info.Text = Messages._LOGIN_ERROR; error_msg.Show(); } } catch (WebException) { error_msg.dialog_label.Content = Messages._ERROR_MESSAGE; error_msg.contained_info.Text = Messages._CONNECTION_TIMEOUT; error_msg.Show(); } }
private static void Init() { // Makes buttons look better Settings.UseDefaultExtendedFont = true; // Shows the main menu _mainMenuWindow = MainMenuWindow.Show(); }
private void EditorMainMenuWindow_Closing(object sender, EventArgs e) { NetworkDelegates.RemoveByUniqueName("EditorMainMenuWindow"); _EditorWebRequestPage?.ClosePage(); _EditorHistoryRequestsControl?.ClosePage(); _EditorProjectChatPage?.ClosePage(); _MainMenuWindow?.Show(); }
// Initiates the game by means of going to the menu first public void InitMainMenu() { SetUpCustomColors(); MainMenu = new MainMenuWindow(GameLoop.GameWidth, GameLoop.GameHeight) { IsFocused = true }; Children.Add(MainMenu); MainMenu.Show(); MainMenu.Position = new Point(0, 0); }
public void ShowMainMenu() { try { ToolsModifierControl.mainToolbar.CloseEverything(); } catch (Exception e) { Log.Error("Error on Show(): " + e); } MainMenuWindow menuWindow = GetMenu(); menuWindow.UpdateButtons(); menuWindow.Show(); TrafficManagerTool.ShowAdvisor("MainMenu"); #if DEBUG GetDebugMenu().Show(); #endif _uiShown = true; SetToolMode(TrafficManagerMode.Activated); MainMenuButton.UpdateButtonImageAndTooltip(); UIView.SetFocus(MainMenu); }