protected void UpdateExistingRaster(object sender, ExportedImageEventArgs e)
        {
            if (this.PendingImage != null)
            {
                return;
            }
            this.PendingImage = e;
            new Extent(e.Points);
            Point3d  point3d  = new Point3d(this.PendingImage.Points[0].X, this.PendingImage.Points[0].Y, 0.0);
            Point3d  point3d2 = new Point3d(this.PendingImage.Points[1].X, this.PendingImage.Points[1].Y, 0.0);
            Point3d  point3d3 = new Point3d(this.PendingImage.Points[2].X, this.PendingImage.Points[2].Y, 0.0);
            Vector3d v        = point3d2 - point3d;
            Vector3d v2       = point3d3 - point3d;

            DocUtil.UpdateRasterImage(this.ParentDataset.ParentDocument, this.RasterObjectId, this.PendingImage.ExportOptions.OutputFile, point3d, v, v2);
            this.CurrentFileName = this.PendingImage.ExportOptions.OutputFile;
            this.PendingImage    = null;
        }
        public bool UpdateRasterNow()
        {
            bool result;

            try
            {
                bool flag = DocUtil.UpdateRasterImage(this._doc, this._rasterID, this.ImageURL, this.BasePoint, this.V1, this.V2);
                if (flag)
                {
                    this.lblReadyForUpdate.Text = "not ready";
                }
                result = flag;
            }
            catch (SystemException ex)
            {
                ErrorReport.ShowErrorMessage("Catch in UpdateRasterNow: " + ex.Message);
                result = false;
            }
            return(result);
        }
        public bool CreateExportImage(string outputFileName)
        {
            bool result;

            try
            {
                this.StopReactors();
                if (!File.Exists(this.CurrentFileName))
                {
                    this.RequestNewRasterNow(this.DrawnViewInfo);
                }
                File.Copy(this.CurrentFileName, outputFileName, true);
                DocUtil.UpdateRasterImage(this.ParentDataset.ParentDocument, this.RasterObjectId, outputFileName);
                this.RasterObjectId = ObjectId.Null;
                if (base.GetType() == typeof(MSCMapService))
                {
                    AfaDocData.ActiveDocData.DocDataset.MapServices.Remove(this.Name);
                    MSCMapService mSCMapService = (MSCMapService)this;
                    mSCMapService.RemoveDictionary();
                    this.ParentDataset.MapServices.Remove(this.Name);
                    MSCDataset.SetDefaultActiveRasterServices();
                }
                if (base.GetType() == typeof(MSCImageService))
                {
                    AfaDocData.ActiveDocData.DocDataset.ImageServices.Remove(this.Name);
                    MSCImageService mSCImageService = (MSCImageService)this;
                    mSCImageService.RemoveDictionary();
                    this.ParentDataset.ImageServices.Remove(this.Name);
                    MSCDataset.SetDefaultActiveRasterServices();
                }
                result = true;
            }
            catch (SystemException)
            {
                result = false;
            }
            return(result);
        }