private void btnEdit_Click(object sender, EventArgs e) { Printer printer = (Printer)bindSrcPrinter.List[bindSrcPrinter.Position]; PrinterForm pf = new PrinterForm(printer); if (pf.ShowDialog() == DialogResult.OK) { bindSrcPrinter.List[bindSrcPrinter.Position] = printer; } }
private void btnAdd_Click(object sender, EventArgs e) { Printer printer = new Printer("", 0.0, "", 0.0, false, Printer.TextWriteState.Inkjet, 0.0); PrinterForm pf = new PrinterForm(printer); if (pf.ShowDialog() == DialogResult.OK) { bindSrcPrinter.Add(printer); } }