public void DeleteNetworkLegend(ISimulationGroup group, NetWorkType nt) { List<string> list = new List<string>(); string item = this.GetGroupNetworkTitle(group, nt); list.Add(item); this.m_LegendManagement.Clear("Simulation", list.ToArray()); }
private void AddGroupNode(ISimulationGroup group) { List<TreeNode> childNodes = new List<TreeNode>(); TreeNode item = this.GenerateGroupNode(group); childNodes.Add(item); this.AddMulitNodes(this.m_SimulationSubSysTreeNode, childNodes); }
private void DeleteGroupLegend(ISimulationGroup group) { foreach (KeyValuePair<NetWorkType, List<StyleStruct>> pair in group.Style.StyleDic) { this.DeleteNetworkLegend(group, pair.Key); } }
private void AddResultNodes(ISimulationGroup group, TreeNode groupNode) { if (group.State == CalculateState.SuccessfulEnd) { List<TreeNode> childNodes = this.GenerateNetworkNodes(group); this.AddMulitNodes(groupNode, childNodes); } }
public void Add(ISimulationGroup group) { if (group != null) { this.m_Groups.Add(group); this.InvokeEventHandler(this.GroupAdded, group); this.SetNeedPromptSave(); } }
public void AddNetworkLegend(ISimulationGroup group, NetWorkType nt) { try { this.DeleteNetworkLegend(group, nt); StyleStruct ss = group.Style.StyleDic[nt][0]; string title = this.GetGroupNetworkTitle(group, nt); this.m_LegendManagement.Add("Simulation", this.GetStyleStructLegend(title, ss).ToArray()); } catch (Exception exception) { WriteLog.Logger.Error("Add Legend Failed", exception); } }
/// <summary> /// 构造函数 /// </summary> public CoSnapshot(ISimulationGroup group, Dictionary<NetWorkType, List<ISnapshot>> snapshotDic, Dictionary<NetVersion, NetWorkType> versionDic, IApplicationContext appContext) { InitConstruct(); m_SnapshotDic = snapshotDic; m_VersionDic = versionDic; m_Group = group; m_Region = group.Region; m_NetworkParam = group.AdvanceParam; m_UIParam = (UnionUIParam)group.AdvanceParam.UnionParam; m_TrafficMaps = group.TrafficMaps; m_Nets = m_UIParam.NETS; m_AppContext = appContext; }
public void Init() { m_SnapshotDic = new Dictionary<NetWorkType, List<ISnapshot>>(); gsmSnapshot = new MockGSMSnapshot(); r99Snapshot = new UMTSR99Snapshot(); List<ISnapshot> gsmList = new List<ISnapshot>(); gsmList.Add(gsmSnapshot); List<ISnapshot> umtsList = new List<ISnapshot>(); umtsList.Add(r99Snapshot); m_SnapshotDic.Add(NetWorkType.GSM, gsmList); m_SnapshotDic.Add(NetWorkType.UMTS, umtsList); m_VersionDic = new Dictionary<NetVersion, NetWorkType>(); m_VersionDic.Add(NetVersion.GSM, NetWorkType.GSM); m_VersionDic.Add(NetVersion.UMTSR99, NetWorkType.UMTS); m_VersionDic.Add(NetVersion.UMTSHSUPA, NetWorkType.UMTS); m_SimulationGroup = new MockSimulationGroup(); NetworkParam networkParam = new NetworkParam(); Dictionary<NetWorkType,object> netWorkTypeDic = new Dictionary<NetWorkType,object>(); netWorkTypeDic.Add(NetWorkType.UMTS, null); netWorkTypeDic.Add(NetWorkType.GSM, null); networkParam.Param = netWorkTypeDic; UnionUIParam unionParam = new UnionUIParam(); unionParam.AllocateType = AllocateUserType.Load; List<NetWorkType> netTypes = new List<NetWorkType>(); netTypes.Add(NetWorkType.GSM); netTypes.Add(NetWorkType.UMTS); unionParam.NETS = netTypes; unionParam.UnionIterationNumber = 2; networkParam.UnionParam = unionParam; m_SimulationGroup.AdvanceParam = networkParam; IApplicationContext context = new MockAppContext(); m_SimulationGroup.Region = CreatRegion(); IProject project = new MockProject(); ProjectSingleton.CurrentProject = project; m_Target = new CoSnapshot(m_SimulationGroup, m_SnapshotDic, m_VersionDic,context); }
public CaculateParam(ISimulationGroup group, ISimulationEngine engine) { this.m_Group = group; this.m_Engine = engine; }
private void RemoveGroupNode(ISimulationGroup group) { TreeNode groupNode = this.GetGroupNode(group.ID); this.m_SimulationSubSysTreeNode.Nodes.Remove(groupNode); }
private string GetGroupNetworkTitle(ISimulationGroup group, NetWorkType nt) { return string.Format("{0} {1}", group.Name, nt.ToString()); }
private void InvokeEventHandler(EventHandler<GroupEventArgs> handler, ISimulationGroup group) { if (handler != null) { GroupEventArgs e = new GroupEventArgs(group); handler(this, e); } }
private TreeNode GenerateGroupNode(ISimulationGroup group) { TreeNode groupNode = new TreeNode(); groupNode.Text = group.Name; groupNode.Name = group.ID.ToString(); groupNode.ContextMenuStrip = this.m_ContextMenuView.GroupContextMenuStrip; groupNode.ImageKey = "SimulationGroupUnlock"; groupNode.SelectedImageKey = "SimulationGroupUnlock"; groupNode.StateImageIndex = 1; this.AddResultNodes(group, groupNode); return groupNode; }
public bool IsNetworkLegendAdded(ISimulationGroup group, NetWorkType nt) { string name = this.GetGroupNetworkTitle(group, nt); return (this.m_LegendManagement.FindIndexOfUtility(name) != -1); }
private List<TreeNode> GenerateNetworkNodes(ISimulationGroup group) { List<TreeNode> list = new List<TreeNode>(); foreach (KeyValuePair<NetWorkType, INetworkResult> pair in group.Result.NetworkResult) { string text = pair.Key.ToString(); TreeNode parentNode = new TreeNode(); parentNode.Text = text; parentNode.Name = text; parentNode.ContextMenuStrip = this.m_ContextMenuView.NetworkContextMenuStrip; parentNode.ImageKey = "SimulationGroupNetwork"; parentNode.SelectedImageKey = "SimulationGroupNetwork"; parentNode.StateImageIndex = 1; StyleStruct ss = group.Style.StyleDic[pair.Key][0]; List<TreeNode> childNodes = this.GenerateNetworkSnapshotNodes(pair.Value, ss); this.AddMulitNodes(parentNode, childNodes); list.Add(parentNode); } return list; }
private void RenameGroupNode(ISimulationGroup group) { this.GetGroupNode(group.ID).Text = group.Name; }
private void RefreshGroupNode(ISimulationGroup group) { TreeNode groupNode = this.GetGroupNode(group.ID); this.ClearChildNodes(groupNode); this.AddResultNodes(group, groupNode); }