|
@@ -55,27 +55,27 @@ namespace Phihong_EVSE_UI_Tool
|
|
|
switch (rb.Tag.ToString())
|
|
|
{
|
|
|
case "Plug":
|
|
|
- srcPath = new Uri(Utility.BG_PARENTFOLDER + Utility.BG_PLUG, UriKind.Relative);
|
|
|
+ srcPath = new Uri(Path.Combine(Utility.BG_PARENTFOLDER, Utility.BG_PLUG), UriKind.Relative);
|
|
|
uxPlugImage.Source = new BitmapImage(srcPath);
|
|
|
- Utility.CopyFileFromResource(srcPath, Utility.OUTPUT_DIRECTORY + Utility.BG_PLUG);
|
|
|
+ Utility.CopyFileFromResource(srcPath, Path.Combine(Utility.OUTPUT_DIRECTORY, Utility.BG_PLUG));
|
|
|
mySettings.IsPlugDefault = true;
|
|
|
break;
|
|
|
case "Precharge":
|
|
|
- srcPath = new Uri(Utility.BG_PARENTFOLDER + Utility.BG_PRECHARGE, UriKind.Relative);
|
|
|
+ srcPath = new Uri(Path.Combine(Utility.BG_PARENTFOLDER, Utility.BG_PRECHARGE), UriKind.Relative);
|
|
|
uxPrechargeImage.Source = new BitmapImage(srcPath);
|
|
|
- Utility.CopyFileFromResource(srcPath, Utility.OUTPUT_DIRECTORY + Utility.BG_PRECHARGE);
|
|
|
+ Utility.CopyFileFromResource(srcPath, Path.Combine(Utility.OUTPUT_DIRECTORY, Utility.BG_PRECHARGE));
|
|
|
mySettings.IsPreChargeDefault = true;
|
|
|
break;
|
|
|
case "Charging":
|
|
|
- srcPath = new Uri(Utility.BG_PARENTFOLDER + Utility.BG_CHARGING, UriKind.Relative);
|
|
|
+ srcPath = new Uri(Path.Combine(Utility.BG_PARENTFOLDER, Utility.BG_CHARGING), UriKind.Relative);
|
|
|
uxChargingImage.Source = new BitmapImage(srcPath);
|
|
|
- Utility.CopyFileFromResource(srcPath, Utility.OUTPUT_DIRECTORY + Utility.BG_CHARGING);
|
|
|
+ Utility.CopyFileFromResource(srcPath, Path.Combine(Utility.OUTPUT_DIRECTORY, Utility.BG_CHARGING));
|
|
|
mySettings.IsChargingDefault = true;
|
|
|
break;
|
|
|
case "Complete":
|
|
|
- srcPath = new Uri(Utility.BG_PARENTFOLDER + Utility.BG_COMPLETE, UriKind.Relative);
|
|
|
+ srcPath = new Uri(Path.Combine(Utility.BG_PARENTFOLDER, Utility.BG_COMPLETE), UriKind.Relative);
|
|
|
uxCompleteImage.Source = new BitmapImage(srcPath);
|
|
|
- Utility.CopyFileFromResource(srcPath, Utility.OUTPUT_DIRECTORY + Utility.BG_COMPLETE);
|
|
|
+ Utility.CopyFileFromResource(srcPath, Path.Combine(Utility.OUTPUT_DIRECTORY, Utility.BG_COMPLETE));
|
|
|
mySettings.IsCompleteDefault = true;
|
|
|
break;
|
|
|
default:
|
|
@@ -99,7 +99,7 @@ namespace Phihong_EVSE_UI_Tool
|
|
|
if (File.Exists(plugCustomImgPath))
|
|
|
{
|
|
|
Utility.LoadImageFromPath(uxPlugImage, plugCustomImgPath);
|
|
|
- File.Copy(plugCustomImgPath, Utility.OUTPUT_DIRECTORY + Utility.BG_PLUG, true);
|
|
|
+ File.Copy(plugCustomImgPath, Path.Combine(Utility.OUTPUT_DIRECTORY, Utility.BG_PLUG), true);
|
|
|
mySettings.IsPlugDefault = false;
|
|
|
}
|
|
|
break;
|
|
@@ -107,7 +107,7 @@ namespace Phihong_EVSE_UI_Tool
|
|
|
if (File.Exists(prechargeCustomImgPath))
|
|
|
{
|
|
|
Utility.LoadImageFromPath(uxPrechargeImage, prechargeCustomImgPath);
|
|
|
- File.Copy(prechargeCustomImgPath, Utility.OUTPUT_DIRECTORY + Utility.BG_PRECHARGE, true);
|
|
|
+ File.Copy(prechargeCustomImgPath, Path.Combine(Utility.OUTPUT_DIRECTORY, Utility.BG_PRECHARGE), true);
|
|
|
mySettings.IsPreChargeDefault = false;
|
|
|
}
|
|
|
break;
|
|
@@ -115,7 +115,7 @@ namespace Phihong_EVSE_UI_Tool
|
|
|
if (File.Exists(chargingCustomImgPath))
|
|
|
{
|
|
|
Utility.LoadImageFromPath(uxChargingImage, chargingCustomImgPath);
|
|
|
- File.Copy(chargingCustomImgPath, Utility.OUTPUT_DIRECTORY + Utility.BG_CHARGING, true);
|
|
|
+ File.Copy(chargingCustomImgPath, Path.Combine(Utility.OUTPUT_DIRECTORY, Utility.BG_CHARGING), true);
|
|
|
mySettings.IsChargingDefault = false;
|
|
|
}
|
|
|
break;
|
|
@@ -123,7 +123,7 @@ namespace Phihong_EVSE_UI_Tool
|
|
|
if (File.Exists(completeCustomImgPath))
|
|
|
{
|
|
|
Utility.LoadImageFromPath(uxCompleteImage, completeCustomImgPath);
|
|
|
- File.Copy(completeCustomImgPath, Utility.OUTPUT_DIRECTORY + Utility.BG_COMPLETE, true);
|
|
|
+ File.Copy(completeCustomImgPath, Path.Combine(Utility.OUTPUT_DIRECTORY, Utility.BG_COMPLETE), true);
|
|
|
mySettings.IsCompleteDefault = false;
|
|
|
}
|
|
|
break;
|
|
@@ -162,9 +162,9 @@ namespace Phihong_EVSE_UI_Tool
|
|
|
{
|
|
|
case "Plug":
|
|
|
uxPlugExploreTextBox.Text = dlg.FileName;
|
|
|
- plugCustomImgPath = Utility.CUSTOM_DIRECTORY + Utility.BG_PLUG;
|
|
|
+ plugCustomImgPath = Path.Combine(Utility.CUSTOM_DIRECTORY, Utility.BG_PLUG);
|
|
|
File.Copy(dlg.FileName, plugCustomImgPath, true);
|
|
|
- File.Copy(dlg.FileName, Utility.OUTPUT_DIRECTORY + Utility.BG_PLUG, true);
|
|
|
+ File.Copy(dlg.FileName, Path.Combine(Utility.OUTPUT_DIRECTORY, Utility.BG_PLUG), true);
|
|
|
Utility.LoadImageFromPath(uxPlugImage, plugCustomImgPath);
|
|
|
mySettings.IsPlugDefault = false;
|
|
|
mySettings.PlugCustomImgPath = plugCustomImgPath;
|
|
@@ -172,9 +172,9 @@ namespace Phihong_EVSE_UI_Tool
|
|
|
break;
|
|
|
case "Precharge":
|
|
|
uxPrechargeExploreTextBox.Text = dlg.FileName;
|
|
|
- prechargeCustomImgPath = Utility.CUSTOM_DIRECTORY + Utility.BG_PRECHARGE;
|
|
|
+ prechargeCustomImgPath = Path.Combine(Utility.CUSTOM_DIRECTORY, Utility.BG_PRECHARGE);
|
|
|
File.Copy(dlg.FileName, prechargeCustomImgPath, true);
|
|
|
- File.Copy(dlg.FileName, Utility.OUTPUT_DIRECTORY + Utility.BG_PRECHARGE, true);
|
|
|
+ File.Copy(dlg.FileName, Path.Combine(Utility.OUTPUT_DIRECTORY, Utility.BG_PRECHARGE), true);
|
|
|
Utility.LoadImageFromPath(uxPrechargeImage, prechargeCustomImgPath);
|
|
|
mySettings.IsPreChargeDefault = false;
|
|
|
mySettings.PreChargeCustomImgPath = prechargeCustomImgPath;
|
|
@@ -182,9 +182,9 @@ namespace Phihong_EVSE_UI_Tool
|
|
|
break;
|
|
|
case "Charging":
|
|
|
uxChargingExploreTextBox.Text = dlg.FileName;
|
|
|
- chargingCustomImgPath = Utility.CUSTOM_DIRECTORY + Utility.BG_CHARGING;
|
|
|
+ chargingCustomImgPath = Path.Combine(Utility.CUSTOM_DIRECTORY, Utility.BG_CHARGING);
|
|
|
File.Copy(dlg.FileName, chargingCustomImgPath, true);
|
|
|
- File.Copy(dlg.FileName, Utility.OUTPUT_DIRECTORY + Utility.BG_CHARGING, true);
|
|
|
+ File.Copy(dlg.FileName, Path.Combine(Utility.OUTPUT_DIRECTORY, Utility.BG_CHARGING), true);
|
|
|
Utility.LoadImageFromPath(uxChargingImage, chargingCustomImgPath);
|
|
|
mySettings.IsChargingDefault = false;
|
|
|
mySettings.ChargingCustomImgPath = chargingCustomImgPath;
|
|
@@ -192,9 +192,9 @@ namespace Phihong_EVSE_UI_Tool
|
|
|
break;
|
|
|
case "Complete":
|
|
|
uxCompleteExploreTextBox.Text = dlg.FileName;
|
|
|
- completeCustomImgPath = Utility.CUSTOM_DIRECTORY + Utility.BG_COMPLETE;
|
|
|
+ completeCustomImgPath = Path.Combine(Utility.CUSTOM_DIRECTORY, Utility.BG_COMPLETE);
|
|
|
File.Copy(dlg.FileName, completeCustomImgPath, true);
|
|
|
- File.Copy(dlg.FileName, Utility.OUTPUT_DIRECTORY + Utility.BG_COMPLETE, true);
|
|
|
+ File.Copy(dlg.FileName, Path.Combine(Utility.OUTPUT_DIRECTORY, Utility.BG_COMPLETE), true);
|
|
|
Utility.LoadImageFromPath(uxCompleteImage, completeCustomImgPath);
|
|
|
mySettings.IsCompleteDefault = false;
|
|
|
mySettings.CompleteCustomImgPath = completeCustomImgPath;
|