当前位置: 首页>>代码示例>>C#>>正文


C# InputTabName.Dispose方法代码示例

本文整理汇总了C#中OpenTween.InputTabName.Dispose方法的典型用法代码示例。如果您正苦于以下问题:C# InputTabName.Dispose方法的具体用法?C# InputTabName.Dispose怎么用?C# InputTabName.Dispose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OpenTween.InputTabName的用法示例。


在下文中一共展示了InputTabName.Dispose方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SelectTab

        private bool SelectTab(ref string tabName)
        {
            do
            {
                //振り分け先タブ選択
                if (TabDialog.ShowDialog() == DialogResult.Cancel)
                {
                    this.TopMost = SettingDialog.AlwaysTop;
                    return false;
                }
                this.TopMost = SettingDialog.AlwaysTop;
                tabName = TabDialog.SelectedTabName;

                ListTab.SelectedTab.Focus();
                //新規タブを選択→タブ作成
                if (tabName == Properties.Resources.IDRuleMenuItem_ClickText1)
                {
                    using (InputTabName inputName = new InputTabName())
                    {
                        inputName.TabName = _statuses.GetUniqueTabName();
                        inputName.ShowDialog();
                        if (inputName.DialogResult == DialogResult.Cancel) return false;
                        tabName = inputName.TabName;
                        inputName.Dispose();
                    }
                    this.TopMost = SettingDialog.AlwaysTop;
                    if (!string.IsNullOrEmpty(tabName))
                    {
                        if (!_statuses.AddTab(tabName, MyCommon.TabUsageType.UserDefined, null) || !AddNewTab(tabName, false, MyCommon.TabUsageType.UserDefined))
                        {
                            string tmp = string.Format(Properties.Resources.IDRuleMenuItem_ClickText2, tabName);
                            MessageBox.Show(tmp, Properties.Resources.IDRuleMenuItem_ClickText3, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                            //もう一度タブ名入力
                        }
                        else
                        {
                            return true;
                        }
                    }
                }
                else
                {
                    //既存タブを選択
                    return true;
                }
            }
            while (true);
        }
开发者ID:egtra,项目名称:OpenTween,代码行数:48,代码来源:Tween.cs

示例2: AddTabMenuItem_Click

 private void AddTabMenuItem_Click(object sender, EventArgs e)
 {
     string tabName = null;
     MyCommon.TabUsageType tabUsage;
     using (InputTabName inputName = new InputTabName())
     {
         inputName.TabName = _statuses.GetUniqueTabName();
         inputName.IsShowUsage = true;
         inputName.ShowDialog();
         if (inputName.DialogResult == DialogResult.Cancel) return;
         tabName = inputName.TabName;
         tabUsage = inputName.Usage;
         inputName.Dispose();
     }
     this.TopMost = SettingDialog.AlwaysTop;
     if (!string.IsNullOrEmpty(tabName))
     {
         //List対応
         ListElement list = null;
         if (tabUsage == MyCommon.TabUsageType.Lists)
         {
             using (ListAvailable listAvail = new ListAvailable())
             {
                 if (listAvail.ShowDialog(this) == DialogResult.Cancel) return;
                 if (listAvail.SelectedList == null) return;
                 list = listAvail.SelectedList;
             }
         }
         if (!_statuses.AddTab(tabName, tabUsage, list) || !AddNewTab(tabName, false, tabUsage, list))
         {
             string tmp = string.Format(Properties.Resources.AddTabMenuItem_ClickText1, tabName);
             MessageBox.Show(tmp, Properties.Resources.AddTabMenuItem_ClickText2, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         }
         else
         {
             //成功
             SaveConfigsTabs();
             if (tabUsage == MyCommon.TabUsageType.PublicSearch)
             {
                 ListTab.SelectedIndex = ListTab.TabPages.Count - 1;
                 ListTabSelect(ListTab.TabPages[ListTab.TabPages.Count - 1]);
                 ListTab.SelectedTab.Controls["panelSearch"].Controls["comboSearch"].Focus();
             }
             if (tabUsage == MyCommon.TabUsageType.Lists)
             {
                 ListTab.SelectedIndex = ListTab.TabPages.Count - 1;
                 ListTabSelect(ListTab.TabPages[ListTab.TabPages.Count - 1]);
                 GetTimeline(MyCommon.WORKERTYPE.List, 1, 0, tabName);
             }
         }
     }
 }
开发者ID:egtra,项目名称:OpenTween,代码行数:52,代码来源:Tween.cs

示例3: TabRename

        public bool TabRename(ref string tabName)
        {
            //タブ名変更
            string newTabText = null;
            using (InputTabName inputName = new InputTabName())
            {
                inputName.TabName = tabName;
                inputName.ShowDialog();
                if (inputName.DialogResult == DialogResult.Cancel) return false;
                newTabText = inputName.TabName;
                inputName.Dispose();
            }
            this.TopMost = SettingDialog.AlwaysTop;
            if (!string.IsNullOrEmpty(newTabText))
            {
                //新タブ名存在チェック
                for (int i = 0; i < ListTab.TabCount; i++)
                {
                    if (ListTab.TabPages[i].Text == newTabText)
                    {
                        string tmp = string.Format(Properties.Resources.Tabs_DoubleClickText1, newTabText);
                        MessageBox.Show(tmp, Properties.Resources.Tabs_DoubleClickText2, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                        return false;
                    }
                }
                //タブ名のリスト作り直し(デフォルトタブ以外は再作成)
                for (int i = 0; i < ListTab.TabCount; i++)
                {
                    if (_statuses.IsDistributableTab(ListTab.TabPages[i].Text))
                    {
                        TabDialog.RemoveTab(ListTab.TabPages[i].Text);
                    }
                    if (ListTab.TabPages[i].Text == tabName)
                    {
                        ListTab.TabPages[i].Text = newTabText;
                    }
                }
                _statuses.RenameTab(tabName, newTabText);

                for (int i = 0; i < ListTab.TabCount; i++)
                {
                    if (_statuses.IsDistributableTab(ListTab.TabPages[i].Text))
                    {
                        if (ListTab.TabPages[i].Text == tabName)
                        {
                            ListTab.TabPages[i].Text = newTabText;
                        }
                        TabDialog.AddTab(ListTab.TabPages[i].Text);
                    }
                }
                SaveConfigsCommon();
                SaveConfigsTabs();
                _rclickTabName = newTabText;
                tabName = newTabText;
                return true;
            }
            else
            {
                return false;
            }
        }
开发者ID:egtra,项目名称:OpenTween,代码行数:61,代码来源:Tween.cs


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