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; }
public void OpenChooseSubtitleForm(List <Subtitle> responseList, ISubtitleClient subtitleClient) { using (frmChooseSubtitle frmChooseSubtitle = new frmChooseSubtitle(responseList, subtitleClient)) { frmChooseSubtitle.ShowDialog(); } }
} // 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); }
public MainInteractor() { this.SubtitleClient = new SubtitleClientFactory().BuildClient(); }
public SearchResultsArgs(List <Subtitle> subtitleList, ISubtitleClient subtitleClient) { this.SubtitleList = subtitleList; this.SubtitleClient = subtitleClient; }
private void cmbStranica_SelectedIndexChanged(object sender, EventArgs e) { Properties.Settings.Default.DefaultWebsite = cmbStranica.SelectedItem.ToString(); Properties.Settings.Default.Save(); this.subtitleClient = this.subtitleClientFactory.BuildClient(); }