本文整理汇总了C#中Code.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Code.ToString方法的具体用法?C# Code.ToString怎么用?C# Code.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Code
的用法示例。
在下文中一共展示了Code.ToString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetInstructionKind
private static InstructionKindEnum GetInstructionKind(Code value)
{
var xName = value.ToString();
if (xName.EndsWith("_S"))
{
xName = xName.Substring(0, xName.Length - 2);
}
return (InstructionKindEnum)Enum.Parse(typeof(InstructionKindEnum), xName);
}
示例2: Get
public static OpCodeInfo Get(Code code)
{
OpCodeInfo info;
if (knownOpCodeDict.TryGetValue(code, out info))
return info;
else
throw new NotSupportedException(code.ToString());
}
示例3: mainExecuteCode
/// <summary>
/// ִ��ָ��
/// </summary>
/// <param name="msg">ָ��</param>
private void mainExecuteCode(BaseCommunication sender, Code code)
{
switch (code.Head)
{
case CodeHead.CONNECT_OK:
//���ӳɹ�
displayMessage(code);
break;
case CodeHead.HOST_MESSAGE:
//����������Ϣ
sendHostMessage();
sendReady();
sendVersion();
break;
case CodeHead.SHUTDOWN:
//�ػ�
WindowsManager.ShutDown();
break;
case CodeHead.REBOOT:
WindowsManager.Reboot();
// ��������.
break;
case CodeHead.SPEAK:
//�Ի�
displayMessage(code);
break;
case CodeHead .CLOSE_APPLICATION:
//�رճ���
Close();
Application.ExitThread();
Application.Exit();
break;
case CodeHead.CONNECT_RESTART:
//�����������
ReStart();
break;
case CodeHead.GET_DISKS:
//��ȡ���ش���
sendDisks(sender);
break;
case CodeHead.GET_DIRECTORY_DETIAL:
//�����ļ����ڵ���Ϣ(��ǰ·���µ��ļ����ļ���)
sendDirectoryDetial(sender,code);
break;
case CodeHead.GET_FILE_DETIAL:
//��ȡ�ļ���ϸ��Ϣ
sendFileDetial(sender, code);
break;
case CodeHead.CONTROL_MOUSE:
//������
doMouseEvent(code);
break;
case CodeHead.CONTROL_KEYBOARD:
//���̿���
doKeyBoardEvent(code);
break;
case CodeHead .VERSION:
//���Ͱ汾��Ϣ
sendVersion();
break;
case CodeHead .UPDATE:
//���и��³���
builtUpdateServer();
break;
case CodeHead.PASSWORD:
savePassWord(sender, code);
break;
default:
break;
}
lbl_Message.Text = code.ToString();
}
示例4: GetOpCode
static OpCode GetOpCode (Code code)
{
return (OpCode) typeof (OpCodes).GetField (
code.ToString (),
SR.BindingFlags.Public | SR.BindingFlags.Static).GetValue (null);
}
示例5: ExceptionData
internal ExceptionData(Exception e, string message, Code ec)
{
this.Message = message;
this.StackTrace = e.StackTrace;
this.ExceptionCode = ec.ToString();
}