private void MonteCarloButton_Click(object sender, RoutedEventArgs e) { WindowUtility.ShowWindow(this, new MonteCarloSimulationWindow() { PreviousWindow = new ChooseModeWindow() }); }
public void DrawXMLGenerator(SerializedObject serializedObject) { WindowUtility.VerticalLayout(() => { WindowUtility.Button("Create Mod Template", () => { }); }); }
private void AnovaButton_Click(object sender, RoutedEventArgs e) { WindowUtility.ShowWindow(this, new AnovaWindow() { PreviousWindow = new ChooseModeWindow() }); }
private void applyStyle() { if (RuntimePlatform.WindowsPlayer == Application.platform) { WindowUtility.ApplyWindowsStyle(); } }
public void DrawModSetup(SerializedObject serializedObject) { WindowUtility.VerticalLayout(() => { WindowUtility.Button("Initialize HS2 Map", () => { }); WindowUtility.Button("Setup Mod Folder", () => { }); }); WindowUtility.VerticalLayout(() => { GUILayout.Label("Initialize Mod Components"); WindowUtility.HorizontalLayout(() => { WindowUtility.Dropdown("Common", new[] { new WindowUtility.DropDownItem { Name = "Hair", On = false, Callback = InitializeObject, Parameter = Command.Hair }, new WindowUtility.DropDownItem { Name = "Clothing", On = false, Callback = InitializeObject, Parameter = Command.Clothing }, new WindowUtility.DropDownItem { Name = "Accessory/Initialize with Existing N_Move", On = false, Callback = InitializeObject, Parameter = Command.Accessory }, new WindowUtility.DropDownItem { Name = "Accessory/Initialize with New N_Move", On = false, Callback = InitializeObject, Parameter = Command.AccessoryWithTransform }, new WindowUtility.DropDownItem { Name = "Accessory/Skinned Accessory", On = false, Callback = InitializeObject, Parameter = Command.AccessorySkinned }, new WindowUtility.DropDownItem { Name = "Studio Item", On = false, Callback = InitializeObject, Parameter = Command.StudioItem }, new WindowUtility.DropDownItem { Name = "Remove All Mod Related Components", On = false, Callback = InitializeObject, Parameter = Command.RemoveAll }, }); WindowUtility.Dropdown("HS2", new[] { new WindowUtility.DropDownItem { Name = "Playable Map", On = false, Callback = InitializeObject, Parameter = Command.HS2Map }, }); WindowUtility.Dropdown("AI", new[] { new WindowUtility.DropDownItem { Name = "Furniture Data", On = false, Callback = InitializeObject, Parameter = Command.AIFurniture }, new WindowUtility.DropDownItem { Name = "Playable Map", On = false, Callback = InitializeObject, Parameter = Command.AIMap }, }); }, false); }); }
void OnWindowDestroyed(IntPtr handle) { //Event.OBJECT_DESTROY is called for child windows, but handle is still refers to root window, //adding this check makes sure we don't remove window prematurely if (!WindowUtility.IsDesktopWindow(handle)) { Remove(handle); } }
private void NumberOfVariablesButton_Click(object sender, RoutedEventArgs e) { WindowUtility.ShowWindow(this, new MonteCarloCalculationWindow(false) { PreviousWindow = new MonteCarloSimulationWindow() { PreviousWindow = new ChooseModeWindow() } }); }
public DesktopWindowCollection() : base(new ObservableCollection <DesktopWindow>()) { //Make sure that the collection is synchronized with ui thread. this.SynchronizeWithUIThread(); //Get existing windows AddRange(WindowUtility.Enumerate()); HookUtility.AddHook(HookUtility.Event.OBJECT_CREATE, Add); HookUtility.AddHook(HookUtility.Event.OBJECT_DESTROY, OnWindowDestroyed); Poller.Update += Update; Update(); }
public void Show() { if (_application?.MainWindow != null) { if (_application.MainWindow.Visibility != Visibility.Visible) { WindowUtility.CenterOnFocusedScreen(_application.MainWindow); _application.MainWindow.Topmost = true; _application.MainWindow.Show(); _application.MainWindow.Activate(); _application.MainWindow.Focus(); } } }
public static List <IWindow> GetWindows(this Process process, IProcess typedProcess) { var output = new List <IWindow>(); IEnumerable <IntPtr> windows = WindowUtility.GetWindows(process); foreach (IntPtr handle in windows) { string title = WindowUtility.GetWindowTitle(handle); if (string.IsNullOrEmpty(title)) { continue; } output.Add(new ProcessWindow(typedProcess, handle)); } return(output); }
private void CalculateButton_Click(object sender, RoutedEventArgs e) { if (string.IsNullOrEmpty(MeasurementsCountTextBox.Text) || string.IsNullOrEmpty(SystemsCountTextBox.Text)) { WriteMessageAndClearFields(); } else { int measurementsCount = int.Parse(MeasurementsCountTextBox.Text); int systemsCount = int.Parse(SystemsCountTextBox.Text); AnovaCalculationWindow anovaCalculationWindow = new AnovaCalculationWindow(measurementsCount, systemsCount) { PreviousWindow = new AnovaWindow() { PreviousWindow = new ChooseModeWindow() }, }; WindowUtility.ShowWindow(this, anovaCalculationWindow); } }
private void Run() { try { while (_isNotDisposed) { _newWindowList.Clear(); WindowUtility.EnumerateWindows(_newWindowList); // if the hook has been freshly installed // simply copy the new list to the "old" one if (0 == _oldWindowList.Count) { foreach (var tKvp in _newWindowList) { _oldWindowList.Add(tKvp.Key, tKvp.Value); } } else // the hook has been running for some time { FireClosedWindows(); FireCreatedWindows(); } } // if the hook has been uninstalled // delete the list of old windows // because when it is restarted you do not want to get a whole // lot of events for windows that where already there _oldWindowList.Clear(); Thread = null; } catch (Exception aException) { Console.Out.WriteLine("exception in thread:" + aException); } Thread = null; }
protected override void WndProc(ref Message m) { Msgs msg = (Msgs)m.Msg; if (Program.IsRunning) { if (msg == Msgs.WM_SIZE) { WindowUtility.WndProc(m.HWnd, m.Msg, m.WParam.ToInt32(), m.LParam.ToInt32()); } if (msg == Msgs.WM_DESTROY) { Program.Core.RenderEngine.DestroyRenderWindow(renderWindow); } else if (msg == Msgs.WM_NCCREATE) { renderWindow = Program.Core.RenderEngine.CreateRenderWindow(Handle); renderWindow.Camera = camera; } } base.WndProc(ref m); }
public void ReturnToPreviousWindow() { WindowUtility.ShowWindow(this, PreviousWindow); }
public void Refresh() { WindowUtility.ShowWindow(this, new MonteCarloSimulationWindow()); }
protected override void OnSourceInitialized(EventArgs e) { WindowUtility.RemoveWindowIcon(this); }
private void onMaxmizeClick() { WindowUtility.Maximize(); }
private void onMinimizeClick() { WindowUtility.Minimize(); }
public void Refresh() { WindowUtility.ShowWindow(this, new ChooseModeWindow()); }
protected override void OnSourceInitialized(EventArgs e) { base.OnSourceInitialized(e); WindowUtility.RemoveIcon(this); }
public void Refresh() { WindowUtility.ShowWindow(this, new AnovaCalculationWindow(MeasurementsCount, AlternativesCount)); }