コード例 #1
0
ファイル: DataListView.cs プロジェクト: crcruicai/Library
 public DataListView()
 {
     this.View          = System.Windows.Forms.View.Details;
     this.FullRowSelect = true;
     this.MultiSelect   = false;
     this.mColumns      = new DataColumnHeaderCollection();
     //this.mColumns.Invalidate += new nsListViewEx.DataColumnHeaderCollection.InvalidateEventHandler(mColumns_Invalidate);
     SetStyle(ControlStyles.ResizeRedraw, true);
     this.BackColorChanged += new EventHandler(DataListView_BackColorChanged);
     this.ForeColorChanged += new EventHandler(DataListView_ForeColorChanged);
 }
コード例 #2
0
ファイル: DataListView.cs プロジェクト: crcruicai/Library
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         bDisposing = true;
         if (this.mSbBackColor != null)
         {
             this.mSbBackColor.Dispose();
         }
         if (this.mSbForeColor != null)
         {
             this.mSbForeColor.Dispose();
         }
         if (base.Columns.Count >= 1)
         {
             base.Columns.Clear();
         }
         if (this.Items.Count >= 1)
         {
             this.Items.Clear();
         }
         if (this.mBindingList != null)
         {
             this.mBindingList.ListChanged -= new ListChangedEventHandler(mBindingList_ListChanged);
             this.mBindingList              = null;
         }
         if (this.mColumns != null)
         {
             //this.mColumns.Invalidate -= new nsListViewEx.DataColumnHeaderCollection.InvalidateEventHandler(mColumns_Invalidate);
             this.mColumns.Clear();
             this.mColumns = null;
         }
         if (this.mDataSource != null)
         {
             this.mDataSource = null;
         }
         //this.Dispose();
     }
     base.Dispose(disposing);
 }