Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/314.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# It’不同的是,一个是EmployeeCharged,另一个是EmployeeNoCharged,但你的解决方案仍然有效thanks@MatteoSala对不起,我在初次编辑时出错,现在更正。。。如果您对代码有任何疑问,请告诉我。。。如果你把你的项目放在G_C#_Html_Image_Canvas - Fatal编程技术网

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>";