private void UpdateDriverStore(IDriverStore driverStore) { this.driverStore = driverStore; switch (driverStore.Type) { case DriverStoreType.Online: { this.Text = Language.Product_Name + " - " + Language.DriverStore_LocalMachine; this.cbAddInstall.Enabled = true; this.cbForceDeletion.Enabled = true; this.deviceNameColumn.IsVisible = true; break; } case DriverStoreType.Offline: { this.Text = Language.Product_Name + " - " + driverStore.OfflineStoreLocation; this.cbAddInstall.Enabled = false; this.cbForceDeletion.Enabled = false; this.deviceNameColumn.IsVisible = false; break; } } }
public DriverFactoryLoader(ILogger logger, IDriverNodesStore driverNodeStore, IDriverStore driverStore, ILicenseContract licenseContract) { _logger = logger; _driverNodeStore = driverNodeStore; _driverStore = driverStore; _licenseContract = licenseContract; }
private void UpdateDriverStore(IDriverStore driverStore) { this.driverStore = driverStore; this.exportAllDriversToolStripMenuItem.Enabled = driverStore.SupportExportAllDrivers; this.exportAllDriversToolStripMenuItem.Visible = driverStore.SupportExportAllDrivers; this.cbAddInstall.Enabled = driverStore.SupportAddInstall; this.cbForceDeletion.Enabled = driverStore.SupportForceDeletion; this.buttonExportDrivers.Visible = driverStore.SupportExportDriver; this.deviceNameColumn.IsVisible = driverStore.SupportForceDeletion; this.ctxMenuExportDriver.Visible = driverStore.SupportExportDriver; switch (driverStore.Type) { case DriverStoreType.Online: { this.Text = Language.Product_Name + " - " + Language.DriverStore_LocalMachine; break; } case DriverStoreType.Offline: { this.Text = Language.Product_Name + " - " + driverStore.OfflineStoreLocation; break; } } }
public DSEForm() { if (!IsOSSupported()) { MessageBox.Show(Language.Message_Requires_Later_OS, Language.Product_Name, MessageBoxButtons.OK, MessageBoxIcon.Information); Application.Exit(); } var lang = Properties.Settings.Default.Language; if (lang != null && CultureInfo.InvariantCulture != lang) { Thread.CurrentThread.CurrentCulture = lang; Thread.CurrentThread.CurrentUICulture = lang; } this.InitializeComponent(); this.Icon = ExtractAssociatedIcon(Application.ExecutablePath); this.BuildLanguageMenu(); this.lstDriverStoreEntries.PrimarySortColumn = this.driverClassColumn; this.lstDriverStoreEntries.PrimarySortOrder = SortOrder.Ascending; this.lstDriverStoreEntries.SecondarySortColumn = this.driverDateColumn; this.lstDriverStoreEntries.SecondarySortOrder = SortOrder.Descending; this.lstDriverStoreEntries.CheckBoxes = isRunAsAdministrator; this.driverSizeColumn.AspectToStringConverter = size => DriverStoreEntry.GetBytesReadable((long)size); this.driverVersionColumn.GroupKeyGetter = (object rowObject) => { DriverStoreEntry driver = (DriverStoreEntry)rowObject; return(new Version(driver.DriverVersion.Major, driver.DriverVersion.Minor)); }; this.driverDateColumn.GroupKeyGetter = (object rowObject) => { DriverStoreEntry driver = (DriverStoreEntry)rowObject; return(new DateTime(driver.DriverDate.Year, driver.DriverDate.Month, 1)); }; this.driverDateColumn.GroupKeyToTitleConverter = (object groupKey) => ((DateTime)groupKey).ToString("yyyy-MM"); this.driverSizeColumn.GroupKeyGetter = (object rowObject) => { DriverStoreEntry driver = (DriverStoreEntry)rowObject; return(DriverStoreEntry.GetSizeRange(driver.DriverSize)); }; this.driverSizeColumn.GroupKeyToTitleConverter = (object groupKey) => DriverStoreEntry.GetSizeRangeName((long)groupKey); Trace.TraceInformation("---------------------------------------------------------------"); Trace.TraceInformation($"{Application.ProductName} started"); this.driverStore = new PNPUtil(); }
public DSEForm() { InitializeComponent(); AppContext.MainForm = this; AppContext.EnableLogging(); driverStore = AppContext.GetDriverStoreHandler(); if (!AppContext.IsOSSupported()) { MessageBox.Show("This utility cannot be run in pre-Vista OS", "Rapr", MessageBoxButtons.OK, MessageBoxIcon.Information); Application.Exit(); } }
public DSEForm() { if (!IsOSSupported()) { MessageBox.Show("This utility cannot be run in pre-Vista OS", "Rapr", MessageBoxButtons.OK, MessageBoxIcon.Information); Application.Exit(); } InitializeComponent(); this.Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath); lstDriverStoreEntries.PrimarySortColumn = this.driverClassColumn; lstDriverStoreEntries.PrimarySortOrder = SortOrder.Ascending; lstDriverStoreEntries.SecondarySortColumn = this.driverDateColumn; lstDriverStoreEntries.SecondarySortOrder = SortOrder.Descending; lstDriverStoreEntries.CheckBoxes = isRunAsAdministrator; driverSizeColumn.AspectToStringConverter = size => DriverStoreEntry.GetBytesReadable((long)size); this.driverVersionColumn.GroupKeyGetter = delegate(object rowObject) { DriverStoreEntry driver = (DriverStoreEntry)rowObject; return(new Version(driver.DriverVersion.Major, driver.DriverVersion.Minor)); }; this.driverDateColumn.GroupKeyGetter = delegate(object rowObject) { DriverStoreEntry driver = (DriverStoreEntry)rowObject; return(new DateTime(driver.DriverDate.Year, driver.DriverDate.Month, 1)); }; this.driverDateColumn.GroupKeyToTitleConverter = delegate(object groupKey) { return(((DateTime)groupKey).ToString("yyyy-MM")); }; this.driverSizeColumn.GroupKeyGetter = delegate(object rowObject) { DriverStoreEntry driver = (DriverStoreEntry)rowObject; return(DriverStoreEntry.GetSizeRange(driver.DriverSize)); }; this.driverSizeColumn.GroupKeyToTitleConverter = delegate(object groupKey) { return(DriverStoreEntry.GetSizeRangeName((long)groupKey)); }; Trace.TraceInformation("---------------------------------------------------------------"); Trace.TraceInformation($"{Application.ProductName} started"); driverStore = new PNPUtil(); }
public DSEForm() { InitializeComponent(); lstDriverStoreEntries.PrimarySortColumn = this.driverClassColumn; lstDriverStoreEntries.PrimarySortOrder = SortOrder.Ascending; lstDriverStoreEntries.SecondarySortColumn = this.driverDateColumn; lstDriverStoreEntries.SecondarySortOrder = SortOrder.Descending; lstDriverStoreEntries.CheckBoxes = isRunAsAdministrator; driverSizeColumn.AspectToStringConverter = size => DriverStoreEntry.GetBytesReadable((long)size); this.driverVersionColumn.GroupKeyGetter = delegate(object rowObject) { DriverStoreEntry driver = (DriverStoreEntry)rowObject; return(new Version(driver.DriverVersion.Major, driver.DriverVersion.Minor)); }; this.driverDateColumn.GroupKeyGetter = delegate(object rowObject) { DriverStoreEntry driver = (DriverStoreEntry)rowObject; return(new DateTime(driver.DriverDate.Year, driver.DriverDate.Month, 1)); }; this.driverDateColumn.GroupKeyToTitleConverter = delegate(object groupKey) { return(((DateTime)groupKey).ToString("yyyy-MM")); }; this.driverSizeColumn.GroupKeyGetter = delegate(object rowObject) { DriverStoreEntry driver = (DriverStoreEntry)rowObject; return(DriverStoreEntry.GetSizeRange(driver.DriverSize)); }; this.driverSizeColumn.GroupKeyToTitleConverter = delegate(object groupKey) { return(DriverStoreEntry.GetSizeRangeName((long)groupKey)); }; AppContext.MainForm = this; AppContext.EnableLogging(); driverStore = AppContext.GetDriverStoreHandler(); if (!AppContext.IsOSSupported()) { MessageBox.Show("This utility cannot be run in pre-Vista OS", "Rapr", MessageBoxButtons.OK, MessageBoxIcon.Information); Application.Exit(); } }
public DSEForm() { if (!IsOSSupported()) { MessageBox.Show( Language.Message_Requires_Later_OS, Language.Product_Name, MessageBoxButtons.OK, MessageBoxIcon.Information); Application.Exit(); } if (!isRunAsAdministrator) { RunAsAdministrator(); } var lang = Settings.Default.Language; if (lang != null && !CultureInfo.InvariantCulture.Equals(lang)) { Thread.CurrentThread.CurrentCulture = lang; Thread.CurrentThread.CurrentUICulture = lang; } this.InitializeComponent(); this.Icon = ExtractAssociatedIcon(Application.ExecutablePath); this.BuildLanguageMenu(); this.lstDriverStoreEntries.PrimarySortColumn = this.driverClassColumn; this.lstDriverStoreEntries.PrimarySortOrder = SortOrder.Ascending; this.lstDriverStoreEntries.SecondarySortColumn = this.driverDateColumn; this.lstDriverStoreEntries.SecondarySortOrder = SortOrder.Descending; this.lstDriverStoreEntries.CheckBoxes = isRunAsAdministrator; this.SetupListViewColumns(); Trace.TraceInformation("---------------------------------------------------------------"); Trace.TraceInformation($"{Application.ProductName} started"); this.driverStore = new DismUtil(); }
public DSEForm() { InitializeComponent(); lstDriverStoreEntries.AlwaysGroupByColumn = this.driverClassColumn; lstDriverStoreEntries.AlwaysGroupBySortOrder = SortOrder.Ascending; lstDriverStoreEntries.PrimarySortColumn = this.driverInfColumn; lstDriverStoreEntries.PrimarySortOrder = SortOrder.Ascending; lstDriverStoreEntries.SecondarySortColumn = this.driverVersionColumn; lstDriverStoreEntries.SecondarySortOrder = SortOrder.Descending; driverSizeColumn.AspectToStringConverter = size => DriverStoreEntry.GetBytesReadable((long)size); AppContext.MainForm = this; AppContext.EnableLogging(); driverStore = AppContext.GetDriverStoreHandler(); if (!AppContext.IsOSSupported()) { MessageBox.Show("This utility cannot be run in pre-Vista OS", "Rapr", MessageBoxButtons.OK, MessageBoxIcon.Information); Application.Exit(); } }