Exemple #1
0
 public Downloader(string dlFolder, bool easyFilenames, ProgressBar pb, MainUI ui, Label percentage, Button startDownload, ComboBox languages, string version)
 {
     this.dlFolder      = dlFolder;
     this.easyFilenames = easyFilenames;
     progress           = pb;
     mainui             = ui;
     percentLabel       = percentage;
     this.languages     = languages;
     programVersion     = version;
     this.startDownload = startDownload;
 }
Exemple #2
0
        public AboutUI(string[] l10n, bool rtl, string[] lang)
        {
            if (rtl)
            {
                RightToLeft = System.Windows.Forms.RightToLeft.Yes;
            }
            InitializeComponent();
            bOk.DialogResult    = System.Windows.Forms.DialogResult.OK;
            lang_chooser.Sorted = true;
            this.l10n           = l10n;
            // Load default lang
            SETTINGS s = set.open_settings();

            if (s.DL_saved_settings.download_path == "")
            {
                folder_save.Text = Path.GetTempPath();
            }
            else
            {
                folder_save.Text = s.DL_saved_settings.download_path;
            }
            folder.RootFolder = Environment.SpecialFolder.MyComputer;
            lang_chooser.Items.AddRange(lang);
            try
            {
                lang_chooser.SelectedItem   = s.l10n;
                ga_tracking.Checked         = s.Piwik.tracking_allowed;
                ga_tracking.CheckedChanged += new EventHandler(ga_tracking_CheckedChanged);
            }
            catch (Exception e)
            { MessageBox.Show(e.Message); }
            lang_chooser.SelectedIndexChanged += new System.EventHandler(this.update_lang);
            cb_advancedFilenames.Checked       = s.cb_advanced_filenames;
            if (s.DL_saved_settings.download_path != null)
            {
                folder_save.Text = s.DL_saved_settings.download_path;
            }
            else
            {
                folder_save.Text = Path.GetTempPath();
            }
            TTadvanced_file_renaming = MainUI.get_ToolTip(cb_advancedFilenames, l10n[22]);
            cb_bs_autoedit.Checked   = s.cb_autoedit_bs;
        }
Exemple #3
0
 public Downloader(SETTINGS s, string version, ProgressBar pb, MainUI ui, Label percentage, Button startDownload, ComboBox languages)
     : this(s.DL_saved_settings.download_path, !s.cb_advanced_filenames, pb, ui, percentage, startDownload, languages, version)
 {
 }