public ColorFormAction(CurrentSetProperty current, bool allowSetTrans, int transparent) { this.m_Transparent = 0; this.m_currentset = current; this.m_Transparent = transparent; this.m_AllowSetTrans = allowSetTrans; }
private void CreateCurrentSetProperty(string filePath) { CurrentSetProperty e = new CurrentSetProperty(); if (File.Exists(filePath)) { XmlDocument document = new XmlDocument(); document.Load(filePath); XmlNode firstChild = document.FirstChild.FirstChild; Dictionary<string, FieldType> dictionary = new Dictionary<string, FieldType>(); dictionary.Add("State", FieldType.State); dictionary.Add("Mobility", FieldType.Name | FieldType.Terminal | FieldType.Code); dictionary.Add("Service", FieldType.Service); dictionary.Add("Terminal", FieldType.Name | FieldType.Terminal); dictionary.Add("UserProfile", FieldType.SpatialMutilplexingGainFactor | FieldType.CIStandardDeviation_dB); Dictionary<string, FontStyle> fontStyleDic = new Dictionary<string, FontStyle>(); fontStyleDic.Add(FontStyle.Bold.ToString(), FontStyle.Bold); fontStyleDic.Add(FontStyle.Italic.ToString(), FontStyle.Italic); fontStyleDic.Add(FontStyle.Regular.ToString(), FontStyle.Regular); fontStyleDic.Add(FontStyle.Strikeout.ToString(), FontStyle.Strikeout); fontStyleDic.Add(FontStyle.Underline.ToString(), FontStyle.Underline); e.DType = DisplayType.DiscreteValues; XmlNode node2 = firstChild.FirstChild; e.FType = dictionary[node2.Attributes[0].Value]; int num = int.Parse(node2.Attributes[1].Value); Dictionary<short, SymbolElement> dictionary3 = new Dictionary<short, SymbolElement>(); Dictionary<short, string> dictionary4 = new Dictionary<short, string>(); for (int i = 0; i < num; i++) { XmlNode node3 = node2.ChildNodes[i]; short key = short.Parse(node3.Attributes[0].Value); float size = float.Parse(node3.Attributes["EMSize"].Value); FontFamily fontfamily = new FontFamily(node3.Attributes["FontFamily"].Value); FontStyle fontstyle = this.getXmlFontStyle(fontStyleDic, node3.Attributes["Style"].Value); Color fontcolor = this.getXmlColor(node3.Attributes["ForeColor"].Value); int num5 = int.Parse(node3.Attributes["SymbolValue"].Value); string str = node3.Attributes["Legend"].Value; SymbolElement element = new SymbolElement(num5, fontfamily, fontstyle, size, fontcolor); dictionary3.Add(key, element); dictionary4.Add(key, str); } e.Name = "SimulationSymbol"; e.OutDiscreteSymbolMap = dictionary3; e.OutDiscreColorMap = new Dictionary<short, Color>(); e.OutDiscreteLegendMap = dictionary4; SimulationDisProperty property2 = new SimulationDisProperty(this.m_SubSysInterface); property2.Correct(e); this.m_SimGroupManager.SimlationDisProperty = property2; this.FT = e.FType; this.DT = e.DType; this.isfirst = false; this.m_CurrentSetProperty = e; this.m_SimlationDisProperty = property2; this.ChangeNodeMsg(this.m_CurrentSetProperty); } }
private void ChangeNodeMsg(CurrentSetProperty csp) { foreach (TreeNode node in this.m_ParentNode.Nodes) { SimGroup group = this.m_SimGroupManager.FindGroup(node.Text); foreach (TreeNode node2 in node.Nodes) { this.RebuildSnapshotNode(csp, group.GroupDisplayUser, node2); } node.StateImageIndex = 1; } this.ShowUser(); }
private void cf_FormButtonClick(object sender, ColorFormAction e) { this.m_SimlationDisProperty = this.m_TempSimlationDisProperty; this.ChangeNodeMsg(e.CurrentSet); this.m_CurrentSetProperty = e.CurrentSet; this.DT = e.CurrentSet.DType; this.FT = e.CurrentSet.FType; this.isfirst = false; this.m_TempSimlationDisProperty.Correct(e.CurrentSet); this.m_SimGroupManager.SimlationDisProperty = this.m_SimlationDisProperty; ProjectSingleton.CurrentProject.NeedPromptSave = true; }
private void RebuildSnapshotNode(CurrentSetProperty csp, List<DisplayUser> groupDisplayUser, TreeNode snapNode) { snapNode.Nodes.Clear(); foreach (KeyValuePair<short, SymbolElement> pair in csp.OutDiscreteSymbolMap) { TreeNode node = new TreeNode(); short key = pair.Key; SymbolElement symbol = pair.Value; string str = csp.OutDiscreteLegendMap[key]; node.Text = str; node.ImageKey = "user"; node.SelectedImageKey = "user"; node.StateImageIndex = 1; snapNode.Nodes.Add(node); snapNode.StateImageIndex = 1; node.Tag = this.BingNodeUsers(groupDisplayUser, node, symbol, csp.FType); } }
public void Correct(CurrentSetProperty e) { base.ReplaceCurrentItemForSymbol(e); }
protected void ReplaceCurrentItemForSymbol(CurrentSetProperty e) { FieldType fType = e.FType; DisplayType dType = e.DType; if (this.Properties2DisplayAll == null) { throw new NullReferenceException("iColorBase not been implements."); } this.Properties2DisplayAll.IsAddToLegend = false; switch (dType) { case DisplayType.DiscreteValues: this.ReplaceDiscreteItemForSymbol(fType, e.OutDiscreteSymbolMap); break; case DisplayType.IntervalsValues: this.ReplaceIntervalItemForSymbol(fType, e.OutInterSymbolMap); break; } }
public ColorFormAction(CurrentSetProperty current) { this.m_Transparent = 0; this.m_currentset = current; }
private bool IsCurrentSetPropertyLegal(CurrentSetProperty currentSetProperty, ref int lineIndex) { if (currentSetProperty.OutInterColorMap != null) { foreach (CurrentSetProperty.IntervalValue value2 in currentSetProperty.OutInterColorMap.Keys) { lineIndex++; if (value2.Min > value2.Max) { return false; } } } return true; }
private void InitializeCurrent4UIntervalsSymbol(Field2ColorElements<IntervalsElement> ielements, CurrentSetProperty property) { if (ielements.DisType.Equals(ColorDisplayType.SimulationSymbol)) { foreach (IntervalsElement element in ielements.Elements) { CurrentSetProperty.IntervalValue key = new CurrentSetProperty.IntervalValue(element.Min, element.Max); this.m_CurrentProperty.OutInterSymbolMap.Add(key, element.Symbol); this.m_CurrentProperty.OutIntevLegendMap.Add(key, element.Legend); } } }
private void InitializeCurrent4UDiscreteSymbol(Field2ColorElements<DiscreteElement> delements, CurrentSetProperty property) { short key = 0; if (delements.DisType.Equals(ColorDisplayType.SimulationSymbol)) { foreach (DiscreteElement element in delements.Elements) { this.m_CurrentProperty.OutDiscreteSymbolMap.Add(key, element.Symbol); this.m_CurrentProperty.OutDiscreteLegendMap.Add(key, element.Legend); key = (short) (key + 1); } } }
private void InitializeCurrent4U() { this.m_CurrentProperty = new CurrentSetProperty(); if (this.m_Current.Properties2DisplayAll != null) { this.m_CurrentProperty.Name = this.m_Current.Properties2DisplayAll.Name; if (!this.InitializeCurrent4UDiscrete() && this.InitializeCurrent4UIntervals()) { } } }