Beispiel #1
0
        private void doUpload()
        {
            ProgressBarSet d  = new ProgressBarSet(SetMarqueeSpeed);
            UIActionsParam da = new UIActionsParam(SetUploadName);

            pbarCurFileA.Invoke(d, new object[] { 0, pbarCurFileA });

            foreach (listMusicItem i in listFiles.Items)
            {
                currentRenderingItem = i;

                if (File.Exists(i.v.VideoPath))
                {
                    pbarCurFileA.Invoke(d, new object[] { 100, pbarCurFileA });

                    statusStrip.Invoke(da, new object[] { i.v.VideoName });

                    i.Upload(pbarCurFileA);
                }
                pbarTotal.Invoke(d, new object[] { pbarTotal.Value + 1, pbarTotal });
            }
            currentRenderingItem = null;

            UIActions de = new UIActions(UploadStopped);

            pbarTotal.Invoke(de);
        }
Beispiel #2
0
        private void doRender()
        {
            ProgressBarSet d  = new ProgressBarSet(SetProgressBarValue);
            UIActionsParam da = new UIActionsParam(SetRenderName);

            // do rendering stuff here
            foreach (listMusicItem i in listFiles.Items)
            {
                currentRenderingItem = i;

                pbarCurFileA.Invoke(d, new object[] { 0, pbarCurFileA });
                pbarCurFileV.Invoke(d, new object[] { 0, pbarCurFileV });

                statusStrip.Invoke(da, new object[] { i.ToString() });

                i.Render(pbarCurFileA, pbarCurFileV);

                pbarTotal.Invoke(d, new object[] { pbarTotal.Value + 1, pbarTotal });
                //pbarTotal.Value = pbarTotal.Value + 1;
            }
            currentRenderingItem = null;

            UIActions de = new UIActions(RenderStopped);

            pbarTotal.Invoke(de);
        }
Beispiel #3
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            Console.WriteLine("Saving...");

            listMusicItem i = (listMusicItem)lstItems.SelectedItem;

            // panel 1
            i.artist = txtArtist.Text;
            i.album  = txtAlbum.Text;
            i.title  = txtTitle.Text;

            if (cmbYTCat.SelectedItem != null)
            {
                i.ytCat = cmbYTCat.SelectedItem.ToString();
            }

            txtYTTags.Text = i.ytTags;
            txtWPTags.Text = i.wpTags;

            // panel 2

            // panel 3 + 4
            if (txtYTDesc.Text != Properties.Settings.Default.ytDesc)
            {
                i.YTDesc = txtYTDesc.Text;
            }
            else
            {
                i.YTDesc = "";
            }

            if (txtWPPost.Text != Properties.Settings.Default.wpPost)
            {
                i.WPPost = txtWPPost.Text;
            }
            else
            {
                i.WPPost = "";
            }

            Console.WriteLine("Done!");
        }
Beispiel #4
0
        private void addPathsToList(string path)
        {
            listMusicItem i = new listMusicItem(path, txtBGImage.Text, txtOutputDir.Text);

            listFiles.Items.Add(i);
        }
Beispiel #5
0
        /// <summary>
        /// This event occurs when the selected item is changed
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void lstItems_SelectedValueChanged(object sender, EventArgs e)
        {
            // check if we wish to save?

            // load data -- panel 1
            listMusicItem sel = (listMusicItem)lstItems.SelectedItem;

            txtAlbum.Text  = sel.album;
            txtArtist.Text = sel.artist;
            txtTitle.Text  = sel.title;

            if (sel.ytCat != "")
            {
                cmbYTCat.SelectedItem = sel.ytCat;
            }
            else
            {
                cmbYTCat.SelectedItem = null;
            }

            sel.ytTags = txtYTTags.Text;
            sel.wpTags = txtWPTags.Text;

            // load data -- panel 2
            System.Drawing.Image.GetThumbnailImageAbort d = new Image.GetThumbnailImageAbort(ImageAborted);
            if (sel.bg != "")
            {
                Image img = Image.FromFile(sel.bg, true);
                btnVideoBG.Image = img.GetThumbnailImage(195, 162, d, System.IntPtr.Zero);
                btnVideoBG.Text  = "";
                txtBGpath.Text   = sel.bg;
            }
            else
            {
                btnVideoBG.Image = null;
                btnVideoBG.Text  = "n/a";
                txtBGpath.Text   = "";
            }

            if (sel.images.Length > 0 && sel.images[0] != null)
            {
                // we'll just load the first image...
                Image img = sel.images[0];
                btnAlbumArt.Image = img.GetThumbnailImage(195, 162, d, System.IntPtr.Zero);
                btnAlbumArt.Text  = "";
                txtBGpath.Text    = "";
            }
            else if (sel.customAlbumArt)
            {
                // see if there is an image path specified
                Image img = Image.FromFile(sel.albumArt);
                btnAlbumArt.Image = img.GetThumbnailImage(195, 162, d, System.IntPtr.Zero);
                btnAlbumArt.Text  = "";
                txtAlbumPath.Text = sel.albumArt;
            }
            else
            {
                btnAlbumArt.Image = null;
                btnAlbumArt.Text  = "n/a";
                txtAlbumPath.Text = "";
            }

            // load data -- panel 3+4
            if (sel.WPPost == "")
            {
                txtWPPost.Text = Properties.Settings.Default.wpPost;
            }
            else
            {
                txtYTDesc.Text = sel.WPPost;
            }

            if (sel.YTDesc == "")
            {
                txtYTDesc.Text = Properties.Settings.Default.ytDesc;
            }
            else
            {
                txtYTDesc.Text = sel.YTDesc;
            }
        }