示例#1
0
 public bool Execute()
 {
     _listBox.BeginUpdate();
     _listBox.Columns.Clear();
     foreach (var item in _lstColumns.Items)
     {
         var c = ((ColumnItem)item).DataContext;
         c.IsVisible = item.CheckedState == CheckedState.Checked;
         _listBox.Columns.Add(c);
     }
     _listBox.NotifyColumnLayoutChanged();
     _listBox.EndUpdate();
     return(true);
 }
示例#2
0
        public override void RefreshContent()
        {
            base.RefreshContent();

            if (ServiceContext != null && _buildType != null)
            {
                _lstBuilds.BeginUpdate();
                _lstBuilds.Items.Clear();
                _buildType.Builds.Refresh();
                lock (_buildType.Builds.SyncRoot)
                {
                    foreach (var build in _buildType.Builds)
                    {
                        _lstBuilds.Items.Add(new BuildListItem(build));
                    }
                }
                _lstBuilds.EndUpdate();
            }
            else
            {
                _lstBuilds.Items.Clear();
            }
        }