private void ChangeGroupNodeStateIndex(IPredictionGroup group) { if (group.State == CalculateState.SuccessfulEnd) { TreeNode node = this.FindGroupNode(group); } }
public AllotingRNForm(IPredictionGroup group, IApplicationContext appContext, AllotingRNProperty allotProperty) { InitializeComponent(); m_Group = group; m_AppContext = appContext; m_AlloteProperty = allotProperty; LoadData(); }
public static void AddPredicitionStudy(List<IStudy> selectedStudyList, TreeNode treeNode, IPredictionGroup predictionGroup) { if (treeNode.StateImageIndex == 2) { string name = treeNode.Name; IStudy item = predictionGroup.Find(name); if (item != null) { selectedStudyList.Add(item); } } }
/// <summary> /// 构造函数 /// </summary> /// <param name="tdGroupMgr"></param> public TDSCDMAPropertyForm(IPredictionGroup group) { InitializeComponent(); m_tdPredicGroup = (TDPredictionGroup)group; m_appContext = m_tdPredicGroup.appContext; m_TDUIParam = m_tdPredicGroup.tdUIParam; m_TranfficForApplication = ServiceHelper.Lookup<ITrafficForApplication>(m_appContext); m_GeoProvider = ServiceHelper.Lookup<IGeoProvider>(m_appContext); m_tdTerminalList = m_TranfficForApplication.FindTerminalList(NetWorkType.TDSCDMA); m_CsServiceList = m_TranfficForApplication.UnionCsServiceList; m_PsServiceList = m_TranfficForApplication.UnionPsServiceList; Init(); }
public StudyPropertiesForm(StudyPropertyFormMgr studyFormMgr, IPredictionGroup group, IStudy study, IApplicationContext appContext) { this.InitializeComponent(); this.m_StudyPropertyMgr = studyFormMgr; this.m_StudyPropertyMgr.DataGridView = this.dgvLegend; this.m_Study = study; this.m_Group = group; this.m_AppContext = appContext; this.m_Saved = false; this.m_IsIntervalStudy = study is IIntervalStudy; this.m_ShadingConfig = new ShadingConfig(); this.CheckAll.CheckedChanged -= new EventHandler(this.CheckAll_CheckedChanged); this.Init(); this.CheckAll.CheckedChanged += new EventHandler(this.CheckAll_CheckedChanged); }
private TreeNode CreateGroupNodeWithStudy(IPredictionGroup group) { if (group == null) { return null; } TreeNode[] nodes = new TreeNode[group.StudyList.Count]; for (int i = 0; i < group.StudyList.Count; i++) { nodes[i] = this.CreatePredictionStudyNodeOnly(group.StudyList[i]); ((ITriStateTreeViewContorller) this.m_RootNode.TreeView).AddNodeDragdropEvent(nodes[i], new EventHandler(this.HandleStudyDragdrop)); } TreeNode node = this.CreatePredictionGroupNodeOnly(group); ((ITriStateTreeViewContorller) this.m_RootNode.TreeView).AddNodeDragdropEvent(node, new EventHandler(this.HandleGroupDragdrop)); node.Nodes.AddRange(nodes); return node; }
public void ExportToCSV(string filepath, TreeNode treeNode, List<double> range) { this.m_StatusBarService.SetCurProgress(0); if (treeNode != null) { if (treeNode.Level == 1) { this.m_PredictionGroup = this.m_ControllerMgr.IPredictionModel.GetGroupByName(treeNode.Text); } else { this.m_PredictionGroup = this.m_ControllerMgr.IPredictionModel.GetGroupByName(treeNode.Parent.Text); } this.m_range = range; this.m_StatusBarService.SetCurProgress(1); List<IStudy> studyList = this.GetStudyList(treeNode); ExportBinData data = new ExportBinData(this.m_appContext, this.m_PredictionGroup); ExportByPilotParam parameter = new ExportByPilotParam(filepath, studyList, this.m_BasicStudyName, range); ParameterizedThreadStart start = new ParameterizedThreadStart(data.ExportDataByPilotPower); new Thread(start).Start(parameter); } }
private void CreateLegendNodeOfOneStudy(IStudy study, IPredictionGroup group) { if (group.State == CalculateState.SuccessfulEnd) { TreeNode groupNode = this.FindGroupNode(group); TreeNode node2 = this.FindStudyNode(study, groupNode); MainFormSingleton.CurrentMainForm.MainForm.BeginInvoke(new ClearTreeNode(this.ClearStudyLegendNodeArr), new object[] { node2 }); List<GeoRasterStyle> list = new List<GeoRasterStyle>(); if (study is IDiscreteStudy) { IDiscreteStudy study2 = study as IDiscreteStudy; list.AddRange(study2.StyleList.ConvertAll<GeoRasterStyle>(new Converter<GeoDiscreteSytle, GeoRasterStyle>(this.ConvertTo))); } else { IIntervalStudy study3 = study as IIntervalStudy; list.AddRange(study3.StyleList.ConvertAll<GeoRasterStyle>(new Converter<GeoIntervalSytle, GeoRasterStyle>(this.ConvertTo))); } TreeNode[] nodeArray = new TreeNode[list.Count]; int index = 0; foreach (GeoRasterStyle style in list) { TreeNode node = new TreeNode(); node.Name = style.FeatureName; node.Text = style.FeatureName; node.ImageKey = "Study"; node.SelectedImageKey = node.ImageKey; node.StateImageIndex = this.GetLegendNodeStateImageIndex(style); (this.m_RootNode.TreeView as ITriStateTreeViewContorller).SetTreeNodeDragdropable(node, false); nodeArray[index] = node; index++; } MainFormSingleton.CurrentMainForm.MainForm.BeginInvoke(new AddRangeTreeNode(this.AddLegendNodeOfOneStudy), new object[] { node2, nodeArray }); MainFormSingleton.CurrentMainForm.MainForm.BeginInvoke(new Huawei.UNet.Prediction.View.Controlls.RefreshNodeStateIndex(this.RefreshNodeStateIndex), new object[] { node2, study.CheckState }); MainFormSingleton.CurrentMainForm.MainForm.BeginInvoke(new Huawei.UNet.Prediction.View.Controlls.RefreshNodeStateIndex(this.RefreshNodeStateIndex), new object[] { groupNode, group.GetCheckState() }); MainFormSingleton.CurrentMainForm.MainForm.BeginInvoke(new Huawei.UNet.Prediction.View.Controlls.RefreshNodeStateIndex(this.RefreshNodeStateIndex), new object[] { this.m_RootNode, this.m_ControllerMgr.IPredictionModel.GetCheckState() }); } }
private string GetSavePath(IPredictionGroup group, IStudy ps) { string currentProjectLossPath = this.m_IProjectManager.CurrentProjectLossPath; if (string.IsNullOrEmpty(currentProjectLossPath)) { currentProjectLossPath = this.m_IProjectManager.DefaultProjectLossPath; } string str3 = currentProjectLossPath; return (str3 + @"\" + group.Name + ps.Name + "_toGIS.tmp"); }
private void GetIntervalLegend(IPredictionGroup group, IIntervalStudy study) { string key = group.Name + study.Name; int index = 0; float coverArea = 0f; float area = 0f; float percentage = 0f; Dictionary<MaxMinValue, int> maxMinDic = this.psm.CalcIntervalValue(study); if (!this.m_IntervalCluterCoverage.ContainsKey(key)) { this.GetClutterCoverage(study, key); } if (maxMinDic != null) { if (this.m_Group.Region != null) { area = (float) this.m_Group.Region.RegionArea; } Dictionary<MaxMinValue, List<double>> clutterDic = new Dictionary<MaxMinValue, List<double>>(); foreach (GeoRasterStyle style in this.m_IntervalCluterCoverage[key].Keys) { clutterDic[(MaxMinValue) style.Value] = this.m_IntervalCluterCoverage[key][style]; } this.cycleMaxMinValue(study, ref index, ref coverArea, area, ref percentage, maxMinDic, clutterDic); this.m_GroupPercentage = this.SolvePrecisionBelow_1(this.m_GroupPercentage); this.m_GroupArea = this.SolvePrecision((double) this.m_GroupArea, this.m_Mode); if ((maxMinDic != null) && (maxMinDic.Keys.Count > 0)) { this.GetCumulatePer(maxMinDic.Keys.Count); } } }
private void GetDiscreteLegend(IPredictionGroup group, IDiscreteStudy study) { short num = 0; float regionArea = 0f; float num3 = 0f; float percentage = 0f; Dictionary<short, int> dictionary = this.psm.CalculateRate(study); if (this.m_Group.Region != null) { regionArea = (float) this.m_Group.Region.RegionArea; } if (dictionary != null) { string key = group.Name + study.Name; if (!this.m_DiscreteCluterCoverage.ContainsKey(key)) { this.GetClutterCoverage(study, key); } Dictionary<GeoRasterStyle, List<double>> dictionary2 = this.m_DiscreteCluterCoverage[key]; for (int i = 0; i < study.StyleList.Count; i++) { short num6 = Convert.ToInt16(study.StyleList[i].Value); this.dgvExpoertData.Rows.Add(); string featureName = study.StyleList[i].FeatureName; Color color = study.StyleList[i].Color; percentage = ((float) dictionary[num6]) / ((float) this.m_Group.NumPointInPolygon); percentage = this.SolvePrecisionBelow_1(percentage); num3 = regionArea * percentage; this.m_GroupArea += num3; this.m_GroupPercentage += percentage; num3 = this.SolvePrecision((double) num3, this.m_Mode); this.dgvExpoertData.Rows[this.m_Index].Cells["GroupNameOrLegend"].Value = this.m_EmptyString + featureName; this.dgvExpoertData.Rows[this.m_Index].Cells["CoverArea"].Value = num3; this.dgvExpoertData.Rows[this.m_Index].Cells["Percentage"].Value = this.SolvePrecision((double) (percentage * 100f), this.m_Mode) + "%"; List<double> list = dictionary2[study.StyleList[i]]; for (int j = 0; j < this.m_Clutters.Count; j++) { this.dgvExpoertData.Rows[this.m_Index].Cells[this.m_Clutters[j]].Value = this.SolvePrecision(list[j] * 100.0, this.m_Mode) + "%"; } this.m_Index++; num = (short) (num + 1); } this.m_GroupPercentage = this.SolvePrecisionBelow_1(this.m_GroupPercentage); this.m_GroupArea = this.SolvePrecision((double) this.m_GroupArea, 4); if (dictionary2.Keys.Count > 0) { this.GetCumulatePer(dictionary2.Keys.Count); } } }
private void fillFilter(IPredictionGroup group) { List<IStudy> list = new List<IStudy>(); if (group.State == CalculateState.SuccessfulEnd) { foreach (IStudy study in group.StudyList) { if (study.CheckState != PredictionCheckedState.Unchecked) { list.Add(study); } } if ((list == null) || (list.Count == 0)) { list = null; } else { this.m_Filter[group] = list; } } }
public Form GetGroupPropertyWindow(IPredictionGroup group) { return new LteGroupPropertyForm(group, this.m_AppContext); }
private bool IsHave(IPredictionGroup pg) { foreach (IStudy study in pg.StudyList) { if (study.Name == ((string) this.cboStudy.SelectedItem)) { return true; } } return false; }
private void ExportOneGroupDataAsReport(IPredictionGroup group) { List<IStudy> list; this.m_Filter.TryGetValue(group, out list); if ((list != null) && (list.Count != 0)) { this.m_Group = group; foreach (IStudy study in list) { this.m_GroupPercentage = 0f; this.m_GroupArea = 0f; this.dgvExpoertData.Rows.Add(); int index = this.m_Index; this.dgvExpoertData.Rows[this.m_Index].Cells["GroupNameOrLegend"].Value = group.Name + " " + study.Name; this.dgvExpoertData.Rows[this.m_Index].Cells["GroupNameOrLegend"].Style.Font = new Font("Arial", 11f, FontStyle.Bold); this.m_Index++; this.ExportStudyDataDisplay(group, study); this.dgvExpoertData.Rows[index].Cells["CoverArea"].Value = this.m_GroupArea; this.dgvExpoertData.Rows[index].Cells["CoverArea"].Style.Font = new Font("", 10f, FontStyle.Bold); if (this.m_GroupPercentage > 0.9999f) { this.m_GroupPercentage = 1f; } this.dgvExpoertData.Rows[index].Cells["Percentage"].Value = (this.m_GroupPercentage * 100f) + "%"; this.dgvExpoertData.Rows[index].Cells["Percentage"].Style.Font = new Font("", 10f, FontStyle.Bold); } this.m_Group = null; } }
public void CreatXYForALlGroup(IPredictionGroup pg, System.Drawing.Color color, int count, string studyname) { IStudy study = pg.Find(studyname); Dictionary<MaxMinValue, int> intCountDic = this.m_PredictionStatisticsManager.CalcIntervalValue((IIntervalStudy) study); this.CreatGraphCDF(pg.Name, study as IIntervalStudy, color, count, intCountDic); }
private string CreateFilePath(IPredictionGroup group, IStudy study) { string str = group.Name + "_" + study.Name + "_legend"; string str2 = "Legend file saving path"; string str3 = "(*.xml)|*.xml"; SaveFileDialog dialog = new SaveFileDialog(); dialog.Filter = str3; dialog.FileName = str; dialog.Title = str2; dialog.DefaultExt = ".xml"; if (DialogResult.Cancel == dialog.ShowDialog()) { return ""; } return dialog.FileName; }
public Form GetGroupPropertyWindow(IPredictionGroup group) { TDSCDMAPropertyForm tdPropertyForm = new TDSCDMAPropertyForm(group); return tdPropertyForm; }
public bool CalculateEngineRun(IPredictionGroup group, List<Transceiver> tranceiverList) { return true; }
private TreeNode CreatePredictionGroupNodeOnly(IPredictionGroup group) { TreeNode node = new TreeNode(); node.Text = group.Name; node.Name = group.Name; node.Tag = group.GroupId; node.ContextMenuStrip = this.m_PredictionContextMenuView.GetGroupCtxtMenuStrip(); node.ImageKey = group.Locked ? PredictionResource.PREDICTION_LOCK : PredictionResource.PREDICTION_UNLOCK; node.SelectedImageKey = node.ImageKey; node.StateImageIndex = 2; return node; }
private void ExportStudyDataAsReport() { this.m_GroupPercentage = 0f; this.m_GroupArea = 0f; this.m_Group = this.m_ControllerMgr.IPredictionModel.GetGroupByName(this.m_TreeNode.Parent.Text); if (this.m_Group.State == CalculateState.SuccessfulEnd) { IStudy study = this.m_Group.Find(this.m_TreeNode.Text); this.dgvExpoertData.Rows.Add(); this.dgvExpoertData.Rows[0].Cells["GroupNameOrLegend"].Value = this.m_Group.Name + " " + study.Name; this.dgvExpoertData.Rows[0].Cells["GroupNameOrLegend"].Style.Font = new Font("Arial", 11f, FontStyle.Bold); this.m_Index++; this.ExportStudyDataDisplay(this.m_Group, study); this.dgvExpoertData.Rows[0].Cells["CoverArea"].Value = this.m_GroupArea; this.dgvExpoertData.Rows[0].Cells["CoverArea"].Style.Font = new Font("", 10f, FontStyle.Bold); if (this.m_GroupPercentage > 0.9999f) { this.m_GroupPercentage = 1f; } this.dgvExpoertData.Rows[0].Cells["Percentage"].Value = (this.m_GroupPercentage * 100f) + "%"; this.dgvExpoertData.Rows[0].Cells["Percentage"].Style.Font = new Font("", 10f, FontStyle.Bold); } }
private TreeNode FindGroupNode(IPredictionGroup group) { TreeNode rootNode = this.m_RootNode; return this.FindGroupNode(rootNode, group.GroupId); }
private void ExportStudyDataDisplay(IPredictionGroup group, IStudy study) { this.Text = this.m_TreeNode.Text; IDiscreteStudy study2 = study as IDiscreteStudy; IIntervalStudy study3 = study as IIntervalStudy; if (study2 != null) { this.GetDiscreteLegend(group, study2); } else { this.GetIntervalLegend(group, study3); } this.dgvExpoertData.ReadOnly = true; }
public GSMPropertyForm(IPredictionGroup group) { InitializeComponent(); m_GsmPredicGroup = (GSMPredicGroup)group; Init(); }
private void CreateSpecialStudyStyle(IPredictionGroup group) { foreach (IStudy study in group.StudyList) { this.m_StyleCreater.CreateBestServerStyle(study, this.m_TransceiverList); this.m_StyleCreater.CreateMCSStyle(study); } }