private void AddBrowsers() { if (Navigators.IsEdgeBrowserInstalled()) { UCAppsList appsList = new UCAppsList(Navigators.GetBrowserFeatures(), "Edge", Resources.Edge, "Edge"); panelWindowApps.Controls.Add(appsList); } var browsers = Navigators.GetBrowsers(); foreach (Browser browser in browsers) { string iconPath = browser.IconPath.Split(',')[0]; Icon icon = Icon.ExtractAssociatedIcon(iconPath); Image image = icon.ToBitmap(); image = Helper.ResizeImage(image, 20, 20); if (browser.BrowserType == BrowserType.Microsoft) { UCAppsList appsList = new UCAppsList(Navigators.GetBrowserFeatures(), browser.Name, image, "IE"); panelWindowApps.Controls.Add(appsList); } else if (browser.BrowserType == BrowserType.Others) { UCAppsList appsList = new UCAppsList(Navigators.GetBrowserFeatures(), browser.Name, image, browser.Name); panelNonWindowsApps.Controls.Add(appsList); } } UCAppsList windowStore = new UCAppsList(Helper.GetWindowStoreItems(), "WindowsStore", Resources.WindowsStore, "WindowsStore"); panelNonWindowsApps.Controls.Add(windowStore); UCAppsList applications = new UCAppsList(Helper.GetApplicationsInstalled(), "Applications", Resources.Applications, "Applications"); panelNonWindowsApps.Controls.Add(applications); UCAppsList internet = new UCAppsList(Helper.GetInternetItems(), "Internet", Resources.Internet, "Internet"); panelNonWindowsApps.Controls.Add(internet); UCAppsList multimedia = new UCAppsList(Helper.GetMultimediaItems(), "Multimedia", Resources.Multimedia, "Multimedia"); panelNonWindowsApps.Controls.Add(multimedia); UCAppsList Utilities = new UCAppsList(Helper.GetUtilitiesItems(), "Utilities", Resources.Utilities, "Utilities"); panelNonWindowsApps.Controls.Add(Utilities); UCAppsList Windows = new UCAppsList(Helper.GetWindowsItems(), "Windows", Resources.Windows, "Windows"); panelNonWindowsApps.Controls.Add(Windows); }
private static INavigatorManager CreateNavigatorManager(Navigators navigator, Settings settings) { if (navigator == Navigators.TotalCommander) { return new TotalCommanderManager(settings.TotalCommanderPath); } else { return new WindowsExplorerManager(); } }
private static INavigatorManager CreateNavigatorManager(Navigators navigator, Settings settings) { if (navigator == Navigators.TotalCommander) { return(new TotalCommanderManager(settings.TotalCommanderPath)); } else { return(new WindowsExplorerManager()); } }
public UCBrowserPlugins() { InitializeComponent(); var result = Navigators.GetIEPlugins(); var bindingList = new BindingList <BrowserExtension>(result.ToList()); var source = new BindingSource(bindingList, null); this.dataGridViewWindows.AutoGenerateColumns = false; this.dataGridViewWindows.DataSource = source; this.dataGridViewWindows.RowHeadersVisible = false; this.dataGridViewWindows.ColumnHeadersVisible = true; this.dataGridViewWindows.CellBorderStyle = DataGridViewCellBorderStyle.None; }
private void tabControlStartup_SelectedIndexChanged(object sender, EventArgs e) { if (tabControlStartup.SelectedTab.Name == "tabPageChrome") { var result = Navigators.GetChromePlugins(); var bindingList = new BindingList <BrowserExtension>(result.ToList()); var source = new BindingSource(bindingList, null); this.dataGridViewChrome.AutoGenerateColumns = false; this.dataGridViewChrome.DataSource = source; this.dataGridViewChrome.RowHeadersVisible = false; this.dataGridViewChrome.ColumnHeadersVisible = true; this.dataGridViewChrome.CellBorderStyle = DataGridViewCellBorderStyle.None; } else if (tabControlStartup.SelectedTab.Name == "tabPageFirefox") { var result = Navigators.GetFirefoxExtensions(); var bindingList = new BindingList <BrowserExtension>(result.ToList()); var source = new BindingSource(bindingList, null); this.dataGridViewFirefox.AutoGenerateColumns = false; this.dataGridViewFirefox.DataSource = source; this.dataGridViewFirefox.RowHeadersVisible = false; this.dataGridViewFirefox.ColumnHeadersVisible = true; this.dataGridViewFirefox.CellBorderStyle = DataGridViewCellBorderStyle.None; } else if (tabControlStartup.SelectedTab.Name == "tabIE") { var result = Navigators.GetIEPlugins(); var bindingList = new BindingList <BrowserExtension>(result.ToList()); var source = new BindingSource(bindingList, null); this.dataGridViewWindows.AutoGenerateColumns = false; this.dataGridViewWindows.DataSource = source; this.dataGridViewWindows.RowHeadersVisible = false; this.dataGridViewWindows.ColumnHeadersVisible = true; this.dataGridViewWindows.CellBorderStyle = DataGridViewCellBorderStyle.None; } }
public NavigatorModel(string name, Navigators type) { _name = name; _type = type; }
public INavigator GetNavigator(string map) { return(Navigators.TryGetValue(map, out INavigator nav) ? nav : new DefaultNavigator(map)); }