Exemple #1
0
 private List<LegendUtility> GetStyleStructLegend(string title, StyleStruct ss)
 {
     List<LegendUtility> list = new List<LegendUtility>();
     List<LegendUtility.LegendUtil> cutline = new List<LegendUtility.LegendUtil>();
     foreach (GeoPointStyle style in ss.Styles)
     {
         LegendUtility.LegendUtil item = new LegendUtility.LegendUtil(style.SymbolValue, style.SymbolFont.FontFamily, style.SymbolFont.Style, (float)style.IconSize.Width, style.Color, style.Name);
         cutline.Add(item);
     }
     LegendUtility utility = new LegendUtility(title, cutline);
     list.Add(utility);
     return list;
 }
Exemple #2
0
 private void AddColorsToLegend(Dictionary<string, Pen> vector)
 {
     if (this.checkBox_Legend.Checked)
     {
         List<LegendUtility.LegendUtil> cutline = new List<LegendUtility.LegendUtil>();
         foreach (KeyValuePair<string, Pen> pair in vector)
         {
             LegendUtility.LegendUtil item = new LegendUtility.LegendUtil(pair.Value.Color, pair.Key);
             cutline.Add(item);
         }
         LegendUtility utility = new LegendUtility(this.m_CurrentLegendUtilName, cutline);
         this.m_LM.Add("GIS", new LegendUtility[] { utility });
         this.m_lutil = cutline;
     }
     else
     {
         this.m_LM.Clear("GIS", new string[] { this.m_CurrentLegendUtilName });
     }
 }
Exemple #3
0
 protected List<LegendUtility.LegendUtil> ConvertDisplayArgsToLegendUtil(List<ColorLegendArgs.LegendArgs> LegendParams)
 {
     List<LegendUtility.LegendUtil> list = new List<LegendUtility.LegendUtil>();
     foreach (ColorLegendArgs.LegendArgs args in LegendParams)
     {
         LegendUtility.LegendUtil util;
         if (args.DisType.Equals(ColorDisplayType.SimulationSymbol))
         {
             util = new LegendUtility.LegendUtil(args.Symbol.SymbolValue, args.Symbol.Family, args.Symbol.Style, args.Symbol.EMSize, args.Symbol.ForeColor, args.Description);
         }
         else
         {
             util = new LegendUtility.LegendUtil(args.Symbol.ForeColor, args.Description);
         }
         list.Add(util);
     }
     return list;
 }