Exemplo n.º 1
0
        private string method_6(ISymbol isymbol_0)
        {
            Guid   guid;
            object obj2;

            ESRI.ArcGIS.esriSystem.IPersistStream stream = (ESRI.ArcGIS.esriSystem.IPersistStream)isymbol_0;
            IMemoryBlobStream pstm    = new MemoryBlobStreamClass();
            IObjectStream     stream3 = new ObjectStreamClass
            {
                Stream = pstm
            };

            stream.GetClassID(out guid);
            stream.Save(pstm, 1);
            ((IMemoryBlobStreamVariant)pstm).ExportToVariant(out obj2);
            System.Array array  = obj2 as Array;
            byte[]       buffer = new byte[array.Length + 16];
            guid.ToByteArray().CopyTo(buffer, 0);
            array.CopyTo(buffer, 16);
            return(Convert.ToBase64String(buffer));
        }
Exemplo n.º 2
0
 private void objTree_AfterSelect(object sender, TreeViewEventArgs e)
 {
     try
     {
         if ((this.objTree.SelectedNode != null) && (this.objTree.SelectedNode.Tag != null))
         {
             IActiveView view;
             object      tag = null;
             tag = this.objTree.SelectedNode.Tag;
             if (tag is IIdentifyObj)
             {
                 IIdentifyObj obj3 = tag as IIdentifyObj;
                 this.Infolist.Visible = true;
                 if (obj3 is IFeatureIdentifyObj)
                 {
                     this.ifeature_0 = (obj3 as IRowIdentifyObject).Row as IFeature;
                     view            = (IActiveView)this.ibasicMap_0;
                     this.method_6(obj3.Layer as IFeatureLayer, this.ifeature_0);
                     obj3.Flash(view.ScreenDisplay);
                 }
                 else
                 {
                     int          num;
                     string[]     strArray;
                     string       str;
                     string       str2;
                     ListViewItem item;
                     if (obj3 is IRasterIdentifyObj2)
                     {
                         this.panel5.AutoSize = true;
                         this.Infolist.Items.Clear();
                         num      = 0;
                         strArray = new string[2];
                         while (true)
                         {
                             try
                             {
                                 (obj3 as IRasterIdentifyObj2).GetPropAndValues(num, out str, out str2);
                                 if (str == null)
                                 {
                                     break;
                                 }
                                 strArray[0] = str;
                                 strArray[1] = str2;
                                 item        = new ListViewItem(strArray);
                                 this.Infolist.Items.Add(item);
                                 num++;
                             }
                             catch
                             {
                                 break;
                             }
                         }
                         view = (IActiveView)this.ibasicMap_0;
                         obj3.Flash(view.ScreenDisplay);
                     }
                     else
                     {
                         Exception exception;
                         if (obj3 is ITinIdentifyObj2)
                         {
                             this.panel5.AutoSize = true;
                             this.Infolist.Items.Clear();
                             num      = 0;
                             strArray = new string[2];
                             while (true)
                             {
                                 try
                                 {
                                     (obj3 as ITinIdentifyObj2).SetupEntity();
                                     (obj3 as ITinIdentifyObj2).GetPropAndValues(num, out str, out str2);
                                     if (str == null)
                                     {
                                         break;
                                     }
                                     strArray[0] = str;
                                     strArray[1] = str2;
                                     item        = new ListViewItem(strArray);
                                     this.Infolist.Items.Add(item);
                                     num++;
                                 }
                                 catch (Exception exception1)
                                 {
                                     exception = exception1;
                                     string message = exception.Message;
                                     break;
                                 }
                             }
                             view = (IActiveView)this.ibasicMap_0;
                             obj3.Flash(view.ScreenDisplay);
                         }
                         else if (obj3 is ICadIdentifyObj2)
                         {
                             this.panel5.AutoSize = true;
                             this.Infolist.Items.Clear();
                             num      = 0;
                             strArray = new string[2];
                             while (true)
                             {
                                 try
                                 {
                                     (obj3 as ICadIdentifyObj2).SetupEntity();
                                     (obj3 as ICadIdentifyObj2).GetPropAndValues(num, out str, out str2);
                                     if (str == null)
                                     {
                                         break;
                                     }
                                     strArray[0] = str;
                                     strArray[1] = str2;
                                     item        = new ListViewItem(strArray);
                                     this.Infolist.Items.Add(item);
                                     num++;
                                 }
                                 catch (Exception exception2)
                                 {
                                     exception = exception2;
                                     string text2 = exception.Message;
                                     break;
                                 }
                             }
                             view = (IActiveView)this.ibasicMap_0;
                             obj3.Flash(view.ScreenDisplay);
                         }
                         else if (obj3 is IIdentifyObject)
                         {
                             object obj4;
                             object obj5;
                             this.panel5.AutoSize = true;
                             (obj3 as IIdentifyObject).PropertySet.GetAllProperties(out obj4, out obj5);
                             this.Infolist.Items.Clear();
                             strArray = new string[2];
                             System.Array array  = obj4 as Array;
                             System.Array array2 = obj5 as Array;
                             for (int i = 0; i < array.Length; i++)
                             {
                                 strArray[0] = array.GetValue(i).ToString();
                                 strArray[1] = array2.GetValue(i).ToString();
                                 item        = new ListViewItem(strArray);
                                 this.Infolist.Items.Add(item);
                             }
                             view = (IActiveView)this.ibasicMap_0;
                             obj3.Flash(view.ScreenDisplay);
                         }
                     }
                 }
             }
             else if (tag is IFeature)
             {
                 this.Infolist.Visible = true;
                 this.ifeature_0       = tag as IFeature;
                 view = (IActiveView)this.ibasicMap_0;
                 this.method_5(this.ifeature_0);
                 Flash.FlashFeature(view.ScreenDisplay, this.ifeature_0);
             }
             else
             {
                 this.Infolist.Visible = false;
             }
         }
     }
     catch
     {
     }
 }