Doubleclick items to replace them
This commit is contained in:
Родитель
95897d99cc
Коммит
0147e65903
|
@ -280,6 +280,7 @@
|
|||
this.listView1.UseCompatibleStateImageBehavior = false;
|
||||
this.listView1.View = System.Windows.Forms.View.List;
|
||||
this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged);
|
||||
this.listView1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listView1_MouseDoubleClick);
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
|
|
|
@ -113,6 +113,8 @@ namespace osu_BackgroundChanger
|
|||
|
||||
private void ReplaceImage()
|
||||
{
|
||||
if (listView1.SelectedItems.Count == 0) return;
|
||||
|
||||
var ofd = new OpenFileDialog();
|
||||
ofd.Filter = "Jpeg files|*.jpg;*.jpeg";
|
||||
ofd.Title = "Replace";
|
||||
|
@ -198,6 +200,7 @@ namespace osu_BackgroundChanger
|
|||
private void aboutToolStripMenuItem_Click(object sender, EventArgs e) => ShowAbout();
|
||||
private void whatIsThisToolStripMenuItem_Click(object sender, EventArgs e) => ShowHelp();
|
||||
|
||||
private void listView1_MouseDoubleClick(object sender, MouseEventArgs e) => ReplaceImage();
|
||||
private void listView1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
UpdateImagePreview();
|
||||
|
|
Загрузка…
Ссылка в новой задаче