public ManagementUnitModel(ITestDataDal iTestDataDal, IManagementUnitStore iManagementUnitStore, IMenuStore iMenuStore, ISelectedManagementUnit iSelectedManagementUnit, IMyEventAggregator iMyEventAggregator ) { _testDataDal = iTestDataDal; _managementUnitStore = iManagementUnitStore; _iSelectedManagementUnit = iSelectedManagementUnit; _myEventAggregator = iMyEventAggregator; _myEventAggregator.Subscribe(this); var cbItems = iMenuStore.GetApplications(); _comboBoxOptions.Clear(); foreach (var p in cbItems) { _comboBoxOptions.Add(p); } LoadManagementUnitsAsync(); this.PropertyChanged += ManagementUnitModel_PropertyChanged; }
public TaskListViewModel(ITaskStore iTaskStore, IMyEventAggregator iMyEventAggregator) { _taskStore = iTaskStore; _myEventAggregator = iMyEventAggregator; _myEventAggregator.Subscribe(this); SearchRange = DateOption.Today; SelectedManagementUnit = 0; ExecuteLoadPastTasksCommandAsync(); }
public Shell() { InitializeComponent(); // ViewModel = FreshIOC.Container.Resolve<TaskListViewModel>(); // _myEventAggregator = new MyEventAggregator(); _navigation = FreshIOC.Container.Resolve <INavigation>(); _myEventAggregator = FreshIOC.Container.Resolve <IMyEventAggregator>(); _myEventAggregator.Subscribe(this); // Initialize Navigation Service. _navigation.Frame = SplitViewFrame; // Navigate to main page. _navigation.Navigate(typeof(MainPage)); ViewModel = FreshIOC.Container.Resolve <IShellViewModel>(); // this.DataContext = ViewModel; }