2 var userSetting = new GetUrlElement();
3 var UrlElement = userSetting.GetUrlElementInstance();
4 var hello = userSetting.sayHello;
5 console.log(UrlElement['sendIpAddress']);
7 var LoadLogMemory = new LogMemory();
8 var GETLogMemory = LoadLogMemory.LogMemoryInstance();
9 var MemoryAll = LoadLogMemory.GETLog();
18 correntConditionText()
26 function getCurrentParams(){
28 console.log("getcurrentparams");
31 url:"//"+UrlElement['sendIpAddress']+
32 ":"+UrlElement['sendPortNumber']+
33 "/"+UrlElement['sendElectronMicroscopeName']+
35 // url:"http://192.168.4.146:9090/fei/get",
36 success: function(data){
42 function clickMove(direction){
43 var movingdistance = $("#movingdistance").val();
44 var movexr = $("#movex").val();
45 var moveyr = $("#movey").val();
46 var movezr = $("#movez").val();
47 var directionSwitch = direction;
49 console.log("movingdistance="+movingdistance);
50 console.log("movex="+movexr);
51 console.log("movey="+moveyr);
52 switch(directionSwitch){
55 moveyr = parseInt(moveyr) + (parseInt(movingdistance));
56 $("#movey").val(String(moveyr));
61 moveyr = parseInt(moveyr) - (parseInt(movingdistance));
62 $("#movey").val(String(moveyr));
67 movexr = parseInt(movexr) + (parseInt(movingdistance));
68 $("#movex").val(String(movexr));
73 movexr = parseInt(movexr) - (parseInt(movingdistance));
74 $("#movex").val(String(movexr));
75 $("#currentx").val(String(movexr));
81 url:"http://" +UrlElement['sendIpAddress']+
82 ":"+UrlElement['sendPortNumber']+"/"+UrlElement['sendManufacturer']+
83 "/set/stagea?x="+encodeURIComponent(movexr)+
84 "&y="+encodeURIComponent(moveyr)+
85 "&z="+encodeURIComponent(movezr)+
86 "&a="+encodeURIComponent(movezr),
87 success: function(data){
88 console.log(data);//string型
94 var movingdistance = $("#movingdistance").val();
95 var movexr = $("#movex").val();
96 var moveyr = $("#movey").val();
97 var movezr = $("#movez").val();
99 $("#movey").keydown(function(e){
100 console.log(e.keyCode);
101 console.log(typeof(e.keyCode));
104 if (e.keyCode == 38 || e.keyCode == 87 || e.keyCode == 72) {
105 moveyr = parseInt(moveyr) + (parseInt(movingdistance)-1);
106 $("#movey").val(String(moveyr));
109 else if (e.keyCode == 40 || e.keyCode == 83 || e.keyCode == 74) {
110 moveyr = parseInt(moveyr) - (parseInt(movingdistance)-1);
111 $("#movey").val(String(moveyr));
115 $("#movex").keydown(function(e){
116 console.log(e.keyCode);
117 console.log(typeof(e.keyCode));
119 if (e.keyCode == 39 || e.keyCode == 68 || e.keyCode == 76) {
120 movexr = parseInt(movexr) + (parseInt(movingdistance)-1);
121 $("#movex").val(String(movexr));
124 else if (e.keyCode == 37 || e.keyCode == 65 || e.keyCode == 75) {
125 movexr = parseInt(movexr) - (parseInt(movingdistance)-1);
126 $("#movex").val(String(movexr));
133 // url:"http://192.168.4.146:9090/fei/set/stagea?x="+encodeURIComponent(movexr)+
134 url:"http://"+UrlElement['sendIpAddress']+
135 ":"+UrlElement['sendPortNumber']+
136 "/"+UrlElement['sendManufacturer']+
137 "/set/stagea?x="+encodeURIComponent(movexr)+
138 "&y="+encodeURIComponent(moveyr)+
139 "&z="+encodeURIComponent(movezr)+
140 "&a="+encodeURIComponent(movezr),
141 success: function(data){
147 function currentConditionText(){
148 var movingdistance = $("#movingdistance").val();
149 var movexr = $("#movex").val();
150 var moveyr = $("#movey").val();
151 var movezr = $("#movez").val();
152 console.log("currentcondition");
153 $("#Currentcondition").innerHTML='x:"movexr" y:"moveyr" z:"movezr"'
156 function setSpotSize(){
157 var setSpotSize = $("#SpotSize").val();
160 url:"http://"+UrlElement['sendIpAddress']+
161 ":"+UrlElement['sendPortNumber']+
162 "/"+UrlElement['sendManufacturer']+
163 "/set/spotsizea?sps="+encodeURIComponent(setSpotSize),
164 success: function(data){
170 function setMagnificationA(){
171 var magnificationA = $("#magnificationA").val();
174 url:"http://"+UrlElement['sendIpAddress']+
175 ":"+UrlElement['sendPortNumber']+
176 "/"+UrlElement['sendManufacturer']+
177 "/set/magnificationa?mag="+encodeURIComponent(magnificationA),
178 success: function(data){
183 function setMagnificationR(){
184 var magnificationR = $("#magnificationR").val();
187 url:"http://"+UrlElement['sendIpAddress']+
188 ":"+UrlElement['sendPortNumber']+
189 "/"+UrlElement['sendManufacturer']+
190 "/set/magnificationr?mag="+encodeURIComponent(magnificationR),
191 success: function(data){
197 function nowCondition(){
198 var movexr = $("#movex").val();
199 var moveyr = $("#movey").val();
200 var movezr = $("#movez").val();
201 var movea = $("#movea").val();
202 var spotSize = $("#spotSize").val();
203 var exptime = $("#exptime").val();
204 var manufacturer = UrlElement['sendElectronMicroscopeName'];
205 document.getElementById("tem").innerHTML = manufacturer;
206 document.getElementById("currentx").innerHTML = parseInt(movexr);
207 document.getElementById("currenty").innerHTML = parseInt(moveyr);
208 document.getElementById("currentz").innerHTML = parseInt(movezr);
209 document.getElementById("currenta").innerHTML = parseInt(movea);
210 document.getElementById("SpotSizeIndex").innerHTML = parseInt(spotSize);
211 document.getElementById("MagIndex").innerHTML = parseInt(magnificationA);