The second problem is how to debug it since when i'm dragging it to form1 designer i'm getting error even before i'm running my program and break points i added in the User Control code not working.
The first problem is that i have two identical directories one is static one is i'm getting from other classes in my project the static one will work fine the one i'm getting from other classes will make the error(that i can't debug).
This is the top of my User Control code:
public DopplerEffect()
{
InitializeComponent();
try
{
sf = Options_DB.Get_Radar_Images_Download_Directory();
i = last_image_file();
InitGifFile = sf + @"\radar" + i.ToString("D6") + ".gif";
}
catch (Exception err)
{
DannyGeneral.Logger.Write(err.ToString());
}
//
//
//
InitGifFile = @"C:\Users\chocolade1972\AppData\Local\mws\My Weather Station\radar_temp_directory\radar008389.gif";
The problem is if i'm using the second InitGifFile it will work fine when i drag the User Control to form1 designer. The second InitGifFile i mean the one with the static path:
InitGifFile = @"C:\Users\chocolade1972\AppData\Local\mws\My Weather Station\radar_temp_directory\radar008389.gif";
But if i mark not to use this line or delete this line and using only the first 3 lines above:
sf = Options_DB.Get_Radar_Images_Download_Directory();
i = last_image_file();
InitGifFile = sf + @"\radar" + i.ToString("D6") + ".gif";
Then the whole program the visual studio is shut down with window error. And i checked many times the result with this 3 lines in InitGifFile is the same exactly like the InitGifFile static path line.
Same path same file name and still when using the 3 lines it give error and shut down the visual studio.
When i'm using the 3 lines with the static path line it's working fine.
I can't figure out why when using the 3 lines getting same path and file name it give error shut down the visual studio but when using the static line path it dosen't and it's working fine.
Aucun commentaire:
Enregistrer un commentaire