void HandleAboutMenuItemClicked(object sender, System.EventArgs e) { Close(sender as NSObject); aboutWindow = windowController.Window; aboutWindow.Title = ""; aboutWindow.TitlebarAppearsTransparent = true; aboutWindow.MovableByWindowBackground = true; windowController.ShowWindow(sender as NSObject); }
void About(NSObject sender) { currentDelegate.StatusBar.HidePopover(sender); aboutWindow = windowController.Window; aboutWindow.Title = ""; aboutWindow.TitlebarAppearsTransparent = true; aboutWindow.MovableByWindowBackground = true; windowController.ShowWindow(sender as NSObject); }
void ShowCauseEffectMatrixScreen( UnexplainedVarianceProportionMatrix unexplainedVarianceProportionMatrix, CausalRelationshipMatrix causalRelationshipMatrix ) { CauseEffectMatrixWindowController = (NSWindowController)Storyboard.InstantiateControllerWithIdentifier("CauseEffectMatrixWindowController"); var viewController = (CauseEffectMatrixViewController)CauseEffectMatrixWindowController.Window.ContentViewController; viewController.ViewModel = new CauseEffectMatrixViewModel(unexplainedVarianceProportionMatrix, causalRelationshipMatrix); CauseEffectMatrixWindowController.ShowWindow(this); }
partial void ShowResults(NSButton sender) { CauseEffectMatrixWindowController = (NSWindowController)Storyboard.InstantiateControllerWithIdentifier("CauseEffectMatrixWindowController"); var viewController = (CauseEffectMatrixViewController)CauseEffectMatrixWindowController.Window.ContentViewController; viewController.ViewModel = new CauseEffectMatrixViewModel( ViewModel._UnexplainedVarianceProportionMatrix, ViewModel._CausalRelationshipMatrix ); View.Window.Close(); CauseEffectMatrixWindowController.ShowWindow(this); }
void ShowModelsPairScreen( UnexplainedVarianceProportionMatrix unexplainedVarianceProportionMatrix, CausalRelationshipMatrix causalRelationshipMatrix ) { ModelsComparingWindowController = (NSWindowController)Storyboard.InstantiateControllerWithIdentifier("ModelsPairWindowController"); var viewController = (ModelsComparingViewController)ModelsComparingWindowController.Window.ContentViewController; viewController.ViewModel = new ModelsComparingViewModel(unexplainedVarianceProportionMatrix, causalRelationshipMatrix); viewController.Algorithms = algorithmService; ModelsComparingWindowController.ShowWindow(this); }
public WindowHandle CreateWindow(Page page, WindowCreationFlags flags) { var window = new NSWindow(new CoreGraphics.CGRect(100, 100, 640, 480), NSWindowStyle.Closable | NSWindowStyle.Resizable | NSWindowStyle.Titled | NSWindowStyle.Miniaturizable, NSBackingStore.Buffered, false) { ContentViewController = page.CreateViewController(), IsVisible = !flags.HasFlag(WindowCreationFlags.Hidden) }; using (var ctrl = new NSWindowController(window)) ctrl.ShowWindow(null); return(new MacWindowHandle(window)); }
public override void DidFinishLaunching(NSNotification notification) { var storyboard = NSStoryboard.FromName("Main", null); _controller = storyboard.InstantiateControllerWithIdentifier("WindowController") as NSWindowController; _item = NSStatusBar.SystemStatusBar.CreateStatusItem(NSStatusItemLength.Variable); _item.Button.Image = NSImage.ImageNamed("status_enabled"); _item.Menu = new NSMenu(); var watcherItem = new NSMenuItem("Disable watcher"); watcherItem.Activated += (sender, e) => { _isAppEnabled = !_isAppEnabled; watcherItem.Title = _isAppEnabled ? $"Disable watcher" : $"Enable watcher"; _item.Button.Image = _isAppEnabled ? NSImage.ImageNamed("status_enabled") : NSImage.ImageNamed("status_disabled"); if (_isAppEnabled) { StartTimer(); } else { StopTimer(); } }; var aboutItem = new NSMenuItem("About"); aboutItem.Activated += (sender, e) => { if (_controller?.Window?.IsVisible == false) { _controller.ShowWindow(this); } }; var exitItem = new NSMenuItem("Exit"); exitItem.Activated += (sender, e) => { NSApplication.SharedApplication.Terminate(this); }; _item.Menu.AddItem(watcherItem); _item.Menu.AddItem(aboutItem); _item.Menu.AddItem(NSMenuItem.SeparatorItem); _item.Menu.AddItem(exitItem); StartTimer(); }
public override void FinishedLaunching(NSObject notification) { AppController.Initialize (); mainWindowController = new MainWindowController (); mainWindowController.ShowWindow (this); if (openFile != null) mainWindowController.Window.Miniaturize (this); else { if (VersionInformationWindowController.ShouldShowVersionInformation) { VersionInformationWindowController versionInfo = new VersionInformationWindowController (); versionInfo.ShowWindow (this); } } }
public override void FinishedLaunching(NSObject notification) { AppController.Initialize(); mainWindowController = new MainWindowController(); mainWindowController.ShowWindow(this); if (openFile != null) { mainWindowController.Window.Miniaturize(this); } else { if (VersionInformationWindowController.ShouldShowVersionInformation) { VersionInformationWindowController versionInfo = new VersionInformationWindowController(); versionInfo.ShowWindow(this); } } }
partial void ShowExogenousParameters(NSButton sender) { ExogenousProcessesWindowController = (NSWindowController)Storyboard.InstantiateControllerWithIdentifier("ExogenousProcessesWindowController"); var viewController = (ExogenousProcessesViewController)ExogenousProcessesWindowController.Window.ContentViewController; viewController.ViewModel = new ExogenousProcessesViewModel( new ExogenousParameters( Enumerable.Range(0, ViewModel.UVPMatrix.Dimension.Rows) .Select(ViewModel.UVPMatrix.RowByIndex) .Select(uvpRow => uvpRow.First(elem => elem != null)) .Select(uvp => uvp.Output) .ToArray(), ViewModel.CRMatrix, ViewModel.UVPMatrix ) ); ExogenousProcessesWindowController.ShowWindow(this); }
public string OpenWindow(Page page) { var identifier = Guid.NewGuid(); var nsWindow = new NSWindow { Title = page.Title ?? string.Empty, BackingType = NSBackingStore.Buffered, StyleMask = NSWindowStyle.Miniaturizable | NSWindowStyle.Titled | NSWindowStyle.Resizable, Level = NSWindowLevel.Normal, Identifier = identifier.ToString() }; nsWindow.SetFrame(new CGRect(200, 1000, 1024, 768), true, true); NSViewController controller = page.CreateViewController(); nsWindow.ContentView = controller.View; NSWindowController windowController = new NSWindowController(nsWindow); windowController.ShowWindow(null); return(identifier.ToString()); }
public void NSWindowController_ShowWindowTest() { NSWindowController c = new NSWindowController(); c.ShowWindow(null); }
public void ShowWindow(NSObject sender) => peopleWindow.ShowWindow(sender);
public void ShowWindow(string title) { censusWindow.Window.Title = title; censusWindow.ShowWindow(App); }