本文整理汇总了C#中StatusType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# StatusType.ToString方法的具体用法?C# StatusType.ToString怎么用?C# StatusType.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StatusType
的用法示例。
在下文中一共展示了StatusType.ToString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: StatusToMessage
private string StatusToMessage(StatusType type)
{
var statusString = Helper.Translate("StatusType" + type.ToString());
if (!string.IsNullOrEmpty(statusString))
return statusString;
return type.ToString();
}
示例2: AddEventItem
private void AddEventItem(string item, bool StopActions = false)
{
_ClientlessLoginLogList.Add(item);
_status = ClientlessLoginLogAnalysis(item);
Console.WriteLine(_status.ToString());
if (StopActions)
return;
switch (_status)
{
case StatusType.Connecting_please_wait:
StartLoginTimer();
_TryConnectCount++;
OnPropertyChanged("TryConnectCount");
break;
case StatusType.Sending_login_informations:
break;
case StatusType.Sending_secondary_passcode:
break;
case StatusType.Character_listing:
break;
case StatusType.Login_Successful:
if (tmrLogin != null)
{
tmrLogin.Dispose();
tmrLogin = null;
}
break;
case StatusType.Disconnected_from_server:
_DCCount++;
OnPropertyChanged("DCCount");
StartLoginTimer();
break;
case StatusType.bot_Process_Terminated:
case StatusType.Error_Stuck_On_Login:
case StatusType.Error_Script_Steps:
_StatusLogList.Clear();
_ClientlessLoginLogList.Clear();
break;
case StatusType.Error_HS_Is_Down:
HSState = false;
break;
case StatusType.Unknown:
break;
}
if (StateChanged != null)
StateChanged(this, _status);
}
示例3: CreateLabel
private ToolStripLabel CreateLabel(StatusType type, string text)
{
ToolStripStatusLabel label = new ToolStripStatusLabel();
label.Name = type.ToString();
if ((int)type > 0)
{
label.Text = statustext[(int)type - 1] + text;
}
else
{
label.Text = text;
}
label.BorderSides = ToolStripStatusLabelBorderSides.All;
label.BorderStyle = Border3DStyle.SunkenOuter;
return label;
}
示例4: SetItem
private void SetItem(StatusType type, string text, bool visible)
{
string itemname = type.ToString();
if (visible)
{
if (this.Items[itemname] == null)
{
int index = this.Items.Count;
for (int i = 0; i < this.Items.Count; i++)
{
try
{
StatusType itemtype = (StatusType)Enum.Parse(typeof(StatusType), this.Items[i].Name);
if ((int)type < (int)itemtype)
{
index = i;
break;
}
}
catch
{
index = i;
break;
}
}
this.Items.Insert(index, CreateLabel(type, text));
}
this.Items[itemname].Visible = true;
}
else
{
if (this.Items[itemname] != null)
{
this.Items[itemname].Visible = false;
}
}
}
示例5: LogStatus
//--- logging ---------------------------
void LogStatus( StatusType status, string name, string path, string filename )
{
StringBuilder st = new StringBuilder( "----" );
st[(int)status] = char.ToUpper( status.ToString()[0] );
st.AppendFormat( " {0}:", name ?? string.Empty );
st.Append( MatchPath.AbsoluteDirectoryPath( path ?? string.Empty ) );
st.Append( filename ?? string.Empty );
Log( st.ToString() );
}