Tải bản đầy đủ (.pdf) (108 trang)

Thiết kế hệ thống đo nhiệt độ và xác định vị trí bệnh nhân qua mạng internet

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (2.17 MB, 108 trang )

OException ex) {

Logger.getLogger(ServerGmap.class.getName()).log(Level.SEVERE, null,
ex);
}
}
}
private void chuyendoi(String vd, String kd) {
String vidonguyen = vd.substring(0, vd.indexOf(".")-2);
float vidothapphan =
(float)(Float.valueOf(vd.substring(vd.indexOf(".")-2)).floatValue()/60);
vido =
(float)(Integer.valueOf(vidonguyen).intValue()+vidothapphan)+"";
String kinhdonguyen = kd.substring(0, kd.indexOf(".")-2);

102


float kinhdothapphan =
(float)(Float.valueOf(kd.substring(kd.indexOf(".")-2)).floatValue()/60);
kinhdo =
(float)(Integer.valueOf(kinhdonguyen).intValue()+kinhdothapphan)+"";
System.out.println("Vĩ độ: "+vido+". Kinh độ: "+kinhdo);
}
private class Connect extends Thread{
@Override
public void run()
{
try{
int port = Integer.valueOf(jTextField1.getText()).intValue();
ServerSocket ss = new ServerSocket(port);


Socket s;
while(true)
{
s = ss.accept();
doComms conn_c = new doComms(s);
Thread t = new Thread(conn_c);
t.start();
}
} catch (IOException ex) {

Logger.getLogger(ServerGmap.class.getName()).log(Level.SEVERE, null,
ex);
}
}
}
}

103


.3. Chƣơng trình cài trên máy Client
namespace Gmap.Properties {
using System;

[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.T
ools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;


private static global::System.Globalization.CultureInfo resourceCulture;

[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.P
erformance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}

[global::System.ComponentModel.EditorBrowsableAttribute(global::System.Comp
onentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new
global::System.Resources.ResourceManager("Gmap.Properties.Resources",
typeof(Resources).Assembly);
resourceMan = temp;
}

104


return resourceMan;
}
}
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.Comp
onentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {

return resourceCulture;
}
set {
resourceCulture = value;
}
}
internal static System.Drawing.Bitmap Down {
get {
object obj = ResourceManager.GetObject("Down", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Left {
get {
object obj = ResourceManager.GetObject("Left", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Mortgage_Center_Button {
get {
object obj = ResourceManager.GetObject("Mortgage Center Button",
resourceCulture);

105


return ((System.Drawing.Bitmap)(obj));
}
}


internal static System.Drawing.Bitmap Right {
get {
object obj = ResourceManager.GetObject("Right", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Up {
get {
object obj = ResourceManager.GetObject("Up", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Zoom_In {
get {
object obj = ResourceManager.GetObject("Zoom-In", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Zoom_Out {
get {
object obj = ResourceManager.GetObject("Zoom-Out", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}

106




×