public bool CanHandle(ScreenActivationContext sac) { var attribute = this.GetType().GetAttributes <TitleAttribute>(false).First(); var result = sac.Jq.IsTitle(attribute.Name); return(result || DoCanHandle(sac)); }
public override void UpdateUi(ScreenActivationContext sac) { var jq = sac.Jq; jq.IsTitle("cheki", Print); jq.IsTitle("gakidva", UpdateSaleViewModel); jq.IsTitle("gadakhdisForma", ShowPaymentForm); }
public override void UpdateUi(ScreenActivationContext sac) { Items.Clear(); Items.AddRange(sac.Jq.All("suggestions", cqq => new SuggestionViewModel() { Name = cqq.GetText("suggest"), Link = cqq.GetLink("suggest") })); }
public void Show(ScreenActivationContext sac) { //var screenType = sac.GetScreenType(); if (ActiveItem != null && this.ActiveItem is IUpdatableScreen && ((IUpdatableScreen)this.ActiveItem).CanHandle(sac)) { ((IUpdatableScreen)ActiveItem).UpdateUi(sac); } else { this.ActivateItem(sac.GetScreen()); } }
public override void UpdateUi(ScreenActivationContext sac) { Search = sac.Jq.GetForm("dzebna"); Items.Clear(); Items.AddRange(sac.Jq.All("produktebi", cqq => new ProductItemViewModel() { Name = cqq.GetText("dasakheleba"), Eans = cqq.GetText("eans"), Photo = cqq.GetText("img"), Open = cqq.GetLink("self") })); }
public override void UpdateUi(ScreenActivationContext sac) { var cqq = sac.Jq; Id = cqq.GetText("ref"); Barcode = cqq.GetText("ref"); Name = cqq.GetText("dasakheleba"); ExcelFileName = ""; Price = cqq.GetForm("fasisShecvla"); Eans = ""; Photos.Clear(); Photos.Add(cqq.GetText("img")); NotifyOfPropertyChange(() => ActivePhoto); References.Clear(); References.AddRange(cqq.All("eans", cqq1 => cqq1.All("refs", q => new ReferenceViewModel() { Barcode = q.GetText("ref"), Open = q.GetLink("self"), })).SelectMany(x => x)); }
public virtual void UpdateUi(ScreenActivationContext sac) { }
protected virtual bool DoCanHandle(ScreenActivationContext sac) { return(false); }
protected override bool DoCanHandle(ScreenActivationContext sac) { return(sac.Jq.IsTitle("gadakhdisForma") || sac.Jq.IsTitle("cheki")); }