Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            LoadPlugins();
            new System.Windows.Documents.FlowDocument();
            ThemeSelector <ApplyingThemeSplashScreenWindow> .Current.Theme = WpfLayoutData.DefaultApplicationTheme;
            WpfViewsManager.RegisterHelperViews();
            var iniFile = new IniFile();

            if (File.Exists(iniFilePath))
            {
                iniFile.Load(iniFilePath);
            }
            var initialDbCreator = new InitialDbCreator(new CreateInitialDbDialog(), ExceptionProcesser.Current);

            if (!initialDbCreator.OpenDb(iniFile))
            {
                return;
            }
            iniFile.Save(iniFilePath);
            //TODO Create Login-Dialog
            if (!LayoutManager.Current.Login(ReferenceData.AdministratorString, string.Empty))
            {
                return;
            }
            var app = new App();

            app.BeforeMainWindowClosed += (d, e) => { LayoutManager.Current.Logout(); };
            app.Run();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Store all views in a local dictionary
        /// </summary>
        static void RegisterViews()
        {
            var viewsManager = new WpfViewsManager();

            viewsManager.RegisterView(typeof(MovieEdit), typeof(MovieEditView));
            viewsManager.RegisterView(typeof(MoviesEdit), typeof(MoviesEditView));
            viewsManager.RegisterView(typeof(MoviePicturesEdit), typeof(MoviePicturesEditView));
            viewsManager.RegisterView(typeof(MovieDetail), typeof(MovieDetailView));
            viewsManager.RegisterView(typeof(MovieAddCompanyEdit), typeof(MovieAddCompanyEditView));
            viewsManager.RegisterView(typeof(MovieAddArtistEdit), typeof(MovieAddArtistEditView));
            viewsManager.RegisterView(typeof(MovieItemsEdit), typeof(MovieItemsEditView));
            viewsManager.RegisterView(typeof(MovieAddItemsEdit), typeof(MovieAddItemsEditView));
            viewsManager.RegisterView(typeof(MoviesList), typeof(MoviesListView));
            viewsManager.RegisterView(typeof(MoviesViewOptionsEdit), typeof(MoviesViewOptionsEditView));
            viewsManager.RegisterView(typeof(ArtistEdit), typeof(ArtistEditView));
            viewsManager.RegisterView(typeof(ArtistsEdit), typeof(ArtistsEditView));
            viewsManager.RegisterView(typeof(ArtistPicturesEdit), typeof(ArtistPicturesEditView));
            viewsManager.RegisterView(typeof(ArtistDetail), typeof(ArtistDetailView));
            viewsManager.RegisterView(typeof(ArtistsList), typeof(ArtistsListView));
            viewsManager.RegisterView(typeof(ArtistAddMovieEdit), typeof(ArtistAddMovieEditView));
            viewsManager.RegisterView(typeof(ArtistsViewOptionsEdit), typeof(ArtistsViewOptionsEditView));
            viewsManager.RegisterView(typeof(MovieCategoryPriceEdit), typeof(MovieCategoryPriceEditView));
            viewsManager.RegisterView(typeof(MovieCategoryEdit), typeof(MovieCategoryEditView));
            viewsManager.RegisterView(typeof(MovieCategoriesEdit), typeof(MovieCategoriesEditView));
            viewsManager.RegisterView(typeof(MovieCategoryDetail), typeof(MovieCategoryDetailView));
            viewsManager.RegisterView(typeof(MovieCategoriesList), typeof(MovieCategoriesListView));
            viewsManager.RegisterView(typeof(CompaniesEdit), typeof(CompaniesEditView));
            viewsManager.RegisterView(typeof(CompanyMoviesEdit), typeof(CompanyMoviesEditView));
            viewsManager.RegisterView(typeof(CompaniesList), typeof(CompaniesListView));
            viewsManager.RegisterView(typeof(CompaniesViewOptionsEdit), typeof(CompaniesViewOptionsEditView));
            viewsManager.RegisterView(typeof(CompanyEdit), typeof(CompanyEditView));
            viewsManager.RegisterView(typeof(CompanyDetail), typeof(CompanyDetailView));
            viewsManager.RegisterView(typeof(CompanyAddMovieEdit), typeof(CompanyAddMovieEditView));
            viewsManager.RegisterView(typeof(CustomersEdit), typeof(CustomersEditView));
            viewsManager.RegisterView(typeof(CustomersList), typeof(CustomersListView));
            viewsManager.RegisterView(typeof(AthletsList), typeof(AthletsListView));
            viewsManager.RegisterView(typeof(CustomersViewOptionsEdit), typeof(CustomersViewOptionsEditView));
            viewsManager.RegisterView(typeof(CustomerEdit), typeof(CustomerEditView));
            viewsManager.RegisterView(typeof(CustomerDetail), typeof(CustomerDetailView));
            viewsManager.RegisterView(typeof(CustomerAddMemberEdit), typeof(CustomerAddMemberEditView));
            viewsManager.RegisterView(typeof(CustomerMemberEdit), typeof(CustomerAddMemberEditView));
            viewsManager.RegisterView(typeof(CustomerStatsEdit), typeof(CustomerStatsView));
            viewsManager.RegisterView(typeof(CurrentCustomerRentsDetail), typeof(CurrentCustomerRentsDetailView));
            viewsManager.RegisterView(typeof(CurrentCustomerRentsEdit), typeof(CurrentCustomerRentsEditView));
            viewsManager.RegisterView(typeof(CurrentCustomerTransactionsDetail), typeof(CurrentCustomerTransactionsDetailView));
            viewsManager.RegisterView(typeof(CurrentCustomerTransactionsEdit), typeof(CurrentCustomerTransactionsEditView));
            viewsManager.RegisterView(typeof(RentsViewOptionsEdit), typeof(RentsViewOptionsEditView));
            viewsManager.RegisterView(typeof(RentsPeriodEdit), typeof(RentsPeriodEditView));
            viewsManager.RegisterView(typeof(PaymentInputEdit), typeof(PaymentInputView));
            viewsManager.RegisterView(typeof(FindCustomerDetail), typeof(FindCustomerDetailView));
            viewsManager.RegisterView(typeof(FindCustomerEdit), typeof(FindCustomerEditView));
            viewsManager.RegisterView(typeof(Announcer), typeof(AnnouncerView));
        }
Ejemplo n.º 3
0
 void OnLoaded(object sender, RoutedEventArgs e)
 {
     WpfViewsManager.Register(Modules, dataSession);
     Activate();
 }