private void fg_process(object sender, FgTask e) { switch ((fgTaskType)e.type) { case fgTaskType.prepareProgress: browserProg.Visibility = Visibility.Visible; browserProg.Value = 0; break; case fgTaskType.updateProgress: browserProg.Value = (double)e.data; break; case fgTaskType.hideProgress: browserProg.Visibility = Visibility.Collapsed; break; case fgTaskType.updateStatus: statusBar.Text = (string)e.data; break; case fgTaskType.delayNext: if (s_loadLastPathSuccess) { this.Frame.Navigate(typeof(chapters)); } else { showErrMsg("Load folder data error!"); } break; } }
protected virtual void OnFgProcess(FgTask task) { FgProcess?.Invoke(this, task); }
public void qryFgTask(FgTask task) { m_worker.ReportProgress(1, task); }