Exemple #1
0
        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);
            }
        }
        private void buttonScan_Click(object sender, EventArgs e)
        {
            if (currentSource == null)
            {
                return;
            }

            buttonSourceDirectory.Enabled = false;
            buttonSaveSource.Enabled      = false;
            buttonScanSource.Enabled      = false;
            buttonRemoveSource.Enabled    = false;
            buttonAddSource.Enabled       = false;

            // meh, but works
            FormMain   formMain   = (FormMain)this.Owner;
            LoadVideos loadVideos = formMain.GetLoadVideos();

            loadVideos.loadVideos_Completed += new EventHandler(LoadVideos_Completed);
            loadVideos.AddAccessToSubFormProgress(subFormProgressOptions);
            loadVideos.LoadFromDisk(currentSource);
        }
Exemple #3
0
        private void SubFormFilterForm_Load(object sender, EventArgs e)
        {
            this.MinimumSize = new Size(160, 540);

            this.filterInfo = new FilterInfo();



            subFormFilterFormSelect.AddAccessToSubForms(this);
            subFormFilterFormCriteria.AddAccessToSubForms(this);
            subFormFilterFormPreset.AddAccessToSubForms(this);

            FormMain formMain = (FormMain)this.ParentForm;

            // save <current>
            formMain.FormClosing += new FormClosingEventHandler(ParentForm_FormClosing);

            // meh, but works
            LoadVideos loadVideos = formMain.GetLoadVideos();

            // when app loaded, filtered/scanned
            loadVideos.loadVideos_Completed += new EventHandler(LoadVideos_Completed);
        }
        public FormMain()
        {
            InitializeComponent();

            MyLog.Add("========================================== Open application");

            MyFile.SetAppInfo();

            // filter form Filter button
            subFormFilterForm.filterForm_filterVideos += new EventHandler(subFormFilterForm_filterVideos);

            // list item clicked
            subFormListView.listView_selectedIndexChanged += new EventHandler(SubFormListView_selectedIndexChanged);

            // file list double clicked
            subFormFileList.fileList_DoubleClicked += new EventHandler(SubFormFileList_doubleClicked);

            // load videos done
            loadVideos = new LoadVideos();
            loadVideos.loadVideos_Completed += new EventHandler(LoadVideos_Completed);

            // add browse view
            subFormGallery = new SubFormGallery();
            this.Controls.Add(subFormGallery);
            // may not need all controls, but mimicing list view for now
            subFormGallery.AddAccessToSubForms(subFormFilterForm, subFormFileList, subFormVideoForm, subFormVideoImage, subFormProgressMain);
            subFormGallery.Hide();

            // so user controls can talk to other user controls
            subFormListView.AddAccessToSubForms(subFormFilterForm, subFormFileList, subFormVideoForm, subFormVideoImage, subFormProgressMain);
            subFormFilterForm.AddAccessToSubForms(subFormListView, subFormGallery, subFormVideoForm, subFormProgressMain);
            subFormFileList.AddAccessToSubForms(subFormListView, subFormVideoForm, subFormVideoImage, subFormProgressMain);

            // mouse wheelz
            this.MouseWheel += new MouseEventHandler(FormMain_MouseWheel);
        }