public static void showVMDialog(PropertyChangedBase viewmodel, string windowHeader) { WindowManager windowManager = new WindowManager(); dynamic settings = new ExpandoObject(); settings.WindowStyle = WindowStyle.ThreeDBorderWindow; settings.ShowInTaskbar = true; settings.Title = windowHeader; settings.WindowState = WindowState.Normal; settings.ResizeMode = ResizeMode.CanMinimize; windowManager.ShowDialog(viewmodel, null, settings); }
public void ShowTagSearch() { var tagSearch = new TagSearchViewModel(); tagSearch.OnAddingTag += this.OnOnAddingTag; var wm = new WindowManager(); wm.ShowWindow(tagSearch); }
public CountdownTimerControlViewModel(WindowManager wman) { //initalization tmr = new Timer(countInterval); tmr.Elapsed += HandleTimerCountdown; _buttonsList = new BindableCollection<Deltagere>(); //basically list of players CTBSVM = new CountdowntimerBigScreenViewModel(); winMan = wman; DisplayName = "Nedtællings-kontrolskærm"; }
public AppBootstrapper() : base() { windowManager = new WindowManager(); smEntities = new stagemanagerEntities(); LoginViewModel loginViewModel = new LoginViewModel(); // Show Window windowManager.ShowWindow(loginViewModel); }
/// <summary> /// Opens the about window /// </summary> private void About() { if (!about_open_) { about_open_ = true; var manager = new WindowManager(); var about = new AboutViewModel(locale_); manager.ShowDialog(about); about_open_ = false; } }
public AppBootstrapper() : base() { windowManager = new WindowManager(); defaultFactory = new DefaultFactory(); smEntities = new stagemanagerEntities(); entityService = new EntityService(defaultFactory, smEntities); viewController = new ViewController(); // Observer observable MainViewModel mainViewModel = new MainViewModel(); mainViewModel.SomethingHappened += viewController.HandleEvent; // Show Window windowManager.ShowWindow(mainViewModel); }
public void Execute(object parameter) { try { System.Diagnostics.Process.Start(this.URI.AbsoluteUri); } catch { IWindowManager windowManager; try { windowManager = IoC.Get<IWindowManager>(); } catch { windowManager = new WindowManager(); } windowManager.ShowMessageBox(Properties.Resources.noLinkClient, Properties.Resources.errorTitle, MessageBoxButton.OK); } }
/// <summary> /// Shows an exception message to the user /// </summary> /// <param name="exception">Exception message</param> private void ShowException(Exception exception) { while (exception.InnerException != null) { exception = exception.InnerException; } var manager = new WindowManager(); manager.ShowDialog(new ExceptionViewModel(exception)); Exit(1); }
public void Connect() { Login myLogin = new Login(); administrators user = myLogin.Connect(username, password); if (user != null) { // Observer observable ViewController viewController = new ViewController(); MainViewModel mainViewModel = new MainViewModel(user); mainViewModel.SomethingHappened += viewController.HandleEvent; WindowManager windowManager = new WindowManager(); mainViewModel.ChangeButton(decideWindowState()); windowManager.ShowWindow(mainViewModel); WVisible = Visibility.Hidden; } else { Visible =true; } }
public void Start() { WindowManager windowManager = new WindowManager(); _w = new WizardViewModel(); windowManager.ShowWindow( _w, null, null ); }
/// <summary> /// Opens a new LayerEditorView for the given layer /// </summary> /// <param name="layer">The layer to open the view for</param> public void EditLayer(LayerModel layer) { if (layer == null) return; IWindowManager manager = new WindowManager(); var editorVm = _layerEditorVmFactory.CreateLayerEditorVm(_gameModel.DataModel, layer); dynamic settings = new ExpandoObject(); var icon = ImageUtilities.GenerateWindowIcon(); settings.Title = "Artemis | Edit " + layer.Name; settings.Icon = icon; manager.ShowDialog(editorVm, null, settings); //// The layer editor VM may have created a new instance of the layer, reapply it to the list //layer.Replace(editorVm.Layer); //layer = editorVm.Layer; // If the layer was a folder, but isn't anymore, assign it's children to it's parent. if (!(layer.LayerType is FolderType) && layer.Children.Any()) { while (layer.Children.Any()) { var child = layer.Children[0]; layer.Children.Remove(child); if (layer.Parent != null) { layer.Parent.Children.Add(child); layer.Parent.FixOrder(); } else { layer.Profile.Layers.Add(child); layer.Profile.FixOrder(); } } } UpdateLayerList(layer); }
public void OpenAbout() { var windowManager = new WindowManager(); windowManager.ShowDialog(new AboutViewModel()); }
public void Edit() { var windowManager = new WindowManager(); var dialogVM = IoC.Get<JobDialogViewModel>(); dialogVM.Init(_job, _isNew); var result = windowManager.ShowDialog(dialogVM); if (result == true) { NotifyOfPropertyChange(() => Source); NotifyOfPropertyChange(() => Destination); NotifyOfPropertyChange(() => Protocol); NotifyOfPropertyChange(() => Running); NotifyOfPropertyChange(() => RunningSince); } else if (result == false && _isNew) { Remove(); } }
public void Start() { _windowManager = new CustomWindowManager(); _appViewModel = new AppViewModel( this ); _windowManager.ShowWindow( _appViewModel, null, null ); _mainWindow = _appViewModel.GetView( null ) as Window; //_interopHelper = new WindowInteropHelper( _mainWindow ); //RegisterHotKeys(); _contextSaver = Context.ServiceContainer.GetService<IContextSaver>(); _sharedDictionary = Context.ServiceContainer.GetService<ISharedDictionary>(); _mainWindow.Closing += OnWindowClosing; }
public AppBootstrapper() { this.windowManager = new WindowManager(); this.Initialize(); }
/// <summary> /// Shows the main view /// </summary> private void Show() { if (!main_open_) { main_open_ = true; var manager = new WindowManager(); var main = new MainViewModel(configuration_, locale_); manager.ShowDialog(main); main_open_ = false; } }
public void EditComic() { this.windowManager = new WindowManager(); var newComicModel = new NewComicModel(this.Comic, false); windowManager.ShowDialog(newComicModel); }
public void NewWorkSpace() { var folderDialog = new FolderBrowserDialog { SelectedPath = "C:\\" }; DialogResult result = folderDialog.ShowDialog(); if (result.ToString() == "OK") { comic.WorkSpace = folderDialog.SelectedPath; this.windowManager = new WindowManager(); var newComicModel = new NewComicModel(this.Comic, true); windowManager.ShowDialog(newComicModel); } }
public void ShowDebug() { IWindowManager manager = new WindowManager(); dynamic settings = new ExpandoObject(); var icon = ImageUtilities.GenerateWindowIcon(); settings.Title = "Artemis | Debugger"; settings.Icon = icon; manager.ShowWindow(_debugViewModel, null, settings); }
public void Teardown() { _stopping = false; _appViewModel = null; _windowManager = null; }
public WIALib(WindowManager wm) { _wm = wm; }
protected override void OnStartup(object sender, StartupEventArgs e) { // configure and bind app-specific dependencies kernel.Bind<IEnvironment>().ToConstant(environment).InSingletonScope(); windowManager = new WindowManager(); kernel.Bind<WindowManager>().ToConstant(windowManager); kernel.Bind<IWindowManager>().To<WindowManager>(); kernel.Bind<AppHostViewModel>().ToSelf().InSingletonScope(); try { sharedDataDirectory = new SharedDataDirectory(); } catch (LockFailedException) { // if cannot obtain exclusive lock on data directory, it means another instance is already running Application.Current.Shutdown(); return; } var config = new WurmAssistantConfig() {DataDirectoryFullPath = sharedDataDirectory.FullName}; kernel.Bind<IWurmAssistantConfig>().ToConstant(config); var marshaller = new WpfGuiThreadEventMarshaller(environment); kernel.Bind<IEventMarshaller, WpfGuiThreadEventMarshaller>().ToConstant(marshaller); // bind app-specific dependencies kernel.Bind<ILogSearcherModuleGui>().To<LogSearcherForm>(); // create hosting window for the app var hostView = kernel.Get<AppHostViewModel>(); windowManager.ShowWindow(hostView, null, new Dictionary<string, object>()); // initialize and resolve the app coreBootstrapper = new CoreBootstrapper(kernel); // show the application startup screen var appStartVm = coreBootstrapper.GetAppStartViewModel(); hostView.CurrentScreen = appStartVm; // initialize application coreBootstrapper.BootstrapRuntime(); globalLogger = kernel.Get<LoggerFactory>().Create(); // show the application running screen var appRunningVm = coreBootstrapper.GetAppRunningViewModel(); hostView.CurrentScreen = appRunningVm; }
/// <summary> /// Locates the view model, locates the associate view, binds them and shows it as the root view. /// </summary> /// <param name="viewModelType">The view model type.</param> protected static void DisplayRootViewFor(Type viewModelType) { IWindowManager windowManager; try { windowManager = IoC.Get<IWindowManager>(); } catch { windowManager = new WindowManager(); } windowManager.ShowWindow(IoC.GetInstance(viewModelType, null)); }
public void Start() { _windowManager = new CustomWindowManager(); _appViewModel = new AppViewModel( this ); _windowManager.ShowWindow( _appViewModel, null, null ); _mainWindow = _appViewModel.GetView( null ) as Window; //_interopHelper = new WindowInteropHelper( _mainWindow ); //RegisterHotKeys(); _mainWindow.Closing += OnWindowClosing; if( HelpService.Status == InternalRunningStatus.Started ) { HelpService.Service.RegisterHelpContent( PluginId, typeof( KeyboardEditor ).Assembly.GetManifestResourceStream( "KeyboardEditor.Resources.helpcontent.zip" ) ); } else if( HelpService.Status.IsStoppedOrDisabled ) HelpService.ServiceStatusChanged += HelpService_ServiceStatusChanged; }