Exemplo n.º 1
0
        public static AppConfig GetDefault()
        {
            List<SelectionRule> selectionRules = new List<SelectionRule>();
            selectionRules.Add(new SelectionRule("Internet Explorer", RuleType.Regex, @"https?://.*\.microsoft\.com.*"));
            //selectionRules.Add(new SelectionRule("Google Chrome", RuleType.Regex, "(ftp)|(https?)"));

            List<BrowserInfo> customBrowsers = new List<BrowserInfo>();
            //customBrowsers.Add(new BrowserInfo("WinSCP", BrowserCategory.Custom, @"""C:\progs\WinSCP\WinSCP.exe"" ""%1"""));
            //customBrowsers[0].AppliesTo = new List<string>();
            //customBrowsers[0].AppliesTo.Add("ftp");

            customBrowsers.Add(new BrowserInfo("Internet Explorer (x64)", BrowserCategory.Custom, @"""C:\Program Files\Internet Explorer\iexplore.exe"" ""%1"""));
            customBrowsers[1].AppliesTo = new List<string>();
            customBrowsers[1].AppliesTo.Add("ftp");
            customBrowsers[1].AppliesTo.Add("http");
            customBrowsers[1].AppliesTo.Add("https");

            AppConfig config = new AppConfig()
            {
                SelectionRules = selectionRules,
                CustomBrowsers = customBrowsers,
                UnsavedChanges = false
            };
            return config;
        }
Exemplo n.º 2
0
        public CustomBrowsers(AppConfig config)
            : this()
        {
            AppConfig = config;

            DisplayCustomBrowsers(AppConfig.CustomBrowsers);

            listView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
        }
Exemplo n.º 3
0
        public Configurator(AppConfig config, BrowserInfo[] defaultBrowsers)
        {
            InitializeComponent();
            AppConfig = config;
            DefaultBrowsers = defaultBrowsers;

            Text = Properties.Resources.AppName;
            Icon = Properties.Resources.AppIcon;
        }
Exemplo n.º 4
0
        public Rules(AppConfig config, BrowserInfo[] browsers)
        {
            AppConfig = config;
            Browsers = browsers;

            InitializeComponent();

            DisplayRules(config.SelectionRules, browsers);

            listView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
        }
Exemplo n.º 5
0
        public Launcher(AppConfig config, BrowserInfo[] browsers)
        {
            AppConfig = config;
            Browsers = browsers;
            InitializeComponent();

            Text = Properties.Resources.AppName;
            Icon = Properties.Resources.AppIcon;

            pbIcon.Image = Icon.ToBitmap();
        }
Exemplo n.º 6
0
 public static void Save(AppConfig config, string filename)
 {
     config.Save(filename);
 }
 public CustomBrowserHelper(AppConfig appConfig)
 {
     AppConfig = appConfig;
 }