Ejemplo n.º 1
0
 public void AddAccessToSubForms(SubFormListView subFormListView, SubFormVideoForm subFormVideoForm, SubFormVideoImage subFormVideoImage, SubFormProgress subFormProgress)
 {
     this.subFormListView   = subFormListView;
     this.subFormVideoForm  = subFormVideoForm;
     this.subFormVideoImage = subFormVideoImage;
     this.subFormProgress   = subFormProgress;
 }
Ejemplo n.º 2
0
 public void AddAccessToSubForms(SubFormListView subFormListView, SubFormGallery subFormGallery, SubFormVideoForm subFormVideoForm, SubFormProgress subFormProgress)
 {
     this.subFormListView  = subFormListView;
     this.subFormGallery   = subFormGallery;
     this.subFormVideoForm = subFormVideoForm;
     this.subFormProgress  = subFormProgress;
 }
Ejemplo n.º 3
0
        public void AddAccessToSubForms(SubFormListView subFormListView, SubFormGallery subFormGallery, SubFormVideoForm subFormVideoForm, SubFormFilterForm subFormFilterForm, SubFormProgress subFormProgress)
        {
            this.subFormListView   = subFormListView;
            this.subFormGallery    = subFormGallery;
            this.subFormVideoForm  = subFormVideoForm;
            this.subFormFilterForm = subFormFilterForm;
            this.subFormProgress   = subFormProgress;

            buildGalleryImages.AddAccessToSubForms(subFormProgress);
            calcVideoInfoStats.AddAccessToSubForms(subFormProgress);
        }
Ejemplo n.º 4
0
        private void buttonRemoveSource_Click(object sender, EventArgs e)
        {
            MyFormField.DelayButtonClick(buttonRemoveSource);

            if (currentSource == null)
            {
                return;
            }

            string message = "Are you sure you want to remove this Video Source?" + Environment.NewLine;

            message += "Alias: " + currentSource.alias + Environment.NewLine;
            message += "Type: " + currentSource.type + Environment.NewLine;
            message += "Directory: " + currentSource.directory + Environment.NewLine;
            string lastScanned = currentSource.lastScanned.ToLocalTime().ToString();

            if (currentSource.lastScanned == DateTime.MinValue)
            {
                lastScanned = "Not yet";
            }
            message += "Last Scanned: " + lastScanned + Environment.NewLine;

            if (MessageBox.Show(message, "Confirm Removal",
                                MessageBoxButtons.YesNo, MessageBoxIcon.Question,
                                MessageBoxDefaultButton.Button2) == System.Windows.Forms.DialogResult.Yes)
            {
                listViewSource.SelectedItems[0].Remove();


                // remove entry from settings
                Config.settings.sources.Remove(currentSource);

                List <VideoInfo> currentVideoInfos = ListVideoInfo.GetList();
                int nbrOrigVideoInfos = currentVideoInfos.Count();
                currentVideoInfos.RemoveAll(s => s.sourceAlias == currentSource.alias);
                int nbrRemovedVideoInfos = nbrOrigVideoInfos - currentVideoInfos.Count();
                ListVideoInfo.SetList(currentVideoInfos);

                // meh, but works
                FormMain        formMain        = (FormMain)this.Owner;
                SubFormListView subFormListView = formMain.GetSubFormListView();
                subFormListView.SetListViewInfos(ListVideoInfo.GetList());

                MyLog.Add("Removed " + currentSource.alias + " and it's " + nbrRemovedVideoInfos + " VideoItems");

                // datatable xml will be updated on main form close
                // settings xml will be updated on main form close

                currentSource = null;
                buttonRemoveSource.Enabled = false;
            }
        }
Ejemplo n.º 5
0
 public void AddAccessToSubFormListView(SubFormListView subFormListView)
 {
     this.subFormListView = subFormListView;
 }