Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > .NET Framework > Forum > C# WinApp JavaScript ใน C# อยากทราบว่าใช้ยังไงหรือครับ



 

C# WinApp JavaScript ใน C# อยากทราบว่าใช้ยังไงหรือครับ

 



Topic : 122639



โพสกระทู้ ( 4,436 )
บทความ ( 23 )



สถานะออฟไลน์
Facebook



1311

ใน WinApp ของ C# มี item JavaScript อยู่ด้วย
อยากทราบว่าใช้ยังไงหรือครับ
ใช้เหมือน web ไม๊ครับ
แล้วตอนเรียกใช้ function ข้างในเรียกใช้ยังไงครับ



Tag : .NET, Win (Windows App), C#, VS 2012 (.NET 4.x)







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2016-04-27 13:13:54 By : lamaka.tor View : 815 Reply : 4
 

 

No. 1



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

เป็นเหมือน Web HTML นี่แหละครับ เพียงแต่มันแสดงผลบนแบบ Win App ปกติจะพัฒนาบน WinRT ใช้กับพวก Windows Store App บน Windows 8 , Windows 10 ครับ

เหมือนตัวนี้ครับ








แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2016-04-27 13:46:35 By : mr.win
 


 

No. 2



โพสกระทู้ ( 4,436 )
บทความ ( 23 )



สถานะออฟไลน์
Facebook

พอเจอเว็บสำหรับ แปลงหน่วยต่างๆครับ
เข้าไปดูใน JavaScript เห็นมี function อยู่แบบนี้ผมสามารถเอามาใช้ใน WinApp ได้ไม๊ครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2016-04-27 13:56:51 By : lamaka.tor
 

 

No. 3



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

ได้ครับ มันก็คือ JavaScript แต่บาง Syntax จะต้องใช้ตาม Framework ของที่มากับ Project ครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2016-04-28 09:24:44 By : mr.win
 


 

No. 4



โพสกระทู้ ( 4,436 )
บทความ ( 23 )



สถานะออฟไลน์
Facebook

Code (JavaScript)
var ab=[["Celsius [&#176C]",'vv + 273.15','vv - 273.15'],["Fahrenheit [&#176F]",'5/9 * (vv + 459.67)','9/5 * vv - 459.67'],["Kelvin [K]",1],["Rankine [&#176R]",'5/9 * vv','9/5 * vv'],["Reaumure [&#176r]",'5/4 * vv + 273.15','4/5 * (vv - 273.15)']];var bb;function jo(db){var eb=window.onload;if(typeof window.onload!="function"){window.onload=db;}
else{window.onload=function(){eb();db();}
}
;}
function ko(db){var gb=window.onunload;if(typeof window.onunload!="function"){window.onunload=db;}
else{window.onunload=function(){gb();db();}
}
;}
jo(lo);ko(mo);function no(kb,value,lb){var mb=new Date();mb.setDate(mb.getDate()+lb);document.cookie=kb+"="+escape(value)+((lb==null)?"":";expires="+mb.toGMTString());}
function oo(kb){if(document.cookie.length>0){ob=document.cookie.indexOf(kb+"=");if(ob!=-1){ob=ob+kb.length+1;pb=document.cookie.indexOf(";",ob);if(pb==-1)pb=document.cookie.length;return unescape(document.cookie.substring(ob,pb));}
}
return"";}
function lo(){po();if(document.getElementById('valuetotemperature1')){qo();cc_temperature1();}
}
function po(){bb=ro();}
function qo(){var tb=so("selectfromtemperature1",0);var vb=so("selecttotemperature1",0);to('selectfromtemperature1',tb);to('selecttotemperature1',vb);document.getElementById('valuefromtemperature1').value=so("valuefromtemperature1",1);}
function mo(){if(document.getElementById('valuetotemperature1')){var xb;xb=document.getElementById('selectfromtemperature1');no('selectfromtemperature1',xb.options[xb.selectedIndex].value,365);xb=document.getElementById('selecttotemperature1');no('selecttotemperature1',xb.options[xb.selectedIndex].value,365);xb=document.getElementById('valuefromtemperature1');no('valuefromtemperature1',xb.value,365);}
}
function to(yb,zb){var xb=document.getElementById(yb);if((zb>=0)&&(zb<xb.options.length)){xb.selectedIndex=zb;}
}
function uo(_b,X){X=(!X?6:X);return Math.round(_b*Math.pow(10,X))/Math.pow(10,X);}
function so(ac,bc){var cc=oo(ac);if(cc===false){return bc;}
else{return cc;}
}
function ro(){return parseInt(so("floatnumber",6));}
function vo(ec){var ValidChars="0123456789.";for(i=0;i<ec.length;i++){if(ValidChars.indexOf(ec.charAt(i))==-1){return false;}
}
return true;}
function ins_temperature1(fc){document.writeln('<select name="'+fc+'" id="'+fc+'" size="1" onchange="cc_temperature1()">');for(i=0;i<ab.length;i++){document.writeln('<option value="'+i+'">'+ab[i][0]+'</option>');}
document.writeln('</select>');}
function wo(hc,vv,ic){var jc=ab[hc];var kc=ab[ic];;if(vo(jc[1])){vv=vv*jc[1];}
else{vv=eval(jc[1]);}
if(vo(kc[1])){vv=vv/kc[1];}
else{vv=eval(kc[2]);}
return uo(vv,bb);}
function cc_temperature1(){var lc=parseFloat(document.getElementById('valuefromtemperature1').value);if(isNaN(lc)){document.getElementById('valuetotemperature1').value='';}
else{var tb=document.getElementById('selectfromtemperature1').selectedIndex;var vb=document.getElementById('selecttotemperature1').selectedIndex;document.getElementById('valuetotemperature1').value=wo(tb,lc,vb);mc=document.getElementById('valueresulttemperature1').tagName;if(mc=="SPAN")document.getElementById('valueresulttemperature1').innerHTML=lc+" "+nc(document.getElementById('selectfromtemperature1').options[document.getElementById('selectfromtemperature1').selectedIndex].text)+" = "+document.getElementById('valuetotemperature1').value+" "+nc(document.getElementById('selecttotemperature1').options[document.getElementById('selecttotemperature1').selectedIndex].text);else
document.getElementById('valueresulttemperature1').value=lc+" "+nc(document.getElementById('selectfromtemperature1').options[document.getElementById('selectfromtemperature1').selectedIndex].text)+" = "+document.getElementById('valuetotemperature1').value+" "+nc(document.getElementById('selecttotemperature1').options[document.getElementById('selecttotemperature1').selectedIndex].text);}
}
function ccb_temperature1(){var lc=parseFloat(document.getElementById('valuetotemperature1').value);if(isNaN(lc)){document.getElementById('valuefromtemperature1').value='';}
else{var tb=document.getElementById('selecttotemperature1').selectedIndex;var vb=document.getElementById('selectfromtemperature1').selectedIndex;document.getElementById('valuefromtemperature1').value=wo(tb,lc,vb);document.getElementById('valueresulttemperature1').value=document.getElementById('valuefromtemperature1').value+" "+nc(document.getElementById('selectfromtemperature1').options[document.getElementById('selectfromtemperature1').selectedIndex].text)+" = "+lc+" "+nc(document.getElementById('selecttotemperature1').options[document.getElementById('selecttotemperature1').selectedIndex].text);}
}
function nc(oc){return oc;var pc;if((oc.indexOf('(')==-1)&&(oc.indexOf('[')==-1))pc=oc.split();else{var qc=oc.indexOf(' ');if(qc==-1)qc=999;var rc=oc.indexOf('(');if(rc==-1)rc=999;var sc=oc.indexOf('[');if(sc==-1)sc=999;var tc=' ';if(rc<qc){tc='(';if(sc<rc){tc='[';}
}
else{tc=' ';if(sc<qc){tc='[';}
}
pc=oc.split(tc);}
return pc[0];}



ผมอยากใช้ cc_temperature1() และ ccb_temperature1() ครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2016-04-28 13:41:20 By : lamaka.tor
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : C# WinApp JavaScript ใน C# อยากทราบว่าใช้ยังไงหรือครับ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 03
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่