示例#1
0
        public void Initialize(IStackedContentChild mainChild, MainWindowControlState state)
        {
            horizontalContent.AddChild(verticalContent);
            verticalContent.AddChild(mainChild, StackedContentChildInfo.CreateVertical(new GridLength(1, GridUnitType.Star), 30));

            foreach (var kv in state.SavedLocations)
            {
                savedLocations[kv.Key] = kv.Value;
            }

            if (state.LeftState != null && state.RightState != null && state.TopState != null && state.BottomState != null)
            {
                state.LeftState.Restore(this, toolWindowUIs[AppToolWindowLocation.Left]);
                state.RightState.Restore(this, toolWindowUIs[AppToolWindowLocation.Right]);
                state.TopState.Restore(this, toolWindowUIs[AppToolWindowLocation.Top]);
                state.BottomState.Restore(this, toolWindowUIs[AppToolWindowLocation.Bottom]);
            }
            else
            {
                RestoreDefault();
            }

            if (state.HorizontalContentState != null && state.VerticalContentState != null)
            {
                horizontalContent.State = state.HorizontalContentState;
                verticalContent.State   = state.VerticalContentState;
            }
        }
示例#2
0
        public Window InitializeMainWindow()
        {
            var sc = new StackedContent <IStackedContentChild>(false);

            sc.AddChild(appToolBar, StackedContentChildInfo.CreateVertical(new GridLength(0, GridUnitType.Auto)));
            sc.AddChild(stackedContent, StackedContentChildInfo.CreateVertical(new GridLength(1, GridUnitType.Star)));
            sc.AddChild(statusBar, StackedContentChildInfo.CreateVertical(new GridLength(0, GridUnitType.Auto)));
            mainWindow = new MainWindow(themeManager, imageManager, sc.UIObject);
            AddTitleInfo(IntPtr.Size == 4 ? "x86" : "x64");
            wpfCommandManager.Add(ControlConstants.GUID_MAINWINDOW, mainWindow);
            new SavedWindowStateRestorer(mainWindow, uiSettings.SavedWindowState, DefaultWindowLocation);
            mainWindow.Closing          += MainWindow_Closing;
            mainWindow.Closed           += MainWindow_Closed;
            mainWindow.GotKeyboardFocus += MainWindow_GotKeyboardFocus;
            RefreshToolBar();
            return(mainWindow);
        }
示例#3
0
        TabGroup Create(int index, Action <ITabGroup> onCreated)
        {
            var tg = new TabGroup(this, menuService, wpfFocusService, options);

            stackedContent.AddChild(tg, null, index);
            if (ActiveIndex < 0)
            {
                ActiveIndex = index;
            }
            onCreated?.Invoke(tg);
            tabGroupCollectionChanged.Raise(this, new TabGroupCollectionChangedEventArgs(true, tg));
            return(tg);
        }
示例#4
0
        TabGroup Create(int index, Action <ITabGroup> onCreated)
        {
            var tg = new TabGroup(this, menuManager, wpfFocusManager, options);

            stackedContent.AddChild(tg, null, index);
            if (ActiveIndex < 0)
            {
                ActiveIndex = index;
            }
            if (onCreated != null)
            {
                onCreated(tg);
            }
            tabGroupCollectionChanged.Raise(this, new TabGroupCollectionChangedEventArgs(true, tg));
            return(tg);
        }
示例#5
0
		public Window InitializeMainWindow() {
			var sc = new StackedContent<IStackedContentChild>(false);
			sc.AddChild(appToolBar, StackedContentChildInfo.CreateVertical(new GridLength(0, GridUnitType.Auto)));
			sc.AddChild(stackedContent, StackedContentChildInfo.CreateVertical(new GridLength(1, GridUnitType.Star)));
			sc.AddChild(statusBar, StackedContentChildInfo.CreateVertical(new GridLength(0, GridUnitType.Auto)));
			mainWindow = new MainWindow(sc.UIObject);
			AddTitleInfo(IntPtr.Size == 4 ? "x86" : "x64");
			wpfCommandService.Add(ControlConstants.GUID_MAINWINDOW, mainWindow);
			new SavedWindowStateRestorer(mainWindow, uiSettings.SavedWindowState, DefaultWindowLocation);
			mainWindow.Closing += MainWindow_Closing;
			mainWindow.Closed += MainWindow_Closed;
			mainWindow.GotKeyboardFocus += MainWindow_GotKeyboardFocus;
			RefreshToolBar();
			return mainWindow;
		}
示例#6
0
 void IDnSpyLoaderContentProvider.SetLoadingContent(object content)
 {
     Debug.Assert(stackedContent.Count == 0);
     stackedContent.AddChild(StackedContentChildImpl.GetOrCreate(content, content));
 }