コード例 #1
0
 public void StateChanged(BaseLogic sender, StateChangedEventArgs args)
 {
     if (args.State == eState.RETRIEVED) {
     this._DataSourceList = sender.Containers;
     this.RebindData();
       }
 }
コード例 #2
0
        public void StateChanged(BaseLogic sender, StateChangedEventArgs args)
        {
            if (args.State == eState.DELETING) {
            this.JustDeleted = true;

              }

              if (args.State == eState.ADDED) {
            JustAdded = true;

              }

              if (args.State == eState.RETRIEVED) {
            int NextID = -1;
            if (this.SelectedItem != null)
              NextID = ((BaseContainer)this.SelectedItem).ID;
            if (this.JustDeleted)
              NextID = this.GetPreviousIndex(NextID);

            this.EnableSelectedIndexChanged = false;
            this._DataSourceList = sender.Containers;
            this.RebindData();
            this.EnableSelectedIndexChanged = true;

            if (this.JustAdded) {
              this.SelectedIndex = this.GetMaxIndex();
              this.JustAdded = false;
              return;
            }
            if (this.JustDeleted) {
              this.SelectedIndex = NextID;
              this.JustDeleted = false;
              return;
            }

            if (this.Items != null &&
              this.Items.Count > 0) {

              if (NextID < 0) {
            this.SelectedIndex = 0;
              }
              else {
            int index = this.GetIndex(NextID);
            if (index < 0)
              this.SelectedIndex = 0;
            else
              this.SelectedIndex = index;
              }
            }
              }
        }
コード例 #3
0
 public void StateChanged(BaseLogic sender, StateChangedEventArgs args)
 {
     if (args.State == eState.RETRIEVED) {
     this.DataSource = sender.Container;
       }
 }
コード例 #4
0
 public override void StateChanged(BaseLogic sender, StateChangedEventArgs args)
 {
 }