示例#1
0
        public BaseCustomFeatureEditor(IXApplication app, IXExtension ext,
                                       Type featDefType,
                                       CustomFeatureParametersParser paramsParser,
                                       DataConverterDelegate <TPage, TData> pageToDataConv,
                                       DataConverterDelegate <TData, TPage> dataToPageConv,
                                       CreateGeometryDelegate <TData> geomCreator)
        {
            m_App         = app;
            m_FeatDefType = featDefType;

            if (!typeof(IXCustomFeatureDefinition <TData>).IsAssignableFrom(m_FeatDefType))
            {
                throw new InvalidCastException($"{m_FeatDefType.FullName} must implement {typeof(IXCustomFeatureDefinition<TData>).FullName}");
            }

            m_PageToDataConv = pageToDataConv;
            m_DataToPageConv = dataToPageConv;
            m_GeomCreator    = geomCreator;

            m_BodiesComparer = new XObjectEqualityComparer <IXBody>();

            m_PmPage = ext.CreatePage <TPage>();

            m_ParamsParser = paramsParser;

            m_PmPage.Closing     += OnPageClosing;
            m_PmPage.DataChanged += OnDataChanged;
            m_PmPage.Closed      += OnPageClosed;
        }
示例#2
0
 public BaseCustomFeatureEditor(IXApplication app,
                                Type featDefType,
                                CustomFeatureParametersParser paramsParser,
                                IServiceProvider svcProvider, CreateDynamicControlsDelegate createDynCtrlHandler)
     : this(app, featDefType, paramsParser, svcProvider)
 {
     InitPage(createDynCtrlHandler);
 }
示例#3
0
 protected BaseCustomFeatureEditor(IXApplication app,
                                   Type featDefType,
                                   CustomFeatureParametersParser paramsParser,
                                   IServiceProvider svcProvider)
 {
     m_App            = app;
     m_SvcProvider    = svcProvider;
     m_Logger         = svcProvider.GetService <IXLogger>();
     m_DefType        = featDefType;
     m_BodiesComparer = new XObjectEqualityComparer <IXBody>();
     m_ParamsParser   = paramsParser;
 }
示例#4
0
        public BaseCustomFeatureEditor(IXApplication app,
                                       Type featDefType,
                                       CustomFeatureParametersParser paramsParser,
                                       IXLogger logger)
        {
            m_App    = app;
            m_Logger = logger;

            m_DefType = featDefType;

            m_BodiesComparer = new XObjectEqualityComparer <IXBody>();

            m_PmPage = CreatePage();

            m_ParamsParser = paramsParser;

            m_PmPage.Closing     += OnPageClosing;
            m_PmPage.DataChanged += OnDataChanged;
            m_PmPage.Closed      += OnPageClosed;
        }