public new DialogResult ShowDialog() { this.opTimer.Enabled = true; this.operation = ProcessOp.Program; this.pbProgramMoway.Image = this.icons.Images[(int)ProcessState.Running]; return(base.ShowDialog()); }
void MController_ProgrammingCompleted(object sender, EventArgs e) { if (this.InvokeRequired) { this.Invoke(new EventHandler(this.MController_ProgrammingCompleted), new object[] { sender, e }); } else { try { this.pbProgramMoway.Image = this.icons.Images[(int)ProcessState.Finish]; this.lProgramMoway.Text = ProcessMessages.PROGRAMMOWAY_OK; this.operation = ProcessOp.Close; this.opTimer.Interval = 1000; this.opTimer.Enabled = true; } catch { } } }
public static object Main(string op, params object[] args) { var processed = ProcessOp.ProcessCommon(op, args); if (processed) { return(true); } if (op == "Cal") { Cal((int)args[0], (int)args[1]); return(true); } else if (op == "Get") { Get((string)args[0]); return(true); } else if (op == "Set") { // auth Set((string)args[0], // name (int)args[1], // value (string)args[2], // ontID (int)args[3] // keyNo ); return(true); } else if (op == "Version") { ont.Runtime.Notify(Errors.SUCCESS, version); return(true); } else if (op == "TransferONT") { return(TransferONT((byte[])args[0], (byte[])args[1], (ulong)args[2])); } return(false); }