コード例 #1
0
        private void buttonDelete_Click(object sender, EventArgs e)
        {
            ConfirmBox   cb           = new ConfirmBox("Delete this image?");
            DialogResult dialogResult = cb.ShowDialog();

            if (dialogResult == DialogResult.Yes)
            {
                pictureBox1.Image.Dispose();
                File.Delete(sm.Images[currentImage].LocalPath);
                sm.Images.RemoveAt(currentImage);
                ChangeImage(currentImage);
                sm.WriteSettingsFile();
            }
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: RobinTo/WallManager
 private void buttonDelete_Click(object sender, EventArgs e)
 {
     ConfirmBox cb = new ConfirmBox("Delete this image?");
     DialogResult dialogResult = cb.ShowDialog();
     if(dialogResult == DialogResult.Yes)
     {
         pictureBox1.Image.Dispose();
         File.Delete(sm.Images[currentImage].LocalPath);
         sm.Images.RemoveAt(currentImage);
         ChangeImage(currentImage);
         sm.WriteSettingsFile();
     }
 }