Ejemplo n.º 1
0
 private async Task ThisSet_SetClickedAsync(RummyHandObservable <S, C, R> thisSet)
 {
     if (SetClickedAsync == null)
     {
         return;
     }
     if (thisSet.DidClickObject == true)
     {
         thisSet.DidClickObject = false;
         return;
     }
     await SetClickedAsync.Invoke(SetList.IndexOf(thisSet) + 1); //wanted to make it one based.
 }
Ejemplo n.º 2
0
        public void Init(IEnableAlways enables)
        {
            if (SetList.Count > 0)
            {
                return; //try this way.
            }
            _thisE = _resolver.Resolve <EventAggregator>();
            int x;
            var loopTo = HowManySets;
            RummyHandObservable <S, C, R> thisSet;

            for (x = 1; x <= loopTo; x++)
            {
                thisSet            = new RummyHandObservable <S, C, R>(_command, _resolver);
                thisSet.AutoSelect = HandObservable <R> .EnumAutoType.None; // somehow doing selectasmany is not working.  this means if its select all, then will be done on the event.
                //thisSet.Visible = true;
                thisSet.SendAlwaysEnable(enables);                          //i think.
                thisSet.Text             = "Set";                           // will always be set on this one.
                thisSet.SetClickedAsync += ThisSet_SetClickedAsync;
                SetList.Add(thisSet);
            }
        }