|
@@ -7,6 +7,7 @@ using System.Linq;
|
|
|
using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
|
using System.Windows.Forms;
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -21,7 +22,7 @@ namespace SketchAssistant
|
|
|
}
|
|
|
|
|
|
|
|
|
- OpenFileDialog ofd = new OpenFileDialog();
|
|
|
+ OpenFileDialog openFileDialogLeft = new OpenFileDialog();
|
|
|
|
|
|
Image leftImage = null;
|
|
|
|
|
@@ -34,10 +35,7 @@ namespace SketchAssistant
|
|
|
|
|
|
private void pictureBoxLeft_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
|
|
|
{
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
if(leftImage != null)
|
|
|
{
|
|
|
pictureBoxLeft.Image = leftImage;
|
|
@@ -45,7 +43,7 @@ namespace SketchAssistant
|
|
|
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
private void toolStripLabel1_Click(object sender, EventArgs e)
|
|
|
{
|
|
|
|
|
@@ -54,7 +52,7 @@ namespace SketchAssistant
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
private void tableLayoutPanel1_Paint(object sender, PaintEventArgs e)
|
|
|
{
|
|
|
|
|
@@ -68,13 +66,11 @@ namespace SketchAssistant
|
|
|
|
|
|
private void loadToolStripMenuItem_Click(object sender, EventArgs e)
|
|
|
{
|
|
|
- ofd.Filter = "SVG|*.svg;*.jpg";
|
|
|
- if(ofd.ShowDialog() == DialogResult.OK)
|
|
|
+ openFileDialogLeft.Filter = "Image|*.jpg;*.png;*.jpeg";
|
|
|
+ if(openFileDialogLeft.ShowDialog() == DialogResult.OK)
|
|
|
{
|
|
|
- toolStripLoadStatus.Text = ofd.SafeFileName;
|
|
|
- Svg.SvgDocument svgDoc = Svg.SvgDocument.Open(ofd.FileName);
|
|
|
- leftImage = new Bitmap(svgDoc.Draw());
|
|
|
-
|
|
|
+ toolStripLoadStatus.Text = openFileDialogLeft.SafeFileName;
|
|
|
+ leftImage = Image.FromFile(openFileDialogLeft.FileName);
|
|
|
|
|
|
|
|
|
this.Refresh();
|
|
@@ -90,10 +86,16 @@ namespace SketchAssistant
|
|
|
{
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
private void timer1_Tick(object sender, EventArgs e)
|
|
|
{
|
|
|
pictureBoxLeft.Update();
|
|
|
}
|
|
|
+
|
|
|
+ private void pictureBoxLeft_Click(object sender, EventArgs e)
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
}
|