/// <summary> /// Handles the Click event of the btnOK control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void btnOK_Click(object sender, EventArgs e) { var series = AddCustomSeriesFactory.GenerateSeries(); TvDBFactory.AddCustomSeries(series); this.Close(); }
/// <summary> /// Initializes a new instance of the <see cref="FrmAddCustomSeries"/> class. /// </summary> public FrmAddCustomSeries() { InitializeComponent(); AddCustomSeriesFactory.Reset(); this.SetupBindings(); }
/// <summary> /// Handles the FocusedRowChanged event of the grdViewSeasons control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs"/> instance containing the event data.</param> private void grdViewSeasons_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) { var selectedRows = grdViewSeasons.GetSelectedRows(); if (selectedRows.Length == 0) { return; } var row = grdViewSeasons.GetRow(selectedRows[0]) as string; AddCustomSeriesFactory.ChangeSelectedSeries(row); AddCustomSeriesFactory.InvokeSeriesChanged(new EventArgs()); }
/// <summary> /// Handles the DragDrop event of the grdFiles control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.Windows.Forms.DragEventArgs"/> instance containing the event data.</param> private void grdFiles_DragDrop(object sender, DragEventArgs e) { var fileNameW = (string[])e.Data.GetData(DataFormats.FileDrop); var filteredFiles = new List <string>(); if (fileNameW != null) { var fileNames = (string[])fileNameW; foreach (var file in fileNames) { if ( Get.InOutCollection.VideoExtentions.Contains( Path.GetExtension(file.ToLower()).Replace(".", string.Empty))) { filteredFiles.Add(file); } } AddCustomSeriesFactory.AddFiles(filteredFiles); } }
/// <summary> /// Handles the SeriesChanged event of the AddCustomSeriesFactory control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> void AddCustomSeriesFactory_SeriesChanged(object sender, EventArgs e) { grdFiles.DataSource = AddCustomSeriesFactory.GetSeasonFiles(); }
private void btnAddBlankShow_Click(object sender, EventArgs e) { AddCustomSeriesFactory.AddBlankToCurrentSeries(); }