public void SetScreen(Screen screen) { if (ScreenAvailable) throw new InvalidOperationException("Message already has a screen set of type " + Screen.GetType().Name); if (!TypeOfScreen.IsAssignableFrom(screen.GetType())) throw new InvalidOperationException("Screen {0} is incompatible with {1}".Fmt(screen.GetType().Name, TypeOfScreen.Name)); Screen = screen; }
public StartupViewModelTests() { _screen = new Screen(); _navigation = new Mock<INavigationService>(); _viewModel = new StartupViewModel( new[] {_screen}, _navigation.Object); }
public NewRegister( RegisterViewModel registerViewModel, IWindowManager windowManager, Screen returnWindow) { _registerViewModel = registerViewModel; _windowManager = windowManager; _returnWindow = returnWindow; }
private static Page GetPage(Screen vm) { var vmView = ViewLocator.LocateForModel(vm, null, null); if (vmView == null) throw new Exception("没有找到视图"); ViewModelBinder.Bind(vm, vmView, null); var activator = vm as IActivate; if (activator != null) activator.Activate(); return (Page)vmView; }
public ToastProvider(Screen s) { this.screen = s; try { this.windowManager = IoC.Get<IWindowManager>(); } catch { this.windowManager = new WindowManager(); } }
public void NavigateToScreen(Screen screen, bool endableIdleTimeout = false) { StopIdleTimeout(); EventAggregator.Publish(screen); if (endableIdleTimeout) StartIdleTimeout(); }
public void Init(ViewModelBase defaultView) { this._defaultContent = defaultView; this.SetDefaultView(); }
/// <summary> /// Initializes a new instance of the <see cref="ChangeMainScreenEvent"/> class /// </summary> /// <param name="screen">The screen to switch to</param> public ChangeMainScreenEvent(Screen screen) { this.Screen = screen; }
public ActivateScreenMessage(Screen screen) { Screen = screen; }
public void NavigateToScreen(Screen screen) { EventAggregator.Publish(screen); }
private void BindViewModelAndPage(Screen screen, Page page) { ViewModelBinder.Bind(screen, page, screen); if (TheConductor != null) { TheConductor.ActivateItem(screen); //IActivate activator = screen as IActivate; //if (activator != null) //{ // activator.Activate(); //} } }
public TaskbarBlinkProvider(Screen s) { this.screen = s; }
public void LoadModule2() { var screen = IoC.Get<AnotherViewModel>(); Another = screen; }
public ChildWindowBagItem(ChildWindowType windowType, Screen viewModel) : this() { WindowType = windowType; ViewModel = viewModel; }
public DesignerViewModel(Screen parentScreen) { _parentScreen = parentScreen; LoadedForkTale = new ForkTale(); }
public MDIViewModel(SimpleContainer container) { this.Master = container.GetInstance<SettingViewModel>(); this.Detail = container.GetInstance<TabViewModel>(); }