public void ViewVideoWalls(IShowView <VideoWall> inForm, IRepository <VideoWall> videoWallRepository, IMainController controller) { IList <VideoWall> videoWalls = videoWallRepository.All().ToList(); inForm.ShowModal(controller, videoWalls); }
public void SetUp() { _mainController = MockRepository.GenerateStub <IMainController>(); _mockResponseProvider = MockRepository.GenerateStub <IResponseProvider>(); _mockLogger = MockRepository.GenerateStub <ILogger>(); _service = new DownloadService(_mainController, _mockResponseProvider, _mockLogger); }
public SearchPartMode(IMainController mainController, ISearchPartView searchPart_view, IModeController mode_ctrl) : base(new SearchPartModeInfo()) { this.m_ctrl = mainController; this.searchPart_view = searchPart_view; this.mode_ctrl = mode_ctrl; }
public AddScheduleToVideoWallForm(IMainController inController, VideoWall videoWall) { _controller = inController; _videoWall = videoWall; InitializeComponent(); Icon = Properties.Resources.Icon; }
public void ShowAddTrainingGroup(IFormFactory formFactory, ITrainingGroupRepository trainingGroupRepository, ITrainingRepository trainingRepository, ITrainingPeriodRepository trainingPeriodRepository, IMainController mainController) { IAddTrainingGroupForm form = formFactory.CreateAddTrainingGroupForm(); List <Training> trainings = trainingRepository.GetAllTrainings(); List <TrainingPeriod> trainingPeriods = trainingPeriodRepository.GetAllTrainingPeriods().ToList(); // Uklanjanje zauzetih termina s popisa dostupnih termina foreach (TrainingGroup group in trainingGroupRepository.GetAllTrainingGroups()) { foreach (TrainingPeriod trainingPeriod in group.TrainingPeriods) { int index = trainingPeriods.FindIndex(period => period.PeriodId == trainingPeriod.PeriodId); if (index != -1) { trainingPeriods.RemoveAt(index); } } } List <TrainingPeriod> newPeriods = trainingPeriods.Select(item => item).ToList(); form.ShowModal(mainController, trainings, newPeriods); }
public SearchResultPage(IMainController mainController, UserContext userContext, string patternToSearch) { InitializeComponent(); DataContext = this; this.mainController = mainController; this.userContext = userContext; this.patternToSearch = patternToSearch; this.GreetingName.Text = string.Format("Hello, {0}!", userContext.LoggedUser.Username); this.SearchResultTBlock.Text = string.Format("\"{0}\"", this.patternToSearch); this.MoneyBalance = userContext.LoggedUser.MoneyBalance.ToString(); this.SearchTBox.Focus(); this.loadingWindow = new LoadingWindow() { Owner = Application.Current.MainWindow, }; this.worker = new BackgroundWorker(); worker.DoWork += Worker_DoWork; worker.RunWorkerCompleted += Worker_RunWorkerCompleted; worker.RunWorkerAsync(); loadingWindow.ShowDialog(); }
public CommandInterpreter(ICharacterFactory characterFactory, IItemFactory itemFactory, IMainController controller) { this.characterFactory = characterFactory; this.itemFactory = itemFactory; this.controller = controller; this.commands = new TypeCollector().GetAllInheritingTypes <ICommand>(); }
public EndTransactionMode(IMainController mainController, IMainView mainView, IModeController mode_ctrl) : base(new EndTransactionModeInfo()) { this.m_ctrl = mainController; this.m_view = mainView; this.mode_ctrl = mode_ctrl; }
public SelectItemMode(IMainController mainController, IMainView mainView, IModeController mode_ctrl) : base(new SelectItemModeInfo()) { this.m_ctrl = mainController; this.m_view = mainView; this.mode_ctrl = mode_ctrl; }
public void ShowAddTrainingPeriod(IFormFactory formFactory, IMainController mainController) { IAddTrainingPeriodForm form = formFactory.CreateAddTrainingPeriodForm(); form.ShowModal(mainController); }
public DownloadService(IMainController mainController, IResponseProvider responseProvider, ILogger logger) { _mainController = mainController; _responseProvider = responseProvider; _logger = logger; }
public static T GetController <T>() where T : IController { UnityScene scene = GameObject.FindObjectOfType <UnityScene>(); IMainController mainController = scene.mainController; return(mainController.GetController <T>()); }
public void ShowHistoryWorkouts(IMainController mainController, List <HistoryWorkout> historyWorkouts) { _mainController = mainController; _historyWorkouts = historyWorkouts; UpdateList(); this.Show(); }
public void AddQuickChanelButton(string controllerName, IMainController controller, EventHandler eventHandler, int imageIndex, string deptid, string moduleid) { BarLargeButtonItem item = new BarLargeButtonItem(this.barManager, controllerName) { Tag = controller }; if (!this._quickChanelDictionary.ContainsKey(moduleid)) { this._quickChanelDictionary.Add(moduleid, item); } item.ItemClick += delegate(object sender, ItemClickEventArgs e) { if (eventHandler != null) { this._currentEventHandler = eventHandler; _currentDeptId = this.GenerateCurrentWstationDeptId(deptid); this._moduleid = moduleid; UserContextManager.userContext.currentWorkstationModule = this.GenerateSystemModule(moduleid); eventHandler(e.Item.Tag, e); this._currentController = controller; } }; this.barItem_quickChanel.ItemLinks.Add(item); MemoryUtil.FlushMemory(); }
private void InitMainController() { var view = FindViewById <MainView>(Resource.Id.mainView); var router = new MainRouter(new WeakReference <Context>(this)); _controller = new MainController(view, router); }
public void ShowAddExercise(IFormFactory formFactory, IMainController mainController) { IAddExerciseForm form = formFactory.CreateAddExerciseForm(); form.ShowModal(mainController); }
public void ViewSchedules(IShowView <Schedule> inForm, IRepository <Schedule> scheduleRepository, IMainController controller) { IList <Schedule> employees = scheduleRepository.All().ToList(); inForm.ShowModal(controller, employees); }
public void ViewEmployees(IShowView <Employee> inForm, IRepository <Employee> employeeRepository, IMainController controller) { IList <Employee> employees = employeeRepository.All().ToList(); inForm.ShowModal(controller, employees); }
public PaymentMode(IMainController mainController, IMainView mainView, IModeController mode_ctrl) : base(new PaymentModeInfo()) { this.m_ctrl = mainController; this.m_view = mainView; this.mode_ctrl = mode_ctrl; }
public RequestEditViewModel(RequestEntity request, IMainController mainController, bool readOnly, bool isProcess, bool isCommit) { _logMgr = ServiceMgr.Current.GetInstance <ILogMgr>(); _commonService = ServiceMgr.Current.GetInstance <ICommonService>(); _nsiService = ServiceMgr.Current.GetInstance <INsiService>(); _viewFormMgr = ServiceMgr.Current.GetInstance <IViewFormMgr>(); _eventMgr = ServiceMgr.Current.GetInstance <IEventMgr>(); _messageBoxMgr = ServiceMgr.Current.GetInstance <IMessageBoxMgr>(); _logger = _logMgr.GetLogger("RequestViewModel"); _logger.Debug("Create."); _logger.Debug("Interfaces: ICommonDbService = {0}; INsiService = {1}; IViewFormMgr = {2}; IEventMgr = {3}; IMessageBoxMgr= {4}", _commonService.ToStateString(), _nsiService.ToStateString(), _viewFormMgr.ToStateString(), _eventMgr.ToStateString(), _messageBoxMgr.ToStateString()); if (mainController == null) { throw new ArgumentNullException("MainController param can not be null."); } Request = request; /*_request = request != null ? request.Clone() : RequestEntity.Create(); * _request.ResetCloneKey(); // Разрываем зависимость для выявления изменений обращения в других формах редактирования*/ Request.CreatorUser = _commonService.User; _mainController = mainController; _readOnly = readOnly; _isProcess = isProcess; _isCommit = isCommit; InitView(); }
public void ShowAds(IShowView <Ad> inForm, IRepository <Ad> adRepository, IMainController controller) { IList <Ad> ads = adRepository.All().ToList(); inForm.ShowModal(controller, ads); }
private void _tabMainControl_SelectedPageChanged(object sender, TabPageChangedEventArgs e) { if (e.Page != null) { this._currentTabController = this._dictTabCtroller[e.Page.Text]; this._currentMainControl = this._dictTabCtroller[e.Page.Text].MainControl; if (this._currentMainControl.LeftControl != null) { } this._currentEventHandler = this._dictTabCtroller[e.Page.Text].eventHandler; _currentDeptId = this._dictTabCtroller[e.Page.Text].CurrentDeptid; this._moduleid = this._dictTabCtroller[e.Page.Text].ModuleId; UserContextManager.userContext.currentWorkstationModule = this._dictTabCtroller[e.Page.Text].CurrentModule; this._currentController = this._dictTabCtroller[e.Page.Text].MainController; string str = "HIS";//FileHelper.LicensesData.Rows[0]["useCompanyName"].ToString(); this.Text = string.Format("{0}-管理系统主程序【{1}】", str, e.Page.Text); this.ResetToolbar(); if (this._dictTabCtroller[e.Page.Text].MainController is BaseManagerLeftMainController) { (this._dictTabCtroller[e.Page.Text].MainController as BaseManagerLeftMainController).CreateToolBarButtons(); } else { if (this._dictTabCtroller[e.Page.Text].MainController != null) { this._dictTabCtroller[e.Page.Text].MainController.CreateToolBarButtons(); } } } }
public void AddQuickChanelButton(SystemModuleData moduleData, IMainController controller, EventHandler eventHandler) { BarLargeButtonItem item; if (!string.IsNullOrEmpty(moduleData.moduleType)) { if (this.moduleTypeList.ContainsKey(moduleData.moduleType)) { item = this.SetBarLargeButtonItem(moduleData, controller, eventHandler); this.moduleTypeList[moduleData.moduleType].ItemLinks.Add(item); } else { BarSubItem item2 = new BarSubItem { Caption = moduleData.moduleType }; this.moduleTypeList.Add(moduleData.moduleType, item2); item = this.SetBarLargeButtonItem(moduleData, controller, eventHandler); this.moduleTypeList[moduleData.moduleType].ItemLinks.Add(item); this.barItem_quickChanel.ItemLinks.Add(item2); } } else { item = this.SetBarLargeButtonItem(moduleData, controller, eventHandler); this.barItem_quickChanel.ItemLinks.Add(item); } MemoryUtil.FlushMemory(); }
public DeviceSettingsViewModel(IMainController controller) { if (controller == null) { throw new ArgumentNullException("controller"); } this.controller = controller; }
public static IStorageGaugeViewModel ResolveIStorageGaugeViewModel(IMainController controller) { if (storageGaugeViewModel == null) { storageGaugeViewModel = new StorageGaugeViewModel(controller); } return(storageGaugeViewModel); }
public static AppSettingsViewModel ResolveAppSettingsViewModel(IMainController controller) { if (appSettingsViewModel == null) { appSettingsViewModel = new AppSettingsViewModel(controller); } return(appSettingsViewModel); }
public AppSettingsViewModel(IMainController controller) { if (controller == null) { throw new ArgumentNullException("controller"); } this.controller = controller; }
public static DeviceSettingsViewModel ResolveDeviceSettingsViewModel(IMainController controller) { if (deviceSettingsViewModel == null) { deviceSettingsViewModel = new DeviceSettingsViewModel(controller); } return(deviceSettingsViewModel); }
public void AddUser(IControllersFactory controllersFactory) { _allUsers.Add(controllersFactory.Login, controllersFactory); IMainController mainUserController = controllersFactory.CreateMainController(_userFightQueue); _userMainController.Add(mainUserController); }
public static ISyncProgressViewModel ResolveISyncProgressViewModel(IMainController controller) { if (syncProgressViewModel == null) { syncProgressViewModel = new SyncProgressViewModel(controller); } return(syncProgressViewModel); }
public void ShowModal(IMainController inMainController, IList <Employee> employees) { _controller = inMainController; _employees = employees; UpdateList(); ShowDialog(); }
public static IMediaContentViewModel ResolveIMediaContentViewModel(IMainController controller) { if (mediaContentViewModel == null) { mediaContentViewModel = new MediaContentViewModel(controller); } return(mediaContentViewModel); }
public static IMainViewModel ResolveIMainViewModel(IMainController controller, IViewModelFactory factory) { if (mainViewModel == null) { mainViewModel = new MainViewModel(controller, factory); } return(mainViewModel); }
public void ShowModal(IMainController inMainController, IList <VideoWall> inList) { _controller = inMainController; _videoWalls = inList; UpdateWallsList(); ShowDialog(); }
public void ShowModal(IMainController inMainController, IList <Ad> ads) { _controller = inMainController; _ads = ads; UpdateList(); ShowDialog(); }
public SyncProgressViewModel(IMainController controller) { if (controller == null) { throw new ArgumentNullException("controller"); } this.controller = controller; controller.PropertyChanged += new PropertyChangedEventHandler(this.OnControllerPropertyChanged); }
public ModeController(IMainController mainController, IMainView m_view, ISearchPartView searchPartView) { this.m_view = m_view; this.mode_scan = new ScanMode(mainController, m_view, this, searchPartView); this.mode_selectItem = new SelectItemMode(mainController, m_view, this); this.mode_payment = new PaymentMode(mainController, m_view, this); this.mode_searchPartByGroup = new SearchPartMode(mainController, searchPartView, this); this.mode_endTransaction = new EndTransactionMode(mainController, m_view, this); }
public ShellController( IShellViewModel shellViewModel, IShellView shellView, IMainController mainController) { _shellViewModel = shellViewModel; _shellView = shellView; _mainController = mainController; _shellView.ViewModel = _shellViewModel; }
public WindowMain() { InitializeComponent(); // Technically the view shouldn't own the controller. // This is a bit of slacking on my part because this is the main window, // and it's not worth rewiring Microsoft's default app startup sequence // to be 100% pure MVC. _controller = new MainController {View = this}; }
public DeviceViewModel(IMainController controller) { if (controller == null) { throw new ArgumentNullException("controller"); } this.controller = controller; controller.PropertyChanged += new PropertyChangedEventHandler(this.OnControllerPropertyChanged); this.InitCollectionViews(); }
public StorageGaugeViewModel(IMainController controller) { if (controller == null) { throw new ArgumentNullException("controller"); } this.controller = controller; this.StorageBarInfos = new Dictionary<string, StorageBarInfo>(); this.InitStorageBars(); controller.PropertyChanged += new PropertyChangedEventHandler(this.OnControllerPropertyChanged); }
public DesignMainViewModel(IMainController controller) { this.Controller = controller; this.StorageGaugeViewModel = new DesignStorageGaugeViewModel(controller); this.SyncProgressViewModel = new DesignSyncProgressViewModel(controller, false); this.ContentViewModel = new DesignContentViewModel(); this.DeviceViewModel = new DesignDeviceViewModel(); this.DeviceSettingsViewModel = new Microsoft.WPSync.UI.ViewModels.DeviceSettingsViewModel(controller); this.DeviceSettingsViewModel.Init(); this.AppSettingsViewModel = new Microsoft.WPSync.UI.ViewModels.AppSettingsViewModel(controller); this.AppSettingsViewModel.Init(); this.CurrentViewState = MainViewState.PCTab; this.CurrentContentViewState = ContentViewState.MusicPanel; }
public DesignSyncProgressViewModel(IMainController controller, bool visible) : base(controller) { base.Header = "Doing things ..."; base.SubHeader = "42 Left"; base.Caption = "Loading some data (for design)..."; if (visible) { base.Visibility = Visibility.Visible; } else { base.Visibility = Visibility.Hidden; } base.CurrentProgress = 50f; base.ProgressLeft = 50f; }
public MainViewModel(IMainController controller, IViewModelFactory factory) { if (controller == null) { throw new ArgumentNullException("controller"); } this.controller = controller; if (factory == null) { throw new ArgumentNullException(typeof(IMainFactory).ToString()); } this.SyncProgressViewModel = factory.CreateISyncProgressViewModel(controller); if (this.SyncProgressViewModel == null) { throw new ApplicationInitializationException(typeof(ISyncProgressViewModel).ToString()); } this.StorageGaugeViewModel = factory.CreateIStorageGaugeViewModel(controller); if (this.StorageGaugeViewModel == null) { throw new ApplicationInitializationException(typeof(IStorageGaugeViewModel).ToString()); } this.ContentViewModel = factory.CreateIMediaContentViewModel(controller); if (this.ContentViewModel == null) { throw new ApplicationInitializationException(typeof(IMediaContentViewModel).ToString()); } this.DeviceViewModel = factory.CreateIDeviceViewModel(controller); if (this.DeviceViewModel == null) { throw new ApplicationInitializationException(typeof(IDeviceViewModel).ToString()); } this.DeviceSettingsViewModel = factory.CreateDeviceSettingsViewModel(controller); if (this.DeviceSettingsViewModel == null) { throw new ApplicationInitializationException(typeof(Microsoft.WPSync.UI.ViewModels.DeviceSettingsViewModel).ToString()); } this.AppSettingsViewModel = factory.CreateAppSettingsViewModel(controller); if (this.AppSettingsViewModel == null) { throw new ApplicationInitializationException(typeof(Microsoft.WPSync.UI.ViewModels.AppSettingsViewModel).ToString()); } this.AppSettingsViewModel.Init(); controller.PropertyChanged += new PropertyChangedEventHandler(this.OnControllerPropertyChanged); }
public void SetController(IMainController mainController) { this.m_ctrl = mainController; }
public IMainViewModel CreateIMainViewModel(IMainController controller) { IViewModelFactory factory = DependencyContainer.ResolveIViewModelFactory(); return DependencyContainer.ResolveIMainViewModel(controller, factory); }
public static AppSettingsViewModel ResolveAppSettingsViewModel(IMainController controller) { if (appSettingsViewModel == null) { appSettingsViewModel = new AppSettingsViewModel(controller); } return appSettingsViewModel; }
public static IDeviceViewModel ResolveIDeviceViewModel(IMainController controller) { if (deviceViewModel == null) { deviceViewModel = new DeviceViewModel(controller); } return deviceViewModel; }
public static IMainViewModel ResolveIMainViewModel(IMainController controller, IViewModelFactory factory) { if (mainViewModel == null) { mainViewModel = new MainViewModel(controller, factory); } return mainViewModel; }
public static IMediaContentViewModel ResolveIMediaContentViewModel(IMainController controller) { if (mediaContentViewModel == null) { mediaContentViewModel = new MediaContentViewModel(controller); } return mediaContentViewModel; }
public static IStorageGaugeViewModel ResolveIStorageGaugeViewModel(IMainController controller) { if (storageGaugeViewModel == null) { storageGaugeViewModel = new StorageGaugeViewModel(controller); } return storageGaugeViewModel; }
public static ISyncProgressViewModel ResolveISyncProgressViewModel(IMainController controller) { if (syncProgressViewModel == null) { syncProgressViewModel = new SyncProgressViewModel(controller); } return syncProgressViewModel; }
public DeviceSettingsViewModel CreateDeviceSettingsViewModel(IMainController controller) { return DependencyContainer.ResolveDeviceSettingsViewModel(controller); }
public IDeviceViewModel CreateIDeviceViewModel(IMainController controller) { return DependencyContainer.ResolveIDeviceViewModel(controller); }
public DesignStorageGaugeViewModel(IMainController controller) : base(controller) { base.ResetModelState(); }
public static void LoadExportProjectAddins(IMainController mainWindow) { foreach (IExportProject exportProject in AddinManager.GetExtensionObjects<IExportProject> ()) { try { Log.Information ("Adding export entry from plugin: " + exportProject.Name); mainWindow.AddExportEntry (exportProject.GetMenuEntryName (), exportProject.GetMenuEntryShortName (), new Action<Project, IGUIToolkit> (exportProject.ExportProject)); } catch (Exception ex) { Log.Error ("Error adding export entry"); Log.Exception (ex); } } }
public ISyncProgressViewModel CreateISyncProgressViewModel(IMainController controller) { return DependencyContainer.ResolveISyncProgressViewModel(controller); }
/// <summary> /// Initialize the <c>Controller</c> /// </summary> /// <remarks> /// <para>Called by the <c>initializeFacade</c> method. Override this method in your subclass of <c>Facade</c> if one or both of the following are true:</para> /// <list type="bullet"> /// <item>You wish to initialize a different <c>IController</c></item> /// <item>You have <c>Observers</c> to register with the <c>Controller</c></item> /// </list> /// <para>If you don't want to initialize a different <c>IController</c>, call <c>base.initializeController()</c> at the beginning of your method, then register <c>IController</c> instances</para> /// <para>Note: This method is <i>rarely</i> overridden; in practice you are more likely to use a <c>Controller</c> to create and register <c>Controller</c>s with the <c>Controller</c>, since <c>IController</c> instances will need to send <c>INotification</c>s and thus will likely want to fetch a reference to the <c>Facade</c> during their construction</para> /// </remarks> protected virtual void InitializeController() { if (this.mMainController != null) return; this.mMainController = MainController.Instance; }
public IMediaContentViewModel CreateIMediaContentViewModel(IMainController controller) { return DependencyContainer.ResolveIMediaContentViewModel(controller); }
public IStorageGaugeViewModel CreateIStorageGaugeViewModel(IMainController controller) { return DependencyContainer.ResolveIStorageGaugeViewModel(controller); }