Exemplo n.º 1
0
        public ToolTab(string id, ToolTabModel model, UIElement tabContent, TabControl container, TabSettings settings) : this()
        {
            Id         = id;
            Model      = model;
            TabContent = tabContent;
            Container  = container;
            CreateBindings();
            MainGrid.Children.Add(tabContent);
            Settings = settings;

            GotFocus += (sender, args) => {
                IsaacDashSerializer.Settings.GeneralSettings.TabWithFocus = Id;
                IsaacDashSerializer.MarkToSave();
            };
        }
Exemplo n.º 2
0
        public void ToExtraWindow()
        {
            Container.Items.Remove(this);
            MainGrid.Children.Remove(TabContent);

            var extraWindowModel = new ExtraWindowModel(Model.IconResource, Model.Label);
            var extraWindow      = new ExtraWindow(extraWindowModel, Settings.WindowSettings, () => {
                if (MainWindow.IsShuttingDown)
                {
                    return;
                }
                MainGrid.Children.Add(TabContent);
                Container.Items.Add(this);
                Focus();
                Settings.IsWindowed = false;
                IsaacDashSerializer.MarkToSave();
            });

            extraWindow.Show(TabContent);
            extraWindow.Focus();
        }
Exemplo n.º 3
0
 private void ToExtraWindow(object sender, RoutedEventArgs e)
 {
     Settings.IsWindowed = true;
     IsaacDashSerializer.MarkToSave();
     ToExtraWindow();
 }