public void AssemblyToScreen(BindingAssembly.Assembly assembly) { switch (assembly.DocBreak) { case BindingAssembly.DocumentBreak.None: rdoNoBreak.Checked = true; rdoPage.Checked = false; rdoSection.Checked = false; break; case BindingAssembly.DocumentBreak.Page: rdoNoBreak.Checked = false; rdoPage.Checked = true; rdoSection.Checked = false; break; case BindingAssembly.DocumentBreak.Section: rdoNoBreak.Checked = false; rdoPage.Checked = false; rdoSection.Checked = true; break; default: throw new InvalidDataException("Unrecognized Assembly.Break"); } chkCopyToTemp.Checked = assembly.CopyToTempFirst; chkResetPageNumber.Checked = assembly.ResetPageNumber; chkStartOnOdd.Checked = assembly.StartOnOdd; SetPageNumEnabled(); }
public void ScreenToAssembly(BindingAssembly.Assembly assembly) { if (rdoPage.Checked) { assembly.DocBreak = BindingAssembly.DocumentBreak.Page; } else if (rdoSection.Checked) { assembly.DocBreak = BindingAssembly.DocumentBreak.Section; } else { assembly.DocBreak = BindingAssembly.DocumentBreak.None; } assembly.CopyToTempFirst = chkCopyToTemp.Checked; assembly.ResetPageNumber = chkResetPageNumber.Checked; assembly.StartOnOdd = chkStartOnOdd.Checked; }