Exemplo n.º 1
0
 private void AddTableContentOnlySymbol(TableLayoutPanel tlp, Field2ColorElements<DiscreteElement> f2discrete)
 {
     short row = 0;
     foreach (DiscreteElement element in f2discrete.Elements)
     {
         string strWithoutA;
         tlp.RowStyles.Add(new RowStyle(SizeType.Absolute, 17f));
         row = (short) (row + 1);
         tlp.Controls.Add(base.CreateNumberLabel(row), 0, row);
         tlp.Controls.Add(base.CreateSymbolLabel(element.Symbol), 1, row);
         if (element.Value.Contains("@"))
         {
             strWithoutA = this.GetStrWithoutA(element.Value);
         }
         else
         {
             strWithoutA = element.Value;
         }
         tlp.Controls.Add(base.CreateValueTextBox(strWithoutA), 2, row);
         if (element.Legend.Contains("@"))
         {
             strWithoutA = this.GetStrWithoutA(element.Legend);
         }
         else
         {
             strWithoutA = element.Legend;
         }
         tlp.Controls.Add(base.CreateLegendTextBox(strWithoutA), 3, row);
         tlp.Controls.Add(base.CreateIsEnableCheckBox(element.IsEnabled), 4, row);
     }
 }
Exemplo n.º 2
0
 private void AddTableContentOnly(TableLayoutPanel tlp, Field2ColorElements<DiscreteElement> f2discrete)
 {
     if (m_ColorDisplayType.Equals(ColorDisplayType.SimulationSymbol))
     {
         this.AddTableContentOnlySymbol(tlp, f2discrete);
     }
     else if (m_ColorDisplayType.Equals(ColorDisplayType.ColorColor))
     {
         this.AddTableContentOnlyColor(tlp, f2discrete);
     }
 }
Exemplo n.º 3
0
 protected Field2ColorElements<IntervalsElement> Field2Colors(FieldType fT, params IntervalsElement[] DiscElem)
 {
     Field2ColorElements<IntervalsElement> elements = new Field2ColorElements<IntervalsElement>();
     List<IntervalsElement> list = new List<IntervalsElement>();
     foreach (IntervalsElement element in DiscElem)
     {
         if (element.DisType != elements.DisType)
         {
             throw new ArgumentException("元素类型与集合指定的元素类型不匹配");
         }
         list.Add(element);
     }
     elements.Field = fT;
     elements.Elements = list;
     return elements;
 }
Exemplo n.º 4
0
 private void GetCurrentColorElements(TableLayoutPanel tlP)
 {
     this.m_CurrentDiscreteElements = new Field2ColorElements<DiscreteElement>(m_ColorDisplayType);
     List<DiscreteElement> currentColorElementsSymbol = new List<DiscreteElement>();
     if (m_ColorDisplayType.Equals(ColorDisplayType.SimulationSymbol))
     {
         currentColorElementsSymbol = this.GetCurrentColorElementsSymbol(tlP);
     }
     else if (m_ColorDisplayType.Equals(ColorDisplayType.ColorColor))
     {
         currentColorElementsSymbol = this.GetCurrentColorElementsColor(tlP);
     }
     this.m_CurrentDiscreteElements.Elements = currentColorElementsSymbol;
 }
Exemplo n.º 5
0
 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);
         }
     }
 }
Exemplo n.º 6
0
 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);
         }
     }
 }