예제 #1
0
파일: GMapView.cs 프로젝트: truonghinh/TnX
 void _xemVungGiaDaTinh_XemVungGiaDat(object sender, LandEventArgs e)
 {
     //MessageBox.Show("line 102 GMapView"+e.Mathua.ToString());
     _landPriceView.CurrentMathua = e.Mathua;
     _landPriceView.Config = CurrentConfig.CallMe();
     _landPriceView.Show();
     _landPriceView.LoadPrice();
 }
예제 #2
0
        /// <summary>
        /// Occurs when this command is clicked
        /// </summary>
        public override void OnClick()
        {
            IMapControl4 mapControl = null;
            LandEventArgs evt = new LandEventArgs();
            _mathua = new List<object>();
            _thuaFt = new List<IFeature>();
            try
            {
                //MessageBox.Show("line 201 XemVunggiaCongbo");
                if (m_hookHelper.Hook is IMapControl4)
                {
                    //MessageBox.Show("line 204 XemVunggiaCongbo");
                    mapControl = (IMapControl4)m_hookHelper.Hook;
                }
                else if (m_hookHelper.Hook is IToolbarControl2)
                {
                    IToolbarControl2 toolbarControl = (IToolbarControl2)m_hookHelper.Hook;
                    mapControl = (IMapControl4)toolbarControl.Buddy;
                }

            }
            catch (Exception ex)
            {
                System.Diagnostics.Trace.WriteLine("line 216 XemVunggiaCongbo, ex when click " + ex.Message);
            }
            //MessageBox.Show("line 204 XemVunggiaCongbo");
            if (m_hookHelper != null)
            {
                //TODO: Add Map/PageLayout related logic
                //MessageBox.Show(this.Name);
                IEnumFeature numFeature = (IEnumFeature)mapControl.ActiveView.FocusMap.FeatureSelection;
                //MessageBox.Show("line 224 num=" + mapControl.Map.LayerCount.ToString());
                IFeature feature = null;
                try
                {
                    while ((feature = numFeature.Next()) != null)
                    {
                        int index = feature.Fields.FindField("mathua");
                        if (index == -1)
                        {
                            index = feature.Fields.FindField("mathua_");
                        }
                        object mt = feature.get_Value(index);
                        _mathua.Add(mt);
                        _thuaFt.Add(feature);
                        evt.Mathua = mt;

                    }

                }
                catch (Exception ex) { MessageBox.Show("line 238 ex=" + ex.ToString()); }

                //if (feature == null)
                //{
                //    MessageBox.Show("line 242 XemTatCaVungGiaDaCongBo null");
                //}
                //MessageBox.Show(feature.get_Value(feature.Fields.FindField(nameOfMaThua)).ToString());

                //mathua = feature.get_Value(index).ToString();
                _view.ClearMaThua();
                _view.MaThua = _mathua;
                _view.MyFeature = _thuaFt;
                _view.Show();
                //foreach (ILandpriceView p in _views)
                //{
                //    p.CurrentMathua = mathua;
                //    //_view.Config = CurrentConfig.CallMe();
                //    p.Show();
                //    p.LoadPrice();
                //}
            }
            if (m_hookHelper != null)
            {
                //TODO: Add Map/PageLayout related logic
            }
            else if (m_sceneHookHelper != null)
            {
                //TODO: Add Scene related logic
            }
            else if (m_globeHookHelper != null)
            {
                //TODO: Add Globe related logic
            }
        }
예제 #3
0
        /// <summary>
        /// Occurs when this command is clicked
        /// </summary>
        public override void OnClick()
        {
            if (_views == null)
            {

                return;
            }
            IMapControl4 mapControl = null;
            LandEventArgs evt = new LandEventArgs();
            try
            {

                if (m_hookHelper.Hook is IMapControl4)
                    mapControl = (IMapControl4)m_hookHelper.Hook;
                else if (m_hookHelper.Hook is IToolbarControl2)
                {
                    IToolbarControl2 toolbarControl = (IToolbarControl2)m_hookHelper.Hook;
                    mapControl = (IMapControl4)toolbarControl.Buddy;
                }

            }
            catch (Exception ex)
            {
                System.Diagnostics.Trace.WriteLine(ex.Message);
            }
            if (m_hookHelper != null)
            {
                //TODO: Add Map/PageLayout related logic
                //MessageBox.Show(this.Name);
                IEnumFeature numFeature = (IEnumFeature)mapControl.ActiveView.FocusMap.FeatureSelection;
                IFeature feature = numFeature.Next();
                //MessageBox.Show(feature.get_Value(feature.Fields.FindField(nameOfMaThua)).ToString());
                int index = feature.Fields.FindField("mathua");
                if (index == -1)
                {
                    index = feature.Fields.FindField("mathua_");
                }
                mathua = feature.get_Value(index).ToString();
                evt.Mathua = mathua;
                foreach (ILandpriceView p in _views)
                {
                    p.CurrentMathua = mathua;
                    //_view.Config = CurrentConfig.CallMe();
                    p.Show();
                    p.LoadPrice();
                }
                OnChanged(evt);
            }
            else if (m_sceneHookHelper != null)
            {
                //TODO: Add Scene related logic
            }
            else if (m_globeHookHelper != null)
            {
                //TODO: Add Globe related logic
            }
        }
예제 #4
0
파일: GMapView.cs 프로젝트: truonghinh/TnX
        void _landDetailCmd_XemThongTin(object sender, LandEventArgs e)
        {
            //MessageBox.Show(string.Format("line 49 - GMapView {0}", e.Mathua));
            //if (_landPriceView != null)
            //{

                _landPricePublishedView.CurrentMathua = e.Mathua;
                _landPricePublishedView.Config = CurrentConfig.CallMe();
                _landPricePublishedView.Show();
                _landPricePublishedView.LoadPrice();
            //}
        }
예제 #5
0
 /// <summary>
 /// Triggers the Changed event.
 /// </summary>
 public virtual void OnChanged(LandEventArgs ea)
 {
     if (XemVungGiaDat != null)
         XemVungGiaDat(null/*this*/, ea);
 }
예제 #6
0
 /// <summary>
 /// Triggers the Changed event.
 /// </summary>
 public virtual void OnChanged(LandEventArgs ea)
 {
     //MessageBox.Show("line 84 XemVunggiaCongbo");
     if (XemVungGiaDat != null)
     {
         XemVungGiaDat(null/*this*/, ea);
     }
     else
     {
         //MessageBox.Show("line 91 null");
     }
 }
예제 #7
0
        /// <summary>
        /// Occurs when this command is clicked
        /// </summary>
        public override void OnClick()
        {
            //MessageBox.Show("line 203 xemgia.., view=" + _keyNames[0]);
            if (_views == null)
            {

                return;
            }
            //MessageBox.Show("line 203 xemgia.., view=" + _views[0].Config.NamApDung.ToString());
            IMapControl4 mapControl = null;
            LandEventArgs evt = new LandEventArgs();
            try
            {
                //MessageBox.Show("line 201 XemVunggiaCongbo");
                if (m_hookHelper.Hook is IMapControl4)
                {
                    //MessageBox.Show("line 204 XemVunggiaCongbo");
                    mapControl = (IMapControl4)m_hookHelper.Hook;
                }
                else if (m_hookHelper.Hook is IToolbarControl2)
                {
                    IToolbarControl2 toolbarControl = (IToolbarControl2)m_hookHelper.Hook;
                    mapControl = (IMapControl4)toolbarControl.Buddy;
                }

            }
            catch (Exception ex)
            {
                System.Diagnostics.Trace.WriteLine("line 216 XemVunggiaCongbo, ex when click "+ex.Message);
            }
            //MessageBox.Show("line 204 XemVunggiaCongbo");
            if (m_hookHelper != null)
            {
                //TODO: Add Map/PageLayout related logic
                //MessageBox.Show(this.Name);
                IEnumFeature numFeature = (IEnumFeature)mapControl.ActiveView.FocusMap.FeatureSelection;
                //MessageBox.Show("line 224 num=" + mapControl.Map.LayerCount.ToString());
                IFeature feature=null;
                try
                {
                    feature = numFeature.Next();
                }
                catch (Exception ex) { MessageBox.Show("line 238 ex="+ex.ToString()); }

                if (feature == null)
                {
                    MessageBox.Show("line 242 XemTatCaVungGiaDaCongBo null");
                }
                //MessageBox.Show(feature.get_Value(feature.Fields.FindField(nameOfMaThua)).ToString());
                int index = feature.Fields.FindField("mathua");
                if (index == -1)
                {
                    index = feature.Fields.FindField("mathua_");
                }
                mathua = feature.get_Value(index).ToString();
                evt.Mathua = mathua;
                foreach (ILandpriceView p in _views)
                {
                    p.CurrentMathua = mathua;
                    //_view.Config = CurrentConfig.CallMe();
                    p.Show();
                    p.LoadPrice();
                }

                OnChanged(evt);
            }
            else if (m_sceneHookHelper != null)
            {
                //TODO: Add Scene related logic
            }
            else if (m_globeHookHelper != null)
            {
                //TODO: Add Globe related logic
            }
        }
예제 #8
0
        /// <summary>
        /// Occurs when this command is clicked
        /// </summary>
        public override void OnClick()
        {
            //MessageBox.Show(string.Format("line 201 - OpenLanDetailCmd"));
            IMapControl4 mapControl = null;
            LandEventArgs evt = new LandEventArgs();

            try
            {

                if (m_hookHelper.Hook is IMapControl4)
                    mapControl = (IMapControl4)m_hookHelper.Hook;
                else if (m_hookHelper.Hook is IToolbarControl2)
                {
                    IToolbarControl2 toolbarControl = (IToolbarControl2)m_hookHelper.Hook;
                    mapControl = (IMapControl4)toolbarControl.Buddy;
                }

            }
            catch (Exception ex)
            {
                //MessageBox.Show(string.Format("line 224 - OpenLanDetailCmd"));
                System.Diagnostics.Trace.WriteLine(ex.Message);
            }
            if (m_hookHelper != null)
            {
                //TODO: Add Map/PageLayout related logic
                //MessageBox.Show(this.Name);
                IEnumFeature numFeature = (IEnumFeature)mapControl.ActiveView.FocusMap.FeatureSelection;
                IFeature feature = numFeature.Next();
                //MessageBox.Show(string.Format("line 230 - OpenLanDetailCmd"));
                //string name = string.Format("{0}_{1}", DataNameTemplate.Thua_Gia_Dat, _nam);
                //_mathua = feature.get_Value(feature.Fields.FindField(_nameOfMaThua));
                int index = feature.Fields.FindField("mathua");
                if (index == -1)
                {
                    index = feature.Fields.FindField("mathua_");
                }
                _mathua = feature.get_Value(index);
                MessageBox.Show(string.Format("line 136 - OpenLanDetailCmd {0}", evt.Mathua));
                evt.Mathua = _mathua;
                //MessageBox.Show(string.Format("line 136 - OpenLanDetailCmd {0}", evt.Mathua));
                OnXemThongTin(evt);
            }
            else if (m_sceneHookHelper != null)
            {
                //TODO: Add Scene related logic
            }
            else if (m_globeHookHelper != null)
            {
                //TODO: Add Globe related logic
            }
            else
            {
                MessageBox.Show(string.Format("line 246 - OpenLanDetailCmd"));
            }
        }
예제 #9
0
 /// <summary>
 /// Triggers the Changed event.
 /// </summary>
 public virtual void OnXemThongTin(LandEventArgs ea)
 {
     //MessageBox.Show(string.Format("line 93 - OpenLanDetailCmd"));
     if (XemThongTin != null)
         XemThongTin(null/*this*/, ea);
 }