Skip to content

Commit

Permalink
Completed Edit
Browse files Browse the repository at this point in the history
Added functionallity to edit/delete existing buttons.

Added Icon to be edited.
  • Loading branch information
Karamu98 committed Apr 26, 2019
1 parent 8a04f7e commit 064cb21
Show file tree
Hide file tree
Showing 10 changed files with 2,396 additions and 13 deletions.
4 changes: 3 additions & 1 deletion PictureSorter/PictureSorter/AddDestination.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

763 changes: 763 additions & 0 deletions PictureSorter/PictureSorter/AddDestination.resx

Large diffs are not rendered by default.

35 changes: 33 additions & 2 deletions PictureSorter/PictureSorter/EditDestination.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 31 additions & 1 deletion PictureSorter/PictureSorter/EditDestination.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ namespace PictureSorter
{
public partial class EditDestination : Form
{
public string name;
public string destDir;

public PicturePicker parentForm;

public EditDestination()
Expand All @@ -21,17 +24,44 @@ public EditDestination()

private void pickSource_Click(object sender, EventArgs e)
{
if (findDestination.ShowDialog() == DialogResult.OK)
{
destDir = findDestination.SelectedPath;

if (destName.Text == null || destName.Text == "")
{
name = destDir.Split(System.IO.Path.DirectorySeparatorChar).Last();
}
else
{
name = destName.Text;
}

this.DialogResult = DialogResult.OK;
}
}

private void OnLoadForm(object sender, EventArgs e)
{
destName.Text = parentForm.buttons[parentForm.buttonToEdit];
destName.Text = parentForm.buttonToEdit.Text;
}

private void destName_TextChanged(object sender, EventArgs e)
{

}

private void doneButton_Click(object sender, EventArgs e)
{
destDir = parentForm.buttons[parentForm.buttonToEdit];
name = destName.Text;

this.DialogResult = DialogResult.OK;
}

private void deleteButton_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.No;
}
}
}
Loading

0 comments on commit 064cb21

Please sign in to comment.