protected override void Init() { base.Init(); if (StationInfoWriter == null) { StationInfoWriter = new StationInfoWriter(this.OutputDirectory + "\\StationInfo.StaInfo"); StationInfoWriter.WriteHeaderLine(); } }
private void Save(string CurrentPath) { StationInfoWriter writer = new StationInfoWriter(CurrentPath); var collection = this.bindingSource1.DataSource as List <StationInfo>; writer.WriteCommentLine(StaionInfoService.reader.Comments); foreach (var item in collection) { writer.Write(item); } writer.Close(); writer.Dispose(); Geo.Utils.FormUtil.ShowOkAndOpenFile(CurrentPath); }