Пример #1
0
		public static SerializedTabGroupWindow Create(IFileTabContentFactoryManager creator, ITabGroupManager tabGroupManager, string name) {
			int index = tabGroupManager.TabGroups.ToList().IndexOf(tabGroupManager.ActiveTabGroup);
			var stackedContentState = ((TabGroupManager)tabGroupManager).StackedContentState;
			var tgw = new SerializedTabGroupWindow(name, index, tabGroupManager.IsHorizontal, stackedContentState);

			foreach (var g in tabGroupManager.TabGroups)
				tgw.TabGroups.Add(SerializedTabGroup.Create(creator, g));

			return tgw;
		}
Пример #2
0
		public static SerializedTabGroupWindow Load(ISettingsSection section) {
			var name = section.Attribute<string>(NAME_ATTR) ?? MAIN_NAME;
			int index = section.Attribute<int?>(INDEX_ATTR) ?? -1;
			bool isHorizontal = section.Attribute<bool?>(ISHORIZONTAL_ATTR) ?? false;
			var stackedContentState = StackedContentStateSerializer.TryDeserialize(section.GetOrCreateSection(STACKEDCONTENTSTATE_SECTION));
			var tgw = new SerializedTabGroupWindow(name, index, isHorizontal, stackedContentState);

			foreach (var tgSection in section.SectionsWithName(TABGROUP_SECTION))
				tgw.TabGroups.Add(SerializedTabGroup.Load(tgSection));

			return tgw;
		}
Пример #3
0
		public static SerializedTabGroup Create(IFileTabContentFactoryManager creator, ITabGroup g) {
			int index = g.TabContents.ToList().IndexOf(g.ActiveTabContent);
			var tg = new SerializedTabGroup(index);

			foreach (IFileTab tab in g.TabContents) {
				var t = SerializedTab.TryCreate(creator, tab);
				if (t != null)
					tg.Tabs.Add(t);
			}

			return tg;
		}
Пример #4
0
		public static SerializedTabGroup Load(ISettingsSection section) {
			int index = section.Attribute<int?>(INDEX_ATTR) ?? -1;
			var tg = new SerializedTabGroup(index);

			foreach (var tabSection in section.SectionsWithName(TAB_SECTION)) {
				var tab = SerializedTab.TryLoad(tabSection);
				if (tab != null)
					tg.Tabs.Add(tab);
			}

			return tg;
		}
Пример #5
0
        public static SerializedTabGroup Load(ISettingsSection section)
        {
            int index = section.Attribute<int?>(INDEX_ATTR) ?? -1;
            var tg = new SerializedTabGroup(index);

            foreach (var tabSection in section.SectionsWithName(TAB_SECTION)) {
                var tab = SerializedTab.TryLoad(tabSection);
                if (tab != null)
                    tg.Tabs.Add(tab);
            }

            return tg;
        }
Пример #6
0
        public static SerializedTabGroup Create(IFileTabContentFactoryManager creator, ITabGroup g)
        {
            int index = g.TabContents.ToList().IndexOf(g.ActiveTabContent);
            var tg = new SerializedTabGroup(index);

            foreach (IFileTab tab in g.TabContents) {
                var t = SerializedTab.TryCreate(creator, tab);
                if (t != null)
                    tg.Tabs.Add(t);
            }

            return tg;
        }