Example #1
0
        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();
     }
 }
Example #3
0
 private static INavigatorManager CreateNavigatorManager(Navigators navigator, Settings settings)
 {
     if (navigator == Navigators.TotalCommander)
     {
         return(new TotalCommanderManager(settings.TotalCommanderPath));
     }
     else
     {
         return(new WindowsExplorerManager());
     }
 }
Example #4
0
        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;
        }
Example #5
0
        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;
 }
Example #7
0
 public INavigator GetNavigator(string map)
 {
     return(Navigators.TryGetValue(map, out INavigator nav) ? nav : new DefaultNavigator(map));
 }
Example #8
0
 public NavigatorModel(string name, Navigators type)
 {
     _name = name;
     _type = type;
 }