/// <summary>
        /// Intialize variables and check selected feature is valid.
        /// </summary>
        /// <param name="CustomCommandHelper"></param>
        public void Activate(Intergraph.GTechnology.API.IGTCustomCommandHelper CustomCommandHelper)
        {
            gtApp = GTClassFactory.Create <IGTApplication>();
            List <KeyValuePair <int, string> > featureTypes = null;

            try
            {
                gtCustomCommandHelper            = CustomCommandHelper;
                gtCustomCommandHelper.MouseMove += gtCustomCommandHelper_MouseMove;
                featureTypes = GetFeatureClass();
                detectOverlappingAnalysis = new DetectOverlappingAnalysis(featureTypes);

                if (detectOverlappingAnalysis.ShowDialog() == DialogResult.OK)
                {
                    //    RunProcess(detectOverlappingAnalysis.SelectedFeatureType, detectOverlappingAnalysis.IsSelfOverlap);
                    DetectOverlapping(detectOverlappingAnalysis.SelectedFeatureType, detectOverlappingAnalysis.IsSelfOverlap);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error " + ex.Message, msgBoxCaption, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                CleanUp();
            }
        }
Exemplo n.º 2
0
        public void Activate()
        {
            List <KeyValuePair <int, string> > featureTypes = null;

            try
            {
                gtApp = GTClassFactory.Create <IGTApplication>();
                if (gtApp.DataContext.IsRoleGranted("PRIV_MGMT_LAND"))
                {
                    featureTypes = GetFeatureClass();
                    detectOverlappingAnalysis = new DetectOverlappingAnalysis(featureTypes);

                    if (detectOverlappingAnalysis.ShowDialog() == DialogResult.OK)
                    {
                        DetectOverlapping(detectOverlappingAnalysis.SelectedFeatureType, detectOverlappingAnalysis.IsSelfOverlap);
                    }
                }
                else
                {
                    MessageBox.Show("Command Access Denied.  Please contact System Administrator", "G/Technology", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error " + ex.Message, msgBoxCaption, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                CleanUp();
            }
        }