public NewAccountWindow(PreviousWindow window, Status?status) { InitializeComponent(); this.window = window; if (status != null) { this.status = (Status)status; } }
public static IWindow ChangeWindow(IWindow window) { PreviousWindow = CurrentWindow; CurrentWindow = window; PreviousWindow.OnExit(); CurrentWindow.OnEnter(); windowChangeCallback?.Invoke(CurrentWindow); return(window); }
public void StartRecording() { // Move focus back to previous window if (this.dte.ActiveWindow.Caption == "Macro Explorer" && PreviousWindow != null) { PreviousWindow.Show(); } this.PreviousWindowIsDocument = this.dte.ActiveWindow.Kind == "Document"; this.IsRecording = true; this.recorder.StartRecording(); }
public static void GoToScript() { ShowWindow(new ReUniterMode { RefreshAction = RefreshAssetInfos, SearchLabel = "Enter Script Name:", LoadItem = LoadAsset }); foreach (var key in ":script ") { PreviousWindow.SendEvent(Event.KeyboardEvent(key.ToString())); } }
public void DefWndProc(ref Message m) { if (PreviousWindow == null) { if (_priorWindowProcHandle == IntPtr.Zero) { Debug.Fail($"Can't find a default window procedure for message {m} on class {GetType().Name}"); // At this point, there isn't much we can do. There's a small chance the following // line will allow the rest of the program to run, but don't get your hopes up. m.Result = User32.DefWindowProcW(m.HWnd, (User32.WM)m.Msg, m.WParam, m.LParam); return; } m.Result = User32.CallWindowProcW(_priorWindowProcHandle, m.HWnd, (User32.WM)m.Msg, m.WParam, m.LParam); } else { m.Result = PreviousWindow.Callback(m.HWnd, (User32.WM)m.Msg, m.WParam, m.LParam); } }
static void RecentItems() { var recentItemsMode = new SearchMode { RefreshAction = RefreshRecentItemInfos, SearchLabel = "Enter Recent Item Name:", LoadItem = LoadUnityObjects }; if (PreviousWindow != null && PreviousWindow.mode.SearchLabel == recentItemsMode.SearchLabel) { PreviousWindow.selectAll = false; PreviousWindow.selectedIndex++; PreviousWindow.Repaint(); } else { ShowWindow(recentItemsMode); } }
public void Playback(string path, int iterations = 1) { if (string.IsNullOrEmpty(path)) { path = SelectedMacro == null ? CurrentMacroPath : SelectedMacro.FullPath; } // Before playing back, save the macro file this.SaveMacroIfDirty(path); // Move focus to first window if (this.dte.ActiveWindow.Caption == "Macro Explorer" && PreviousWindow != null) { PreviousWindow.Show(); } VSMacrosPackage.Current.StatusBarChange(Resources.StatusBarPlayingText, 1); this.TogglePlayback(path, iterations); }
public void SelectPreviousWindow() { if (PreviousWindow != null && PreviousWindow.Visible && !PreviousWindow.Exit && !(PreviousWindow is MenuWindow)) { foreach (var w in Windows.Where(p => p != PreviousWindow)) { w.TitleBarColour = Terminal.BLACK; w.TitleColour = Terminal.WHITE; w.Unselect(); if (w is MenuItemWindow) { w.Visible = false; } } PreviousWindow.Select(); CurrentWindow = PreviousWindow; CurrentWindow.TitleBarColour = Terminal.WHITE; CurrentWindow.TitleColour = Terminal.BLACK; BasicOne.CursorVisible = false; Windows.Remove(CurrentWindow); Windows.Add(CurrentWindow); } }
private void ButtonPrevious_Click(object sender, RoutedEventArgs e) { PreviousWindow.Show(); this.Hide(); }
private void CloseWindow() { PreviousWindow.Show(); this.Close(); }