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); }
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); }