public StateEditor() { InitializeComponent(); _radBasePanel = new RadPanel(base_panel); _codeBox.Dock = DockStyle.Fill; CodePage.Controls.Add(_codeBox); _radBasePanel.Name = "base_panel"; _currentCtrl = _radBasePanel; MainPropGrid.SelectedObject = _radBasePanel; }
private void Object_MouseDown(object sender, MouseEventArgs e) { _move = true; Control netCtrl = (Control)sender; _last = netCtrl.Parent.PointToClient(Cursor.Position); _cur = netCtrl.Location; netCtrl.Cursor = Cursors.SizeAll; RadControl radCtrl = FindControl(((Control)sender).Name); if (radCtrl != null) { if (_currentCtrl != null) _currentCtrl.Outlined = false; _currentCtrl = radCtrl; _currentCtrl.Outlined = true; MainPropGrid.SelectedObject = radCtrl; } }
void MainPanel_MouseClick(object sender, MouseEventArgs e) { if (_currentCtrl != null) _currentCtrl.Outlined = false; _currentCtrl = _radBasePanel; _currentCtrl.Outlined = true; MainPropGrid.SelectedObject = _radBasePanel; }