本文整理汇总了C#中System.Windows.Forms.TabPage.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# TabPage.Equals方法的具体用法?C# TabPage.Equals怎么用?C# TabPage.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.TabPage
的用法示例。
在下文中一共展示了TabPage.Equals方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateItem
private ListViewItem CreateItem(TabPage Tab, PostClass Post, int Index)
{
StringBuilder mk = new StringBuilder();
//if (Post.IsDeleted) mk.Append("×");
//if (Post.IsMark) mk.Append("♪");
//if (Post.IsProtect) mk.Append("Ю");
//if (Post.InReplyToStatusId > 0) mk.Append("⇒");
if (Post.FavoritedCount > 0) mk.Append("+" + Post.FavoritedCount.ToString());
ImageListViewItem itm;
if (Post.RetweetedId == 0)
{
string[] sitem= {"",
Post.Nickname,
Post.IsDeleted ? "(DELETED)" : Post.TextFromApi,
Post.CreatedAt.ToString(SettingDialog.DateTimeFormat),
Post.ScreenName,
"",
mk.ToString(),
Post.Source};
itm = new ImageListViewItem(sitem, (ImageDictionary)this.TIconDic, Post.ImageUrl);
}
else
{
string[] sitem = {"",
Post.Nickname,
Post.IsDeleted ? "(DELETED)" : Post.TextFromApi,
Post.CreatedAt.ToString(SettingDialog.DateTimeFormat),
Post.ScreenName + Environment.NewLine + "(RT:" + Post.RetweetedBy + ")",
"",
mk.ToString(),
Post.Source};
itm = new ImageListViewItem(sitem, (ImageDictionary)this.TIconDic, Post.ImageUrl);
}
itm.StateImageIndex = Post.StateIndex;
bool read = Post.IsRead;
//未読管理していなかったら既読として扱う
if (!_statuses.Tabs[Tab.Text].UnreadManage || !SettingDialog.UnreadManage) read = true;
ChangeItemStyleRead(read, itm, Post, null);
if (Tab.Equals(_curTab)) ColorizeList(itm, Index);
return itm;
}
示例2: ChangeCacheStyleRead
private void ChangeCacheStyleRead(bool Read, int Index, TabPage Tab)
{
//Read:true=既読 false=未読
//未読管理していなかったら既読として扱う
if (!_statuses.Tabs[_curTab.Text].UnreadManage ||
!SettingDialog.UnreadManage) Read = true;
//対象の特定
ListViewItem itm = null;
PostClass post = null;
if (Tab.Equals(this._curTab))
{
this.TryGetListViewItemCache(Index, out itm, out post);
}
if (itm == null || post == null)
{
itm = ((DetailsListView)Tab.Tag).Items[Index];
post = _statuses[Tab.Text, Index];
}
ChangeItemStyleRead(Read, itm, post, ((DetailsListView)Tab.Tag));
}
示例3: ChangeCacheStyleRead
private void ChangeCacheStyleRead(bool Read, int Index, TabPage Tab)
{
//Read:true=既読 false=未読
//未読管理していなかったら既読として扱う
if (!_statuses.Tabs[_curTab.Text].UnreadManage ||
!SettingDialog.UnreadManage) Read = true;
//対象の特定
ListViewItem itm;
PostClass post;
if (Tab.Equals(_curTab) && _itemCache != null && Index >= _itemCacheIndex && Index < _itemCacheIndex + _itemCache.Length)
{
itm = _itemCache[Index - _itemCacheIndex];
post = _postCache[Index - _itemCacheIndex];
}
else
{
itm = ((DetailsListView)Tab.Tag).Items[Index];
post = _statuses[Tab.Text, Index];
}
ChangeItemStyleRead(Read, itm, post, ((DetailsListView)Tab.Tag));
}
示例4: SubmitSelectedTabPage
private void SubmitSelectedTabPage(TabPage currentTabPage)
{
string errMsg;
DevControl.tagErrorCode eCode;
if (currentTabPage.Equals(this.tabPage_Power))
{
RebootType rebootType;
if (radioButton_Default.Checked)
{
rebootType = RebootType.DefaultWithoutReboot;
}
else if (radioButton_DefaultReboot.Checked)
{
rebootType = RebootType.DefaultAndReboot;
}
else if (radioButton_Reboot.Checked)
{
rebootType = RebootType.RebootWithoutSave;
}
else
{
rebootType = RebootType.SaveAndReboot;
}
eCode = this.CurrentDevice.RebootManage(rebootType);
//返回值处理
errMsg = ErrorHandling.HandleDeviceError(eCode, this.CurrentDevice);
this.Lable_Message.Text = errMsg;
System.Windows.Forms.MessageBox.Show(errMsg);
}
else if (currentTabPage.Equals(this.tabPage_Password))
{
string password, newPassword;
password = this.oldPwdTB.Text.Trim();
newPassword = this.newPwdTB.Text.Trim();
if ((password == "") || (newPassword == ""))
{
System.Windows.Forms.MessageBox.Show("Password required!");
return;
}
if (newPassword != this.retypePwdTB.Text.Trim())
{
System.Windows.Forms.MessageBox.Show("Password are not same!");
return;
}
//
eCode = this.CurrentDevice.ModifyPassword(password, newPassword);
//返回值处理
errMsg = ErrorHandling.HandleDeviceError(eCode, this.CurrentDevice);
this.Lable_Message.Text = errMsg;
System.Windows.Forms.MessageBox.Show(errMsg);
}
else
{
int channelNum = 0;
if (currentTabPage.Equals(this.tabPage_Hostlist))
{
channelNum = (int)this.comboBox_HostChannel.SelectedItem;
}
else if (currentTabPage.Equals(this.tabPage_Serial))
{
channelNum = (int)this.comboBox_SerialChannel.SelectedItem;
}
else if (currentTabPage.Equals(this.tabPage_Connection))
{
channelNum = (int)this.comboBox_ConnChannel.SelectedItem;
}
eCode = this.AutoProperty.SetParameter(currentTabPage, channelNum);
//返回值处理
errMsg = ErrorHandling.HandleDeviceError(eCode, this.CurrentDevice);
this.Lable_Message.Text = errMsg;
System.Windows.Forms.MessageBox.Show(errMsg);
}
}
示例5: ReflashSelectedTabPage
private void ReflashSelectedTabPage(TabPage currentTabPage)
{
int channelNum=0;
string errMsg;
this.Lable_Message.Text = "";
if (currentTabPage.Equals(this.tabPage_Power))
{
//do nothing;
}
else if (currentTabPage.Equals(this.tabPage_Password))
{
//do nothing;
}
else
{
if (currentTabPage.Equals(this.tabPage_Hostlist))
{
channelNum = (int)this.comboBox_HostChannel.SelectedItem;
}
else if(currentTabPage.Equals(this.tabPage_Serial))
{
channelNum = (int)this.comboBox_SerialChannel.SelectedItem;
}
else if (currentTabPage.Equals(this.tabPage_Connection))
{
channelNum = (int)this.comboBox_ConnChannel.SelectedItem;
}
DevControl.tagErrorCode eCode = this.AutoProperty.GetParameter(currentTabPage, channelNum);
errMsg = ErrorHandling.HandleDeviceError(eCode, this.CurrentDevice);
this.Lable_Message.Text = errMsg;
// System.Windows.Forms.MessageBox.Show(errMsg);
}
}
示例6: CreateItem
private ListViewItem CreateItem(TabPage Tab, PostClass Post, int Index)
{
StringBuilder mk = new StringBuilder();
//if (Post.IsDeleted) mk.Append("×");
//if (Post.IsMark) mk.Append("♪");
//if (Post.IsProtect) mk.Append("Ю");
//if (Post.InReplyToStatusId != null) mk.Append("⇒");
if (Post.FavoritedCount > 0) mk.Append("+" + Post.FavoritedCount.ToString());
string[] sitem = {"",
Post.Nickname,
Post.IsDeleted ? "(DELETED)" : Post.TextSingleLine,
Post.CreatedAt.ToString(this._cfgCommon.DateTimeFormat),
Post.RetweetedId == null ? Post.ScreenName : Post.ScreenName + Environment.NewLine + "(RT:" + Post.RetweetedBy + ")",
"",
mk.ToString(),
Post.Source};
ImageListViewItem itm = this._cfgCommon.IconSize != MyCommon.IconSizes.IconNone ?
new ImageListViewItem(sitem, this.IconCache, Post.ImageUrl) :
new ImageListViewItem(sitem);
itm.StateIndex = Post.StateIndex;
bool read = Post.IsRead;
//未読管理していなかったら既読として扱う
if (!_statuses.Tabs[Tab.Text].UnreadManage || !this._cfgCommon.UnreadManage) read = true;
ChangeItemStyleRead(read, itm, Post, null);
if (Tab.Equals(_curTab)) ColorizeList(itm, Index);
return itm;
}
示例7: ChangeCacheStyleRead
private void ChangeCacheStyleRead(bool read, int index, TabPage tab)
{
// Read_:True=既読 False=未読
// 未読管理していなかったら既読として扱う
if (!_statuses.Tabs[_curTab.Text].UnreadManage || !_configs.UnreadManage)
{
read = true;
}
// 対象の特定
ListViewItem itm;
PostClass post;
if (tab.Equals(_curTab) && _itemCache != null && index >= _itemCacheIndex && index < _itemCacheIndex + _itemCache.Length)
{
itm = _itemCache[index - _itemCacheIndex];
post = _postCache[index - _itemCacheIndex];
}
else
{
itm = ((DetailsListView)tab.Tag).Items[index];
post = _statuses.Item(tab.Text, index);
}
ChangeItemStyleRead(read, itm, post, (DetailsListView)tab.Tag);
}
示例8: CreateItem
private ListViewItem CreateItem(TabPage tabPage, PostClass post, int index)
{
var mk = new StringBuilder();
if (post.FavoritedCount > 0)
{
mk.AppendFormat("+{0}", post.FavoritedCount);
}
string postedByDetail = post.ScreenName;
if (post.IsRetweeted)
{
postedByDetail += string.Format("{0}(RT:{1})", Environment.NewLine, post.RetweetedBy);
}
bool read = post.IsRead || (!_statuses.Tabs[tabPage.Text].UnreadManage || !_configs.UnreadManage);
var subitem = new[]
{
string.Empty,
post.Nickname,
(post.IsDeleted ? "(DELETED)" : string.Empty) + post.TextFromApi,
post.CreatedAt.ToString(_configs.DateTimeFormat),
postedByDetail,
string.Empty,
mk.ToString(),
post.Source
};
var itm = new ImageListViewItem(subitem, _iconDict, post.ImageUrl)
{
StateImageIndex = post.StateIndex
};
ChangeItemStyleRead(read, itm, post, null);
if (tabPage.Equals(_curTab))
{
ColorizeList(itm, index);
}
return itm;
}