예제 #1
0
        public frmMaterials()
        {
            InitializeComponent();
            InitializeListView();

            using (var bitmap = new Bitmap(Properties.Resources.color_picker, new Size(24, 24)))
            {
                var ptr = bitmap.GetHicon();
                colorPickerCursor = new Cursor(ptr);
            }

            brushesPopup = new ctrlBrushesPopup(CurrentBrusn);
            complex = new Popup(brushesPopup);
            complex.Resizable = false;

            Sizeble = false;
            ProgramCore.MainForm.ctrlRenderControl.pickingController.OnSelectedMeshChanged += pickingController_OnSelectedMeshChanged;
        }
예제 #2
0
 private void SetOwnerItem(Control control)
 {
     if (control == null)
     {
         return;
     }
     if (control is Popup)
     {
         var popupControl = control as Popup;
         _ownerPopup = popupControl;
         _ownerPopup._childPopup = this;
         OwnerItem = popupControl.Items[0];
         return;
     }
     else if (_opener == null)
     {
         _opener = control;
     }
     if (control.Parent != null)
     {
         SetOwnerItem(control.Parent);
     }
 }