fix: path magic
This commit is contained in:
parent
0fcec4d971
commit
bb9ba7db52
|
@ -225,7 +225,7 @@ namespace KRY_0x02
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Wrap the creation of the OpenFileDialog instance in a using statement,
|
* Wrap the creation of the OpenFileDialog instance in a using statement,
|
||||||
* rather than manually calling the Dispose method to ensure proper disposal
|
* rather than manually calling the Dispose method to ensure proper disposal
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using (OpenFileDialog dlg = new OpenFileDialog())
|
using (OpenFileDialog dlg = new OpenFileDialog())
|
||||||
|
@ -258,7 +258,12 @@ namespace KRY_0x02
|
||||||
private void button5_Click(object sender, EventArgs e)
|
private void button5_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
/*/* use-default-pic button */
|
/*/* use-default-pic button */
|
||||||
string filename = @"C:\Users\citizen\source\repos\KRY-0x02\security.png";
|
string wd = Environment.CurrentDirectory;
|
||||||
|
Console.WriteLine("* [debug] working directory: " + wd);
|
||||||
|
string projectDirectory = Directory.GetParent(wd).Parent.FullName;
|
||||||
|
Console.WriteLine("* [debug] project directory: " + projectDirectory);
|
||||||
|
string filename = projectDirectory + @"/security.png";
|
||||||
|
Console.WriteLine("* [debug] filename: " + filename);
|
||||||
pictureBox1.Image = new Bitmap(filename);
|
pictureBox1.Image = new Bitmap(filename);
|
||||||
pictureBox1.SizeMode = PictureBoxSizeMode.AutoSize;
|
pictureBox1.SizeMode = PictureBoxSizeMode.AutoSize;
|
||||||
textBoxsizemode.Text = "auto";
|
textBoxsizemode.Text = "auto";
|
||||||
|
|
Loading…
Reference in New Issue