protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); ContainerBuilder containerBuilder = new ContainerBuilder(); containerBuilder.RegisterType <MainWindowController>().As <IMainWindowController>(); containerBuilder.RegisterGeneric(typeof(Repository <>)).As(typeof(IRepository <>)); containerBuilder.RegisterType <Genre>().As <IGenre>(); containerBuilder.RegisterType <Movie>().As <IMovie>(); containerBuilder.RegisterType <AddGenreViewModel>().As <IAddGenreViewModel>(); containerBuilder.RegisterType <AddMovieViewModel>().As <IAddMovieViewModel>(); containerBuilder.RegisterType <GenreViewModel>().As <IGenreViewModel>(); containerBuilder.RegisterType <MainWindowViewModel>().As <IMainWindowViewModel>(); containerBuilder.RegisterType <MovieViewModel>().As <IMovieViewModel>(); containerBuilder.RegisterType <AddGenreViewController>().As <IAddGenreViewController>(); containerBuilder.RegisterType <AddMovieViewController>().As <IAddMovieViewController>(); containerBuilder.RegisterType <GenresViewController>().As <IGenreViewController>(); containerBuilder.RegisterType <MoviesViewController>().As <IMovieViewController>(); Container = containerBuilder.Build(); IMainWindowController mainController = Container.Resolve <IMainWindowController>(); mainController.Initialize(Container.Resolve <IRepository <IMovie> >(new NamedParameter("databaseFile", @"Database/Movies.db")), Container.Resolve <IRepository <IGenre> >(new NamedParameter("databaseFile", @"Database/Movies.db")), false); }
public MainWindowViewModel(IMainWindowController controller) { controller.ViewModel = this; Budgets = new ObservableCollection <Budget>(); GetBudgetsCommand = new DelegateCommand(controller.OnGetBudgets); }
public MainWindowViewModel(IMainWindowController controller) { controller.ViewModel = this; Budgets = new ObservableCollection<Budget>(); GetBudgetsCommand = new DelegateCommand(controller.OnGetBudgets); }
public MainWindow(IMainWindowController candyShopController) { Controller = candyShopController; InitializeComponent(); Text = String.Format(LocaleEN.TEXT_APP_TITLE, Application.ProductName, Application.ProductVersion); }
static void Main() { App app = new App(); IMainWindowController controller = WindowControllerFactory.GetMainWindowController(); app.Run(controller.GetAttachedWindow().GetAsWindow()); }
public ViewModelLogin(IEnterValidationRule enterValidationRule, IMainWindowController mainWindowController, IFrontServiceClient frontServiceClient) { this.validatablePropertyCollection.Add("Login"); this.validatablePropertyCollection.Add("Password"); this.enterValidationRule = enterValidationRule; this.mainWindowController = mainWindowController; this.frontServiceClient = frontServiceClient; }
public ViewModelFactory(IMainWindowController mainWindowController, IFrontServiceClient frontServiceClient) { _mainWindowController = mainWindowController; _frontServiceClient = frontServiceClient; _viewModelCollection.Add(typeof(LoginViewModel), new LoginViewModel(_mainWindowController, frontServiceClient)); _viewModelCollection.Add(typeof(RegisterViewModel), new RegisterViewModel(_mainWindowController, frontServiceClient)); _viewModelCollection.Add(typeof(DashboardViewModel), new DashboardViewModel(_mainWindowController, frontServiceClient)); }
public ViewModelReport(IReportValidationRule reportValidationRule, IMainWindowController mainWindowController, IFrontServiceClient frontServiceClient, User user) { this.validatablePropertyCollection.Add("SinceDate"); this.validatablePropertyCollection.Add("ToDate"); this.reportValidationRule = reportValidationRule; this.mainWindowController = mainWindowController; this.frontServiceClient = frontServiceClient; this.user = user; }
public void InstallViewController(IMainWindowController theController) { MenuCommands = new ObservableCollection <CommandDescriptor>(theController.GetMenuCommands()); Colors = new ObservableCollection <ColorDescription>(theController.GetColors()); SelectedColor = Colors.First(); LineWidths = new ObservableCollection <LineWidthDescription>(theController.GetLineDescriptions()); SelectedLineWidth = LineWidths.First(); }
public ViewModelMain(IProductByDateValidationRule productByDateValidationRule, ISaleByDateValidationRule saleByDateValidationRule, IMainWindowController mainWindowController, IFrontServiceClient frontServiceClient, User user) { this.validatablePropertyCollection.Add("SinceDate"); this.validatablePropertyCollection.Add("ToDate"); this.productByDateValidationRule = productByDateValidationRule; this.saleByDateValidationRule = saleByDateValidationRule; this.mainWindowController = mainWindowController; this.frontServiceClient = frontServiceClient; this.user = user; }
/// <summary> /// Creates a new instance of <see cref="StorageCommandHandler"/>. /// </summary> /// <param name="projectStorage">Class responsible to storing and loading the application project.</param> /// <param name="projectMigrator">Class responsible for the migration of the application projects.</param> /// <param name="projectFactory">The factory to use when creating new projects.</param> /// <param name="projectOwner">The class owning the application project.</param> /// <param name="inquiryHelper">The object facilitating user interaction.</param> /// <param name="mainWindowController">The object owning the parent controller for UI.</param> public StorageCommandHandler(IStoreProject projectStorage, IMigrateProject projectMigrator, IProjectFactory projectFactory, IProjectOwner projectOwner, IInquiryHelper inquiryHelper, IMainWindowController mainWindowController) { projectPersister = projectStorage; this.projectMigrator = projectMigrator; this.projectFactory = projectFactory; this.projectOwner = projectOwner; this.inquiryHelper = inquiryHelper; this.mainWindowController = mainWindowController; }
public ViewModelSale(ISaleValidationRule saleValidationRule, IProductValidationRule productValidationRule, IMainWindowController mainWindowController, IFrontServiceClient frontServiceClient, Seller seller, User user) { this.validatablePropertyCollection.Add("Product"); this.validatablePropertyCollection.Add("Count"); this.validatablePropertyCollection.Add("Datetime"); this.saleValidationRule = saleValidationRule; this.productValidationRule = productValidationRule; this.mainWindowController = mainWindowController; this.frontServiceClient = frontServiceClient; this.seller = seller; this.user = user; }
public ViewModelProduct(IArrivedGoodsValidationRule arrivedGoodsValidationRule, IProductValidationRule productValidationRule, IMainWindowController mainWindowController, IFrontServiceClient frontServiceClient, ArrivedGoods arrivedGoods, Product product, Seller seller, User user, int id) { this.validatablePropertyCollection.Add("Unit"); this.validatablePropertyCollection.Add("Count"); this.validatablePropertyCollection.Add("Datetime"); this.validatablePropertyCollection.Add("ExpirationDate"); this.validatablePropertyCollection.Add("PurchasePrice"); this.validatablePropertyCollection.Add("SalesPrice"); this.validatablePropertyCollection.Add("ReturnedDate"); this.arrivedGoodsValidationRule = arrivedGoodsValidationRule; this.productValidationRule = productValidationRule; this.mainWindowController = mainWindowController; this.frontServiceClient = frontServiceClient; this.seller = seller; this.product = product; this.arrivedGoods = arrivedGoods; this.user = user; this.id = id; }
/// <summary> /// Saves the handle to the controller for the MainWindow /// </summary> /// <param name="mainWindowController"></param> public void AttachMainWindowController(IMainWindowController mainWindowController) { MainWindowController = mainWindowController; }
public AddMovieWindow(IMainWindowController mwc) { InitializeComponent(); _mwc = mwc; }
private async Task StartChildControllers() { _mainWindowController = new KernelWrapper().Get <IMainWindowController>(); _mainWindowController.MainWindow = _mainWindow; await _mainWindowController.StartControllerAsync(); }
/// <summary> /// Constructs the MainWindow view. /// </summary> /// <param name="operate">Operation handler for MainWindowController</param> public MainWindow(IMainWindowController mwc) { InitializeComponent(); _mwc = mwc; // Store MainWindowController InitializeUx(); // Initialize Ux }
public ViewModelFactory(IValidationRuleFactory validationRuleFactory, IMainWindowController mainWindowController, IFrontServiceClient frontServiceClient) { this.validationRuleFactory = validationRuleFactory; this.mainWindowController = mainWindowController; this.frontServiceClient = frontServiceClient; }
public AddProductController(RichTextBox outputTextField, IMainWindowController Main) { this.Main = Main; AddLogic = new AddProductLogic(); output = outputTextField; }
public ModifyAccountWindow(IMainWindowController mwc, AccountSelector GetSelectedAccount) { InitializeComponent(); _mwc = mwc; _GetSelectedAccount = GetSelectedAccount; }
public CreateAccountWindow(IMainWindowController mwc) { InitializeComponent(); _mwc = mwc; }
public DashboardViewModel(IMainWindowController mainWindowController, IFrontServiceClient frontServiceClient) : base(mainWindowController, frontServiceClient) { }
/// <summary> /// Constructor /// </summary> /// <param name="mwc">Delegate to handle operations</param> public BrowseMovieWindow(IMainWindowController mwc) { InitializeComponent(); _mwc = mwc; uxButtonGetMovie.Enabled = false; }