private RankerFactory GetRankerFactory() { this.GetParams(); RankerFactory rankerFactory = new RankerFactory(txtRankFilePath.Text.Trim(), (DataFormat)comboDataType.SelectedValue, insertParamsDic); rankerFactory.CurrentLineChanged += dataRanker_CurrentLineChanged; rankerFactory.ProcessFinished += dataRanker_ProcessFinished; return(rankerFactory); }
private void StartDataRank() { if (this.CheckRankData()) { this.SaveParams(); this.SetRankButtonEabled(false); rankerFactory = GetRankerFactory(); rankerFactory.Start(); this.StartTimer(); } }
private void StopRank() { this.SetRankButtonEabled(true); this.StopTimer(); if (null != this.rankerFactory) { rankerFactory.Stop(); rankerFactory.CurrentLineChanged -= dataRanker_CurrentLineChanged; rankerFactory.ProcessFinished -= dataRanker_ProcessFinished; rankerFactory = null; } }