public SearchViewer() { InitializeComponent(); listViewSorter = new ListViewSorter(Hits); TemplateLabel.MouseDown += (sender, args) => Templates.SelectedIndex = 0; AuthorLabel.MouseDown += (sender, args) => Authors.SelectedIndex = 0; CategoryLabel.MouseDown += (sender, args) => Categories.SelectedIndex = 0; PathLabel.MouseDown += delegate { var item = pathsAllTreeViewItem; if (item != null) { item.IsSelected = true; } }; UpdatedLabel.MouseDown += delegate { var item = updatedAllTreeViewItem; if (item != null) { item.IsSelected = true; } }; Notifications.RegisterItemEvents(this, deleted: ItemDeleted, renamed: ItemRenamed); }
public FirmwaresConfig(bool retryLoadRom = false, string reloadRomPath = null) { InitializeComponent(); // prep imagelist for listview with 3 item states for {idUnsure, idMissing, idOk} imageList1.Images.AddRange(new[] { Properties.Resources.RetroQuestion, Properties.Resources.ExclamationRed, Properties.Resources.GreenCheck }); listviewSorter = new ListViewSorter(this, -1); if (retryLoadRom) { toolStripSeparator1.Visible = true; tbbCloseReload.Visible = true; tbbCloseReload.Enabled = true; if (string.IsNullOrWhiteSpace(reloadRomPath)) { tbbCloseReload.ToolTipText = "Close Firmware Manager and reload ROM"; } else { tbbCloseReload.ToolTipText = $"Close Firmware Manager and reload {reloadRomPath}"; } } }
public FirmwaresConfig(bool retryLoadRom = false, string reloadRomPath = null) { InitializeComponent(); //prep imagelist for listview with 3 item states for {idUnsure, idMissing, idOk} imageList1.Images.AddRange(new[] { Properties.Resources.RetroQuestion, Properties.Resources.ExclamationRed, Properties.Resources.GreenCheck }); listviewSorter = new ListViewSorter(this, -1); if (retryLoadRom) { toolStripSeparator1.Visible = true; tbbCloseReload.Visible = true; tbbCloseReload.Enabled = true; if (string.IsNullOrWhiteSpace(reloadRomPath)) { tbbCloseReload.ToolTipText = "Close Firmware Manager and reload ROM"; } else { tbbCloseReload.ToolTipText = "Close Firmware Manager and reload " + reloadRomPath; } } }
public ItemDependencyListView() { InitializeComponent(); _listViewSorter = new ListViewSorter(ListView); FilterText = string.Empty; }
private void ProfilerControl_Load(object sender, System.EventArgs e) { _lvsFunction = new ListViewSorter(); _lvsFunction.SetColumns(new ListViewCompareType[] { ListViewCompareType.Float, ListViewCompareType.String, ListViewCompareType.Float, ListViewCompareType.Float, ListViewCompareType.Float, ListViewCompareType.Float, ListViewCompareType.Float, }); _lvsFunction.SortColumn(_lvFunctionInfo, 1); _lvFunctionInfo.ListViewItemSorter = _lvsFunction; _lvFunctionInfo.ColumnClick += new ColumnClickEventHandler(_lvsFunction.OnListViewColumnClick); _lvsCalleeFunction = new ListViewSorter(); _lvsCalleeFunction.SetColumns(new ListViewCompareType[] { ListViewCompareType.Float, ListViewCompareType.String, ListViewCompareType.Float, ListViewCompareType.Float, ListViewCompareType.Float, }); _lvsCalleeFunction.SortColumn(_lvChildInfo, 1); _lvChildInfo.ListViewItemSorter = _lvsCalleeFunction; _lvChildInfo.ColumnClick += new ColumnClickEventHandler(_lvsCalleeFunction.OnListViewColumnClick); }
private void listView1_ColumnClick(object sender, ColumnClickEventArgs e) { ListViewSorter Sorter = new ListViewSorter(); listView1.ListViewItemSorter = Sorter; if (!(listView1.ListViewItemSorter is ListViewSorter)) { return; } Sorter = (ListViewSorter)listView1.ListViewItemSorter; if (Sorter.LastSort == e.Column) { if (listView1.Sorting == SortOrder.Ascending) { listView1.Sorting = SortOrder.Descending; } else { listView1.Sorting = SortOrder.Ascending; } } else { listView1.Sorting = SortOrder.Descending; } Sorter.ByColumn = e.Column; listView1.Sort(); }
private void DoColumnSort(int ColumnNo) { Sorting = true; ListViewSorter Sorter = new ListViewSorter(); Sorter.DateCols.Add(5); //ensure this column is treated as a date ListView.ListViewItemSorter = Sorter; if (!(ListView.ListViewItemSorter is ListViewSorter)) { return; } Sorter = (ListViewSorter)ListView.ListViewItemSorter; if (LastSort == ColumnNo) { if (ListView.Sorting == SortOrder.Ascending) { ListView.Sorting = SortOrder.Descending; } else { ListView.Sorting = SortOrder.Ascending; } } else { ListView.Sorting = SortOrder.Descending; } Sorter.ByColumn = ColumnNo; ListView.Sort(); LastSort = ColumnNo; Sorting = false; }
public CommitWindow() { InitializeComponent(); this.InitializeDialog(); listViewSorter = new ListViewSorter(ListView); }
public FirmwaresConfig(IMainFormForConfig mainForm, Config config, bool retryLoadRom = false, string reloadRomPath = null) { _mainForm = mainForm; _config = config; InitializeComponent(); tbbGroup.Image = tbbScan.Image = tbbOrganize.Image = tbbImport.Image = tbbClose.Image = tbbCloseReload.Image = tbbOpenFolder.Image = Resources.placeholder_bitmap; // prep ImageList for ListView with 3 item states for {idUnsure, idMissing, idOk} imageList1.Images.AddRange(new[] { Resources.RetroQuestion, Resources.ExclamationRed, Resources.GreenCheck }); _listViewSorter = new ListViewSorter(-1); if (retryLoadRom) { toolStripSeparator1.Visible = true; tbbCloseReload.Visible = true; tbbCloseReload.Enabled = true; tbbCloseReload.ToolTipText = string.IsNullOrWhiteSpace(reloadRomPath) ? "Close Firmware Manager and reload ROM" : $"Close Firmware Manager and reload {reloadRomPath}"; } }
public SiteViewer() { InitializeComponent(); listViewSorter = new ListViewSorter(SiteList); Loaded += ControlLoaded; }
private void driver_details_ColumnClick(object sender, ColumnClickEventArgs e) { if (driverSorter == null) { driverSorter = new ListViewSorter(driver_details); } driverSorter.Sort(e.Column); }
public JobViewer() { InitializeComponent(); _listViewSorter = new ListViewSorter(ListView); Notifications.Unloaded += ControlUnloaded; }
public TemplatePicker() { InitializeComponent(); listViewSorter = new ListViewSorter(TemplateListView); Loaded += ControlLoaded; }
public DirectoryDetailsControl() { InitializeComponent(); _filesByExtensionListViewSorter = new ListViewSorter(FilesByExtensionListView); _largeFilesListViewSorter = new ListViewSorter(LargeFilesListView); _binaryFilesByExtensionListViewSorter = new ListViewSorter(BinaryFilesByExtensionListView); _largeBinaryFilesListViewSorter = new ListViewSorter(LargeBinaryFilesListView); }
private void processes_details_ColumnClick(object sender, ColumnClickEventArgs e) { if (processesSorter == null) { processesSorter = new ListViewSorter(processes_details); } processesSorter.Sort(e.Column); }
private void logs_details_ColumnClick(object sender, ColumnClickEventArgs e) { if (logsSorter == null) { logsSorter = new ListViewSorter(logs_details); } logsSorter.Sort(e.Column); }
private void irqs_details_ColumnClick(object sender, ColumnClickEventArgs e) { if (irqsSorter == null) { irqsSorter = new ListViewSorter(irqs_details); } irqsSorter.Sort(e.Column); }
public RenderingPicker() { InitializeComponent(); _listViewSorter = new ListViewSorter(RenderingListView); Loaded += ControlLoaded; }
public FrmAccountingRules() { InitializeComponent(); _sorter = new ListViewSorter(); listViewContractsRules.ListViewItemSorter = _sorter; GetEventTypes(); Initialize(); }
public CommandViewer() { InitializeComponent(); _listViewSorter = new ListViewSorter(CommandsList); Loaded += ControlLoaded; }
public HistoryListView() { InitializeComponent(); _listViewSorter = new ListViewSorter(ListView); FilterText = string.Empty; Loaded += ControlLoaded; }
public StatisticsViewer() { InitializeComponent(); listViewSorter = new ListViewSorter(StatisticsList); FilterText = string.Empty; Loaded += ControlLoaded; }
public FirmwaresConfig() { InitializeComponent(); //prep imagelist for listview with 3 item states for {idUnsure, idMissing, idOk} imageList1.Images.AddRange(new[] { Properties.Resources.RetroQuestion, Properties.Resources.ExclamationRed, Properties.Resources.GreenCheck }); listviewSorter = new ListViewSorter(this, -1); }
public LanguageViewer() { InitializeComponent(); listViewSorter = new ListViewSorter(LanguageList); FilterText = string.Empty; Loaded += ControlLoaded; }
public CreateItemWindow() { InitializeComponent(); this.InitializeDialog(); listViewSorter = new ListViewSorter(ListView); Loaded += ControlLoaded; }
public FirmwaresConfig() { InitializeComponent(); //prep imagelist for listview with 3 item states for {idUnsure, idMissing, idOk} imageList1.Images.AddRange(new[] { Properties.Resources.RetroQuestion, Properties.Resources.ExclamationRed, Properties.Resources.GreenCheck }); listviewSorter = new ListViewSorter(this, -1); }
private void SortList() { ListViewSorter Sorter = new ListViewSorter(); listView1.ListViewItemSorter = Sorter; listView1.Sorting = SortOrder.Descending; listView1.Sort(); }
public CacheViewer() { InitializeComponent(); _listViewSorter = new ListViewSorter(CacheList); FilterText = string.Empty; Loaded += ControlLoaded; }
private void Initialization(Control pMDIForm) { InitializeComponent(); _mdiForm = pMDIForm; InitializeSearchParameters(); Sorter = new ListViewSorter(); listViewContracts.ListViewItemSorter = Sorter; }
public IndexViewer() { InitializeComponent(); _indexListSorter = new ListViewSorter(IndexList); FilterText = string.Empty; Loaded += ControlLoaded; }
public TypeNameSelector() { InitializeComponent(); listViewSorter = new ListViewSorter(Types); InitialTypeName = string.Empty; Loaded += ControlLoaded; }
private void AddSortBinding() { var gv = (GridView)listView1.View; for (int i = 1; i <= gv.Columns.Count; i++) { GridViewColumn col = gv.Columns[i - 1]; ListViewSorter.SetSortBindingMember(col, new Binding((string)col.Header)); } }
public AnalyzePackageDialog() { InitializeComponent(); this.InitializeDialog(); itemListSorter = new ListViewSorter(ItemList); fileListSorter = new ListViewSorter(FileList); Loaded += ControlLoaded; }
public HistoryViewer() { InitializeComponent(); FilterText = string.Empty; listViewSorter = new ListViewSorter(History); Loaded += ControlLoaded; }
public PublishingQueue() { InitializeComponent(); listViewSorter = new ListViewSorter(Items); UpdatedByLabel.MouseDown += (sender, args) => UpdatedBy.SelectedIndex = 0; PathLabel.MouseDown += (sender, args) => pathsAllTreeViewItem.IsSelected = true; UpdatedLabel.MouseDown += (sender, args) => updatedAllTreeViewItem.IsSelected = true; }
/*******************************************************************************/ private void ColumnClick(object o, ColumnClickEventArgs e) { ColumnHeader currentColumn = listView.Columns[e.Column]; var sortOrder = ListViewSorter.SetSortingOrder(currentColumn); listView.ListViewItemSorter = new ListViewSorter(e.Column, sortOrder); listView.Sort(); }
public Form1() { InitializeComponent(); //this.Icon = Properties.Resources.yoda1; columnHeader1.Width = 183 - System.Windows.Forms.SystemInformation.VerticalScrollBarWidth; iconListManager = new Etier.IconHelper.IconListManager(smallIconList, Etier.IconHelper.IconReader.IconSize.Small); currentDirectory = "/polling/data/pos"; // Create an instance of a ListView column sorter and assign it // to the ListView control. lvSorter = new ListViewSorter(); listView1.ListViewItemSorter = lvSorter; }
public FirmwaresConfig(bool retryLoadRom = false) { InitializeComponent(); //prep imagelist for listview with 3 item states for {idUnsure, idMissing, idOk} imageList1.Images.AddRange(new[] { Properties.Resources.RetroQuestion, Properties.Resources.ExclamationRed, Properties.Resources.GreenCheck }); listviewSorter = new ListViewSorter(this, -1); if (retryLoadRom) { toolStripSeparator1.Visible = true; tbbCloseReload.Visible = true; tbbCloseReload.Enabled = true; } }
// Software \\ // Drivers private void populateDriversTab(object sender, EventArgs e) { try { if (currentComputer.Driver.Count == 0 && !Configuration.LoadWMIAtStart && sender != null) { Splash.AddProgressInfo("Processing Driver Information...", 50); currentComputer.GetDrivers(); Splash.AddProgressInfo("Done", 50); } // Quick info driver_quick_1.Text = currentComputer.Driver.Count.ToString(); // Main info driver_details.Items.Clear(); foreach (Driver driver in currentComputer.Driver) { // If the driver has a name, include in list if (driver.Name != "") { // Add values to list as a ListViewItem driver_details.Items.Add(new ListViewItem(new string[] { driver.Name, driver.Publisher, driver.Version, driver.Date })); } } // Resize last column driver_details.Columns[driver_details.Columns.Count - 1].Width = -2; // Sort driverSorter = new ListViewSorter(driver_details); driverSorter.Sort(0); } catch (Exception) { } }
// Addresses private void populateAddressesTab(object sender, EventArgs e) { try { if (currentComputer.Address.Count == 0 && !Configuration.LoadWMIAtStart && sender != null) { Splash.AddProgressInfo("Processing Address Maps Information...", 50); currentComputer.GetAddresses(); Splash.AddProgressInfo("Done", 50); } addresses_quick_1.Text = currentComputer.Address.Count.ToString(); addresses_details.Items.Clear(); foreach (Address address in currentComputer.Address) { if (address.Resource != "") { addresses_details.Items.Add(new ListViewItem(new string[] { address.Resource, address.Device })); } } addressesSorter = new ListViewSorter(addresses_details); addressesSorter.Sort(0); } catch (Exception) { } }
private void ProfilerControl_Load(object sender, System.EventArgs e) { _lvsFunction = new ListViewSorter(); _lvsFunction.SetColumns( new ListViewCompareType[] { ListViewCompareType.Float, ListViewCompareType.String, ListViewCompareType.Float, ListViewCompareType.Float, ListViewCompareType.Float, ListViewCompareType.Float, ListViewCompareType.Float, } ); _lvsFunction.SortColumn( _lvFunctionInfo, 1 ); _lvFunctionInfo.ListViewItemSorter = _lvsFunction; _lvFunctionInfo.ColumnClick += new ColumnClickEventHandler( _lvsFunction.OnListViewColumnClick ); _lvsCalleeFunction = new ListViewSorter(); _lvsCalleeFunction.SetColumns( new ListViewCompareType[] { ListViewCompareType.Float, ListViewCompareType.String, ListViewCompareType.Float, ListViewCompareType.Float, ListViewCompareType.Float, } ); _lvsCalleeFunction.SortColumn( _lvChildInfo, 1 ); _lvChildInfo.ListViewItemSorter = _lvsCalleeFunction; _lvChildInfo.ColumnClick += new ColumnClickEventHandler( _lvsCalleeFunction.OnListViewColumnClick ); }
// Installed Software private void populateSoftwareTab(object sender, EventArgs e) { try { if (currentComputer.Software.Count == 0 && !Configuration.LoadWMIAtStart && sender != null) { Splash.AddProgressInfo("Processing Software Information...", 50); currentComputer.GetSoftware(); Splash.AddProgressInfo("Done", 50); } software_quick_1.Text = currentComputer.Software.Count.ToString(); software_details.Items.Clear(); foreach (Software software in currentComputer.Software) { if (software.Name != "") { software_details.Items.Add(new ListViewItem(new string[] { software.Name, software.Publisher, software.Version, software.Date })); } } software_details.Columns[software_details.Columns.Count - 1].Width = -2; softwareSorter = new ListViewSorter(software_details); softwareSorter.Sort(0); } catch (Exception) { } }
// Processes private void populateProcessesTab(object sender, EventArgs e) { try { if (currentComputer.Process.Count == 0 && !Configuration.LoadWMIAtStart && sender != null) { Splash.AddProgressInfo("Loading Process Information...", 50); currentComputer.GetProcesses(); Splash.AddProgressInfo("Done", 50); } processes_quick_1.Text = currentComputer.Process.Count.ToString(); processes_details.Items.Clear(); foreach (Process process in currentComputer.Process) { // If the process has a name, include in list if (process.ImageName != "") { processes_details.Items.Add(new ListViewItem(new string[] { process.ImageName, Convert.ToString(process.PID), process.ExecutablePath, Convert.ToString(process.CPU), Convert.ToString(process.IO) })); } } processes_details.Columns[processes_details.Columns.Count - 1].Width = -2; processesSorter = new ListViewSorter(processes_details); processesSorter.Sort(0); } catch (Exception) { } }
// Event Logs private void populateLogsTab(object sender, EventArgs e) { try { if (currentComputer.Log.Count == 0 && !Configuration.LoadWMIAtStart && sender != null) { Splash.AddProgressInfo("Loading Event Log Information...", 50); currentComputer.GetLogs(); Splash.AddProgressInfo("Done", 50); } // Count logs_quick_1.Text = currentComputer.Log.Count.ToString(); // Date, time and reason of last shutdown if (currentComputer.ShutdownReason != "") { logs_quick_2.Text = currentComputer.ShutdownDate.ToShortDateString() + " " + currentComputer.ShutdownDate.ToShortTimeString(); logs_quick_3.Text = currentComputer.ShutdownReason; } else { logs_quick_2.Text = "No information available"; logs_quick_3.Text = ""; } // Dirty bit logs_quick_4.Text = currentComputer.DirtyFlag.ToString(); // Only change if number of items has changed if (logs_details.Items.Count != currentComputer.Log.Count) { logs_details.Items.Clear(); foreach (Log log in currentComputer.Log) { // If the log has a source, include in list if (log.Source != "") { logs_details.Items.Add(new ListViewItem(new string[] { log.Level, log.DateTime, log.Source, Convert.ToString(log.EventID), log.Message })); } } logs_details.Columns[logs_details.Columns.Count - 1].Width = -2; logsSorter = new ListViewSorter(logs_details); logsSorter.Sort(0); } } catch (Exception) { } }
private void software_details_ColumnClick(object sender, ColumnClickEventArgs e) { if (softwareSorter == null) { softwareSorter = new ListViewSorter(software_details); } softwareSorter.Sort(e.Column); }
private void database_query_stop_Click(object sender, EventArgs e) { Thread abortThread = new Thread(new ThreadStart(abortDatabaseOperation)); abortThread.IsBackground = true; abortThread.Start(); // Do a final list search ListViewSorter sorter = new ListViewSorter(database_details); sorter.Sort(1, Sorting.Order.Descending); }
// IRQs private void populateIRQsTab(object sender, EventArgs e) { try { if (currentComputer.IRQ.Count == 0 && !Configuration.LoadWMIAtStart && sender != null) { Splash.AddProgressInfo("Processing IRQ Maps Information...", 50); currentComputer.GetIRQs(); Splash.AddProgressInfo("Done", 50); } irqs_quick_1.Text = currentComputer.IRQ.Count.ToString(); irqs_details.Items.Clear(); foreach (IRQ irq in currentComputer.IRQ) { if (irq.Resource != "") { irqs_details.Items.Add(new ListViewItem(new string[] { irq.Resource, irq.Device })); } } irqs_details.Columns[irqs_details.Columns.Count - 1].Width = -2; irqsSorter = new ListViewSorter(irqs_details); irqsSorter.Sort(0); } catch (Exception) { } }
private void updater_Tick(object sender, EventArgs e) { // Main Volatile Updates \\ // Handle status strip if (Splash.Progress > 0 && Splash.Progress < 100) { this.status_strip_label.Enabled = true; this.status_strip_progress.Visible = true; this.status_strip_label.Text = Splash.Status; this.status_strip_progress.Value = Splash.Progress; } else { this.status_strip_label.Text = "Idle"; this.status_strip_label.Enabled = false; this.status_strip_progress.Visible = false; } // Graphs and Volatile Info \\ // If the selected index falls within the actual number of processors, continue if (currentComputer.Processor.Count > processor_list.SelectedIndex && processor_list.SelectedIndex >= 0) { if (processorGraph != null) { // Add value to graph currentComputer.Processor[processor_list.SelectedIndex].GetVolatileInfo(); processorGraph.Series[0].AddValue(currentComputer.Processor[processor_list.SelectedIndex].Usage); processorGraph.Series[1].AddValue(currentComputer.Processor[processor_list.SelectedIndex].Temperature); // Add values to processes graph (average usage of all processors) UInt16 usageTotal = 0; foreach (Processor processor in currentComputer.Processor) { usageTotal += processor.Usage; } processesGraph.Series[0].AddValue(usageTotal / currentComputer.Processor.Count); // Update graphs processorGraph.Redraw(); processesGraph.Redraw(); } } if (currentComputer.Motherboard.Count > motherboard_list.SelectedIndex && motherboard_list.SelectedIndex >= 0) { // Update values currentComputer.Motherboard[motherboard_list.SelectedIndex].GetVolatileInfo(); } if (currentComputer.GraphicsAdapter.Count > graphics_list.SelectedIndex && graphics_list.SelectedIndex >= 0) { currentComputer.GraphicsAdapter[graphics_list.SelectedIndex].GetVolatileInfo(); graphicsGraph.Series[0].AddValue(currentComputer.GraphicsAdapter[graphics_list.SelectedIndex].Temperature); graphicsGraph.Redraw(); } if (currentComputer.HardDrive.Count > harddrive_list.SelectedIndex && harddrive_list.SelectedIndex >= 0) { currentComputer.HardDrive[harddrive_list.SelectedIndex].GetVolatileInfo(); } if (currentComputer.NetworkAdapter.Count > network_list.SelectedIndex && network_list.SelectedIndex >= 0) { currentComputer.NetworkAdapter[network_list.SelectedIndex].GetVolatileInfo(); networkGraph.Series[0].AddValue((int)currentComputer.NetworkAdapter[network_list.SelectedIndex].CurrentDownlink); networkGraph.Series[1].AddValue((int)currentComputer.NetworkAdapter[network_list.SelectedIndex].CurrentUplink); networkGraph.Redraw(); } if (!Configuration.ProcessVolatileFail) { ManagementObject[] perfData = DataRetriever.GetWMIData("Win32_PerfFormattedData_PerfProc_Process"); if (perfData != null) { foreach (ManagementObject processPerfData in perfData) { foreach (Process process in currentComputer.Process) { if (process.PID == DataRetriever.GetValueUInt16(processPerfData, "IDProcess")) { process.GetVoltatileInfo(); } } } populateProcessesTab(null, null); } else { Configuration.ProcessVolatileFail = true; } } // Database search results before the thread has finished if (temporary_database_details.Items.Count != database_details.Items.Count) { // Get the database_details list from items in the temporary_database_details list database_details.Items.Clear(); foreach (ListViewItem item in temporary_database_details.Items) { database_details.Items.Add((ListViewItem)item.Clone()); } // Quicksort the details list by the score column with the sortListView function in MainWindowSorting ListViewSorter sorter = new ListViewSorter(database_details); sorter.Sort(1, Sorting.Order.Descending); } }