Beispiel #1
0
 private void HandleSourceEvents(object old, object source)
 {
     if (!ReferenceEquals(old, source))
     {
         DetachSource(old);
         AttachSource(source);
         BusinessBase bb = Source as BusinessBase;
         if (bb != null)
         {
             IsBusy = bb.IsPropertyBusy(Property);
         }
     }
 }
        private void SetSource(object oldSource, object newSource)
        {
            DetachSource(oldSource);
            AttachSource(newSource);

            BusinessBase bb = newSource as BusinessBase;

            if (bb != null && !string.IsNullOrEmpty(Property))
            {
                IsBusy = bb.IsPropertyBusy(Property);
            }

            UpdateState();
        }
Beispiel #3
0
        void source_BusyChanged(object sender, BusyChangedEventArgs e)
        {
            if (e.PropertyName == PropertyName || string.IsNullOrEmpty(e.PropertyName))
            {
                bool         busy = e.Busy;
                BusinessBase bb   = Source as BusinessBase;
                if (bb != null)
                {
                    busy = bb.IsPropertyBusy(PropertyName);
                }

                if (busy != IsBusy)
                {
                    IsBusy = busy;
                    UpdateState();
                }
            }
        }