public ProcessRouteBlueprintForm(PRouteBlueprintModel _parModel) { parModel = _parModel; CheckForIllegalCrossThreadCalls = false; InitializeComponent(); }
public void NoticeDealWith(string json) { DataModel <object> model = JsonConvert.DeserializeObject <DataModel <object> >(json); Form form = new Form(); switch (model.UploadType) { case UploadTypeEnum.ProcessBlueprint: ProcessBlueprintModel PBModel = JsonConvert.DeserializeObject <ProcessBlueprintModel>(model.ParamsModel.ToString()); if (PBModel.UserCode.Equals(ConfigInfo.LocalKey)) { form = new ProcessBlueprintForm(PBModel); } else { return; } break; case UploadTypeEnum.PRouteBlueprint: PRouteBlueprintModel PRBModel = JsonConvert.DeserializeObject <PRouteBlueprintModel>(model.ParamsModel.ToString()); if (PRBModel.UserCode.Equals(ConfigInfo.LocalKey)) { form = new ProcessRouteBlueprintForm(PRBModel); } else { return; } break; default: MessageBox.Show(@"参数异常!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } Hide(); form.TopMost = true; DialogResult dr = form.ShowDialog(); switch (dr) { case DialogResult.OK: MessageBox.Show(@"上传成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); break; case DialogResult.No: MessageBox.Show(@"上传失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); break; default: break; } WindowState = FormWindowState.Minimized; Show(); }