private void RegisterToStickyWindows() { // 1. Try to get startup options passed from GD. Create our default options if there aren't any passed options. Make your app a sticky flat window with title Clients // Hint - you can use the placement object for your default config and you can get the startup options from Glue.StickyWindows.GetStartupOptions(); var gwOptions = App.Glue.GlueWindows.GetStartupOptions(); if (gwOptions == null) { gwOptions = new GlueWindowOptions(); var placement = new GlueWindowScreenPlacement(); var bounds = new GlueWindowBounds { Width = 300, Height = 190 }; placement.WithBounds(bounds); gwOptions .WithId(Guid.NewGuid().ToString()) .WithPlacement(placement); } gwOptions .WithType(GlueWindowType.Flat) .WithTitle("Notifications"); App.Glue.GlueWindows.RegisterWindow(this, gwOptions); }
internal void RegisterGlue(Glue42 glue) { _glue = glue; UpdateUI(true); //bounds are optional. With them we will just set initial placement of the application var defaultBounds = new GlueWindowBounds() { X = (int)((SystemParameters.PrimaryScreenWidth / 2) - (Width / 2)), Y = (int)((SystemParameters.PrimaryScreenHeight / 2) - (Height / 2)), Width = (int)Width, Height = (int)Height }; var gwOptions = glue.GetStartupWindowOptions("AppManager Demo", defaultBounds); gwOptions.WithType(GlueWindowType.Flat); glue.GlueWindows?.RegisterWindow(this, gwOptions); var appManager = glue.AppManager; if (appManager != null) { appManager.ApplicationAdded += OnApplicationAdded; appManager.ApplicationUpdated += OnApplicationUpdated; appManager.ApplicationRemoved += OnApplicationRemoved; appManager.ApplicationInstanceStarted += OnApplicationInstanceStarted; appManager.ApplicationInstanceStopped += OnApplicationInstanceStopped; ExecuteAction(() => appManager.Applications.Each(OnApplicationAdded)); } }
private void RegisterToStickyWindows() { // 1. Try to get startup options passed from GD // Create our default options if there aren't any passed options // Make your app a sticky flat window with title Clients var bounds = new GlueWindowBounds { Width = 1200, Height = 700, }; var placement = new GlueWindowScreenPlacement(); placement.WithBounds(bounds); }
private void RegisterToStickyWindows() { // 1. Try to get startup options passed from GD // Create our default options if there aren't any passed options // Make your app a sticky flat window with title Portfolio var bounds = new GlueWindowBounds { Width = 1250, Height = 900 }; var placement = new GlueWindowScreenPlacement(); placement.WithBounds(bounds); var id = Guid.NewGuid().ToString(); }
internal void RegisterGlue(Glue42 glue) { _glue = glue; UpdateUI(true); //bounds are optional. With them we will just set initial placement of the application var defaultBounds = new GlueWindowBounds() { X = (int)((SystemParameters.PrimaryScreenWidth / 2) - (Width / 2)), Y = (int)((SystemParameters.PrimaryScreenHeight / 2) - (Height / 2)), Width = (int)Width, Height = (int)Height }; var gwOptions = glue.GetStartupWindowOptions("Notification Publisher", defaultBounds); gwOptions.WithType(GlueWindowType.Tab); //register the window glue.GlueWindows?.RegisterWindow(this, gwOptions); //register notification service glue.Interop.RegisterService <INotificationHandler>(this); }
internal void RegisterGlue(Glue42 glue) { _glue = glue; UpdateUI(true); //bounds are optional. With them we will just set initial placement of the application var defaultBounds = new GlueWindowBounds() { X = (int)((SystemParameters.PrimaryScreenWidth / 2) - (Width / 2)), Y = (int)((SystemParameters.PrimaryScreenHeight / 2) - (Height / 2)), Width = (int)Width, Height = (int)Height }; var gwOptions = glue.GetStartupWindowOptions(Title, defaultBounds); glue.GlueWindows?.RegisterWindow(this, gwOptions).ContinueWith(t => { if (t.IsCompleted) { GlueWindow = t.Result; } }, TaskScheduler.FromCurrentSynchronizationContext()); }