public WDSummaryGrid(ISessionColumnCollection collection, DataTable data, SessionColumnType sheartype) { _collection = collection; _rowdata = _data.AsDataView(); setCols(); FilterData(); }
public BulkShearStationSummary( ISessionColumnCollection collection, DataView data, double wdbin, double wdrosebin, double wsbin ) { _ef = new ExcelFile(); _ef.LimitNear += new LimitEventHandler(_ef_LimitNear); //original data SessionColumnType sheartype = SessionColumnType.WSAvgBulkShear; _monthHourWorksht = new WindSpeedFrequencyMonthHourWorkSheet(collection, data.Table, _ef, sheartype); _wSWDworkSht = new WindSpeedFrequencyWDWSWorkSheet(collection, data, wdbin, wsbin, _ef, sheartype); _wroseWksht = new WindRoseWorkSheet(collection, data, wdrosebin, _ef, sheartype); //datarecovery worksheet //built in order they will appear in work book _monthHourWorksht.BuildWorkSheet(); _wSWDworkSht.BuildWorkSheet(); _wroseWksht.BuildWorkSheet(); }
public SortedDictionary <double, ISessionColumn> GetColumnsByType(SessionColumnType coltype , DateTime date) { try { SortedDictionary <double, ISessionColumn> resultDictionary = new SortedDictionary <double, ISessionColumn>(); //find var result = from ISessionColumn s in _columns.AsEnumerable() where s.ColumnType.Equals(coltype) select s; foreach (var v in result) { //get config at each date ISensorConfig config = v.getConfigAtDate(date); if (config != null && !resultDictionary.ContainsKey(config.Height)) { resultDictionary.Add(config.Height, (ISessionColumn)v); } } return(resultDictionary); } catch (Exception e) { throw e; } }
public WindDirectionSummaryGrid(ISessionColumnCollection collection, DataTable data, SessionColumnType sheartype, WindDirectionAxis axis) { _collection = collection; _rowdata = data.AsDataView(); setCols(); FilterData(); }
public WindSpeedFrequencyMonthHourWorkSheet( ISessionColumnCollection collection, DataTable data, ExcelFile ef, SessionColumnType sheartype) { _ef = ef; _monthgrid = new SummaryGrid(collection, data, sheartype, new MonthAxis(), SummaryType.Month); _hourgrid = new SummaryGrid(collection, data, sheartype, new HourAxis(), SummaryType.Hour); }
//constructor public CreateWindSpeedSummaryGrid(List <XbyYCoincidentRow> filtereddata, WindSpeedAxis axis, double upperwsht, double lowerwsht, double shearht, SessionColumnType sheartype) { _axis = axis; _filtereddata = filtereddata; _upperwsht = upperwsht; _lowerwsht = lowerwsht; _shearht = shearht; _sheartype = sheartype; }
public WindRoseWorkSheet( ISessionColumnCollection collection, DataView data, double wdbinwidth, ExcelFile ef, SessionColumnType sheartype) { _ef = ef; _wRoseGrid = new SummaryGrid(collection, data.Table, sheartype, new WindDirectionAxis(wdbinwidth), SummaryType.WDRose); }
public SummaryGrid(ISessionColumnCollection collection, DataTable data, SessionColumnType sheartype , IAxis axis, SummaryType summarytype) { _collection = collection; _rowdata = data.AsDataView(); _axis = axis; _sheartype = sheartype; _summarytype = summarytype; setCols(); FilterData(); }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (value != null) { SessionColumnType columnType = (SessionColumnType)value; return(Enum.GetName(typeof(SessionColumnType), columnType)); } else { return(SessionColumnType.Select); } }
public SummaryGrid(ISessionColumnCollection collection, DataTable data, SessionColumnType sheartype, int shearidx, IAxis axis, SummaryType summarytype, bool CDNT) { _collection = collection; _rowdata = data.AsDataView(); _axis = axis; _sheartype = sheartype; _summarytype = summarytype; _shearwscol = _collection[shearidx]; setCols(); FilterData(CDNT); }
public List <ISessionColumn> GetColumnsByType(SessionColumnType coltype) { List <ISessionColumn> resultList = new List <ISessionColumn>(); //find columns by type //Console.WriteLine("Looking for " + coltype + " in session column collection"); var result = from ISessionColumn s in _columns.AsEnumerable() where s.ColumnType == coltype select s; Console.WriteLine(coltype + " found " + result.Count()); resultList = result.ToList(); return(resultList); }
public WindSpeedFrequencyWDWSWorkSheet( ISessionColumnCollection collection, DataView data, double wdbinwidth, double wsbinwidth, ExcelFile ef, SessionColumnType sheartype, int shearidx) { DateTime start = (DateTime)data[0][collection.DateIndex]; _WDgrid = new SummaryGrid(collection, data.Table, sheartype, shearidx, new WindDirectionAxis(wdbinwidth), SummaryType.WD, false); _WSgrid = new SummaryGrid(collection, data.Table, sheartype, shearidx, new WindSpeedAxis(wsbinwidth, data, collection.UpperWSComp(start)), SummaryType.WS, false); _excelfile = ef; }
public ISensorConfig CreateConfigType(SessionColumnType _coltype) { try { switch (_coltype) { case SessionColumnType.WSAvg: { WindSpeedConfig result = new WindSpeedConfig(); return(result); } default: { SensorConfig result = new SensorConfig(); return(result); } } } catch (Exception e) { throw e; } }