public EditPipeForCutCommand(SpoolViewModel viewModel, ISpoolRepositories repos, IUserNotify notify, ISecurityContext ctx) { this.viewModel = viewModel; this.repos = repos; this.notify = notify; this.ctx = ctx; }
public SpoolDeactivationCommand(ISpoolRepositories repo, SpoolViewModel viewModel, IUserNotify notify, ISecurityContext ctx) { this.repo = repo; this.viewModel = viewModel; this.notify = notify; this.ctx = ctx; }
public SpoolViewModel(ISpoolRepositories repos, Guid id, IUserNotify notify, ISecurityContext ctx) { this.repos = repos; this.ctx = ctx; this.notify = notify; this.Inspectors = repos.RepoInspector.GetAll(); if (this.Inspectors == null || this.Inspectors.Count <= 0) { log.Warn(string.Format("Spool (id:{0}) creation: List of Inspectors is NULL or empty", id)); } searchCommand = ViewModelSource.Create <EditPipeForCutCommand>( () => new EditPipeForCutCommand(this, repos, notify, ctx)); saveCommand = ViewModelSource.Create <SaveSpoolCommand>( () => new SaveSpoolCommand(this, repos, notify, ctx)); deactivateCommand = ViewModelSource.Create <SpoolDeactivationCommand>( () => new SpoolDeactivationCommand(repos, this, notify, ctx)); allPipes = new BindingList <Pipe>(); foreach (Pipe p in repos.PipeRepo.GetAvailableForCutPipes()) { allPipes.Add(p); } if (id == Guid.Empty) { NewSpool(); } else { Spool = repos.SpoolRepo.Get(id); Pipe = Spool.Pipe; InitPipeLenght = Spool.Length + Pipe.Length; } }
public SpoolViewModel(ISpoolRepositories repos, Guid id, IUserNotify notify, ISecurityContext ctx) { this.repos = repos; this.ctx = ctx; this.notify = notify; this.Inspectors = repos.RepoInspector.GetAll(); if(this.Inspectors == null || this.Inspectors.Count <= 0) log.Warn(string.Format("Spool (id:{0}) creation: List of Inspectors is NULL or empty", id)); searchCommand = ViewModelSource.Create<EditPipeForCutCommand>( () => new EditPipeForCutCommand(this, repos, notify, ctx)); saveCommand = ViewModelSource.Create<SaveSpoolCommand>( () => new SaveSpoolCommand(this, repos, notify, ctx)); deactivateCommand = ViewModelSource.Create<SpoolDeactivationCommand>( () => new SpoolDeactivationCommand(repos, this, notify, ctx)); allPipes = new BindingList<Pipe>(); foreach(Pipe p in repos.PipeRepo.GetAvailableForCutPipes()) { allPipes.Add(p); } if(id == Guid.Empty) { NewSpool(); } else { Spool = repos.SpoolRepo.Get(id); Pipe = Spool.Pipe; InitPipeLenght = Spool.Length + Pipe.Length; } }
public EditPipeForCutCommand(SpoolViewModel viewModel, ISpoolRepositories repos, IUserNotify notify) { this.viewModel = viewModel; this.repos = repos; this.notify = notify; }