コード例 #1
0
        internal static IDockableWindow GetFabricAdjustmentWindow()
        {
            // Only get/create the dockable window if needed
            if (s_dockWindow == null)
            {
                // Use GetDockableWindow directly intead of FromID as we want the client IDockableWindow not the internal class
                UID dockWinID = new UIDClass();
                dockWinID.Value = ThisAddIn.IDs.AdjustmentDockWindow;
                s_dockWindow    = ArcMap.DockableWindowManager.GetDockableWindow(dockWinID);
                //      make enabled
                IEditor TheEditor = ArcMap.Editor;
                if (TheEditor != null)
                {
                    AdjustmentDockWindow.SetEnabled(TheEditor.EditState == esriEditState.esriStateEditing);
                }
            }

            return(s_dockWindow);
        }
        void m_editEvents_OnStartEditing()
        {
            AdjustmentDockWindow.SetEnabled(true);
            ICadastralEditor pCadEd = (ICadastralEditor)ArcMap.Application.FindExtensionByName("esriCadastralUI.CadastralEditorExtension");

            string m_sFieldName = "";

            m_sFieldName = s_extension.FieldName;

            ICadastralFabric pFabric = pCadEd.CadastralFabric;

            if (pFabric == null)
            {
                return;
            }

            IFeatureClass pLinesFC = (IFeatureClass)pFabric.get_CadastralTable(esriCadastralFabricTable.esriCFTLines);

            if (pLinesFC.FindField(m_sFieldName) == -1)
            {
                m_RecordToField = false;
                return;
            }
        }
コード例 #3
0
 void m_editEvents_OnStopEditing(bool bSave)
 {
     AdjustmentDockWindow.SetEnabled(false);
 }
コード例 #4
0
 void m_editEvents_OnStartEditing()
 {
     //set the units
     AdjustmentDockWindow.SetEnabled(true);
 }
コード例 #5
0
 protected override IntPtr OnCreateChild()
 {
   m_windowUI = new AdjustmentDockWindow(this.Hook);
   return m_windowUI.Handle;
 }
 protected override IntPtr OnCreateChild()
 {
     m_windowUI = new AdjustmentDockWindow(this.Hook);
     return(m_windowUI.Handle);
 }
コード例 #7
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            Utilities FabUTILS = new Utilities();
            ////check the strings to make sure they are doubles
            double dVal          = 0;
            string sVersion      = FabUTILS.GetDesktopVersionFromRegistry();
            int    iSelectedPage = this.tabControl1.SelectedIndex;

            FabUTILS.WriteToRegistry(RegistryHive.CurrentUser,
                                     "Software\\ESRI\\Desktop" + sVersion + "\\ArcMap\\Cadastral\\AddIn.ParcelEditHelper",
                                     "LSASettingsSelectedPage", iSelectedPage.ToString(), false);

            if (Double.TryParse(this.txtDistTolerance.Text, out dVal))
            {
                FabUTILS.WriteToRegistry(RegistryHive.CurrentUser,
                                         "Software\\ESRI\\Desktop" + sVersion + "\\ArcMap\\Cadastral\\AddIn.ParcelEditHelper",
                                         "LSADistanceToleranceReport", this.txtDistTolerance.Text, true);

                //need to set the Text Box to the same value in the AdjustmentDockWindow
                AdjustmentDockWindow.SetTextOnDistanceTolerance(this.txtDistTolerance.Text);
            }
            if (Double.TryParse(this.txtBearingTolerance.Text, out dVal))
            {
                FabUTILS.WriteToRegistry(RegistryHive.CurrentUser,
                                         "Software\\ESRI\\Desktop" + sVersion + "\\ArcMap\\Cadastral\\AddIn.ParcelEditHelper",
                                         "LSABearingToleranceReport", this.txtBearingTolerance.Text, false);
            }

            if (Double.TryParse(this.txtLinePtsOffsetTolerance.Text, out dVal))
            {
                FabUTILS.WriteToRegistry(RegistryHive.CurrentUser,
                                         "Software\\ESRI\\Desktop" + sVersion + "\\ArcMap\\Cadastral\\AddIn.ParcelEditHelper",
                                         "LSALinePointsOffsetToleranceReport", this.txtLinePtsOffsetTolerance.Text, true);
            }

            if (Double.TryParse(this.txtClosePointsTolerance.Text, out dVal))
            {
                FabUTILS.WriteToRegistry(RegistryHive.CurrentUser,
                                         "Software\\ESRI\\Desktop" + sVersion + "\\ArcMap\\Cadastral\\AddIn.ParcelEditHelper",
                                         "LSAClosePointsToleranceReport", this.txtClosePointsTolerance.Text, true);
            }

            FabUTILS.WriteToRegistry(RegistryHive.CurrentUser,
                                     "Software\\ESRI\\Desktop" + sVersion + "\\ArcMap\\Cadastral\\AddIn.ParcelEditHelper",
                                     "LSANumberRepeatCountIteration", this.numRepeatCount.Value.ToString(), false);

            if (Double.TryParse(this.txtConvergenceValue.Text, out dVal))
            {
                FabUTILS.WriteToRegistry(RegistryHive.CurrentUser,
                                         "Software\\ESRI\\Desktop" + sVersion + "\\ArcMap\\Cadastral\\AddIn.ParcelEditHelper",
                                         "LSAConvergenceValue", this.txtConvergenceValue.Text, true);
            }

            if (Double.TryParse(this.txtDivergenceValue.Text, out dVal))
            {
                FabUTILS.WriteToRegistry(RegistryHive.CurrentUser,
                                         "Software\\ESRI\\Desktop" + sVersion + "\\ArcMap\\Cadastral\\AddIn.ParcelEditHelper",
                                         "LSADivergenceValue", this.txtDivergenceValue.Text, true);
            }

            FabUTILS.WriteToRegistry(RegistryHive.CurrentUser,
                                     "Software\\ESRI\\Desktop" + sVersion + "\\ArcMap\\Cadastral\\AddIn.ParcelEditHelper",
                                     "LSAReportType", this.cboReportType.SelectedIndex.ToString(), false);

            FabUTILS.WriteToRegistry(RegistryHive.CurrentUser,
                                     "Software\\ESRI\\Desktop" + sVersion + "\\ArcMap\\Cadastral\\AddIn.ParcelEditHelper",
                                     "LSABrowseFilePath", this.txtBrowseFilePath.Text, false);

            FabUTILS.WriteToRegistry(RegistryHive.CurrentUser,
                                     "Software\\ESRI\\Desktop" + sVersion + "\\ArcMap\\Cadastral\\AddIn.ParcelEditHelper",
                                     "LSAChkBendLinesOn", (this.chkBendLines.Checked).ToString(), false);

            if (Double.TryParse(this.txtBendLinesTolerance.Text, out dVal))
            {
                FabUTILS.WriteToRegistry(RegistryHive.CurrentUser,
                                         "Software\\ESRI\\Desktop" + sVersion + "\\ArcMap\\Cadastral\\AddIn.ParcelEditHelper",
                                         "LSABendLinesTolerance", this.txtBendLinesTolerance.Text, true);
            }

            FabUTILS.WriteToRegistry(RegistryHive.CurrentUser,
                                     "Software\\ESRI\\Desktop" + sVersion + "\\ArcMap\\Cadastral\\AddIn.ParcelEditHelper",
                                     "LSAChkIncludeDependentLines", (this.chkIncludeDependentLines.Checked).ToString(), false);

            FabUTILS.WriteToRegistry(RegistryHive.CurrentUser,
                                     "Software\\ESRI\\Desktop" + sVersion + "\\ArcMap\\Cadastral\\AddIn.ParcelEditHelper",
                                     "LSAChkSnapLinePointsToLines", (this.chkSnapLinePointsToLines.Checked).ToString(), false);

            if (Double.TryParse(this.txtSnapLinePointTolerance.Text, out dVal))
            {
                FabUTILS.WriteToRegistry(RegistryHive.CurrentUser,
                                         "Software\\ESRI\\Desktop" + sVersion + "\\ArcMap\\Cadastral\\AddIn.ParcelEditHelper",
                                         "LSASnapLinePtsToLinesTolerance", this.txtSnapLinePointTolerance.Text, true);
            }

            FabUTILS.WriteToRegistry(RegistryHive.CurrentUser,
                                     "Software\\ESRI\\Desktop" + sVersion + "\\ArcMap\\Cadastral\\AddIn.ParcelEditHelper",
                                     "LSAChkStraightenRoadFrontages", (this.chkStraightenRoadFrontages.Checked).ToString(), false);

            if (Double.TryParse(this.txtStraightRoadOffsetTolerance.Text, out dVal))
            {
                FabUTILS.WriteToRegistry(RegistryHive.CurrentUser,
                                         "Software\\ESRI\\Desktop" + sVersion + "\\ArcMap\\Cadastral\\AddIn.ParcelEditHelper",
                                         "LSAStraightenRoadFrontagesOffset", this.txtStraightRoadOffsetTolerance.Text, true);
            }

            if (Double.TryParse(this.txtStraightRoadAngleTolerance.Text, out dVal))
            {
                FabUTILS.WriteToRegistry(RegistryHive.CurrentUser,
                                         "Software\\ESRI\\Desktop" + sVersion + "\\ArcMap\\Cadastral\\AddIn.ParcelEditHelper",
                                         "LSAStraightenRoadFrontagesAngle", this.txtStraightRoadAngleTolerance.Text, false);
            }
        }