Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 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);
 }