Iam使用Visual Studio2013。Iam在C#中编写GUI应用程序的代码,因为当单击“重置”按钮时,应用程序将设置为默认值。但是当我单击“重置”按钮时,我无法获得默认值,应用程序将挂起。
我该如何解决这个问题?提供任何用于重置的编码按钮,以在c#中设置默认值。
private bool resetToDefault()
{
bool ret_status = false;
Payload requestPayload = new Payload("0");
COMMAND requestCommand = new COMMAND(CommandDefine.ScreenID.MAIN_WINDOW_ID, CommandDefine.CommandID.SYSTEM_RESET_REQ, CommandDefine.Type.DATA_FRAME, requestPayload.PAYLOAD_LENGTH, requestPayload.getPayloadInBytes());
ret_status = p.Send(requestCommand);
if (ret_status)
if (SendCommand(Prev_SubTab))
ret_status = set_DEVICE_INFO();
return ret_status;
}
private bool set_DEVICE_INFO()
{
Payload requestPayload = new Payload("0");
// COMMAND requestCommand = new COMMAND(CommandDefine.ScreenID.MAIN_WINDOW_ID, CommandDefine.CommandID.DEV_STATUS_REQ, CommandDefine.Type.DATA_FRAME, requestPayload.PAYLOAD_LENGTH, requestPayload.getPayloadInBytes());
COMMAND requestCommand = new COMMAND(CommandDefine.ScreenID.MAIN_WINDOW_ID, CommandDefine.CommandID.DEV_STATUS_REQ, CommandDefine.Type.DATA_FRAME, requestPayload.PAYLOAD_LENGTH, requestPayload.getPayloadInBytes());
return p.Send(requestCommand);
}
Iam使用Visual Studio2013。Iam在C#中编写GUI应用程序的代码,因为当单击“重置”按钮时,应用程序将设置为默认值。但是,当我单击...时,iam无法获得默认值...