Esempio n. 1
0
        private void FlashFeature_ItemClick(object sender, ItemClickEventArgs e)
        {
            IFeatureFindData2 tag = null;
            int num;

            new ArrayClass();
            IEnvelope other = null;

            for (num = 0; num < this.listView1.SelectedItems.Count; num++)
            {
                tag = this.listView1.SelectedItems[num].Tag as IFeatureFindData2;
                if (num == 0)
                {
                    other = tag.Feature.Shape.Envelope;
                }
                else
                {
                    other.Union(tag.Feature.Shape.Envelope);
                }
            }
            IRelationalOperator extent = this.iactiveView_0.Extent as IRelationalOperator;

            if (!extent.Contains(other))
            {
                this.iactiveView_0.Extent = other;
                this.iactiveView_0.Refresh();
                this.iactiveView_0.ScreenDisplay.UpdateWindow();
            }
            for (num = 0; num < this.listView1.SelectedItems.Count; num++)
            {
                tag = this.listView1.SelectedItems[num].Tag as IFeatureFindData2;
                Flash.FlashFeature(this.iactiveView_0.ScreenDisplay, tag.Feature);
            }
        }
Esempio n. 2
0
 private void FlashObject_ItemClick(object sender, ItemClickEventArgs e)
 {
     if (this.m_list.Count == 1)
     {
         IActiveView pMap    = this.m_pMap as IActiveView;
         IFeature    feature = this.m_list[0] as IFeature;
         Flash.FlashFeature(pMap.ScreenDisplay, feature);
     }
     else if (this.m_list.Count > 1)
     {
         this.m_pMultiAttributeListControl.FlashObject();
     }
 }
Esempio n. 3
0
 private void ZoomToFeature_Click(object sender, EventArgs e)
 {
     if (sender is Control)
     {
         (sender as Control).Hide();
     }
     if (this.ifeature_1 != null)
     {
         CommonHelper.Zoom2Feature(this.ibasicMap_0 as IActiveView, this.ifeature_1);
         (this.ibasicMap_0 as IActiveView).ScreenDisplay.UpdateWindow();
         Flash.FlashFeature((this.ibasicMap_0 as IActiveView).ScreenDisplay, this.ifeature_1);
     }
 }
Esempio n. 4
0
        private void ZoomToFeature_ItemClick(object sender, ItemClickEventArgs e)
        {
            IFeatureFindData2 tag = null;
            int    num;
            IArray array = new ArrayClass();

            for (num = 0; num < this.listView1.SelectedItems.Count; num++)
            {
                tag = this.listView1.SelectedItems[num].Tag as IFeatureFindData2;
                array.Add(tag.Feature);
            }
            CommonHelper.Zoom2Features(this.iactiveView_0, array);
            this.iactiveView_0.ScreenDisplay.UpdateWindow();
            for (num = 0; num < this.listView1.SelectedItems.Count; num++)
            {
                tag = this.listView1.SelectedItems[num].Tag as IFeatureFindData2;
                Flash.FlashFeature(this.iactiveView_0.ScreenDisplay, tag.Feature);
            }
        }
Esempio n. 5
0
        private void method_8(int int_0, int int_1)
        {
            TreeNode nodeAt = this.objTree.GetNodeAt(int_0, int_1);

            if ((nodeAt != null) && (nodeAt.Tag != null))
            {
                object      tag  = nodeAt.Tag;
                IActiveView view = (IActiveView)this.ibasicMap_0;
                if (tag is IIdentifyObj)
                {
                    (tag as IIdentifyObj).Flash(view.ScreenDisplay);
                }
                else
                {
                    IFeature oOlOOlOO = nodeAt.Tag as IFeature;
                    if (oOlOOlOO != null)
                    {
                        Flash.FlashFeature(view.ScreenDisplay, oOlOOlOO);
                    }
                }
            }
        }
Esempio n. 6
0
        private void ZoomToFeature_ItemClick(object sender, ItemClickEventArgs e)
        {
            IFeatureFindData2 tag = null;
            int    num;
            IArray array = new ArrayClass();

            for (num = 0; num < this.listView1.SelectedItems.Count; num++)
            {
                tag = this.listView1.SelectedItems[num].Tag as IFeatureFindData2;
                array.Add(tag.Feature);
            }
            if (this.ibasicMap_0 is IActiveView)
            {
                Yutai.ArcGIS.Common.Helpers.CommonHelper.Zoom2Features(this.ibasicMap_0 as IActiveView, array);
                (this.ibasicMap_0 as IActiveView).ScreenDisplay.UpdateWindow();
                for (num = 0; num < this.listView1.SelectedItems.Count; num++)
                {
                    tag = this.listView1.SelectedItems[num].Tag as IFeatureFindData2;
                    Flash.FlashFeature((this.ibasicMap_0 as IActiveView).ScreenDisplay, tag.Feature);
                }
            }
        }
Esempio n. 7
0
 private void method_0(int int_0, int int_1)
 {
     try
     {
         System.Windows.Forms.TreeNode nodeAt = this.treeView1.GetNodeAt(int_0, int_1);
         if (nodeAt != null)
         {
             if (nodeAt.Parent != null)
             {
                 IActiveView   activeView   = (IActiveView)this.imap_0;
                 int           iD           = (int)nodeAt.Tag;
                 IFeatureClass featureClass = nodeAt.Parent.Tag as IFeatureClass;
                 IFeature      feature      = featureClass.GetFeature(iD);
                 if (feature != null)
                 {
                     Flash.FlashFeature(activeView.ScreenDisplay, feature);
                 }
             }
         }
     }
     catch
     {
     }
 }
Esempio n. 8
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
     {
     }
 }