private 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;
     //    pEdit.Cursor = System.Windows.Forms.Cursors.Default;
     //    //   pEdit.Dock = System.Windows.Forms.DockStyle.Fill;
     //    pEdit.Properties.AllowScrollViaMouseDrag = false;
     //    pEdit.Properties.AllowScrollOnMouseWheel = DevExpress.Utils.DefaultBoolean.True;
     //    pEdit.Properties.AllowZoomOnMouseWheel = DevExpress.Utils.DefaultBoolean.True;
     //    pEdit.Properties.Appearance.BackColor = System.Drawing.Color.Black;
     //    pEdit.Properties.Appearance.Options.UseBackColor = true;
     //    pEdit.Properties.ShowMenu = true;
     //    pEdit.Properties.ShowScrollBars = true;
     //    pEdit.Properties.SizeMode = DevExpress.XtraEditors.Controls.PictureSizeMode.Squeeze;
     //    pEdit.Properties.ShowCameraMenuItem = DevExpress.XtraEditors.Controls.CameraMenuItemVisibility.Never;
     //    pEdit.Properties.ShowZoomSubMenu = DevExpress.Utils.DefaultBoolean.True;
     //    pEdit.Properties.ZoomingOperationMode = DevExpress.XtraEditors.Repository.ZoomingOperationMode.MouseWheel;
     //}
 }
Example #2
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();
            }
        }
        public void TryInitializePictureItem()
        {
            ImagePropertyEditor imageEditor = View.FindItem("Photo") as ImagePropertyEditor;

            if (imageEditor != null)
            {
                if (imageEditor.Control != null)
                {
                    InitPhotoEditor(imageEditor);
                }
                else
                {
                    imageEditor.ControlCreated += new EventHandler <EventArgs>(imageEditor_ControlCreated);
                }
            }
        }
Example #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;
            }
        }