/// <summary> /// 建構子 /// </summary> /// <param name="container">DataGrid</param> /// <param name="menuStrip">右鍵選單</param> /// <param name="refCoordinate">參考座標</param> /// <param name="refSkew">參考軸擺正</param> /// <param name="invisiableColumnNames">不顯示的欄位名稱們</param> /// <param name="iconImageList">圖示s</param> /// <param name="resolution">解析度</param> /// <param name="roundDigit">進位</param> /// <param name="assistant"></param> public GeoDataGridViewManager(DataGridView container, ContextMenuStrip menuStrip, BindingList<RefCoordinate> refCoordinate, BindingList<RefSkew> refSkew, string[] invisiableColumnNames, Dictionary<string, Bitmap> iconImageList, double resolution, int roundDigit, MeasureAssistant assistant) { _GridViewContainer = container; _geoContextMenuStrip = menuStrip; _refCoordinate = refCoordinate; _refSkew = refSkew; _defaultRefSkew = new RefSkew(); //初始化 skewID if (_refSkew == null) { _refSkew = new BindingList<RefSkew>(); _refSkew.Add(_defaultRefSkew); } _currentSkewID = (_refSkew.Count > 0) ? _refSkew[0].ID : ""; _DataList = new BindingList<GeoDataGridViewModel>(); _InvisiableColumnNames = invisiableColumnNames; _ImageList = iconImageList; _Resolution = resolution; _RoundDigit = roundDigit; mAssistant = assistant; initialize(); }
public GeoDataGridViewManager(DataGridView container, BindingList<GeoDataGridViewModel> bindingList, string[] invisiableColumnNames, Dictionary<string, Bitmap> iconImageList, double resolution, int roundDigit, MeasureAssistant assistant) { _GridViewContainer = container; _DataList = bindingList; _InvisiableColumnNames = invisiableColumnNames; _ImageList = iconImageList; _Resolution = resolution; _RoundDigit = roundDigit; mAssistant = assistant; var dfCoordinateModel = new List<RefCoordinate>() { new RefCoordinate(), }; _refCoordinate = new BindingList<RefCoordinate>(dfCoordinateModel); //初始化 軸擺正 _defaultRefSkew = new RefSkew(); _currentSkewID = _defaultRefSkew.ID; var dfSkewModel = new List<RefSkew>() { _defaultRefSkew }; _refSkew = new BindingList<RefSkew>(dfSkewModel); initialize(); }