public HydroMonitorWordVm() { this.OpenDirCmd = new DelegateCommand(OpenDir); this.WordMakeCmd = new DelegateCommand(WordMake); this.ChangeCmd = new DelegateCommand(Change); this.MakingTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 8, 0, 0); config = new ProductPathConfig(); this.DirList = new ObservableCollection <ProductPath>(config.ListProductPath); PreAndSignConfig cf = new PreAndSignConfig(); this.MakingPerson = cf.Pas.PreName; this.templateName = Path.Combine(Directory.GetCurrentDirectory(), dir, templateFileName); FileInfo fileInfo = new FileInfo(this.templateName); if (!fileInfo.Exists) { this.templateName = null; } if (!File.Exists(this.templateName)) { this.templateName = null; } worker.DoWork += worker_DoWork; worker.RunWorkerCompleted += worker_RunWorkerCompleted; }
public WaterloggingWordVm() { this.OpenPicCmd = new DelegateCommand(OpenPic); this.OpenOutPathCmd = new DelegateCommand(OpenOutPath); this.WordMakeCmd = new DelegateCommand(WordMake); this.ChangeCmd = new DelegateCommand <object>(Change); config = new ProductPathConfig(); this.DirList = new ObservableCollection <ProductPath>(config.ListProductPath); this.templateName = Path.Combine(Directory.GetCurrentDirectory(), dir, templateFileName); FileInfo fileInfo = new FileInfo(this.templateName); if (!fileInfo.Exists) { this.templateName = null; } if (!File.Exists(this.templateName)) { this.templateName = null; } PreAndSignConfig cf = new PreAndSignConfig(); this.PrePeople = cf.Pas.PreName; this.SignPeople = cf.Pas.SignName; this.Section = new ProductVolumeConfig().productVolume.WaterloggingVolume.ToString(); }
public ProductPathConfigVm() { this.AddCmd = new DelegateCommand(Add); this.ModifyCmd = new DelegateCommand(Modify); this.DeleteCmd = new DelegateCommand(Delete); this.OpenCmd = new DelegateCommand(Open); this.ChangeCmd = new DelegateCommand <object>(Change); config = new ProductPathConfig(); this.DirList = new ObservableCollection <ProductPath>(config.ListProductPath); }
public void InitDirs() { ProductPathConfig config = new ProductPathConfig(); this.DirList = new ObservableCollection <ProductPath>(); foreach (var item in config.ListProductPath) { this.DirList.Add(item); } }