void SearchFileEclipse() { OpenFileDialog dlg = new OpenFileDialog(); if (dlg.ShowDialog() == DialogResult.OK) { this.FilePath = dlg.FileName; } if (!File.Exists(this._filePath)) { return; } EclipseData ecl = FileFactoryService.Instance.ThreadLoadResize(this._filePath); //this.EclipseData = SimDataConvertService.Instance.ConvertToSimON(ecl); //SimONData sim = FileFactoryService.Instance.ThreadLoadSimONResize(this._filePath); //this.EclipseData = new EclipseData(); //RunLog = EclipseData.RunLog; //this.EclipseData.Load(this._filePath); //END end= this.EclipseData.Key.Find<END>(); // if(end!=null) // { // end.ClearAllAfter(); // } List <BaseKey> bb = ecl.Key.FindAll <BaseKey>(); var ssr = bb.FindAll(l => l.ParentKey == null); BkSource = ecl.Key.FindAll <BaseKey>(); if (BkSource.Count > 0) { IteamSel = BkSource.FirstOrDefault(); } Total = BkSource.Count.ToString(); List <BaseKey> unKonwKeys = BkSource.FindAll(l => !l.IsUnKnowKey); UnKownTotalType = unKonwKeys.GroupBy(l => l.Name.Split(' ')[0]).Count().ToString(); List <BaseKey> KonwKeys = BkSource.FindAll(l => l.IsUnKnowKey); KownTotalType = KonwKeys.GroupBy(l => l.Name.Split(' ')[0]).Count().ToString(); UnKownTotal = unKonwKeys.Count.ToString(); KownTotal = (int.Parse(Total) - int.Parse(UnKownTotal)).ToString(); }
void SearchFile() { OpenFileDialog dlg = new OpenFileDialog(); if (dlg.ShowDialog() == DialogResult.OK) { this.FilePath = dlg.FileName; } if (!File.Exists(this._filePath)) { return; } //var ut = EclipseDataService.GetUnitType(this.FilePath); //MessageBox.Show(ut.ToString()); //return; //// 加载进度窗体 //RunLogWindow runLogWindow = new RunLogWindow(this); //runLogWindow.Show(); //EclipseData ecl = FileFactoryService.Instance.ThreadLoadResize(this._filePath); //this.EclipseData = SimDataConvertService.Instance.ConvertToSimON(ecl); SimONData sim = FileFactoryService.Instance.ThreadLoadSimONResize(this._filePath); //SimONData sim = FileFactoryService.Instance.ThreadLoadFunc<SimONData>(() => new SimONData(this._filePath, null, l => l.GetParentKey() is SCHEDULE)); //this.EclipseData = new EclipseData(); //RunLog = EclipseData.RunLog; //this.EclipseData.Load(this._filePath); //END end= this.EclipseData.Key.Find<END>(); // if(end!=null) // { // end.ClearAllAfter(); // } List <BaseKey> bb = sim.Key.FindAll <BaseKey>(); var ssr = bb.FindAll(l => l.ParentKey == null); BkSource = sim.Key.FindAll <BaseKey>(); if (BkSource.Count > 0) { IteamSel = BkSource.FirstOrDefault(); } Total = BkSource.Count.ToString(); List <BaseKey> unKonwKeys = BkSource.FindAll(l => !l.IsUnKnowKey); UnKownTotalType = unKonwKeys.GroupBy(l => l.Name.Split(' ')[0]).Count().ToString(); List <BaseKey> KonwKeys = BkSource.FindAll(l => l.IsUnKnowKey); KownTotalType = KonwKeys.GroupBy(l => l.Name.Split(' ')[0]).Count().ToString(); UnKownTotal = unKonwKeys.Count.ToString(); KownTotal = (int.Parse(Total) - int.Parse(UnKownTotal)).ToString(); }