public CreateProjectWizardViewModel(IEventAggregator EventAggregator, IProjectInfoBAL projctInfoBll, IRegionManager _regionManager, IGlobalProperties globalProperties, IModalWindowService winService) { _eventAggregator = EventAggregator; _projectBAL = projctInfoBll; _globalProperties = globalProperties; _winService = winService; _eventAggregator.GetEvent <PubSubEvent <Visibility> >().Subscribe(GetSetFloorTabVisibility); _eventAggregator.GetEvent <OduIduVisibility>().Subscribe(GetSetIduTabVisibility); _eventAggregator.GetEvent <TheuInfoVisibility>().Subscribe(GetSetTHEUITabVisibility); //ACC - RAG //_eventAggregator.GetEvent<RefreshDashboard>().Subscribe(RefreshDashBoard); CancelClickCommand = new DelegateCommand(this.CancelClick); CreateClickCommand = new DelegateCommand(this.CreateClick); NextClickCommand = new DelegateCommand(NextClick); PreviousClickCommand = new DelegateCommand(PreviousClick); this.FloorVisibility = Visibility.Collapsed; this.TheuInfoVisibility = Visibility.Collapsed; //ACC - RAG _eventAggregator.GetEvent <ProjectInfoSubscriber>().Subscribe(SetProjectInfoValidateValue); _eventAggregator.GetEvent <DesignerTabSubscriber>().Subscribe(SetDesignTabValidateValue); _eventAggregator.GetEvent <TypeTabSubscriber>().Subscribe(SetTypeTabValidateValue); _eventAggregator.GetEvent <FloorTabSubscriber>().Subscribe(SetFloorTabValidateValue); _eventAggregator.GetEvent <NextButtonVisibility>().Subscribe(GetSetNextBtnVisibility); //ACC - RAG this.NextButtonVisibility = Visibility.Visible; //ACC - RAG _eventAggregator.GetEvent <OduTabSubscriber>().Subscribe(SetOduTabValidateValue); _eventAggregator.GetEvent <IduTabSubscriber>().Subscribe(SetIDUTabValidateValue); _eventAggregator.GetEvent <CreateButtonVisibility>().Subscribe(GetSetCreateBtnVisibility); //ACC - RAG this.CreateButtonVisibility = Visibility.Collapsed; //ACC - RAG CreateButtonEnable = true; _eventAggregator.GetEvent <CreateButtonEnability>().Subscribe(GetSetCreateBtnEnability); _eventAggregator.GetEvent <Cleanup>().Subscribe(OnCleanup); RegionManager = _regionManager; Project.isSystemPropertyWiz = false; }
public TotalHeatExchDetailsInfoViewModel(IEventAggregator EventAggregator, IModalWindowService winService, JCHVRF_New.Model.LightProject thisProj) { try { NumericOutdoorCDBCommand = new DelegateCommand(NumericOutdoorCDB_LostFocus); NumericOutdoorCWBCommand = new DelegateCommand(NumericOutdoorCWBCommand_LostFocus); NumericOutdoorHDBCommand = new DelegateCommand(NumericOutdoorHDBCommand_LostFocus); NumericRHommand = new DelegateCommand(NumericRHommand_LostFocus); ValidateUnitNameCommand = new DelegateCommand(ValidateUnitNameOnLostFocus); _eventAggregator = EventAggregator; _winService = winService; _bll = new JCHVRF.BLL.IndoorBLL(JCHVRF.Model.Project.CurrentProject.SubRegionCode, JCHVRF.Model.Project.CurrentProject.BrandCode); ChangeTempCommand = new DelegateCommand(btnChangeTempUClicked); _eventAggregator.GetEvent <RoomListSaveSubscriber>().Subscribe(GetRoomList); AddFloorCommand = new DelegateCommand(OnAddFloorClicked); AddEditRoomCommand = new DelegateCommand(OnAddEditRoomClicked); _eventAggregator.GetEvent <FloorListSaveSubscriber>().Subscribe(OpenGetFloorList); _eventAggregator.GetEvent <CleanupSystemWizard>().Subscribe(OnCleanup); } catch (Exception ex) { int?id = Project.GetProjectInstance?.projectID; Logger.LogProjectError(id, ex); } }
public AddNewClientViewModel(IEventAggregator eventAggregator, IModalWindowService winService) { try { _eventAggregator = eventAggregator; _winService = winService; EmailValidationDBCommand = new DelegateCommand(EmailId_LostFocus); CancelNewClientClickedCommand = new DelegateCommand(OnCancelClickedCommand); PhoneValidationDBCommand = new DelegateCommand <TextCompositionEventArgs>(PhoneNumber_LostFocus); AddNewClientClickedCommand = new DelegateCommand(OnNewClientClickedCommand); if (Application.Current.Properties["Value"] != null) { if (Application.Current.Properties["SelectedClient"] != null) { clientVal = Convert.ToInt32(Application.Current.Properties["SelectedClient"]); GetClientDetails(clientVal); } } } catch (Exception ex) { Logger.LogProjectError(null, ex); } }
public FloorTabViewModel(IEventAggregator eventAggregator, IModalWindowService winService) { _eventAggregator = eventAggregator; _winService = winService; ListFloor = new ObservableCollection <Floor>(); CurrentProject = JCHVRF.Model.Project.GetProjectInstance; BulkRemoveFloorCommand = new DelegateCommand(BulkRemoveFloor); AddFloorCommand = new DelegateCommand(AddFloorIconClick); AddEditFloorCommand = new DelegateCommand(AddEditFloorClick); RemoveFloorCommand = new DelegateCommand(RemoveFloorIconClick); CheckUpdateCommand = new DelegateCommand(() => { RaisePropertyChanged(nameof(AreAllFloorChecked)); }); _eventAggregator.GetEvent <PubSubEvent <int?> >().Subscribe(OnMultiFloorValueTypeTab); _eventAggregator.GetEvent <PubSubEvent>().Subscribe(OnAddFloorEdit); _eventAggregator.GetEvent <PubSubEvent <string> >().Subscribe(OnMultiFloorValueBulkUpload); _eventAggregator.GetEvent <FloorListAddSubscriber>().Subscribe(AddFloor); BulkAddCommand = new DelegateCommand(BulkAddClick); ProjectInitialisation(); _eventAggregator.GetEvent <FloorTabNext>().Subscribe(FloorNextClick); AddDefoultFloorlist(); SaveClickCommand = new DelegateCommand(OnSaveClicked); NavigationParameters param = _winService.GetParameters(ViewKeys.FloorTab); if (param != null) { EnableFLoorSavebutton((bool)param["EnableSaveButtons"]); } }
public IndoorUnitInfoViewModel(IEventAggregator EventAggregator, IModalWindowService winService) { try { _project = JCHVRF.Model.Project.GetProjectInstance; _bllProject = new JCHVRF.BLL.ProjectBLL(_project); _eventAggregator = EventAggregator; SelectedIDU = new ObservableCollection <IDU>(); SetIndoorSystemSpecificIndoorInfo(); RemoveCommand = new DelegateCommand(OnRemove); SelectCommand = new DelegateCommand(RefreshHeaderAndRemoveButton); _winService = winService; OpenAddIndoorUnit = new DelegateCommand(OpenAddIndoorUnitView); } catch (Exception ex) { int?id = _project?.projectID; Logger.LogProjectError(id, ex); } }
public ProjectSettingsViewModel(IEventAggregator EventAggregator, IModalWindowService winService) { _eventAggregator = EventAggregator; _winService = winService; SaveClickedCommand = new DelegateCommand(OnSaveClickedCommand); CancelClickCommand = new DelegateCommand(CancelClick); }
public EventListViewModel(IEventAggregator EventAggregator, IModalWindowService winService, IEventDAL eventDAL) { _eventAggregator = EventAggregator; _winService = winService; _eventDAL = eventDAL; _eventAggregator.GetEvent <AddEventClickedDate>().Subscribe(LoadEvents); EditEventClickedCommand = new DelegateCommand <int?>(EditEventClick); DeleteEventClickedCommand = new DelegateCommand <int?>(DeleteEventClick); }
public EditReportContentsViewModel(IEventAggregator eventAggregator, IProjectInfoBAL projectInfoBll, IModalWindowService winService) { if (SystemSetting.UserSetting.unitsSetting.settingPOWER == "kW") { this.VisisbleIduCapacityW = Visibility.Visible; } else { this.VisisbleIduCapacityW = Visibility.Collapsed; } this._eventAggregator = eventAggregator; LeftSideBarItems = new ObservableCollection <LeftSideBarItem>(); _winService = winService; uc_CheckBox_RptSelectAllModuleCheckedCommandEvent(); uc_CheckBox_ActualCheckedCommandEvent(); Apply_Click = new DelegateCommand(this.OnApplyClicked); CancelClickCommand = new DelegateCommand(this.CancelClick); uc_CheckBox_RptSelectAllModuleCheckedCommand = new DelegateCommand(uc_CheckBox_RptSelectAllModuleCheckedCommandEvent); uc_CheckBox_RptSelectAllModuleUnCheckedCommand = new DelegateCommand(uc_CheckBox_RptSelectAllModuleUnCheckedCommandEvent); uc_CheckBox_RptRoomInfoCheckedCommand = new DelegateCommand(uc_CheckBox_RptRoomInfoCheckedCommandEvent); uc_CheckBox_RptRoomInfoUnCheckedCommand = new DelegateCommand(uc_CheckBox_RptRoomInfoUnCheckedCommandEvent); uc_CheckBox_RptOutdoorDetailCheckedCommand = new DelegateCommand(uc_CheckBox_RptOutdoorDetailCheckedCommandEvent); uc_CheckBox_RptWiringCheckedCommand = new DelegateCommand(uc_CheckBox_RptWiringCheckedCommandEvent); uc_CheckBox_RptOutdoorDetailUnCheckedCommand = new DelegateCommand(uc_CheckBox_RptOutdoorDetailUnCheckedCommandEvent); uc_CheckBox_RptWiringUnCheckedCommand = new DelegateCommand(uc_CheckBox_RptWiringUnCheckedCommandEvent); uc_CheckBox_RptIndoorDetailCheckedCommand = new DelegateCommand(uc_CheckBox_RptIndoorDetailCheckedCommandEvent); uc_CheckBox_RptIndoorDetailUnCheckedCommand = new DelegateCommand(uc_CheckBox_RptIndoorDetailUnCheckedCommandEvent); uc_CheckBox_RptPipingCheckedCommand = new DelegateCommand(uc_CheckBox_RptPipingCheckedCommandEvent); uc_CheckBox_RptPipingUnCheckedCommand = new DelegateCommand(uc_uc_CheckBox_RptPipingUnCheckedCommandEvent); uc_CheckBox_RptControllerCheckedCommand = new DelegateCommand(uc_CheckBox_RptControllerCheckedCommandEvent); uc_CheckBox_RptControllerUnCheckedCommand = new DelegateCommand(uc_CheckBox_RptControllerUnCheckedCommandEvent); uc_CheckBox_RptExchangerCheckedCommand = new DelegateCommand(uc_CheckBox_RptExchangerCheckedCommandEvent); uc_CheckBox_RptExchangerUnCheckedCommand = new DelegateCommand(uc_CheckBox_RptExchangerUnCheckedCommandEvent); uc_CheckBox_ActualCheckedCommand = new DelegateCommand(uc_CheckBox_ActualCheckedCommandEvent); uc_CheckBox_ActualUnCheckedCommand = new DelegateCommand(uc_CheckBox_ActualUnCheckedCommandEvent); uc_CheckBox_NominalCheckedCommand = new DelegateCommand(uc_CheckBox_NominalCheckedCommandEvent); uc_CheckBox_IduCapacityWCheckedCommand = new DelegateCommand(uc_CheckBox_IduCapacityCheckedCommandEvent); uc_CheckBox_IduCapacityWUnCheckedCommand = new DelegateCommand(uc_CheckBox_IduCapacityUnCheckedCommandEvent); uc_CheckBox_NominalUnCheckedCommand = new DelegateCommand(uc_CheckBox_NominalUnCheckedCommandEvent); var proj = JCHVRF.Model.Project.GetProjectInstance; if (proj.IsIduCapacityW != null) { IsIduCapacityW = proj.IsIduCapacityW; } // _eventAggregator.GetEvent<SystemCreated>().Subscribe(NewSystemCreated); // _eventAggregator.GetEvent<SystemSelectedTabSubscriber>().Subscribe(OnSelectedSystemTab); }
public Dashboard(IRegionManager regionManager, IEventAggregator eventAggregator, IGlobalProperties globalProperties, IModalWindowService winService, IEventDAL eventDAL) { InitializeComponent(); _eventAggregator = eventAggregator; _regionManager = regionManager; _globalProperties = globalProperties; _eventDAL = eventDAL; _winService = winService; CachTableBLL CommonBll = new CachTableBLL(); CommonBll.CreateCachTable(); ProjectTemplateViewModel vm = new ProjectTemplateViewModel(_regionManager, _globalProperties); vm.LoadProjects("All"); GridAllProject.DataContext = vm; _eventAggregator.GetEvent <RefreshDashboard>().Subscribe(RefreshDashboard); }
public BulkFloorPopupViewModel(IEventAggregator eventAggregator, IModalWindowService winService) { try { _eventAggregator = eventAggregator; _winService = winService; PlushClickCommand = new DelegateCommand(PlushClick); MinusClickCommand = new DelegateCommand(MinusClick); CancelBulkPopupClickedCommand = new DelegateCommand(OnCancelBulkPopupClickedCommand); AddBulkPopupClickedCommand = new DelegateCommand(OnAddBulkPopupClickedCommand); BulkTextChangedCommand = new DelegateCommand <TextCompositionEventArgs>(OnBulkTextChangedCommand); } catch (Exception ex) { Logger.LogProjectError(null, ex); } }
public VRFSystemDetailsViewModel(IEventAggregator _eventAggregator, IModalWindowService winService) { try { eventAggregator = _eventAggregator; _winService = winService; EditSystemDetailsCommand = new DelegateCommand(OnEditSystemDetailsCommandClick); VRFSystemDetails_Load = new DelegateCommand(VRFSystemDetails_Loaded); VRFSystemDetails_UnLoad = new DelegateCommand(VRFSystemDetails_UnLoaded); //if (WorkFlowContext.CurrentSystem != null) //{ // if (WorkFlowContext.CurrentSystem is JCHVRF.Model.NextGen.SystemVRF) // reloadsystemDetails((WorkFlowContext.CurrentSystem) as JCHVRF.Model.NextGen.SystemVRF); //} } catch (Exception ex) { int?id = Project.GetProjectInstance?.projectID; Logger.LogProjectError(id, ex); } }
public TotalHeatExUnitInfoViewModel(IEventAggregator EventAggregator, IModalWindowService winService, JCHVRF_New.Model.LightProject thisProj) { try { NumericOutdoorCDBCommand = new DelegateCommand(NumericOutdoorCDB_LostFocus); NumericOutdoorCWBCommand = new DelegateCommand(NumericOutdoorCWBCommand_LostFocus); NumericOutdoorHDBCommand = new DelegateCommand(NumericOutdoorHDBCommand_LostFocus); NumericRHommand = new DelegateCommand(NumericRHommand_LostFocus); //CreateClickCommand = new DelegateCommand(CreateHENextClick); ChangeTempCommand = new DelegateCommand(btnChangeTempUClicked); AddFloorCommand = new DelegateCommand(OnAddFloorClicked); AddEditRoomCommand = new DelegateCommand(OnAddEditRoomClicked); ValidateUnitNameCommand = new DelegateCommand(ValidateUnitNameOnLostFocus); _eventAggregator = EventAggregator; _winService = winService; _eventAggregator.GetEvent <RoomListSaveSubscriber>().Subscribe(GetRoomList); _eventAggregator.GetEvent <FloorListSaveSubscriber>().Subscribe(OpenGetFloorList); GetRoomList(); BindFloor(); //BindDefaultFanSpeed(); _eventAggregator.GetEvent <TheuInfoVisibility>().Subscribe(OnTypeSelected); _eventAggregator.GetEvent <BeforeCreate>().Subscribe(OnBeforeCreate); _eventAggregator.GetEvent <Cleanup>().Subscribe(OnCleanup); _indoorBll = new JCHVRF.BLL.IndoorBLL(JCHVRF.Model.Project.CurrentProject.SubRegionCode, JCHVRF.Model.Project.CurrentProject.BrandCode); WorkFlowContext.FloorNames = null; bll = new JCHVRF.BLL.OutdoorBLL(JCHVRF.Model.Project.CurrentProject.SubRegionCode, JCHVRF.Model.Project.CurrentProject.BrandCode); if (JCHVRF.Model.Project.GetProjectInstance.DesignCondition != null) { BindInternalDesignConditions(); } WorkFlowContext.FloorNames = new List <string>(); } catch (Exception ex) { int?id = Project.GetProjectInstance?.projectID; Logger.LogProjectError(id, ex); } }
public AddEventViewModel(IEventAggregator eventAggregator, IModalWindowService winService, IGlobalProperties globalProperties, IEventDAL eventDAL) { IsSaveEnable = "Visible"; IsUpdateEnable = false; _eventAggregator = eventAggregator; _winService = winService; _globalProperties = globalProperties; _eventDAL = eventDAL; AddEventCommand = new DelegateCommand(AddEventCommandClick); UpdateEventCommand = new DelegateCommand(UpdateEventCommandClick); AddEventCancelCommand = new DelegateCommand(AddEventCancelCommandClick); //_eventAggregator.GetEvent<EditEventEventId>().Subscribe(EditLoadEvents); if (_winService.GetParameters(ViewKeys.AddEvent)["EventId"] != null) { int EventID = Convert.ToInt16(_winService.GetParameters(ViewKeys.AddEvent)["EventId"]); EditLoadEvents(EventID); } if (_winService.GetParameters(ViewKeys.AddEvent)["clickedDate"] != null) { SelectedEvent.StartDate = Convert.ToDateTime(_winService.GetParameters(ViewKeys.AddEvent)["clickedDate"]); SelectedEvent.EndDate = Convert.ToDateTime(_winService.GetParameters(ViewKeys.AddEvent)["clickedDate"]); } }
public NewCreatorInformationViewModel(IEventAggregator eventAggregator, IModalWindowService winService) { try { _eventAggregator = eventAggregator; _winService = winService; AddNewCreatorClickedCommand = new DelegateCommand(OnNewCreatorClickedCommand); CancelNewCreatorClickedCommand = new DelegateCommand(OnCancelClickedCommand); if (Application.Current.Properties["Value"] != null) { if (Application.Current.Properties["SelectedCreator"] != null) { creatorVal = Convert.ToInt32(Application.Current.Properties["SelectedCreator"]); GetCreatorDetails(creatorVal); } } } catch (Exception ex) { Logger.LogProjectError(null, ex); } }
public AddEditRoomViewModel(IEventAggregator eventAggregator, IModalWindowService modalWindowService) { try { CurrentProject = JCHVRF.Model.Project.GetProjectInstance; _eventAggregator = eventAggregator; _modalWindowService = modalWindowService; TemperatureUnit = SystemSetting.UserSetting.unitsSetting.settingTEMPERATURE; AreaUnit = SystemSetting.UserSetting.unitsSetting.settingAREA; PowerUnit = SystemSetting.UserSetting.unitsSetting.settingPOWER; AirFlowRateUnit = SystemSetting.UserSetting.unitsSetting.settingAIRFLOW; PressureUnit = SystemSetting.UserSetting.unitsSetting.settingESP; SaveClickCommand = new DelegateCommand(AddEditRoomClick); AddRoomCommand = new DelegateCommand(AddRoomIconClick); RemoveRoomCommand = new DelegateCommand(RemoveRoomIconClick); BulkRemoveRoomCommand = new DelegateCommand(BulkRemoveRoom); chkSelectAll_UnCheckedCommand = new DelegateCommand(chkSelectAll_UnChecked); chkSelectAll_CheckedCommand = new DelegateCommand(chkSelectAll_Checked); BulkAddCommand = new DelegateCommand(BulkAddClick); _eventAggregator.GetEvent <PubSubEvent <int> >().Subscribe(OnMultiRoomValueBulkUpload); AddRoomDefoult(); RoomCheckChangedCommand = new DelegateCommand(() => { RaisePropertyChanged(nameof(AreAllRoomChecked)); }); GridTextchanged = new DelegateCommand(RoomListchanged_event); if (_modalWindowService.GetParameters(ViewKeys.AddEditRoom) != null) { AreSaveCancelVisible = (bool)_modalWindowService.GetParameters(ViewKeys.AddEditRoom)["ShowSaveCancel"]; } } catch (Exception ex) { int?id = Project.GetProjectInstance?.projectID; Logger.LogProjectError(id, ex); } }
public ProjectInfoViewModel(IProjectInfoBAL projctInfoBll, IEventAggregator eventAggregator, IModalWindowService winService) { Initialization(); _eventAggregator = eventAggregator; _winService = winService; CoolingCheckedCommand = new DelegateCommand(CoolingCheckedEvent); CoolingUnCheckedCommand = new DelegateCommand(CoolingUncheckedEvent); HeatingCheckedCommand = new DelegateCommand(HeatingCheckedEvent); HeatingUnCheckedCommand = new DelegateCommand(HeatingUncheckedEvent); BothCheckedCommand = new DelegateCommand(BothCheckedEvent); BothUnCheckedCommand = new DelegateCommand(BothUncheckedEvent); HitachiCheckedCommand = new DelegateCommand(HitachiCheckedEvent); HitachiUnCheckedCommand = new DelegateCommand(HitachiUncheckedEvent); YorkCheckedCommand = new DelegateCommand(YorkCheckedEvent); YorkUnCheckedCommand = new DelegateCommand(YorkUncheckedEvent); SelectedDateChanged = new DelegateCommand(DeliveryDateChangedEvent); ProjectInitialisation(); _projectInfoBll = projctInfoBll; LookupProjectName = GetDefaultProjectName(); this.PropertyChanged += ProjectInfoViewModel_PropertyChanged; NewClientClickedCommand = new DelegateCommand(OnNewClientClicked); NewCreatorClickedCommand = new DelegateCommand(OnNewCreatorClicked); ShowTextVisibility(); ClientNameDBCommand = new DelegateCommand(OnClientNameKeyUpCommand); GetClientList(); GetCreatorList(); _eventAggregator.GetEvent <ProjectTypeInfoTabNext>().Subscribe(ProjectTypeNextClick); _eventAggregator.GetEvent <AddCreatorPayLoad>().Subscribe(RebindCreatorList); ProjectInfoWindowLoaded = new DelegateCommand(() => { _isOpenedFromProjectSettings = true; IsCheckSettingsVal = true; IsBrandSelectionEnabled = false; Application.Current.Properties["Value"] = IsCheckSettingsVal; checkDesignConditionVal = "true"; var proj = JCHVRF.Model.Project.GetProjectInstance; LookupProjectName = proj.Name; IsCoolingChecked = proj.IsCoolingModeEffective; IsHeatingChecked = proj.IsHeatingModeEffective; IsBothChecked = proj.IsBothMode; Notes = proj.Remarks; this.TxtClientName = proj.clientName; this.TxtCreatorName = proj.CreatorName; this.DeliveryDate = proj.DeliveryRequiredDate; IsHitachiRdbVisible = proj.BrandCode; TxtVisibility = Visibility.Collapsed; if (proj.BrandCode == "H") { IsHitachi = true; } else { IsYork = true; } } ); _eventAggregator.GetEvent <ProjectSettingsSave>().Subscribe(SetProjectMode); }