Exemple #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            var mainForm = new frmMain();

            InvoiceApp.RegisterMainForm(mainForm);

            InvoiceApp.RouteManager.RegisterRoute(Route.InvoiceList, new RouteItem<InvoiceListViewModel, InvoiceListViewTest>(mainForm, mainForm, false));
            InvoiceApp.RouteManager.RegisterRoute(Route.EditInvoice, new RouteItem<InvoiceViewModel, InvoiceEditor>(mainForm, mainForm, false));
            InvoiceApp.RouteManager.RegisterRoute(Route.RefMeasureUnits, new RouteItem<MeasureUnitsViewModel, MeasureUnitsEditor>(mainForm, mainForm));
            InvoiceApp.RouteManager.RegisterRoute(Route.PrintPreview, new RouteItem<InvoicePrintPreviewModel, PrintPreviewViewTest>(mainForm, mainForm, false));
            InvoiceApp.RouteManager.RegisterRoute(Route.RefProducts, new RouteItem<ProductViewModel, ProductEditor>(mainForm, mainForm));
            InvoiceApp.RouteManager.RegisterRoute(Route.RefPacking, new RouteItem<PackingViewModel, PackingEditor>(mainForm, mainForm));
            InvoiceApp.RouteManager.RegisterRoute(Route.RefCustomers, new RouteItem<NamedEntityViewModel<Customer>, NamedEntityEditor>(mainForm, mainForm));
            InvoiceApp.RouteManager.RegisterRoute(Route.RefProducers, new RouteItem<NamedEntityViewModel<Producer>, NamedEntityEditor>(mainForm, mainForm));
            InvoiceApp.RouteManager.RegisterRoute(Route.RefSuppliers, new RouteItem<NamedEntityViewModel<Supplier>, NamedEntityEditor>(mainForm, mainForm));

            Application.Run(mainForm);
        }
Exemple #2
0
 public static void RegisterMainForm(frmMain form)
 {
     MainForm = form;
 }