Esempio n. 1
0
        private async void StartProcessing()
        {
            try
            {
                SetUICrap_StartProcessing();

                foreach (ListViewItem item in listViewMain.Items)
                {
                    CurrentViewItem = item;

                    // yuk! quick 'n dirty feedback for UI
                    textBoxMain.Text += "\r\n\r\nProcessing: " + ProcessingModel.File.FullName;
                    textBoxMain.Text += "\r\nOutput: " + ProcessorUtil.GetOutputTmFullPath(ProcessingModel.File);


                    await Run(ProcessingModel.File.FullName, ProcessorUtil.GetOutputTmFullPath(ProcessingModel.File));


                    StatusBarProgressBar.Value++;
                    StatusBarPercentage.Text =
                        ProcessorUtil.GetPercentage(StatusBarProgressBar.Maximum, StatusBarProgressBar.Value) + "%";
                }
            }
            finally
            {
                SetUICrap_EndProcessing();
            }
        }
Esempio n. 2
0
        private void AddTmFileToGrid(FileInfo tmFileInfo)
        {
            if (IsInGrid(tmFileInfo))
            {
                return;
            }

            var item = listViewMain.Items.Add(tmFileInfo.FullName);

            item.SubItems.Add(ProcessorUtil.GetOutputTmFullPath(tmFileInfo));
            item.SubItems.Add("0%");
            item.SubItems.Add("Waiting...");
            item.Tag = new ProcessingModel
            {
                File = tmFileInfo
            };
        }