private void buttonFilter_Click(object sender, EventArgs e) { LoadVideos loadVideos = new LoadVideos(); loadVideos.AddAccessToSubForms(subFormListView, subFormGallery, subFormVideoForm, this, subFormProgress); loadVideos.FilterListView(); // bubble the event up if (this.filterForm_filterVideos != null) { this.filterForm_filterVideos(this, e); } }
// after form loaded private void FormMain_Shown(object sender, EventArgs e) { MyFormField.HighlightFormFieldsOnFocus(this); loadVideos.AddAccessToSubForms(subFormListView, subFormGallery, subFormVideoForm, subFormFilterForm, subFormProgressMain); Application.DoEvents(); // meh // ensure required app dirs exist MyFile.EnsureDirectoryExists(@"cache"); MyFile.EnsureDirectoryExists(@"cache\gallery"); MyFile.EnsureDirectoryExists(@"config"); MyFile.EnsureDirectoryExists(@"data"); MyFile.EnsureDirectoryExists(@"filters"); MyFile.EnsureDirectoryExists(@"libs"); MyFile.EnsureDirectoryExists(@"libs\ffmpeg\bin"); MyFile.EnsureDirectoryExists(@"logs"); MyFile.EnsureDirectoryExists(@"stats"); MyFile.EnsureDirectoryExists(@"sync"); if (Config.settings.sources.Count == 0) { MessageBox.Show("No Video Sources found. Add some and Scan.."); ShowFormSources(); return; } if (ListVideoInfo.Load()) { loadVideos.FilterListView(); } else { loadVideos.LoadFromDisk(); } }