C# It’不同的是,一个是EmployeeCharged,另一个是EmployeeNoCharged,但你的解决方案仍然有效thanks@MatteoSala对不起,我在初次编辑时出错,现在更正。。。如果您对代码有任何疑问,请告诉我。。。如果你把你的项目放在G
C# It’不同的是,一个是EmployeeCharged,另一个是EmployeeNoCharged,但你的解决方案仍然有效thanks@MatteoSala对不起,我在初次编辑时出错,现在更正。。。如果您对代码有任何疑问,请告诉我。。。如果你把你的项目放在G,c#,html,image,canvas,C#,Html,Image,Canvas,It’不同的是,一个是EmployeeCharged,另一个是EmployeeNoCharged,但你的解决方案仍然有效thanks@MatteoSala对不起,我在初次编辑时出错,现在更正。。。如果您对代码有任何疑问,请告诉我。。。如果你把你的项目放在GitHub上,我可以看看并在那里合作。 string employeeImage = ""; //the for loop that creates the charts and updates the list of the
It’不同的是,一个是EmployeeCharged,另一个是EmployeeNoCharged,但你的解决方案仍然有效thanks@MatteoSala对不起,我在初次编辑时出错,现在更正。。。如果您对代码有任何疑问,请告诉我。。。如果你把你的项目放在GitHub上,我可以看看并在那里合作。
string employeeImage = "";
//the for loop that creates the charts and updates the list of the first images
employeeImage = employeeImage + " <option value=\"EmployeeChargeable\\"+Convert.ToString(textBox1.Text)+".png\">"+titolo+"</option>";
//end of the first loop
string employeeImageN = "";
//the for loop that creates the charts and updates the list of the second images
employeeImageN = employeeImageN + " <option value=\"EmployeeNonChargeable\\" + Convert.ToString(textBox1.Text) + ".png\">" + titolo + "</option>";
//end of the second looop
string savHtml = "<html>" +
"<head>" +
" <title>Select Image</title>" +
" <script type=\"text/javascript\">" +
" function displayImage(elem) {" +
" var image = document.getElementById(\"canvas\");" +
" image.src = elem.value; " +
" }" +
" function displayImageN(elem) {" +
" var imageN = document.getElementById(\"canvasN\");" +
" imageN.src = elem.value; " +
" }" +
" </script>" +
"</head>" +
"<body>" +
" <form name=\"controls\">" +
//seleziona persone
" <select name=\"imageList\" onchange=\"displayImage(this);\">" +
employeeImage+
"</select>" +
" <img id=\"canvas\" src=\"EmployeeChargeable/fire1.png\" />" +
" <select name=\"imageList\" onchange=\"displayImageN(this);\">" +
employeeImageN +
"</select>" +
" <img id=\"canvasN\" src=\"EmployeeNonChargeable/fire1.png\" />" +
" </form>" +
"</body>" +
"</html>";
File.WriteAllText(@"C:\Users\...\theFile.html", savHtml);
savHtml = @"
<html>
<head>
<title>Select Image</title>
</head>
<body>
<form name='controls'>
<select name='imageList' onchange='displayImage(this);'>
<option value='fire.png'>fire</option>
<option value='mare.png'>mare</option>
<option value='terra.png'>terra</option>
</select>
<img id='canvas' src='EmployeeChargeable/fire1.png' />
<img id='canvasN' src='EmployeeNonChargeable/fire1.png' />
</form>
<script type='text/javascript'>
var image = document.getElementById('canvas');
var imageN = document.getElementById('canvasN');
function displayImage(elem) {
image.src = 'EmployeeChargeable/' + elem.value;
imageN.src = 'EmployeeNonChargeable/' + elem.value;
}
</script>
</body>
</html>";