コード例 #1
0
 public void Initialize(IDictionary <string, object> dict)
 {
     this.RendererType  = "";
     this.Label         = "";
     this.Description   = "";
     this.DefaultSymbol = null;
     foreach (KeyValuePair <string, object> current in dict)
     {
         if (current.Key == "type")
         {
             this.RendererType = (current.Value as string);
         }
         else if (current.Key == "label")
         {
             this.Label = (current.Value as string);
         }
         else if (current.Key == "description")
         {
             this.Description = (current.Value as string);
         }
         else if (current.Key == "defaultsymbol")
         {
             this.DefaultSymbol = new AGSSymbol();
             this.DefaultSymbol.Initialize(current.Value as IDictionary <string, object>);
         }
     }
 }
コード例 #2
0
        public AGSSimpleRenderer(IDictionary <string, object> dict)
        {
            base.Initialize(dict);
            this.Symbol = null;
            object obj;

            if (dict.TryGetValue("symbol", out obj))
            {
                IDictionary <string, object> dictionary = obj as IDictionary <string, object>;
                object obj2;
                if (dictionary.TryGetValue("type", out obj2))
                {
                    string a = obj2 as string;
                    if (a == "esriSMS")
                    {
                        this.Symbol = new AGSSimpleMarkerSymbol(dictionary);
                        return;
                    }
                    if (a == "esriSLS")
                    {
                        this.Symbol = new AGSSimpleLineSymbol(dictionary);
                        return;
                    }
                    if (a == "esriSFS")
                    {
                        this.Symbol = new AGSSimpleFillSymbol(dictionary);
                        return;
                    }
                    if (a == "esriPMS")
                    {
                        this.Symbol = new AGSPictureMarkerSymbol(dictionary);
                        return;
                    }
                    if (a == "esriPFS")
                    {
                        this.Symbol = new AGSPictureFillSymbol(dictionary);
                        return;
                    }
                    if (a == "esriTS")
                    {
                        this.Symbol = null;
                    }
                }
            }
        }