Exemplo n.º 1
0
 protected void OnTallyCountChanged(TallyCountChangedEventArgs ea)
 {
     if (TallyCountChanged != null)
     {
         TallyCountChanged(this, ea);
     }
 }
 public void HandleTreeCountChanged(TallyCountChangedEventArgs ea)
 {
     foreach (Control c in _tallyContainer_PNL.Controls)
     {
         var tallyButton = c as FixCNTTallyButton;
         if (tallyButton != null)
         { tallyButton.HandleTreeCountChanged(ea); }
     }
 }
Exemplo n.º 3
0
        //public override Tree CreateNewTreeEntry(SampleGroup sg, TreeDefaultValueDO tdv, bool isMeasure)
        //{
        //    return base.CreateNewTreeEntry(sg, tdv, false);
        //}

        protected void NotifyTallyCountChanged(IFixCNTTallyBucket tallyBucket)
        {
            var args = new TallyCountChangedEventArgs()
            {
                CountProvider = this
                ,
                TallyBucket = tallyBucket
            };

            OnTallyCountChanged(args);
        }
        public void HandleTreeCountChanged(TallyCountChangedEventArgs ea)
        {
            if (ea.TallyBucket != null
                && object.ReferenceEquals(ea.TallyBucket, this))
            { return; }

            var tallyCountProvider = ea.CountProvider;
            if (tallyCountProvider != null)
            {
                var tallyCount = tallyCountProvider.GetTallyCount(this.Bucket);
                _tallyCount_LBL.Text = tallyCount.ToString();
            }
            else
            {
                _tallyCount_LBL.Text = "-";
            }
        }
        void WireTallyCountProvider()
        {
            var tallyCountProvider = TallyCountProvider;
            if (tallyCountProvider != null)
            {
                tallyCountProvider.TallyCountChanged += new EventHandler<TallyCountChangedEventArgs>(tallyCountProvider_TallyCountChanged);

                var updateEventArgs =
                    new TallyCountChangedEventArgs() { CountProvider = tallyCountProvider };

                UpdateTallyCount(updateEventArgs);
            }
        }
        void UpdateTallyCount(TallyCountChangedEventArgs e)
        {
            if (e == null) { throw new ArgumentNullException("e"); }

            foreach (var c in Controls)
            {
                var tallyRow = c as FixCntTallyRow;
                if (tallyRow != null)
                { tallyRow.HandleTreeCountChanged(e); }
            }
        }
 void tallyCountProvider_TallyCountChanged(object sender, TallyCountChangedEventArgs e)
 {
     UpdateTallyCount(e);
 }
Exemplo n.º 8
0
 protected void OnTallyCountChanged(TallyCountChangedEventArgs ea)
 {
     if (TallyCountChanged != null)
     {
         TallyCountChanged(this, ea);
     }
 }
Exemplo n.º 9
0
 protected void NotifyTallyCountChanged(IFixCNTTallyBucket tallyBucket)
 {
     var args = new TallyCountChangedEventArgs()
     {
         CountProvider = this
         ,
         TallyBucket = tallyBucket
     };
     OnTallyCountChanged(args);
 }