public GeneratorView()
 {
     InitializeComponent();
     _views           = new List <UserControl>();
     _invoice         = new Invoice();
     _mainUserControl = new CreatorView(_invoice);
     AddUserControl(_mainUserControl);
     AddUserControl(new CreateInvoiceItemView(_invoice.Items));
     UpdateViewBar(_mainUserControl);
     OpenUserControl(_mainUserControl);
 }
 public GeneratorView(Invoice invoice)
 {
     InitializeComponent();
     _views           = new List <UserControl>();
     _invoice         = invoice;
     _mainUserControl = new CreatorView(_invoice, false);
     AddUserControl(_mainUserControl);
     AddUserControl(new CreateInvoiceItemView(_invoice.Items));
     UpdateViewBar(_mainUserControl);
     OpenUserControl(_mainUserControl);
     RepresentativeName = $"{Properties.strings.edit} {invoice.DocumentData.Number}";
 }