Esempio n. 1
0
        internal LocationReport(TabablzControl tabablzControl, Layout rootLayout, Branch parentBranch, bool isSecondLeaf)
        {
            if (tabablzControl == null) throw new ArgumentNullException("tabablzControl");
            if (rootLayout == null) throw new ArgumentNullException("rootLayout");

            _tabablzControl = tabablzControl;
            _rootLayout = rootLayout;
            _parentBranch = parentBranch;
            _isLeaf = _parentBranch != null;
            _isSecondLeaf = isSecondLeaf;
        }
Esempio n. 2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 10 "..\..\InterTabWindow.xaml"
                ((SmartScene.View.InterTabWindow)(target)).Closed += new System.EventHandler(this.DragablzWindow_Closed);

            #line default
            #line hidden
                return;

            case 2:
                this.dockLayout = ((Dragablz.Dockablz.Layout)(target));
                return;

            case 3:
                this.tc = ((Dragablz.TabablzControl)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 3
0
        private static void Float(Layout layout, DragablzItem dragablzItem)
        {
            //TODO we need eq of IManualInterTabClient here, so consumer can control this op'.            

            //remove from source
            var sourceOfDragItemsControl = ItemsControl.ItemsControlFromItemContainer(dragablzItem) as DragablzItemsControl;
            if (sourceOfDragItemsControl == null) throw new ApplicationException("Unable to determin source items control.");            
            var sourceTabControl = TabablzControl.GetOwnerOfHeaderItems(sourceOfDragItemsControl);
            layout._floatTransfer = FloatTransfer.TakeSnapshot(dragablzItem, sourceTabControl);
            var floatingItemSnapShots = sourceTabControl.VisualTreeDepthFirstTraversal()
                    .OfType<Layout>()
                    .SelectMany(l => l.FloatingDragablzItems().Select(FloatingItemSnapShot.Take))
                    .ToList();
            if (sourceTabControl == null) throw new ApplicationException("Unable to determin source tab control.");            
            sourceTabControl.RemoveItem(dragablzItem);
            
            //add to float layer            
            CollectionTeaser collectionTeaser;
            if (CollectionTeaser.TryCreate(layout.FloatingItemsSource, out collectionTeaser))
                collectionTeaser.Add(layout._floatTransfer.Content);
            else
                layout.FloatingItems.Add(layout._floatTransfer.Content);

            layout.Dispatcher.BeginInvoke(new Action(() => RestoreFloatingItemSnapShots(layout, floatingItemSnapShots)), DispatcherPriority.Loaded);
        }
Esempio n. 4
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 17 "..\..\MainWindow.xaml"
                ((SmartScene.View.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.MetroWindow_Loaded);

            #line default
            #line hidden
                return;

            case 2:

            #line 60 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.Flyout_ConflictEdit = ((MahApps.Metro.Controls.Flyout)(target));
                return;

            case 4:
                this.leftSide = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 5:
                this.expender_left = ((System.Windows.Controls.Expander)(target));

            #line 98 "..\..\MainWindow.xaml"
                this.expender_left.Collapsed += new System.Windows.RoutedEventHandler(this.expender_left_Collapsed);

            #line default
            #line hidden

            #line 98 "..\..\MainWindow.xaml"
                this.expender_left.Expanded += new System.Windows.RoutedEventHandler(this.expender_left_Expanded);

            #line default
            #line hidden
                return;

            case 6:

            #line 104 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.GridSplitter)(target)).DragCompleted += new System.Windows.Controls.Primitives.DragCompletedEventHandler(this.GridSplitter_DragCompleted);

            #line default
            #line hidden
                return;

            case 7:
                this.dockLayout = ((Dragablz.Dockablz.Layout)(target));
                return;

            case 8:
                this.tabControl_default = ((Dragablz.TabablzControl)(target));
                return;

            case 9:
                this.statusBar = ((System.Windows.Controls.Primitives.StatusBar)(target));
                return;

            case 10:

            #line 124 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_1);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
        //TODO I've internalised constructor for now, so I can come back and add Window without breaking.

        internal LocationReport(TabablzControl tabablzControl, Layout rootLayout)
            : this(tabablzControl, rootLayout, null, false)
        {
        }
Esempio n. 6
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 17 "..\..\MainWindow.xaml"
     ((SmartScene.View.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.MetroWindow_Loaded);
     
     #line default
     #line hidden
     return;
     case 2:
     
     #line 60 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);
     
     #line default
     #line hidden
     return;
     case 3:
     this.Flyout_ConflictEdit = ((MahApps.Metro.Controls.Flyout)(target));
     return;
     case 4:
     this.leftSide = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 5:
     this.expender_left = ((System.Windows.Controls.Expander)(target));
     
     #line 98 "..\..\MainWindow.xaml"
     this.expender_left.Collapsed += new System.Windows.RoutedEventHandler(this.expender_left_Collapsed);
     
     #line default
     #line hidden
     
     #line 98 "..\..\MainWindow.xaml"
     this.expender_left.Expanded += new System.Windows.RoutedEventHandler(this.expender_left_Expanded);
     
     #line default
     #line hidden
     return;
     case 6:
     
     #line 104 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.GridSplitter)(target)).DragCompleted += new System.Windows.Controls.Primitives.DragCompletedEventHandler(this.GridSplitter_DragCompleted);
     
     #line default
     #line hidden
     return;
     case 7:
     this.dockLayout = ((Dragablz.Dockablz.Layout)(target));
     return;
     case 8:
     this.tabControl_default = ((Dragablz.TabablzControl)(target));
     return;
     case 9:
     this.statusBar = ((System.Windows.Controls.Primitives.StatusBar)(target));
     return;
     case 10:
     
     #line 124 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_1);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
Esempio n. 7
0
        //TODO I've internalised constructor for now, so I can come back and add Window without breaking.

        internal LocationReport(TabablzControl tabablzControl, Layout rootLayout)
            : this(tabablzControl, rootLayout, null, false)
        { }
Esempio n. 8
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 10 "..\..\InterTabWindow.xaml"
     ((SmartScene.View.InterTabWindow)(target)).Closed += new System.EventHandler(this.DragablzWindow_Closed);
     
     #line default
     #line hidden
     return;
     case 2:
     this.dockLayout = ((Dragablz.Dockablz.Layout)(target));
     return;
     case 3:
     this.tc = ((Dragablz.TabablzControl)(target));
     return;
     }
     this._contentLoaded = true;
 }