Exemple #1
0
        public frmChooseSubtitle(List <Subtitle> responseList, ISubtitleClient subtitleClient)
        {
            this.subtitleClient = subtitleClient;

            InitializeComponent();
            WindowManager.SetTopMost(this.Handle);

            dataGridView1.DataSource = responseList;

            DataGridViewButtonColumn btnDownload = new DataGridViewButtonColumn();

            {
                btnDownload.Name       = "btnDownload";
                btnDownload.HeaderText = "Download";
                btnDownload.Text       = "Download";
                btnDownload.UseColumnTextForButtonValue = true;
                this.dataGridView1.Columns.Add(btnDownload);
            }

            foreach (DataGridViewColumn col in dataGridView1.Columns)
            {
                col.Visible = false;
            }

            dataGridView1.Columns["SubFileName"].Visible = true;
            dataGridView1.Columns["btnDownload"].Visible = true;
        }
Exemple #2
0
 public void OpenChooseSubtitleForm(List <Subtitle> responseList, ISubtitleClient subtitleClient)
 {
     using (frmChooseSubtitle frmChooseSubtitle = new frmChooseSubtitle(responseList, subtitleClient))
     {
         frmChooseSubtitle.ShowDialog();
     }
 }
Exemple #3
0
        }                                                    // ako se tražilica poziva sa vanjske forme, koji je inicijalni direktorij


        public frmSearch(ISubtitleClientFactory subtitleClientFactory)
        {
            this.subtitleClientFactory = subtitleClientFactory;
            this.subtitleClient        = this.subtitleClientFactory.BuildClient();
            InitializeComponent();

            List <Language> languageList = new List <Language> {
                new Language("English", "eng"), new Language("Croatian", "hrv")
            };

            cmbLanguage.DataSource    = languageList;
            cmbLanguage.DisplayMember = "Name";
            cmbLanguage.ValueMember   = "CountryCode";

            cmbLanguage.SelectedIndex = cmbLanguage.FindString(Properties.Settings.Default.DefaultLanguage);
            cmbStranica.SelectedIndex = cmbStranica.FindString(Properties.Settings.Default.DefaultWebsite);
        }
Exemple #4
0
 public MainInteractor()
 {
     this.SubtitleClient = new SubtitleClientFactory().BuildClient();
 }
Exemple #5
0
 public SearchResultsArgs(List <Subtitle> subtitleList, ISubtitleClient subtitleClient)
 {
     this.SubtitleList   = subtitleList;
     this.SubtitleClient = subtitleClient;
 }
Exemple #6
0
 private void cmbStranica_SelectedIndexChanged(object sender, EventArgs e)
 {
     Properties.Settings.Default.DefaultWebsite = cmbStranica.SelectedItem.ToString();
     Properties.Settings.Default.Save();
     this.subtitleClient = this.subtitleClientFactory.BuildClient();
 }