Skip to content

Commit

Permalink
Remove adv options button, file name persistance between open and save
Browse files Browse the repository at this point in the history
  • Loading branch information
the6p4c committed Feb 12, 2016
1 parent da9180c commit 5230562
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
15 changes: 1 addition & 14 deletions Kalkimg/FormMain.Designer.cs

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

5 changes: 5 additions & 0 deletions Kalkimg/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ public partial class FormMain : Form {
private Bitmap currentImageOriginal;
private Bitmap currentImageTransformed;

private string openedFileName;

public FormMain() {
InitializeComponent();
}
Expand All @@ -26,6 +28,8 @@ private void RunTransform() {

private void loadImage_Click(object sender, EventArgs e) {
if (openFileDialog.ShowDialog() == DialogResult.OK) {
openedFileName = Path.GetFileNameWithoutExtension(openFileDialog.FileName);

currentImageOriginal = (Bitmap) Image.FromFile(openFileDialog.FileName);

bool imageSmallerThanMax = currentImageOriginal.Width < Utility.MAX_IMAGE_WIDTH && currentImageOriginal.Height < Utility.MAX_IMAGE_HEIGHT;
Expand All @@ -43,6 +47,7 @@ private void saveImage_Click(object sender, EventArgs e) {
return;
}

saveFileDialog.FileName = openedFileName;
if (saveFileDialog.ShowDialog() == DialogResult.OK) {
C2PFile c2pFile = new C2PFile(currentImageTransformed);

Expand Down

0 comments on commit 5230562

Please sign in to comment.