void UpdateWindowContents(Reset reset) { cbCommand.Text = reset.Command.ToString(); txtArg0.Text = reset.Arg0.ToString(); txtArg1.Text = reset.Arg1.ToString(); txtArg2.Text = reset.Arg2.ToString(); txtArg3.Text = reset.Arg3.ToString(); txtArg4.Text = reset.Arg4.ToString(); txtArg5.Text = reset.Arg5.ToString(); txtArg6.Text = reset.Arg6.ToString(); txtArg7.Text = reset.Arg7.ToString(); lblDescription.Text = reset.ToString(); }
private void UpdateResetDescriptionWithoutCommittingChanges() { Reset reset = new Reset(); int value = 0; if (Int32.TryParse(txtArg0.Text, out value)) reset.Arg0 = value; if (Int32.TryParse(txtArg1.Text, out value)) reset.Arg1 = value; if (Int32.TryParse(txtArg2.Text, out value)) reset.Arg2 = value; if (Int32.TryParse(txtArg3.Text, out value)) reset.Arg3 = value; if (Int32.TryParse(txtArg4.Text, out value)) reset.Arg4 = value; if (Int32.TryParse(txtArg5.Text, out value)) reset.Arg5 = value; if (Int32.TryParse(txtArg6.Text, out value)) reset.Arg6 = value; if (Int32.TryParse(txtArg7.Text, out value)) reset.Arg7 = value; string cmd = (string)cbCommand.Text; if (!String.IsNullOrEmpty(cmd)) { reset.Command = cmd[0]; } lblDescription.Text = reset.ToString(); }