private void Panel2_MouseUp(object sender, MouseEventArgs e) { if (attributeEditorRadioButton.Checked && e.Button == MouseButtons.Left) { if (selectedState != null) { updateDraggedState(); GraphicState.setZOrderOfStateOnTop(selectedState, stateArrayList); updateEdgeStates(); shirnkCanvasAsRequired(); } selectedState = null; } }
private void createNewState(int x, int y) { enlargeBackBufferAsRequired(ref x, ref y); Graphics g = Graphics.FromImage(backBuffer); g.SmoothingMode = SmoothingMode.AntiAlias; GraphicState s = new GraphicState(new Point(x, y), "q" + num); stateArrayList.Add(s); GraphicState.setZOrderOfStateOnTop(s, stateArrayList); GraphicState.drawState(s, g, stateBrush, stateBorderPen, stateNameFont, stateNameBrush, stateNameStringFormat); num++; updateEdgeStates(); panel2.Invalidate(); }