public RegressionResult(ILevels independent_, DatedDataCollectionGen<double[]> regDataInput_, NMathStats.LinearRegression lin_, NMathStats.LinearRegressionAnova anova_) { m_independent = independent_; m_lin = lin_; m_regressionData = regDataInput_; m_anova = anova_; }
public void ReplaceLevels(ILevels newValue) { var index = ConfigComponentsLookup.Levels; var component = (LevelsComponent)CreateComponent(index, typeof(LevelsComponent)); component.value = newValue; ReplaceComponent(index, component); }
public GameController(Contexts contexts, IResources resources, ILevels levels, Tilemap tilemap) { contexts.config.SetResources(resources); contexts.config.SetLevels(levels); contexts.game.SetTilemap(tilemap); // This is the heart of Match One: // All logic is contained in all the sub systems of GameSystems _systems = new GameSystems(contexts); }
public ConfigEntity SetLevels(ILevels newValue) { if (hasLevels) { throw new Entitas.EntitasException("Could not set Levels!\n" + this + " already has an entity with LevelsComponent!", "You should check if the context already has a levelsEntity before setting it or use context.ReplaceLevels()."); } var entity = CreateEntity(); entity.AddLevels(newValue); return(entity); }
private void _ObtainMap(ILevels map) { if (map != null) { _Levels = map; map.ToLevelsEvent += _CreateLevels; map.ToTownEvent += _ToTown; } else { throw new SystemException("找不到地圖"); } }
public void ReplaceLevels(ILevels newValue) { var entity = levelsEntity; if (entity == null) { entity = SetLevels(newValue); } else { entity.ReplaceLevels(newValue); } }
public BoardCreateSystem(Contexts contexts) { _context = contexts.game; _resources = contexts.config.resources.value; _levels = contexts.config.levels.value; }
public LevelsChangedEventArgs(ILevels def_) { Levels = def_; }
private void GenerateContourMap() { Surfer.Application app = new Surfer.Application(); IDocuments docs = app.Documents; IPlotDocument Doc = (IPlotDocument)docs.Add(SrfDocTypes.srfDocPlot); //創建一個空白繪圖文檔 IShapes Shapes = Doc.Shapes; #region 添加等值面 IMapFrame contourMapFrame = Shapes.AddContourMap(path + "temp.grd"); //加載網格文件 for (int i = 1; i <= contourMapFrame.Axes.Count; i++) { contourMapFrame.Axes.Item(i).Visible = false; contourMapFrame.Axes.Item(i).MajorTickType = SrfTickType.srfTickNone; contourMapFrame.Axes.Item(i).ShowLabels = false; } contourMapFrame.SetLimits(xMin: 140000, //x最小值 xMax: 370000, //x最大者 yMin: 2400000, //y最小值 yMax: 2800000 //y最大值 ); contourMapFrame.xMapPerPU = 23000; //設置比例 contourMapFrame.yMapPerPU = 20000; //設置比例 IContourMap contourMap = (IContourMap)contourMapFrame.Overlays.Item(1); /* * contourMap.ShowColorScale = true; // 顯示對應色柱 * contourMap.ColorScale.Top = 10; //色柱y方向位置 * contourMap.ColorScale.Left = contourMap.Left + contourMap.Width + 0.8;//色柱x方向位置 * contourMap.ColorScale.Width = 1; //色柱寬度 * contourMap.ColorScale.Height = 10; //色柱高度 * contourMap.ColorScale.LabelFont.Size = 10; * contourMap.ColorScale.LabelFont.Face = "Time New Roman"; * contourMap.ColorScale.LabelFrequency = 1; * contourMap.ColorScale.Name = "PM2.5 (μg/m3)"; */ contourMap.FillContours = true; //添加顏色填充 //通過文件加載顏色 ILevels levels = contourMap.Levels; levels.LoadFile(path + "PM25.lvl"); //加載系統顏色 //contourMap.FillForegroundColorMap.LoadFile(path + "Rainbow.clr"); //contourMap.ApplyFillToLevels(1, 1, 0); //使用灰色 //contourMap.Levels.AutoGenerate(contourMap.Grid.zMin,contourMap.Grid.zMax,10); for (int i = 0; i < contourMap.Levels.Count; i++) { contourMap.Levels.Item(i + 1).ShowLabel = false; //顯示等值線上的數值 contourMap.Levels.Item(i + 1).ShowHach = false; // contourMap.Levels.Item(i + 1).Line.Style = "Invisible"; //不顯示線 } contourMap.SmoothContours = SrfConSmoothType.srfConSmoothNone; //平滑等值線邊界當前設置不平滑 #endregion #region 添加邊界 //後添加的會覆蓋在先前添加的圖片之上 IMapFrame boundryMapFrame = Shapes.AddBaseMap(path + "city.shp", "Defaults=1"); for (int i = 1; i <= boundryMapFrame.Axes.Count; i++) { boundryMapFrame.Axes.Item(i).Visible = false; //隱藏軸線 boundryMapFrame.Axes.Item(i).MajorTickType = SrfTickType.srfTickNone; //隱藏邊線 boundryMapFrame.Axes.Item(i).ShowLabels = false; //隱藏軸線上的坐標 } boundryMapFrame.SetLimits(xMin: 140000, //x最小值 xMax: 370000, //x最大者 yMin: 2400000, //y最小值 yMax: 2800000 //y最大值 ); boundryMapFrame.xMapPerPU = 23000; boundryMapFrame.yMapPerPU = 20000; IBaseMap boundryBaseMap = (IBaseMap)boundryMapFrame.Overlays.Item(1); boundryBaseMap.Line.Width = 0.001; //設置邊線寬度 #endregion string strWH = string.Format("width = {0:f0}, height = {1:f0}, KeepAspect = 1, ColorDepth = 32", 680, 1280); //設置輸出圖片的高度和寬度 Doc.Export2(path + "Image.png", SelectionOnly: false, Options: strWH, FilterId: "png"); //設置輸出圖片格式名 Doc.Close(SrfSaveTypes.srfSaveChangesNo); //不生成srf文件 app.Quit(); System.GC.Collect(System.GC.GetGeneration(app)); }