Exemplo n.º 1
0
        public INewTabHost <Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            //When tearing a windows, create a new main window
            var view = ServiceLocator.Current.GetInstance <MainWindow>();

            return(new NewTabHost <Window>(view, view.TabablzControl));
        }
Exemplo n.º 2
0
        public INewTabHost <Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            var view = new TemplateWindow();

            view.DataContext = source.DataContext;
            return(new NewTabHost <Window>(view, view.TabablzControl));
        }
Exemplo n.º 3
0
        public INewTabHost<Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            TabControlVM tcvm = new TabControlVM();
            TabWindowVM twvm = new TabWindowVM() { };
            twvm.TabControlVMs.Add(tcvm);
            InterTabWindow view = new InterTabWindow(twvm);

            Window window = Window.GetWindow(source);
            TabControlVM tvm = (TabControlVM)source.DataContext;
            MainWindowVM mvm = null;
            if(window is MainWindow)
            {
                mvm = (window as MainWindow).MainWindowVM;
                if (tvm.TabPanelVMs.Count == 1)
                {
                    mvm.TabPanelManagerVM.TabControlVMs.Remove(tvm);
                }
            }
            else if(window is InterTabWindow)
            {
                mvm = (window as InterTabWindow).MainWindowVM;
                if (tvm.TabPanelVMs.Count == 1)
                {
                    (window as InterTabWindow).TabWindowVM.TabControlVMs.Remove(tvm);
                }
            }
            view.MainWindowVM =mvm;
            view.MainWindowVM.TabPanelManagerVM.TabWindowVMs.Add(view.TabWindowVM);

            NewTabHost<InterTabWindow> th= new  NewTabHost<InterTabWindow>(view, view.TabablzControl) ;
            return th;
        }
Exemplo n.º 4
0
        public INewTabHost<Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            var window = _factory.Create();
           

            return new NewTabHost<Window>(window, window.InitialTabablzControl);
        }
        public WindowViewModel(IObjectProvider objectProvider, IWindowFactory windowFactory)
        {
            _objectProvider = objectProvider;
            _interTabClient = new InterTabClient(windowFactory);
            _showMenuCommand =  new Command(ShowMenu,()=> Selected!=null && !(Selected.Content is MenuItems));
            _showInGitHubCommand = new Command(()=>   Process.Start("https://github.com/RolandPheasant"));

            var menuController = _data.ToObservableChangeSet()
                                        .Filter(vc => vc.Content is MenuItems)
                                        .Transform(vc => (MenuItems) vc.Content)
                                        .MergeMany(menuItem => menuItem.ItemCreated)
                                        .Subscribe(item =>
                                        {
                                            _data.Add(item);
                                            Selected = item;
                                        });
            

            _cleanUp = Disposable.Create(() =>
                                         {
                                             menuController.Dispose();
                                             foreach (var disposable in  _data.Select(vc=>vc.Content).OfType<IDisposable>())
                                                 disposable.Dispose();
                                         });
        }
Exemplo n.º 6
0
        public INewTabHost <Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            var window = _factory.Create();


            return(new NewTabHost <Window>(window, window.InitialTabablzControl));
        }
        public WindowViewModel(
            ViewContainer.Factory viewContainerFactory,
            MenuBuilder.Factory menuItemsFactory,
            IInterTabClient interTabClient)
        {
            _viewContainerFactory = viewContainerFactory;
            _menuItemsFactory     = menuItemsFactory;
            InterTabClient        = interTabClient;

            _showMenuCommand    = ReactiveCommand.Create(ShowMenu, Observable.Return <bool>(Selected != null && !(Selected.Content is MenuBuilder)));
            ShowInGitHubCommand = ReactiveCommand.Create(() => Process.Start("https://github.com/RolandPheasant"));

            var menuController = Views.ToObservableChangeSet()
                                 .Filter(vc => vc.Content is MenuBuilder)
                                 .Transform(vc => (MenuBuilder)vc.Content)
                                 .MergeMany(menuItems => menuItems.ItemCreated)
                                 .Subscribe(item =>
            {
                Views.Add(item);
                Selected = item;
            });

            _cleanUp = Disposable.Create(() =>
            {
                menuController.Dispose();
                foreach (var disposable in Views.Select(vc => vc.Content).OfType <IDisposable>())
                {
                    disposable.Dispose();
                }
            });
        }
Exemplo n.º 8
0
        public WindowViewModel(IObjectProvider objectProvider, IWindowFactory windowFactory)
        {
            _objectProvider      = objectProvider;
            _interTabClient      = new InterTabClient(windowFactory);
            _showMenuCommand     = new Command(ShowMenu, () => Selected != null && !(Selected.Content is MenuItems));
            _showInGitHubCommand = new Command(() => Process.Start("https://github.com/RolandPheasant"));

            var menuController = _data.ToObservableChangeSet()
                                 .Filter(vc => vc.Content is MenuItems)
                                 .Transform(vc => (MenuItems)vc.Content)
                                 .MergeMany(menuItem => menuItem.ItemCreated)
                                 .Subscribe(item =>
            {
                _data.Add(item);
                Selected = item;
            });


            _cleanUp = Disposable.Create(() =>
            {
                menuController.Dispose();
                foreach (var disposable in  _data.Select(vc => vc.Content).OfType <IDisposable>())
                {
                    disposable.Dispose();
                }
            });
        }
 public INewTabHost<Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
 {
     var window = new Window();
     var tabControl = new AB_DockingTabControl();
     window.Content = tabControl;
     return new NewTabHost<Window>(window, tabControl);
 }
Exemplo n.º 10
0
        public INewTabHost <Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            var childWindow = new ChildWindow();

            childWindow.TabablzControl.Items.Clear();
            return(new NewTabHost <Window>(childWindow, childWindow.TabablzControl));
        }
Exemplo n.º 11
0
        public INewTabHost <Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            ChildWindow childWindow = new ChildWindow();

            var us = (UserControl)source.SelectedContent;
            var sz = new Size(us.ActualWidth + 10, us.ActualHeight + 80);

            childWindow = new ChildWindow(sz);


            //if (source.SelectedContent.GetType().Name == typeof(ScrappView).Name) {
            //     sz = new Size(280, 120);
            //    childWindow = new ChildWindow(sz);
            //}else
            //    if (source.SelectedContent.GetType().Name == typeof(PainelElementoView).Name)
            //    {
            //        sz = new Size(650, 500);
            //        childWindow = new ChildWindow(sz);
            //    }else
            //if (source.SelectedContent.GetType().Name == typeof(ConsultaCaso).Name)
            //{
            //     sz = new Size(250, 500);
            //    childWindow = new ChildWindow(sz);
            //}else
            //if (source.SelectedContent.GetType().Name == typeof(PainelElementoInfo).Name)
            //{
            //     sz = new Size(500, 300);
            //    childWindow = new ChildWindow(sz);
            //}


            var nw = new NewTabHost <Window>(childWindow, childWindow.ChildWindowTabablzControl);

            return(nw);
        }
Exemplo n.º 12
0
            INewTabHost <Window> IInterTabClient.GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
            {
                StyledWindow window = StyledWindow.Create <TornTabView>();

                window.OverlapTitleBar = true;
                return(new NewTabHost <Window>(window, ((TornTabView)window.Content).InitialTabablzControl));
            }
 public INewTabHost<Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
 {
     var view = new BasicExampleTemplateWindow();
     var model = new BasicExampleTemplateModel(interTabClient, partition);
     view.DataContext = model;
     return new NewTabHost<Window>(view, view.TabablzControl);
 }
Exemplo n.º 14
0
        public INewTabHost <Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            if (SourceTabablzControl == null)
            {
                SourceTabablzControl = source;
                SourceTabablzControl.IsVisibleChanged += SourceTabablzControl_IsVisibleChanged;
            }

            var window = new DragablzWindow();

            window.Height        = source.ActualHeight;
            window.Width         = source.ActualWidth;
            window.WindowState   = WindowState.Normal;
            window.SizeChanged  += Window_SizeChanged;
            window.StateChanged += Window_StateChanged;

            var tabControl = new TabablzControl();

            window.Content = tabControl;
            var newTabHost = new NewTabHost <Window>(window, tabControl);

            NewTabHosts.Add(newTabHost);
            window.Closed += Window_Closed;
            return(newTabHost);
        }
 public TearedShellViewModel(
     IInterTabClient interTabClient,
     IInterLayoutClient interLayoutClient)
 {
     InterTabClient    = interTabClient;
     InterLayoutClient = interLayoutClient;
 }
Exemplo n.º 16
0
        public virtual INewTabHost <Window> GetNewHost(IInterTabClient interTabClient, object partition, DockControl source)
        {
            if (source == null)
            {
                throw new ArgumentNullException(nameof(source));
            }
            var sourceWindow = source.GetSelfAndVisualAncestors().OfType <Window>().First();

            if (sourceWindow == null)
            {
                throw new ApplicationException("Unable to ascrtain source window.");
            }

            var newHost = (Window)Activator.CreateInstance(sourceWindow.GetType());

            Dispatcher.UIThread.InvokeAsync(new Action(() => { }), DispatcherPriority.DataBind);

            var newDockControl = newHost.GetSelfAndLogicalAncestors().OfType <DockControl>().FirstOrDefault();

            if (newDockControl == null)
            {
                throw new ApplicationException("Unable to ascrtain tab control.");
            }

            return(new NewTabHost <Window>(newHost, newDockControl));
        }
Exemplo n.º 17
0
 public INewTabHost<Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
 {
     var view = new MainWindow();
     var model = new MainWindowViewModel();
     view.DataContext = model;
     return new NewTabHost<Window>(view, view.TabablzControl);
 }
Exemplo n.º 18
0
        public TraderWindowModel(IObjectProvider objectProvider,TraderWindowFactory traderWindowFactory )
        {
            _objectProvider = objectProvider;
            _interTabClient = new InterTabClient(traderWindowFactory);
            _showMenu =  new Command(OnShowMenu);

            var menuController = _data.AsObservable(vc => vc.Id)
                                        .Filter(vc => vc.Content is MenuItems)
                                        .Transform(vc => (MenuItems) vc.Content)
                                        .MergeMany(menuItem => menuItem.ItemCreated)
                                        .Subscribe(item =>
                                        {
                                            _data.Add(item);
                                            Selected = item;
                                        });

            _cleanUp = Disposable.Create(() =>
                                         {
                                             menuController.Dispose();
                                             foreach (var disposable in  _data.Select(vc=>vc.Content).OfType<IDisposable>())
                                                 disposable.Dispose();
                                             
                                             _newMenuItemSubscriber.Dispose();
                                         });
        }
Exemplo n.º 19
0
        public virtual INewTabHost <Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }
            var sourceWindow = Window.GetWindow(source);

            if (sourceWindow == null)
            {
                throw new ApplicationException("Unable to ascertain source window.");
            }
            var newWindow = (Window)Activator.CreateInstance(sourceWindow.GetType());

            newWindow.Dispatcher.Invoke(new Action(() => { }), DispatcherPriority.DataBind);

            var newTabablzControl = newWindow.LogicalTreeDepthFirstTraversal().OfType <TabablzControl>().FirstOrDefault();

            if (newTabablzControl == null)
            {
                throw new ApplicationException("Unable to ascertain tab control.");
            }

            if (newTabablzControl.ItemsSource == null)
            {
                newTabablzControl.Items.Clear();
            }

            return(new NewTabHost <Window>(newWindow, newTabablzControl));
        }
Exemplo n.º 20
0
            /// <summary>
            ///     Create a new <see cref="SigmaWindow" /> when a tab is dragged out.
            ///     Provide a new host window so a tab can be teared from an existing window into
            ///     a new window.
            /// </summary>
            /// <param name="interTabClient"></param>
            /// <param name="partition">Provides the partition where the drag operation was initiated.</param>
            /// <param name="source">The source control where a dragging operation was initiated.</param>
            /// <returns></returns>
            public INewTabHost <Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
            {
                TWindow window = Construct(new[] { typeof(WPFMonitor), typeof(Application), typeof(string), typeof(TWindow) },
                                           new object[] { _monitor, _app, _title, _monitor.Window });

                return(new NewTabHost <WPFWindow>(window, window.TabControl.InitialTabablzControl));
            }
Exemplo n.º 21
0
        public TraderWindowModel(IObjectProvider objectProvider, TraderWindowFactory traderWindowFactory)
        {
            _objectProvider = objectProvider;
            _interTabClient = new InterTabClient(traderWindowFactory);
            _showMenu       = new Command(OnShowMenu);

            var menuController = _data.AsObservable(vc => vc.Id)
                                 .Filter(vc => vc.Content is MenuItems)
                                 .Transform(vc => (MenuItems)vc.Content)
                                 .MergeMany(menuItem => menuItem.ItemCreated)
                                 .Subscribe(item =>
            {
                _data.Add(item);
                Selected = item;
            });

            _cleanUp = Disposable.Create(() =>
            {
                menuController.Dispose();
                foreach (var disposable in  _data.Select(vc => vc.Content).OfType <IDisposable>())
                {
                    disposable.Dispose();
                }

                _newMenuItemSubscriber.Dispose();
            });
        }
Exemplo n.º 22
0
        public INewTabHost <Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            MainWindow window   = new MainWindow(fullscreen: false);
            MainPage   mainPage = window.GetMainPage();

            return(new NewTabHost <Window>(window, mainPage.tcMainTabControl));
        }
Exemplo n.º 23
0
 public INewTabHost<Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
 {
     var view = new TabWindow();
     view.AllowsTransparency = true;
     view.WindowStyle = WindowStyle.None;
     return new NewTabHost<TabWindow>(view, view.InitialTabablzControl);
 }
        public INewTabHost<Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            var childWindow = new ChildWindow();

            childWindow.TabablzControl.Items.Clear();

            return new NewTabHost<Window>(childWindow, childWindow.TabablzControl);
        }
Exemplo n.º 25
0
        public INewTabHost <Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            var view  = new BoundExampleWindow();
            var model = new BoundExampleModel();

            view.DataContext = model;
            return(new NewTabHost <Window>(view, view.InitialTabablzControl));
        }
Exemplo n.º 26
0
        public INewTabHost <Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            MainWindow view  = new();
            var        model = ChromEr.Instance.CreateMainViewModel(new List <DirectoryTabItemViewModel>());

            view.DataContext = model;
            return(new NewTabHost <Window>(view, view.InitMainView.InitialTabablzControl));
        }
Exemplo n.º 27
0
        public INewTabHost <Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            var viewModel = viewModelFactory.CreateViewModel <MainWindowViewModel>();
            var window    = new MainWindow();

            window.DataContext = viewModel;
            return(new NewTabHost <MainWindow>(window, window.TabablzControl));
        }
Exemplo n.º 28
0
        public INewTabHost <Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            var win = new MainWindow();
            var vm  = new MainViewModel(false, new IWindowImpl(win));

            win.DataContext = vm;
            return(new NewTabHost <Window>(win, win.MainView.TabablzControl));
        }
Exemplo n.º 29
0
        public INewTabHost <Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            var view = new TabWindow();

            view.AllowsTransparency = true;
            view.WindowStyle        = WindowStyle.None;
            return(new NewTabHost <TabWindow>(view, view.InitialTabablzControl));
        }
        public INewTabHost <Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            var view  = new BasicExampleTemplateWindow();
            var model = new BasicExampleTemplateModel(interTabClient, partition);

            view.DataContext = model;
            return(new NewTabHost <Window>(view, view.TabablzControl));
        }
Exemplo n.º 31
0
        /// <summary>
        /// Implementation of InterTabClient.
        /// To open dragged tabs in a different window class than they originated from.
        /// </summary>
        /// <param name="interTabClient">InterTabClient</param>
        /// <param name="partition">Partition</param>
        /// <param name="source">Source</param>
        /// <returns>Tab host.</returns>
        public INewTabHost <Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            TabWindow view = new TabWindow();

            view.Owner    = App.Current.MainWindow;
            TControl      = source;
            view.Closing += new CancelEventHandler(CloseWindow);
            return(new NewTabHost <Window>(view, view.TabablzControl)); //TabablzControl is a names control in the XAML.
        }
Exemplo n.º 32
0
        public MainWindowViewModel(IRegionManager regionManager)
        {
            this.regionManager = regionManager;

            OpenView1      = new DelegateCommand(OpenView1Action);
            OpenView2      = new DelegateCommand(OpenView2Action);
            OpenView3      = new DelegateCommand(OpenView3Action);
            InterTabClient = new InterTabClient();
        }
Exemplo n.º 33
0
        public override INewTabHost <Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            // We hold the only backend in DataContext on all MainWindow (host).
            // We need to copy it to the new window.
            var host = base.GetNewHost(interTabClient, partition, source);

            host.Container.DataContext = Window.GetWindow(source).DataContext;
            return(host);
        }
Exemplo n.º 34
0
        public INewTabHost <Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            var view = new TabShellWindow();

            view.TabsContainer.InterTabController = new InterTabController {
                InterTabClient = interTabClient
            };
            return(new NewTabHost <Window>(view, view.TabsContainer));
        }
 public ShellViewModel(
     IInterTabClient interTabClient,
     IInterLayoutClient interLayoutClient)
 {
     InterTabClient    = interTabClient;
     InterLayoutClient = interLayoutClient;
     Items.Add(new TabContentViewModel(1));
     Items.Add(new TabContentViewModel(2));
     Items.Add(new TabContentViewModel(3));
 }
Exemplo n.º 36
0
 public MainWindowViewModel()
 {
     InterTabClient = new MainInterTabClient();
     contentList    = new List <UIElement>();
     projects       = new ObservableCollection <Views.Controls.Project>();
     contentList.Add(new Dashboard());
     contentList.Add(new Projects());
     contentList.Add(new Reports());
     ContentIndex = 0;
 }
Exemplo n.º 37
0
        public INewTabHost <Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            var shell = new MainView();

            shell.Title = DisplayName;
            var vm = IoC.Get <UserControl2ViewModel>();

            ViewModelBinder.Bind(vm, shell, null);
            return(new NewTabHost <MetroWindow>(shell, shell.Items));
        }
Exemplo n.º 38
0
        public BasicExampleMainModel()
        {
            _basicColourMonitor = new PositionMonitor();
            _basicColourMonitor.LocationChanged += (sender, args) => BasicColourMonitorText = args.Location.ToString();
            _peopleMonitor = new VerticalPositionMonitor();
            _peopleMonitor.OrderChanged += PeopleMonitorOnOrderChanged;

            _people.Add(new Person {
                FirstName = "Albert", LastName = "Einstein"
            });
            _people.Add(new Person {
                FirstName = "Neil", LastName = "Tyson"
            });
            _people.Add(new Person {
                FirstName = "James", LastName = "Willock"
            });                                                                    //i move in esteemed circles ;)

            _viewModels.Add(new SimpleViewModel {
                Name = "Alpha", SimpleContent = "This is the alpha content"
            });
            _viewModels.Add(new SimpleViewModel {
                Name = "Beta", SimpleContent = "Beta content", IsSelected = true
            });
            _viewModels.Add(new SimpleViewModel {
                Name = "Gamma", SimpleContent = "And here is the gamma content"
            });

            SelectedViewModel = _viewModels[1];

            _interTabClient = new BasicExampleInterTabClient();

            _addNewPerson = new AnotherCommandImplementation(
                x =>
            {
                _newPersonCount++;
                _people.Add(new Person
                {
                    FirstName = "Hello_" + _newPersonCount,
                    LastName  = "World_" + _newPersonCount
                });
            });

            _addNewViewModel = new AnotherCommandImplementation(
                x =>
            {
                _newViewModelCount++;
                _viewModels.Add(new SimpleViewModel()
                {
                    Name          = "New Tab " + _newViewModelCount,
                    SimpleContent = "New Tab Content " + _newViewModelCount
                });
                SelectedViewModel = _viewModels.Last();
            });
        }
Exemplo n.º 39
0
        public INewTabHost <Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            var shell = new MainView();

            shell.Title = this.DisplayName;
            //shell.InitializeComponent(); // Only required if you don't have ShellView.xaml.cs
            var vm = IoC.Get <UserControl1ViewModel>();

            ViewModelBinder.Bind(vm, shell, null);
            return(new NewTabHost <MetroWindow>(shell, shell.Items));
        }
Exemplo n.º 40
0
        public MainWindow(IKernel kernel, IGameConnection connection, IInterTabClient interTab, IInterLayoutClient interLayout, IProjectManager projectManager)
        {
            _kernel = kernel;
            _connection = connection;
            _interTabClient = interTab;
            _interLayoutClient = interLayout;
            _projectManager = projectManager;

            InitializeComponent();

            Loaded += WindowLoaded;
        }
        public virtual INewTabHost<Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }

            var sourceWindow = Window.GetWindow(source);
            if (sourceWindow == null)
            {
                throw new ApplicationException("Unable to ascrtain source window.");
            }
            
            return new NewTabHost<Window>(sourceWindow, source);
        }
Exemplo n.º 42
0
        public virtual INewTabHost<Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            if (source == null) throw new ArgumentNullException("source");
            var sourceWindow = Window.GetWindow(source);
            if (sourceWindow == null) throw new ApplicationException("Unable to ascrtain source window.");
            var newWindow = (Window)Activator.CreateInstance(sourceWindow.GetType());

            newWindow.Dispatcher.Invoke(new Action(() => { }), DispatcherPriority.DataBind);

            var newTabablzControl = newWindow.LogicalTreeDepthFirstTraversal().OfType<TabablzControl>().FirstOrDefault();
            if (newTabablzControl == null) throw new ApplicationException("Unable to ascrtain tab control.");

            newTabablzControl.Items.Clear();

            return new NewTabHost<Window>(newWindow, newTabablzControl);
        }
Exemplo n.º 43
0
        public BasicExampleMainModel()
        {
            _basicColourMonitor = new PositionMonitor();
            _basicColourMonitor.LocationChanged += (sender, args) => BasicColourMonitorText = args.Location.ToString();
            _peopleMonitor = new VerticalPositionMonitor();
            _peopleMonitor.OrderChanged += PeopleMonitorOnOrderChanged;

            _people.Add(new Person {FirstName = "Albert", LastName = "Einstein"});
            _people.Add(new Person { FirstName = "Neil", LastName = "Tyson" });
            _people.Add(new Person { FirstName = "James", LastName = "Willock" }); //i move in esteemed circles ;)

            _viewModels.Add(new SimpleViewModel { Name = "Alpha", SimpleContent = "This is the alpha content"});
            _viewModels.Add(new SimpleViewModel { Name = "Beta", SimpleContent = "Beta content", IsSelected = true });
            _viewModels.Add(new SimpleViewModel { Name = "Gamma", SimpleContent = "And here is the gamma content" });

            SelectedViewModel = _viewModels[1];

            _interTabClient = new BasicExampleInterTabClient();

            _addNewPerson = new AnotherCommandImplementation(
                x =>
                {
                    _newPersonCount++;
                    _people.Add(new Person
                    {
                        FirstName = "Hello_" + _newPersonCount,
                        LastName = "World_" + _newPersonCount
                    });
                });

            _addNewViewModel = new AnotherCommandImplementation(
                x =>
                {
                    _newViewModelCount++;
                    _viewModels.Add(new SimpleViewModel()
                    {
                        Name = "New Tab " + _newViewModelCount,
                        SimpleContent = "New Tab Content " + _newViewModelCount
                    });
                    SelectedViewModel = _viewModels.Last();
                });
        }
        public INewTabHost<Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            if (SourceTabablzControl == null)
            {
                SourceTabablzControl = source;
                SourceTabablzControl.IsVisibleChanged += SourceTabablzControl_IsVisibleChanged;
            }

            var window = new DragablzWindow();
            window.Height = source.ActualHeight;
            window.Width = source.ActualWidth;
            window.WindowState = WindowState.Normal;
            window.SizeChanged += Window_SizeChanged;
            window.StateChanged += Window_StateChanged;

            var tabControl = new TabablzControl();
            window.Content = tabControl;
            var newTabHost = new NewTabHost<Window>(window, tabControl);
            NewTabHosts.Add(newTabHost);
            window.Closed += Window_Closed;
            return newTabHost;
        }
        public INewTabHost<Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            if (SourceTabablzControl == null)
            {
                SourceTabablzControl = source;
                SourceTabablzControl.IsVisibleChanged += SourceTabablzControl_IsVisibleChanged;
            }

            var window = new DragablzWindow {WindowState = WindowState.Normal};
            window.SizeChanged += Window_SizeChanged;
            window.StateChanged += Window_StateChanged;

            var tabControl = new TabablzControl
            {
                InterTabController = new InterTabController {InterTabClient = new DockableTabInterTabClient()}
            };

            window.Content = tabControl;
            var newTabHost = new NewTabHost<Window>(window, tabControl);
            NewTabHosts.Add(newTabHost);
            window.Closed += Window_Closed;
            return newTabHost;
        }
 public INewTabHost<Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
 {
     var view = new ShellViewModel(false).View;
     return new NewTabHost<Window>(view, view.ShellTabablzControl);
 }
Exemplo n.º 47
0
 public InterLayoutClient(IInterTabClient interTabClient)
 {
     _interTabClient = interTabClient;
 }
Exemplo n.º 48
0
        public INewTabHost<Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
        {
            var view = ServiceLocator.Current.GetInstance<MainWindow>();

            return new NewTabHost<Window>(view, view.TabablzControl);
        }
Exemplo n.º 49
0
 public MainWindowViewModel()
 {
     _interTabClient = new DefaultInterTabClient();
 }
Exemplo n.º 50
0
 public BasicExampleTemplateModel(IInterTabClient interTabClient, object partition)
 {
     _interTabClient = interTabClient;
     _partition = partition;            
 }
Exemplo n.º 51
0
 public INewTabHost<Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source)
 {
     var view = _kernel.Get<MainWindow>();
     return new NewTabHost<MainWindow>(view, view.InitialTabablzControl);
 }