// // GET: /Matcher/ public ActionResult Index() { MatcherVM mvm = new MatcherVM(); mvm.Teams = _teamBLL.TeamMatcherList(); return(View()); }
public GeneralMatcherVM(Action <GeneralMatcherVM> removeFromUI, Action <GeneralMatcherVM> cleanupSetLevel) { AllMatcherTypes = Enum.GetValues(typeof(MatcherType)).Cast <MatcherType>(); SelectedMatcherType = MatcherType.Text; RemoveMatcher = new DelegateCommand(_ => { MatcherVM.remove(); removeFromUI(this); }); this.cleanupSetLevel = cleanupSetLevel; }
public void propagateToBackingMatchers(MatcherChain matcherChain) { if (matcherVMRemoved != null) { matcherVMRemoved.propagateToBackingMatchers(matcherChain.Matchers, this); matcherVMRemoved = null; } MatcherVM.propagateToBackingMatchers(matcherChain.Matchers, this); if (MatcherVM.hasBackingMatcher()) { MatcherVM.getBackingMatcher().Name = Name; } if (IsLevel && MatcherVM.hasBackingMatcher()) { matcherChain.LevelMatcherRef = MatcherVM.getBackingMatcher(); } }
private void OnSelectedMatcherChanged(MatcherType newValue) { if (MatcherVM != null) { MatcherVM.remove(); if (MatcherVM.hasBackingMatcher()) { matcherVMRemoved = MatcherVM; } } MatcherVM = getInstance(newValue); HasAffixes = MatcherVM.hasAffixes(); HasSeparator = MatcherVM.hasSeparator(); CanBeLevel = canBeLevel(newValue); if (!CanBeLevel) { IsLevel = false; } }