本文整理汇总了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);
}
示例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);
}
}
}
}
示例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;
}
}