fix: path magic
This commit is contained in:
parent
0fcec4d971
commit
bb9ba7db52
|
@ -258,7 +258,12 @@ namespace KRY_0x02
|
|||
private void button5_Click(object sender, EventArgs e)
|
||||
{
|
||||
/*/* 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.SizeMode = PictureBoxSizeMode.AutoSize;
|
||||
textBoxsizemode.Text = "auto";
|
||||
|
|
Loading…
Reference in New Issue