public frmToolSchedule_new(UserInformation userInformation, WPF.MDI.MdiChild mdiChild, string partNo) { try { Progress.ProcessingText = PDMsg.Load; Progress.Start(); CultureInfo ci = CultureInfo.CreateSpecificCulture(CultureInfo.CurrentCulture.Name); ci.DateTimeFormat.ShortDatePattern = "dd/MM/yyyy"; ci.DateTimeFormat.DateSeparator = "/"; Thread.CurrentThread.CurrentCulture = ci; InitializeComponent(); tsmvm = new ViewModel.ToolScheduleViewModel(userInformation, mdiChild); this.DataContext = tsmvm; this.me = mdiChild; this.me.Closing += tsmvm.CloseMethod; tsmvm.CmbSubHeadingCombo = cmbSeqHeading; tsmvm.DgvToolSchedule = dgvToolSchedule; tsmvm.DgvAuxTools = dgvAuxTools; tsmvm.DgvToolsScheduleRev = dgvToolsScheduleRev; Progress.End(); if (tsmvm.CloseAction == null) { tsmvm.CloseAction = new Action(() => mdiChild.Close()); } } catch (Exception ex) { throw ex.LogException(); } }
public frmPartNumberConfig(UserInformation userInformation, WPF.MDI.MdiChild mdiChild) { try { InitializeComponent(); CustPartNoDescription.Focus(); PartNumberCode = 0; PartNumberConfigViewModel vm = new PartNumberConfigViewModel(userInformation, PartNumberCode, OperationMode.AddNew); this.DataContext = vm; mdiChild.Closing += vm.CloseMethod; if (vm.CloseAction == null) { vm.CloseAction = new Action(() => mdiChild.Close()); } bll = new PartNumberConfiguration(userInformation); List <ProcessDesigner.Model.V_TABLE_DESCRIPTION> lstTableDescription = bll.GetTableColumnsSize("PartNumberConfig"); this.SetColumnLength <TextBox>(lstTableDescription); } catch (Exception ex) { throw ex.LogException(); } }
public FlxReportsViewModel(UserInformation userInformation, WPF.MDI.MdiChild mdiChild, Nullable <DateTime> startdate, Nullable <DateTime> enddate) { try { _userInformation = userInformation; _mdiChild = mdiChild; _flxReportsBll = new FlxReportsBll(_userInformation); LoadUserGrid(); LoadOptionCombo(); ReportCode = "PPAP"; this.refreshDataCommand = new DelegateCommand(this.RefreshData); this.exportToExcelCommand = new DelegateCommand(this.ExportToExcel); if (UserList.Count > 0) { SelectedUser = UserList[0]; NotifyPropertyChanged("SelectedUser"); StartDate = startdate; EndDate = enddate; RefreshData(); //HeaderDetails = message + cnt.ToString() + (cnt > 0 ? " Entries" : " Entry") + " found "; } } catch (Exception ex) { throw ex.LogException(); } }
public MOPGraphViewModel(UserInformation userInformation, WPF.MDI.MdiChild mdiChild) { try { _userInformation = userInformation; _mdiChild = mdiChild; _mopGraphBll = new MOPGraphBll(_userInformation); this.refreshGraphCommand = new DelegateCommand(this.RefreshGraph); LoadCombo(); EndDate = DateTime.Now; if (DateTime.Now.Month < 4) { StartDate = Convert.ToDateTime("01/04/" + (DateTime.Now.Year - 1)); } else { StartDate = Convert.ToDateTime("01/04/" + (DateTime.Now.Year)); } GraphType = "FRC"; RefreshGraph(); } catch (Exception ex) { throw ex.LogException(); } }
public frmRptCustpartNo(UserInformation userInformation, WPF.MDI.MdiChild mdiChild, PRD_MAST productMaster = null, DDCI_INFO customerInfo = null, DDCUST_MAST customerMaster = null, bool refreshOnLoad = false, string title = "Customer Partno Wise Report") { InitializeComponent(); this.mdiChild = mdiChild; vm = new ReportMISCustomerPartNoWiseViewModel(userInformation, mdiChild, productMaster, customerInfo, customerMaster, refreshOnLoad, title); this.DataContext = vm; //if (vm.CloseAction == null && mdiChild.IsNotNullOrEmpty()) // vm.CloseAction = new Action(() => mdiChild.Close()); }
public frmMfmDevelopment(WPF.MDI.MdiChild me, UserInformation userInfo) { InitializeComponent(); MFMDevelopmentViewModel vm = new MFMDevelopmentViewModel(userInfo); this.DataContext = vm; if (vm.CloseAction == null) { vm.CloseAction = new Action(() => me.Close()); } }
public frmLogView(UserInformation userInformation, WPF.MDI.MdiChild me) { InitializeComponent(); LogViewModel lvm = new LogViewModel(userInformation); this.DataContext = lvm; if (lvm.CloseAction == null) { lvm.CloseAction = new Action(() => me.Close()); } }
public frmOTPMCharts(UserInformation userInformation, WPF.MDI.MdiChild mdiChild, string chartType = null, int?workingYear = null, int?pgCatogory = null, bool refreshOnLoad = false, string title = "OTPM Charts - Development Lead Time") { InitializeComponent(); this.mdiChild = mdiChild; vm = new ReportOTPMChartsViewModel(userInformation, mdiChild, chartType, workingYear, pgCatogory, refreshOnLoad, title); this.DataContext = vm; mdiChild.Closing += vm.CloseMethod; //if (vm.CloseAction == null && mdiChild.IsNotNullOrEmpty()) // vm.CloseAction = new Action(() => mdiChild.Close()); }
public frmCategory(UserInformation userInfo, WPF.MDI.MdiChild me) { InitializeComponent(); CategoryViewModel cv = new CategoryViewModel(userInfo); this.DataContext = cv; me.Closing += cv.CloseMethod; if (cv.CloseAction == null) { cv.CloseAction = new Action(() => me.Close()); } }
public frmApplication(UserInformation userInfo, WPF.MDI.MdiChild me) { InitializeComponent(); ApplicationViewModel appView = new ApplicationViewModel(userInfo); this.DataContext = appView; me.Closing += appView.CloseMethod; if (appView.CloseAction == null) { appView.CloseAction = new Action(() => me.Close()); } }
public frmSapImport(UserInformation userInformation, WPF.MDI.MdiChild me) { InitializeComponent(); SapExportToPd fm = new SapExportToPd(userInformation); this.DataContext = fm; me.Closing += fm.CloseMethod; if (fm.CloseAction == null) { fm.CloseAction = new Action(() => me.Close()); } }
public frmTfcPCR(UserInformation userInfo, WPF.MDI.MdiChild me) { InitializeComponent(); TfcPCRViewModel pcr = new TfcPCRViewModel(userInfo); this.DataContext = pcr; me.Closing += pcr.CloseMethod; if (pcr.CloseAction == null) { pcr.CloseAction = new Action(() => me.Close()); } }
public override IScriptCommand Execute(FileExplorer.ParameterDic pm) { IWindowManager wm = pm.GetValue <IWindowManager>(WindowManagerKey) ?? new WindowManager(); WPF.MDI.MdiContainer container = pm.GetValue <WPF.MDI.MdiContainer>(MdiContainerKey); if (container == null) { return(ResultCommand.Error(new KeyNotFoundException("MdiContainerKey"))); } IExplorerViewModel explorer = pm.GetValue <IExplorerViewModel>(ExplorerKey); if (explorer == null) { return(ResultCommand.Error(new KeyNotFoundException("ExplorerKey"))); } var view = new ExplorerView(); Caliburn.Micro.Bind.SetModel(view, explorer); //Set the ViewModel using this command. var mdiChild = new WPF.MDI.MdiChild { DataContext = explorer, ShowIcon = true, Content = view }; mdiChild.SetBinding(WPF.MDI.MdiChild.TitleProperty, new Binding("DisplayName") { Mode = BindingMode.OneWay }); mdiChild.SetBinding(WPF.MDI.MdiChild.IconProperty, new Binding("CurrentDirectory.Icon") { Mode = BindingMode.OneWay }); mdiChild.SetBinding(WPF.MDI.MdiChild.WidthProperty, new Binding("Parameters.Width") { Mode = BindingMode.TwoWay }); mdiChild.SetBinding(WPF.MDI.MdiChild.HeightProperty, new Binding("Parameters.Height") { Mode = BindingMode.TwoWay }); mdiChild.SetBinding(WPF.MDI.MdiChild.PositionProperty, new Binding("Parameters.Position") { Mode = BindingMode.TwoWay }); container.Children.Add(mdiChild); return(NextCommand); }