protected override void Dispose(bool disposing)
 {
     if (control != null)
     {
         control.ImageChanged -= OnImageChanged;
         control = null;
     }
     base.Dispose(disposing);
 }
 protected override object CreateControlCore()
 {
     control = new XafPictureEdit();
     if (CurrentObject != null)
     {
         var businessObject = CurrentObject;
         //         control.OpenDialogFilter = string.Format("Custom filter for Bitmaps (*.bmp)|*{0}*.bmp", businessObject.ID);
     }
     InitPhotoEditor();
     control.ImageChanged     += OnImageChanged;
     control.MouseDoubleClick += EventPictureEditXrayOnDoubleClick;
     return(control);
 }
Пример #3
0
 private void InitGraphics()
 {
     if (Frame is NestedFrame)
     {
         parentView = ((NestedFrame)Frame).ViewItem.View;
         ImagePropertyEditor imageEditor = parentView.FindItem("Photo") as ImagePropertyEditor;
         if (imageEditor != null)
         {
             var ctrl = imageEditor.Control;
             pEdit = (XafPictureEdit)ctrl;
         }
     }
 }
        internal void InitPhotoEditor(ImagePropertyEditor imageEditor)
        {
            rectangleMarkers = new List <RectangleMarker>();
            var ctrl = imageEditor.Control;

            pEdit = (XafPictureEdit)ctrl;
            if (pEdit != null)
            {
                pEdit.LoadCompleted += LoadCompleted;
                pEdit.MouseClick    += PEdit_Click;
                //    pEdit.Paint += Paint;
                InitialEditorSettigs();
            }
        }
Пример #5
0
        private void InitPhotoEditor(ImagePropertyEditor imageEditor)
        {
            var ctrl = imageEditor.Control;

            pEdit = (XafPictureEdit)ctrl;
            if (pEdit != null)
            {
                pEdit.MouseDown     += MouseDown;
                pEdit.MouseUp       += MouseUp;
                pEdit.MouseMove     += MouseMove;
                pEdit.Invalidated   += Invalidated;
                pEdit.LoadCompleted += LoadCompleted;
                pEdit.ImageChanged  += ImageChanged;
                pEdit.Resize        += Resize;
            }
        }