コード例 #1
0
ファイル: CmdProperty.cs プロジェクト: wwcc19870805/DIFGIS
        private void UpdateDatabase()
        {
            DF3DFeatureClass featureClassInfo = CommonUtils.Instance().CurEditLayer;

            if (featureClassInfo == null)
            {
                return;
            }
            IFeatureClass fc = featureClassInfo.GetFeatureClass();

            if (fc == null)
            {
                return;
            }
            int            count          = SelectCollection.Instance().GetCount(false);
            EditParameters editParameters = new EditParameters(fc.Guid.ToString());

            editParameters.connectionInfo = CommonUtils.Instance().GetCurrentFeatureDataset().DataSource.ConnectionInfo.ToConnectionString();
            editParameters.datasetName    = CommonUtils.Instance().GetCurrentFeatureDataset().Name;
            editParameters.regexDataList  = regexDataList;
            editParameters.colName        = colName;
            editParameters.fidList        = fids;
            editParameters.nTotalCount    = count;
            editParameters.TemproalTime   = this.time;
            IBatcheEdit batcheEdit = BatchEditFactory.CreateBatchEdit(count);

            batcheEdit.BeginEdit();
            batcheEdit.DoWork(EditType.ET_UPDATE_ATTRIBUTE, editParameters);
            batcheEdit.EndEdit();
        }
コード例 #2
0
        private void UpdateDatabase()
        {
            DF3DFeatureClass featureClassInfo = CommonUtils.Instance().CurEditLayer;

            if (featureClassInfo == null)
            {
                return;
            }
            IFeatureClass fc = featureClassInfo.GetFeatureClass();

            if (fc == null)
            {
                return;
            }
            int            count          = 1;
            EditParameters editParameters = new EditParameters(fc.Guid.ToString());

            editParameters.connectionInfo = CommonUtils.Instance().GetCurrentFeatureDataset().DataSource.ConnectionInfo.ToConnectionString();
            editParameters.datasetName    = CommonUtils.Instance().GetCurrentFeatureDataset().Name;
            editParameters.geometryMap    = beforeRowBufferMap;
            editParameters.nTotalCount    = count;
            editParameters.TemproalTime   = this.time;
            IBatcheEdit batcheEdit = BatchEditFactory.CreateBatchEdit(count);

            batcheEdit.BeginEdit();
            batcheEdit.DoWork(EditType.ET_INSERT_FEATURES, editParameters);
            batcheEdit.EndEdit();
        }
コード例 #3
0
        public override void Run(object sender, System.EventArgs e)
        {
            RenderControlEditServices.Instance().StopGeometryEdit(true);
            System.DateTime temproalTime = System.DateTime.Now;
            if (CommonUtils.Instance().EnableTemproalEdit)
            {
                using (DateSettingDialog dateSettingDialog = new DateSettingDialog())
                {
                    if (dateSettingDialog.ShowDialog() != System.Windows.Forms.DialogResult.OK)
                    {
                        return;
                    }
                    temproalTime = dateSettingDialog.Time;
                }
            }
            DF3DFeatureClass featureClassInfo = null;

            System.Collections.IEnumerator enumerator = SelectCollection.Instance().FeatureClassInfoMap.Keys.GetEnumerator();
            try
            {
                if (enumerator.MoveNext())
                {
                    DF3DFeatureClass featureClassInfo2 = (DF3DFeatureClass)enumerator.Current;
                    featureClassInfo = featureClassInfo2;
                }
            }
            finally
            {
                System.IDisposable disposable = enumerator as System.IDisposable;
                if (disposable != null)
                {
                    disposable.Dispose();
                }
            }
            if (featureClassInfo == null)
            {
                return;
            }
            int            count          = SelectCollection.Instance().GetCount(false);
            EditParameters editParameters = new EditParameters(featureClassInfo.GetFeatureClass().Guid.ToString());

            editParameters.connectionInfo = CommonUtils.Instance().GetCurrentFeatureDataset().DataSource.ConnectionInfo.ToConnectionString();
            editParameters.datasetName    = CommonUtils.Instance().GetCurrentFeatureDataset().Name;
            editParameters.TemproalTime   = temproalTime;
            IBatcheEdit batcheEdit = BatchEditFactory.CreateBatchEdit(count);

            batcheEdit.BeginEdit();
            batcheEdit.DoWork(EditType.ET_DELETE_SELCTION, editParameters);
            batcheEdit.EndEdit();
        }
コード例 #4
0
 private void EndRote()
 {
     this.bFinished = true;
     if (this.modifyRowbufferMap != null)
     {
         DF3DFeatureClass featureClassInfo         = null;
         System.Collections.IEnumerator enumerator = this.modifyRowbufferMap.Keys.GetEnumerator();
         try
         {
             if (enumerator.MoveNext())
             {
                 DF3DFeatureClass featureClassInfo2 = (DF3DFeatureClass)enumerator.Current;
                 featureClassInfo = featureClassInfo2;
             }
         }
         finally
         {
             System.IDisposable disposable = enumerator as System.IDisposable;
             if (disposable != null)
             {
                 disposable.Dispose();
             }
         }
         if (featureClassInfo == null)
         {
             return;
         }
         int            count          = SelectCollection.Instance().GetCount(false);
         EditParameters editParameters = new EditParameters(featureClassInfo.GetFeatureClass().Guid.ToString());
         editParameters.connectionInfo = CommonUtils.Instance().GetCurrentFeatureDataset().DataSource.ConnectionInfo.ToConnectionString();
         editParameters.datasetName    = CommonUtils.Instance().GetCurrentFeatureDataset().Name;
         editParameters.geometryMap    = this.ToDictionary();
         editParameters.nTotalCount    = count;
         editParameters.TemproalTime   = this.time;
         IBatcheEdit batcheEdit = BatchEditFactory.CreateBatchEdit(count);
         batcheEdit.BeginEdit();
         batcheEdit.DoWork(EditType.ET_UPDATE_GEOMETRY, editParameters);
         batcheEdit.EndEdit();
     }
     this.beginRowbufferMap = this.modifyRowbufferMap;
 }
コード例 #5
0
ファイル: UCGeometryEdit.cs プロジェクト: wwcc19870805/DIFGIS
        private void UpdateDatabase(System.Collections.Generic.Dictionary <DF3DFeatureClass, IRowBufferCollection> rowsMap)
        {
            System.Collections.Generic.Dictionary <DF3DFeatureClass, IRowBufferCollection> .Enumerator enumerator = rowsMap.GetEnumerator();
            if (!enumerator.MoveNext())
            {
                return;
            }
            System.Collections.Generic.KeyValuePair <DF3DFeatureClass, IRowBufferCollection> current = enumerator.Current;
            DF3DFeatureClass key          = current.Key;
            int            count          = SelectCollection.Instance().GetCount(false);
            EditParameters editParameters = new EditParameters(key.GetFeatureClass().GuidString);

            editParameters.connectionInfo = key.GetFeatureClass().DataSource.ConnectionInfo.ToConnectionString();
            editParameters.datasetName    = key.GetFeatureClass().FeatureDataSet.Name;
            editParameters.geometryMap    = rowsMap;
            editParameters.nTotalCount    = count;
            editParameters.TemproalTime   = this._time;
            IBatcheEdit batcheEdit = BatchEditFactory.CreateBatchEdit(count);

            batcheEdit.BeginEdit();
            batcheEdit.DoWork(EditType.ET_UPDATE_GEOMETRY, editParameters);
            batcheEdit.EndEdit();
        }
コード例 #6
0
ファイル: CmdShape.cs プロジェクト: wwcc19870805/DIFGIS
        public void DeleteGeometry()
        {
            DF3DFeatureClass featureClassInfo = null;

            System.Collections.IEnumerator enumerator = SelectCollection.Instance().FeatureClassInfoMap.Keys.GetEnumerator();
            try
            {
                if (enumerator.MoveNext())
                {
                    DF3DFeatureClass featureClassInfo2 = (DF3DFeatureClass)enumerator.Current;
                    featureClassInfo = featureClassInfo2;
                }
            }
            finally
            {
                System.IDisposable disposable = enumerator as System.IDisposable;
                if (disposable != null)
                {
                    disposable.Dispose();
                }
            }
            if (featureClassInfo == null)
            {
                return;
            }
            int            count          = SelectCollection.Instance().GetCount(false);
            EditParameters editParameters = new EditParameters(featureClassInfo.GetFeatureClass().Guid.ToString());

            editParameters.connectionInfo = CommonUtils.Instance().GetCurrentFeatureDataset().DataSource.ConnectionInfo.ToConnectionString();
            editParameters.datasetName    = CommonUtils.Instance().GetCurrentFeatureDataset().Name;
            editParameters.TemproalTime   = this.time;
            IBatcheEdit batcheEdit = BatchEditFactory.CreateBatchEdit(count);

            batcheEdit.BeginEdit();
            batcheEdit.DoWork(EditType.ET_DELETE_SELCTION, editParameters);
            batcheEdit.EndEdit();
        }