Пример #1
0
 public CommandsView(CommandsViewModel viewModel)
 {
     InitializeComponent();
     Loaded += (s, e) =>
     {
         DataContext = viewModel;
     };
 }
Пример #2
0
 public MainWindowViewModel()
 {
     DirectoryVM = new SelectDirectoryViewModel();
     CommandsVM = new CommandsViewModel(from type in Assembly.GetExecutingAssembly().GetTypes()
                                        where !type.IsInterface && !type.IsAbstract
                                        where typeof(IFlowCommand).IsAssignableFrom(type)
                                        select Activator.CreateInstance(type) as IFlowCommand);
 }
Пример #3
0
 public override void Dispose()
 {
     base.Dispose();
     ColumnHost.ActiveBlades.ForEach(x => (((x.Content as Frame)?.Content as ColumnShellPage).SlimContentPage as ColumnViewBase).ItemInvoked -= ColumnViewBase_ItemInvoked);
     ColumnHost.ActiveBlades.ForEach(x => ((x.Content as Frame)?.Content as UIElement).RemoveHandler(UIElement.PointerPressedEvent, ColumnPointerPressedHandler));
     ColumnHost.ActiveBlades.Select(x => (x.Content as Frame)?.Content).OfType <IDisposable>().ForEach(x => x.Dispose());
     UnhookEvents();
     CommandsViewModel?.Dispose();
 }
Пример #4
0
 public override void Dispose()
 {
     base.Dispose();
     ColumnHost.Items.OfType <BladeItem>().Select(x => ((x.Content as Frame)?.Content as ColumnShellPage).SlimContentPage as ColumnViewBase).Where(x => x != null).ForEach(x => x.ItemInvoked -= ColumnViewBase_ItemInvoked);
     ColumnHost.Items.OfType <BladeItem>().ForEach(x => ((x.Content as Frame)?.Content as ColumnShellPage).ContentChanged -= ColumnViewBrowser_ContentChanged);
     ColumnHost.Items.OfType <BladeItem>().ForEach(x => ((x.Content as Frame)?.Content as UIElement).GotFocus             -= ColumnViewBrowser_GotFocus);
     ColumnHost.Items.OfType <BladeItem>().Select(x => (x.Content as Frame)?.Content).OfType <IDisposable>().ForEach(x => x.Dispose());
     UnhookEvents();
     CommandsViewModel?.Dispose();
 }
 public override void Dispose()
 {
     base.Dispose();
     ColumnHost.ActiveBlades.Select(x => (x.Content as Frame)?.Content).OfType <IDisposable>().ForEach(x => x.Dispose());
     UnhookEvents();
     CommandsViewModel?.Dispose();
     ColumnViewBase.ItemInvoked             -= ColumnViewBase_ItemInvoked;
     ColumnViewBase.UnFocusPreviousListView -= ColumnViewBase_UnFocusPreviousListView;
     ColumnViewBase.DismissColumn           -= ColumnViewBase_DismissColumn;
 }
        public MainWindowViewModel(
            NotificationViewModel notificationViewModel,
            SetupViewModel setupMenuViewModel,
            CommandsViewModel commandsViewModel,
            MainViewModel mainViewViewModel,
            IAppConfigService appConfigService,
            ModalWindowManager modalWindowManager)
        {
            SetupMenuViewModel = setupMenuViewModel;
            CommandsViewModel  = commandsViewModel;
            Notification       = notificationViewModel;
            MainViewViewModel  = mainViewViewModel;
            AppConfigService   = appConfigService;
            ModalWindowManager = modalWindowManager;

            Content = MainViewViewModel;
        }
Пример #7
0
 public override void Dispose()
 {
     UnhookEvents();
     CommandsViewModel?.Dispose();
 }
Пример #8
0
 public override void Dispose()
 {
     Debugger.Break(); // Not Implemented
     CommandsViewModel?.Dispose();
 }