public static GeoPointStyle GenerateDefaultTranceiverStyle() { GeoPointStyle style = new GeoPointStyle(); style.IconSize = new Size(0, 0); style.EdgeColor = Color.Transparent; style.Visible = false; return style; }
private GraphicsPath BuildArcPath(GeoXYPoint position, GeoPointStyle pointStyle) { Point point = this.m_Helper.PlaneToScreen(position); Point location = new Point(point.X - (pointStyle.IconSize.Width / 2), point.Y - (pointStyle.IconSize.Height / 2)); Rectangle rect = new Rectangle(location, pointStyle.IconSize); GraphicsPath path = new GraphicsPath(); path.AddArc(rect, 0f, 360f); return path; }
public static GeoPointStyle GenerateDefaultRepeaterStyle() { GeoPointStyle style = new GeoPointStyle(); style.SymbolStyle = PointSymbolStyle.Repeater; style.IconSize = new Size(0x18, 0x18); style.Color = Color.Red; style.LabelFont = new Font("Arial", 9f); style.LabelColor = Color.Black; style.IsShowLabel = true; return style; }
public void GetPointStyleDict_Test() { GeoXYPoint point = new GeoXYPoint(); List<GeoXYPoint> pl = new List<GeoXYPoint>(); pl.Add(point); GeoPointStyle pointStyle = new GeoPointStyle(); List<GeoPointStyle> psl = new List<GeoPointStyle>(); psl.Add(pointStyle); m_ss.Styles = psl; m_VecData.GetPointStyleDict(pl, psl); }
private void InitDrawingStyles() { this.m_VetexPointStyle = new GeoPointStyle(); this.m_VetexPointStyle.SymbolStyle = PointSymbolStyle.HollowSquare; this.m_VetexPointStyle.IconSize = new Size(6, 6); this.m_VetexPointStyle.Color = Color.DarkViolet; this.m_FixedLineStyle = new GeoLineStyle(); this.m_FixedLineStyle.Color = Color.DarkViolet; this.m_FixedLineStyle.LineWidth = 2f; this.m_MovingLineStyle = new GeoLineStyle(); this.m_MovingLineStyle.Color = Color.DarkViolet; this.m_MovingLineStyle.LineWidth = 2f; this.m_MovingLineStyle.LineDashStyle = DashStyle.DashDot; }
public static GeoPointStyle GenerateDefaultPointStyle() { GeoPointStyle style = new GeoPointStyle(); style.SymbolStyle = PointSymbolStyle.GisPoint; style.IsShowLabel = true; style.IconSize = new Size(10, 10); style.Color = Color.YellowGreen; style.SelectedColor = Color.Blue; style.LabelFont = new Font("Arial", 9f); style.LabelColor = Color.Black; style.SelectedLabelColor = Color.MediumVioletRed; style.EdgeColor = Color.Blue; style.SelectedEdgeColor = Color.Blue; return style; }
public void GetPointStyleDictTest_1() { List<UserResult> userList = new List<UserResult>(); UserResult ur = new UserResult(); ur.BcchCir = 12f; ur.BcchRxPower = 33f; ur.BestServerName = "Trx1"; ur.DlGeometry = -15f; ur.DlTchRxPower = 33f; ur.UserX = 115f; ur.UserY = 120f; ur.UserState = UserStateType.DLSatisfied; userList.Add(ur); StyleStruct ss = new StyleStruct(); GeoPointStyle style1 = new GeoPointStyle(); style1.Name = "DLSatisfied"; ss.Styles.Add(style1); GSMSimulationVectorData gvd = new GSMSimulationVectorData(ss); gvd.UserResult = userList; List<GeoXYPoint> pointList = new List<GeoXYPoint>(); List<GeoPointStyle> styleList = new List<GeoPointStyle>(); gvd.UpadateStyles(ss); gvd.GetPointStyleDict(pointList, styleList); string output; Assert.IsTrue(gvd.TryGetPointInfo(pointList[0], out output)); Assert.AreEqual(115, pointList[0].X); Assert.AreEqual(style1.Name, styleList[0].Name); Assert.IsFalse(gvd.TryGetPointInfo(new GeoXYPoint(112, 115), out output)); //Assert.IsNull(gvd.GetAllStyles()); Assert.AreEqual(style1.Name, gvd.GetAllStyles()[0].Name); }
public void AddPoint(GeoXYPoint point, GeoPointStyle pointStyle) { Dictionary<GeoXYPoint, GeoPointStyle> points = new Dictionary<GeoXYPoint, GeoPointStyle>(); points.Add(point, pointStyle); this.AddPoints(points); }
public void CellStatisticsTest_1() { //1个trx List<GSMSimTRX> trxList = new List<GSMSimTRX>(); trxList.Add(GSMMock.MockGsmSimTrx()); //3个用户 List<GSMSimUser> m_User = new List<GSMSimUser>(); m_User.AddRange(GSMMock.MockGsmSimUserList()); List<GSMSimUser> serverUsers = new List<GSMSimUser>(); serverUsers.Add(m_User[0]); List<GSMSimUser> accessFail = new List<GSMSimUser>(); accessFail.Add(m_User[2]); List<GSMSimUser> forAccessAgain = new List<GSMSimUser>(); forAccessAgain.Add(m_User[1]); //trxList[0].TSs[1].CurULThroughput.Add(m_User[0], 25f); m_User[0].UlTs.Add(trxList[0].TSs[1]); trxList[0].CellUsers.Add(m_User[0]); trxList[0].LastKick.Add(m_User[2]); m_User[0].TrafficUser.LinkType = LinkType.Uplink; m_User[2].TrafficUser.LinkType = LinkType.Downlink; trxList[0].AccessCsUlUsers.Add(m_User[0]); trxList[0].AccessCsDlUsers.Add(m_User[2]); m_User[0].ULInterf.Add(trxList[0].TSs[1], -110f); m_User[0].UlCirs.Add(trxList[0].TSs[1], 15f); m_User[0].CurULTxPower.Add(trxList[0].TSs[1], 33f); //add by 6.10 m_User[0].ResultStatistic.UlThorughput.Add(12000); m_User[0].ResultStatistic.ULTDInterf.Add(-150); m_User[0].ResultStatistic.ULUMTSInterf.Add(-150); trxList[0].IterULThrghtpt.Add(25f); trxList[0].IterDLThrghtpt.Add(0f); ConvergenceResult convergenceResult = new ConvergenceResult(); //将相应参数加入到context中 SnapshotContext context = GSMMock.CreateContext(); context.AddKey(GsmContextkey.GSMSimTRXs, trxList); context.AddKey(GsmContextkey.GSMGetLinkloss, m_IGetLinkloss); context.AddKey(GsmContextkey.AllUsers, m_User); context.AddKey(GsmContextkey.GSMServedUsers, serverUsers); context.AddKey(GsmContextkey.GSMAccessFails, accessFail); context.AddKey(GsmContextkey.GSMForAccessAgain, forAccessAgain); context.AddKey(GsmContextkey.GSMConvergenceResult, convergenceResult); SnapShotStatistics statistics = new SnapShotStatistics(); statistics.Init(context); statistics.CellStatistics(); /*小区统计参数*/ //上下行负载 Assert.IsTrue(trxList[0].UlLoad - 0.125 < 0.01); Assert.IsTrue(trxList[0].DlLoad - 0 < 0.01); //被服务的用户数 Assert.AreEqual(1, trxList[0].SerUserNum); //掉话数 //Assert.AreEqual(1, trxList[0].DropUserNum); //语音及数据阻塞数 //Assert.IsTrue(trxList[0].VoiceBlock - 0.5 < 0.01); //Assert.IsTrue(trxList[0].PacketBlock - 0 < 0.01); //接入失败用户数 Assert.AreEqual(0, trxList[0].FailAccessUserNum); statistics.PdfCdfStatistics(); /*用户统计参数*/ Assert.IsTrue(m_User[0].ResultStatistic.UserULInterf - (-110) < 0.01); Assert.AreEqual(float.NegativeInfinity, m_User[0].ResultStatistic.UserDLInterf); Assert.IsTrue(m_User[0].ResultStatistic.ULCir - 15 < 0.01); Assert.AreEqual(float.NegativeInfinity, m_User[0].ResultStatistic.DLCir); Assert.AreEqual(float.NegativeInfinity, m_User[0].ResultStatistic.DLTCHRxPower); Assert.IsTrue(m_User[0].ResultStatistic.TxPower - 33 < 0.01); GSMSnapshotResult result = statistics.GetResult(); result.GetExcelResult(); result.GetSnapshotDisplayData(new StyleStruct()); GSMGetSimulationVectorData ggsvd = new GSMGetSimulationVectorData(); List<IResult> resultList = new List<IResult>(); resultList.Add(result); StyleStruct ss = new StyleStruct(); GeoPointStyle style1 = new GeoPointStyle(); style1.Name = "DLSatisfied"; ss.Styles.Add(style1); Assert.AreEqual(6, ((GSMSimulationVectorData)ggsvd.GetSimulationVectorData(resultList, ss)).UserResult.Count); }
private void GenerateDefaultStyle() { this.m_DefaultPointStyle = new GeoPointStyle(); this.m_DefaultLineStyle = new GeoLineStyle(); this.m_DefaultPolygonStyle = new GeoPolygonStyle(); }
private GraphicsPath BuildTextSymbolPath(GeoXYPoint position, GeoPointStyle pointStyle) { string text = char.ConvertFromUtf32(pointStyle.SymbolValue); Point point = this.m_Helper.PlaneToScreen(position); Size size = TextRenderer.MeasureText(text, pointStyle.SymbolFont); Point location = new Point(point.X - (size.Width / 2), point.Y - (size.Height / 2)); Rectangle rect = new Rectangle(location, size); GraphicsPath path = new GraphicsPath(); path.AddRectangle(rect); return path; }
private static void UpdateGeoDataByArgs(AnalyGeoXYPointSymbolEventArgs args, GeoUserVectorData userVectorData) { Dictionary<SymbolConfig, List<GeoXYPoint>> symbolPtDict = args.m_SymbolPtDict; foreach (KeyValuePair<SymbolConfig, List<GeoXYPoint>> pair in symbolPtDict) { SymbolConfig key = pair.Key; List<GeoXYPoint> list = pair.Value; if (list.Count != 0) { GeoPointStyle style = new GeoPointStyle(); style.SymbolStyle = PointSymbolStyle.TextSymbol; style.SymbolValue = key.SymbolValue; style.Color = key.ForeColor; style.IconSize = new Size((int) key.EMSize, (int) key.EMSize); style.SymbolFont = new Font(key.Family, key.EMSize, key.Style); foreach (GeoXYPoint point in list) { userVectorData.AddPoint(point, style, false); } } } }
public void GetPointStyleDict_Test() { TDSimUser user1; user1 = MockDPAUser.CreatTDSimUser_CS(); TDSimUser user2; user2 = MockDPAUser.CreatTDSimUser_CS(); TDSimUser user3; user3 = MockDPAUser.CreatTDSimUser_CS(); List<TDSimUser> tdPreUser = new List<TDSimUser>(); tdPreUser.Add(user1); tdPreUser.Add(user2); StyleStruct ss = new StyleStruct(); GeoPointStyle gps1 = new GeoPointStyle(); gps1.Name = "gps1"; GeoPointStyle gps2 = new GeoPointStyle(); gps2.Name = "gps2"; ss.Styles.Add(gps1); ss.Styles.Add(gps2); SimulationVectorData simuVectorData = new SimulationVectorData(tdPreUser, ss); GeoXYPoint geoXYPoint = new GeoXYPoint(); GeoPointStyle geoPointStyle = new GeoPointStyle(); List<GeoXYPoint> geoXYPointList = new List<GeoXYPoint>(); List<GeoPointStyle> geoPointStyleList = new List<GeoPointStyle>(); geoXYPointList.Add(geoXYPoint); geoPointStyleList.Add(geoPointStyle); simuVectorData.GetPointStyleDict(geoXYPointList, geoPointStyleList); simuVectorData.UpadateStyles(ss); string info = "GIS"; bool result = false; result = simuVectorData.TryGetPointInfo(geoXYPoint,out info); Assert.IsTrue(result); GeoPointStyle gpStytle1 = new GeoPointStyle(); gpStytle1 = simuVectorData.FindLinkSituByUser(user2); GeoPointStyle gpStytle2 = new GeoPointStyle(); gpStytle2 = simuVectorData.FindLinkSituByUser(user3); Assert.AreEqual(gpStytle1.Name, "gps2"); }