コード例 #1
0
 private void btnChangeFig_Click(object sender, EventArgs e)
 {
     if (SelectedFig != null)
     {
         SelectedFig.ChangeColor(PenColor.Color);
         SelectedFig.Draw();
         MainView.Image = Canvas;
         SelectedFig    = null;
         lvFigures.SelectedIndices.Clear();
     }
 }
コード例 #2
0
 public void OnMouseDown(out AbstractFigure figure, ActionParamter paramter)
 {
     figure = null;
     foreach (AbstractFigure crntFigure in Canvas.Instanse._figures)
     {
         if (crntFigure.CheckFigure(paramter.Point))
         {
             figure = crntFigure;
             Canvas.Instanse._figures.Remove(figure);
             Canvas.Instanse.DrawAll();
             figure.ChangeColor(paramter.Color);
             Canvas.Instanse.GetTempBitmap();
             break;
         }
     }
 }