Пример #1
0
        /// <summary>
        /// 参照ボタンのクリックイベント
        /// </summary>
        private void ReferenceButton_Click(object sender, EventArgs e)
        {
            Image openImage = this.LoadImage();

            if (openImage != null)
            {
                this.PuzzleImage             = openImage;
                this.PreviewPictureBox.Image = ImageTransformation.Resize(this.PuzzleImage, 150).DrawMeshLine(this.LevelComboBox.SelectedIndex + 1);
                this.UpdatePreview();
            }
        }
Пример #2
0
 /// <summary>
 /// パズル生成元ラジオボタン(画像)の値変更イベント
 /// </summary>
 private void FromImageRadioButton_CheckedChanged(object sender, EventArgs e)
 {
     if (this.FromImageRadioButton.Checked)
     {
         Image openImage = this.LoadImage();
         if (openImage == null)
         {
             this.FilePathTextBox.Clear();
             this.FromNumberRadioButton.Checked = true;
         }
         else
         {
             this.PuzzleImage             = openImage;
             this.PreviewPictureBox.Image = ImageTransformation.Resize(this.PuzzleImage, 150).DrawMeshLine(this.LevelComboBox.SelectedIndex + 1);
             this.ReferenceButton.Enabled = true;
             this.UpdatePreview();
         }
     }
 }