Exemplo n.º 1
0
 public void RestoreAfterUpdate()
 {
     _listView.ListViewItemSorter = this;
     _listView.Sort();
     ListViewSaver.loadItem(_listView, _selItem);
     _listView.EndUpdate();
     _listView.Focus();
 }
Exemplo n.º 2
0
 public void PrepareForUpdate()
 {
     //MainForm.StillWorking();
     _selItem = ListViewSaver.saveItem(_listView);
     _listView.ListViewItemSorter = null;
     _listView.Items.Clear();
     _listView.BeginUpdate();
 }
Exemplo n.º 3
0
 private void OnColumnWidthChanged(object sender, ColumnWidthChangedEventArgs e)
 {
     if (!_listView.Focused)
     {
         return;
     }
     ListViewSaver.save(option, _listView);
 }
Exemplo n.º 4
0
 public ListViewColumnSorter(ListView lv, int[] intsorts, Options.OPT_ID op)
 {
     sortColumn = 0;
     //OrderOfSort = SortOrder.None;
     ObjectCompare         = new CaseInsensitiveComparer();
     _intSorts             = intsorts;
     _listView             = lv;
     lv.ListViewItemSorter = this;
     option = op;
     for (int i = 0; i < lv.Columns.Count; i++)
     {
         lv.Columns[i].AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
     }
     lv.ColumnClick        += new ColumnClickEventHandler(this.OnColumnClick);
     lv.ColumnWidthChanged += new ColumnWidthChangedEventHandler(this.OnColumnWidthChanged);
     lv.DrawColumnHeader   += new DrawListViewColumnHeaderEventHandler(this.OnDrawHeader);
     lv.DrawItem           += new DrawListViewItemEventHandler(this.OnDrawItem);
     lv.DrawSubItem        += new DrawListViewSubItemEventHandler(this.OnDrawSubItem);
     ListViewSaver.load(op, lv);
 }
Exemplo n.º 5
0
 private void OnColumnClick(object sender, ColumnClickEventArgs e)
 {
     if (e.Column == SortColumn)
     {
         if (this.sortOrder == SortOrder.Ascending)
         {
             this.sortOrder = SortOrder.Descending;
         }
         else
         {
             this.sortOrder = SortOrder.Ascending;
         }
     }
     else
     {
         SortColumn     = e.Column;
         this.sortOrder = SortOrder.Ascending;
     }
     ListViewSaver.save(option, _listView);
     (sender as ListView).Sort();
     _listView.Refresh();
 }