• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# TabState类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中TabState的典型用法代码示例。如果您正苦于以下问题:C# TabState类的具体用法?C# TabState怎么用?C# TabState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TabState类属于命名空间,在下文中一共展示了TabState类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OnTabStateRemoved

		void OnTabStateRemoved(TabState tabState) {
			var hts = tabState as HexTabState;
			if (hts == null)
				return;

			hts.HexBox.OnWrite -= HexBox_OnWrite;
		}
开发者ID:arkanoid1,项目名称:dnSpy,代码行数:7,代码来源:HexBoxUndo.cs


示例2: WeaponTab

 void WeaponTab()
 {
     if (GUILayout.Button("Weapons"))
     {
         tabState = TabState.WEAPON;
     }
 }
开发者ID:mnapier,项目名称:ItemSystem,代码行数:7,代码来源:ISObjectTopTabBar.cs


示例3: ArmorTab

 void ArmorTab()
 {
     if (GUILayout.Button("Armor"))
     {
         tabState = TabState.ARMOR;
     }
 }
开发者ID:mnapier,项目名称:ItemSystem,代码行数:7,代码来源:ISObjectTopTabBar.cs


示例4: PotionTab

 void PotionTab()
 {
     if (GUILayout.Button("Potions"))
     {
         tabState = TabState.POTION;
     }
 }
开发者ID:mnapier,项目名称:ItemSystem,代码行数:7,代码来源:ISObjectTopTabBar.cs


示例5: AboutTab

 void AboutTab()
 {
     if (GUILayout.Button("About"))
     {
         tabState = TabState.ABOUT;
     }
 }
开发者ID:mnapier,项目名称:ItemSystem,代码行数:7,代码来源:ISObjectTopTabBar.cs


示例6: OnTabStateChanged

			void OnTabStateChanged(TabState oldTabState, TabState newTabState) {
				var oldTsd = oldTabState as DecompileTabState;
				if (oldTsd != null)
					oldTsd.TextView.OnShowOutput -= DecompilerTextView_OnShowOutput;
				var newTsd = newTabState as DecompileTabState;
				if (newTsd != null)
					newTsd.TextView.OnShowOutput += DecompilerTextView_OnShowOutput;
			}
开发者ID:nakijun,项目名称:dnSpy,代码行数:8,代码来源:LocalsControl.xaml.cs


示例7: OnEnable

        void OnEnable()
        {
            tabState = TabState.QUALITY;

            weaponDatabase = new ISObjectDatabaseType<ISWeaponDatabase, ISWeapon>(DatabaseManager.weaponDatabase, "Weapon");
            armorDatabase = new ISObjectDatabaseType<ISArmorDatabase, ISArmor>(DatabaseManager.armorDatabase, "Armor");
            consumableDatabase = new ISObjectDatabaseType<ISConsumableDatabase, ISConsumable>(DatabaseManager.consumableDatabase, "Consumable");
            qualityDatabase = new ISObjectDatabaseType<ISQualityDatabase, ISQuality>(DatabaseManager.qualityDatabase, "Quality");
        }
开发者ID:pgpizza,项目名称:HackNSlash5Tut,代码行数:9,代码来源:ItemObjectEditor.cs


示例8: TabStateEventArgs

 public TabStateEventArgs(TabState tabState)
 {
     this.TabState = tabState;
 }
开发者ID:DeepSkyFire,项目名称:dnSpy,代码行数:4,代码来源:MainWindow.xaml.cs


示例9: TabStateChangedEventArgs

 public TabStateChangedEventArgs(TabState oldTabState, TabState newTabState)
 {
     this.OldTabState = oldTabState;
     this.NewTabState = newTabState;
 }
开发者ID:DeepSkyFire,项目名称:dnSpy,代码行数:5,代码来源:MainWindow.xaml.cs


示例10: ZoomReset

        void ZoomReset(TabState tabState)
        {
            if (tabState == null)
                return;

            SetScaleValue(tabState, 1);
        }
开发者ID:DeepSkyFire,项目名称:dnSpy,代码行数:7,代码来源:MainWindow.xaml.cs


示例11: tabManager_OnSelectionChanged

        internal void tabManager_OnSelectionChanged(TabManager<TabState> tabManager, TabState oldState, TabState newState)
        {
            UninitializeActiveTab(oldState, false);
            InitializeActiveTab(newState, false);

            if (IsActiveTab(newState))
                SetTabFocus(newState);

            if (OnTabStateChanged != null)
                OnTabStateChanged(this, new TabStateChangedEventArgs(oldState, newState));
        }
开发者ID:DeepSkyFire,项目名称:dnSpy,代码行数:11,代码来源:MainWindow.xaml.cs


示例12: OnTabStateChanged

        void OnTabStateChanged(TabState oldTabState, TabState newTabState)
        {
            var oldTsd = oldTabState as DecompileTabState;
            if (oldTsd != null) {
                oldTsd.TextView.OnBeforeShowOutput -= DecompilerTextView_OnBeforeShowOutput;
                oldTsd.TextView.OnShowOutput -= DecompilerTextView_OnShowOutput;
            }
            var newTsd = newTabState as DecompileTabState;
            if (newTsd != null) {
                newTsd.TextView.OnBeforeShowOutput += DecompilerTextView_OnBeforeShowOutput;
                newTsd.TextView.OnShowOutput += DecompilerTextView_OnShowOutput;
            }

            if (oldTsd != null)
                Remove(oldTsd.TextView);
            if (newTsd != null)
                UpdateStackFrameLines(newTsd.TextView);
        }
开发者ID:kenwilcox,项目名称:dnSpy,代码行数:18,代码来源:StackFrameManager.cs


示例13: IgnoreSelectionChanged_HACK

 internal bool IgnoreSelectionChanged_HACK(TabState tabState)
 {
     var tabManager = tabState.Owner;
     bool value;
     tabManager_dontSelectHack.TryGetValue(tabManager, out value);
     tabManager_dontSelectHack[tabManager] = true;
     return value;
 }
开发者ID:DeepSkyFire,项目名称:dnSpy,代码行数:8,代码来源:MainWindow.xaml.cs


示例14: CloneTabMakeActive

 internal TabState CloneTabMakeActive(TabState tabState, bool decompile = true)
 {
     var clonedTabState = CloneTab(tabState, decompile);
     if (clonedTabState != null)
         tabGroupsManager.ActiveTabGroup.SetSelectedTab(clonedTabState);
     return clonedTabState;
 }
开发者ID:DeepSkyFire,项目名称:dnSpy,代码行数:7,代码来源:MainWindow.xaml.cs


示例15: SetTabFocus

        void SetTabFocus(TabState tabState)
        {
            if (disable_SetTabFocus)
                return;
            if (tabState == null)
                return;
            if (!IsActiveTab(tabState))
                return;
            if (tabState.TabItem.Content == null)
                return;

            var uiElem = tabState.FocusedElement;
            Debug.Assert(uiElem != null);
            if (uiElem == null)
                return;

            if (!uiElem.IsVisible)
                new SetFocusWhenVisible(tabState, uiElem);
            else
                SetFocusIfNoMenuIsOpened(uiElem);
        }
开发者ID:DeepSkyFire,项目名称:dnSpy,代码行数:21,代码来源:MainWindow.xaml.cs


示例16: SetScaleValue

        void SetScaleValue(TabState tabState, double scale)
        {
            var scaleElem = tabState.ScaleElement;
            if (scaleElem == null)
                return;
            if (scale == 1) {
                scaleElem.LayoutTransform = Transform.Identity;
                scaleElem.ClearValue(TextOptions.TextFormattingModeProperty);
            }
            else {
                var st = scaleElem.LayoutTransform as ScaleTransform;
                if (st == null)
                    scaleElem.LayoutTransform = st = new ScaleTransform();

                if (scale < MIN_ZOOM)
                    scale = MIN_ZOOM;
                else if (scale > MAX_ZOOM)
                    scale = MAX_ZOOM;

                // We must set it to Ideal or the text will be blurry
                TextOptions.SetTextFormattingMode(scaleElem, TextFormattingMode.Ideal);
                st.ScaleX = scale;
                st.ScaleY = scale;
            }
        }
开发者ID:DeepSkyFire,项目名称:dnSpy,代码行数:25,代码来源:MainWindow.xaml.cs


示例17: IsActiveTab

 bool IsActiveTab(TabState tabState)
 {
     return tabGroupsManager.ActiveTabGroup.ActiveTabState == tabState;
 }
开发者ID:DeepSkyFire,项目名称:dnSpy,代码行数:4,代码来源:MainWindow.xaml.cs


示例18: InitializeActiveTab

        void InitializeActiveTab(TabState tabState, bool forceIsInActiveTabGroup)
        {
            var tabManager = tabState == null ? null : tabState.Owner as TabManager<TabState>;
            bool isInActiveTabGroup = tabGroupsManager.ActiveTabGroup == tabManager || forceIsInActiveTabGroup;

            var dts = tabState as DecompileTabState;
            var newView = dts == null ? null : dts.TextView;

            if (isInActiveTabGroup) {
                InstallTabCommandBindings(tabState);
                if (dts != null)
                    SetLanguage(dts.Language);
            }

            bool dontSelect;
            if (tabManager != null && tabManager_dontSelectHack.TryGetValue(tabManager, out dontSelect) && dontSelect) {
            }
            else if (tabState == null || dts == null) {
                if ((isInActiveTabGroup && tabState != null) || (tabGroupsManager.AllTabGroups.Count == 1 && tabGroupsManager.ActiveTabGroup.ActiveTabState == null)) {
                    var old = TreeView_SelectionChanged_ignore;
                    try {
                        TreeView_SelectionChanged_ignore = true;
                        treeView.SelectedItems.Clear();
                    }
                    finally {
                        TreeView_SelectionChanged_ignore = old;
                    }
                }
                else if (isInActiveTabGroup)
                    treeView.SelectedItems.Clear();
            }
            else
                SelectTreeViewNodes(dts, dts.DecompiledNodes);

            if (isInActiveTabGroup)
                ClosePopups();
            if (newView != null && isInActiveTabGroup)
                InstallTextEditorListeners(newView);
        }
开发者ID:DeepSkyFire,项目名称:dnSpy,代码行数:39,代码来源:MainWindow.xaml.cs


示例19: GetScaleValue

 double GetScaleValue(TabState tabState)
 {
     var scaleElem = tabState.ScaleElement;
     if (scaleElem == null)
         return 1;
     var st = scaleElem.LayoutTransform as ScaleTransform;
     if (st != null)
         return st.ScaleX;
     return 1;
 }
开发者ID:DeepSkyFire,项目名称:dnSpy,代码行数:10,代码来源:MainWindow.xaml.cs


示例20: DelaySetFocus

 void DelaySetFocus(TabState tabState)
 {
     if (tabState != null) {
         // The TreeView steals the focus so we can't just set the focus to the text view
         // right here, we have to wait a little bit.
         // This is ugly, but we must use Normal prio to get rid of flickering (tab getting
         // inactive followed by getting active). However, this doesn't work all the time
         // (test: right-click tab, open new tab), so we must start another one at a lower
         // priority in case the treeview steals the focus.......
         this.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(delegate {
             if (ActiveTabState == tabState)
                 SetTabFocus(tabState);
         }));
         this.Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(delegate {
             if (ActiveTabState == tabState)
                 SetTabFocus(tabState);
         }));
     }
 }
开发者ID:DeepSkyFire,项目名称:dnSpy,代码行数:19,代码来源:MainWindow.xaml.cs



注:本文中的TabState类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# TabVS2005类代码示例发布时间:2022-05-24
下一篇:
C# TabPage类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap