예제 #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);
 }