DAS  3.1.6 - 18/09/2017
DAS_Spat_Conf.c
Go to the documentation of this file.
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4 #include <windows.h>
5 #include <direct.h>
6 #include <math.h>
7 #include <ctype.h>
8 #include <conio.h>
9 //#include "stdafx.h"
10 #include "mgui.h"
11 #include "DAS_Spatram.h"
12 #include "dcl.h"
13 #include "dil.h"
14 #include "bil.h"
15 #include "wsc.h"
16 #include "dxl.h"
17 #include "dscud.h"
18 #include "DOAS.h"
19 #include "portio32.h"
20 
21 
22 
23 
31 //confp CONFP;
35 
36 paramini PARAM; //Param.ini
37 //pbutt PBUTT; //Command Button
40 //db_options DB_O;
41 ccd DC_CCD; // CCD settings
42 ptf DC_HP; // Platform settings
43 config Cfg; // Camera controls & Options
44 flag FLAG; //flags structure
46 //stepm STEPM; //Stepper Motors
47 ids IDS; //ID tasks
50 omutemp OMUTEMP; //structure for OMU temperatures
52 //omu OMU;
53 //hrizmeas HMEAS;
55 
58 //mige MIGE;
59 
60 
61 
62 /***************************************************************
63  * This callback toggles the Bold attribute
64  ***************************************************************/
65 //extern void SetBoldCB(MOBJECT obj, MVALUE a, void *data);
66 /***************************************************************
67  * This callback toggles the Italic attribute
68  ***************************************************************/
69 //extern void SetItalicCB(MOBJECT obj, MVALUE a, void *data);
70 /***************************************************************
71  * This callback Unloads the latest loaded font and
72  * destroys the dialog
73  ***************************************************************/
74 //extern void CloseFontViewCB(MOBJECT p, void *a, void *data);
75 /***************************************************************
76  * This callback tries to load the specified font
77  ***************************************************************/
78 //extern void TestFontCB(MOBJECT obj, void *a, void *data);
79 /***************************************************************
80  * This callback tries to load the specified font
81  ***************************************************************/
82 //extern void LoadFontCB(MOBJECT obj, void *a, void *data);
83 /***************************************************************
84  * This callback draws strings using the selected font
85  ***************************************************************/
86 //extern void DrawAreaExpFontCB(MOBJECT obj, MEvent * pe, void *data);
87 
88 int bold = False;
89 int italic = False;
90 
91 int FlgBG = True;
92 int FlgFG = False;
93 int FlgOBJ = -1;
94 char lfraz[6];
95 
96 MOBJECT PFAMS; // paged form for AMS
97 
98  const char *Relais_Code[]= {{"b0 - Peltier"}, //0
99  {"b1 - FANPelt "}, //1
100  {"b2 - HG"}, //2
101  {"b3 - QJ"}, //3
102  {"b4 - Spare"}, //4
103  {"b5 - Spare"}, //5
104  {"b6 - Spare"}, //6
105  {"b7 - Spare"}, //7
106 
107  {"b0 - spare"}, //0
108  {"b1 - Spare "}, //1
109  {"b2 - Spare"}, //2
110  {"b3 - Spare"}, //3
111  {"b4 - Spare"}, //4
112  {"b5 - Spare"}, //5
113  {"b6 - Spare"}, //6
114  {"b7 - Spare"}, //7
115 
116  {"b0 - Spare"}, //0
117  {"b1 - Spare"}, //1
118  {"b2 - Spare"}, //2
119  {"b3 - Spare"}, //3
120  {"b4 - Spare"}, //4
121  {"b5 - Spare"}, //5
122  {"b6 - Spare"}, //6
123  {"b7 - Spare"}}; //7
124 
125 
126 
127 
128 
129 /*
130  Write on FTP.INI file:
131  1) the FTP server address,
132  2) the FTP User Name,
133  3) the FTP User pwd,
134 */
135 int WriteFTPINI(void)
136 {
137 
138  FILE *fs;
139  char str[255];
140 
141  char buff[_MAX_PATH];
142 
143  sprintf(buff, "%s\\FTP.INI", BIL.DFILEM.CONFIGDIREQUIPMENT);
144 
145  fs = fopen(buff, "w");
146 
147  if(fs == NULL)
148  {
149  MMessageDialog("DAS information", "Problems in opening file", " Ok ", NULL);
150  return 1;
151  }
152 
153  sprintf(str, "####################################################\n");
154  fprintf(fs,str);
155  sprintf(str, "# Configuration file for FTP Setting. #\n");
156  fprintf(fs,str);
157  sprintf(str, "####################################################\n");
158  fprintf(fs,str);
159  sprintf(str, "# FTP Server Address #\n");
160  fprintf(fs,str);
161 
162  sprintf(str, "%s\n", DFTP.ftpserver);
163  fprintf(fs,str);
164 
165  sprintf(str, "# FTP User Name #\n");
166  fprintf(fs,str);
167 
168  sprintf(str, "%s\n", DFTP.ftpuser);
169  fprintf(fs,str);
170 
171  sprintf(str, "# FTP pwd #\n");
172  fprintf(fs,str);
173 
174  sprintf(str, "%s\n", DFTP.ftppwd);
175  fprintf(fs,str);
176 
177  sprintf(str, "####################################################\n");
178  fprintf(fs,str);
179 
180  fclose (fs);
181 
182  sprintf(str, "%s\\%s", BIL.DFILEM.CONFIGDIREQUIPMENT, "FTP.INI");
183 
184  sprintf(buff,"The settings for FTP Server have been saved in the file:\n '%s'", str);
185  MMessageDialog("DAS information", buff, " Ok ", NULL);
186 
187 
188  return 0;
189 }
190 
191 /*
192  TEST the FTP server
193 */
194 int TestFTP(void)
195 {
196 
197  int er = 0;
198  char COMANDO[255];
199  char buff[255];
200 
201  FILE *fd;
202 
203  sprintf(buff, "%s\\%s", BIL.DFILEM.CONFIGDIREQUIPMENT, "TestFTP.txt");
204  fd = fopen(buff, "w");
205 
206  if(fd == NULL)
207  {
208  MMessageDialog("DAS information", "Problems in opening file", " Ok ", NULL);
209  return 1;
210  }
211 
212  sprintf(buff, "%s\n", DFTP.ftpuser);
213  fprintf(fd,buff);
214  sprintf(buff, "%s\n", DFTP.ftppwd);
215  fprintf(fd,buff);
216 // sprintf(buff, "%s\n", "bi");
217 // fprintf(fd,buff);
218 
219  fclose(fd);
220 
221 
222  COMANDO[0] = '\0';
223 
224  //Write Command file
225  sprintf(buff, "%s\\%s", BIL.DFILEM.CONFIGDIREQUIPMENT, "TestFTP.txt");
226 
227  sprintf(COMANDO, "ftp -i -s:%s %s",buff, DFTP.ftpserver);
228 
229  er = WinExec(COMANDO, SW_SHOW); // or SW_HIDE
230 
231 // sprintf(COMANDO, "del %s",buff);
232 
233 // system(COMANDO);
234 
235  return 0;
236 }
237 
238 /*
239 Callback for the FTP push buttons
240 */
241 void PbftpCB(MOBJECT o, void *a, void *v)
242 {
243  int er = 0;
244  int c = (int) v;
245 
246  switch (c)
247  {
248  case 0: // Save FTP.INI
249  WriteFTPINI();
250  break;
251  case 1: // Test FTP Connection
252  TestFTP();
253  break;
254  }
255 }
256 
257 /*
258 Callback for the FTP radio buttons
259 */
260 void DB_RadioFTPCB(MOBJECT o, void *a, void *v)
261 {
262 
263  int er = 0;
264  int c = (int) v;
265 // char buf[32];
266 
267 
269 
270  if(er)
271  {
272  switch (c)
273  {
274  case 0:
275  DAS.DOption.ftpbackup = 1;
276 /*
277  LoadFTPSetting();
278  MEditEnableEditing(DFTP.edServerFTP);
279  sprintf(buf, "%s",DFTP.ftpserver);
280  MObjectSetText(DFTP.edServerFTP, buf);
281  MObjectSetBackgroundRGB(DFTP.edServerFTP, 40, 96, 72);
282 
283  sprintf(buf, "%s",DFTP.ftppwd);
284  MObjectSetText(DFTP.edpwd, buf);
285  MEditEnableEditing(DFTP.edpwd);
286  MObjectSetBackgroundRGB(DFTP.edpwd, 40, 96, 72);
287 
288  sprintf(buf, "%s",DFTP.ftpuser);
289  MObjectSetText(DFTP.edid, buf);
290  MEditEnableEditing(DFTP.edid);
291  MObjectSetBackgroundRGB(DFTP.edid, 40, 96, 72);
292 */
293  break;
294  case 1:
295  DAS.DOption.ftpbackup = 0;
296 /* sprintf(buf, "%s"," ");
297  MObjectSetText(DFTP.edServerFTP, buf);
298  MEditDisableEditing(DFTP.edServerFTP);
299  MObjectSetBackgroundRGB(DFTP.edServerFTP, 192, 192, 192);
300 
301  sprintf(buf, "%s"," ");
302  MObjectSetText(DFTP.edpwd, buf);
303  MEditDisableEditing(DFTP.edpwd);
304  MObjectSetBackgroundRGB(DFTP.edpwd, 192, 192, 192);
305 
306  sprintf(buf, "%s"," ");
307  MObjectSetText(DFTP.edid, buf);
308  MEditDisableEditing(DFTP.edid);
309  MObjectSetBackgroundRGB(DFTP.edid, 192, 192, 192);
310 */
311  break;
312 
313  }
314  }
315 
316 }
317 /****************************************************************/
318 /****************************************************************/
319 /*********** LOG Temperatures Callbacks *************/
320 /****************************************************************/
321 
322 
323 void CloseShTempCB(MOBJECT p, void *od, void *ad)
324 {
325  char buf[_MAX_PATH];
326  int er = 0;
327 
328  // DAS Working directory and MGUI Environment
329  sprintf(buf, "%s\\%s", BIL.DFILEM.HOMEDIRECTORY, "DAS.exe");
330  er = SetWorkDirMGUIenv(buf);
331  if (er == -1)
332  {
333  //Unable to set the enviromental variable
334  }
335 
336  MShellUnrealize(p);
337  MShellDestroy(p);
338 
339 
340 }
341 
342 
343 MOBJECT MDCreate2DPlot(char *title, int x, int y, int dx, int dy, int mode)
344 {
345 
346  char buf[_MAX_PATH];
347  int er = 0;
348 
349 
350  OMUTEMP.sh = MDCreate_2DPlot(title);
351  MShellRealize( OMUTEMP.sh);
352  //Close shell CB
354 
355 
356  // DAS Working directory and MGUI Environment
357  sprintf(buf, "%s\\%s", BIL.DFILEM.HOMEDIRECTORY, "DAS.exe");
358  er = SetWorkDirMGUIenv(buf);
359  if (er == -1)
360  {
361  //Unable to set the enviromental variable
362  }
363 
364 
365 
366 // DrawAreaTempCB(datatemp.drawarea000);
367  return 0;
368 
369 }
370 
371 void DB_2DPlot(char *title, int x, int y, int dx, int dy, int mode)
372 {
373 
374  MDCreate2DPlot(title, x, y, dx, dy, mode);
375 
376 }
377 
378 
379 int ReadLogFile(int mod, char *dir, char *filename, int nx, int ny, struct omutemp datatemp)
380 {
381  FILE *fs;
382  char fileorigin[_MAX_PATH];
383 
384  char str[255], ch;
385  int k= 0, t=0;
386  int x, y, l;
387  char ttime[8], timetemp[2];
388 
389  timetemp[0] = '\0';
390 
391  sprintf(fileorigin,"%s%s", dir, filename);
392 
393  fs = fopen(fileorigin, "r");
394  if(fs < 0) return -1;
395  if(mod==0)
396  {
397  //Init the reading of the file
398  do
399  {
400  ReadLine(str, 255, fs);
401  k++;
402  }while(!feof(fs));
403 
404  fclose(fs);
405  return k - 2; //Number of data
406  }
407  if(mod)
408  {
409 
410 
411  //Init the reading of the file
412  //FlushLine (the first)
413  t=0;
414  do
415  {
416  str[t] = (unsigned char)ch;
417  ch = getc(fs);
418  t++;
419  }while (ch != 10);
420 
421  for (x = 0; x < nx; x++)
422  {
423  ReadLine(str, 32, fs);
424  sscanf(str, "%s %f %f% %f% ", &ttime, &datatemp.CCDTemp[x], &datatemp.CCDPwr[x], &datatemp.PltPwr[x]);
425  //if(str[0] != numero --> messAGGIO ED esci
426  l = strlen(ttime);
427  // Build time
428  strncpy(timetemp, ttime, 2);
429  datatemp.ptimeMat[x].ti_hour = (unsigned char) atoi(timetemp);
430  strncpy(timetemp, ttime + 3, 2);
431  datatemp.ptimeMat[x].ti_min = (unsigned char) atoi(timetemp);
432  strncpy(timetemp, ttime + 6, 2);
433  datatemp.ptimeMat[x].ti_sec = (unsigned char) atoi(timetemp);
434 
435  for(y = 0; y < ny; y++)
436  {
437 
438  fscanf(fs, "%f", &datatemp.pTempMat[x * ny + y] );
439 
440  }
441  //FlushLine
442  t=0;
443  do
444  {
445  str[t] = (unsigned char)ch;
446  ch = getc(fs);
447  t++;
448  }while (ch != 10);
449 
450  }
451 
452  fclose(fs);
453  }
454  return 0;
455 }
456 int BrowseLog(void)
457 {
458  int er = 0;
459  char buf[255];
460  int tix = 0, tiy = OMUTEMP.dimy = 16;
461 
462  char fname[128], dirname[128];
463  unsigned long mx;
464 
465 
466  FB_PREFS prefs;
467 
468  prefs.allow_dir_create = True;
469  prefs.allow_dir_delete = True;
470  prefs.allow_dir_rename = True;
471  prefs.change_cwd = True;
472  prefs.allow_dir_create = True;
473  prefs.allow_dir_rename = True;
474  prefs.bg_image = False;
475  prefs.bg_image_file = "";
476  prefs.button_font = HELV_SMALL;
477  prefs.close_button = "CANCEL";
478  prefs.create_menu = "CREATE";
479  prefs.file_label = "File:";
480  prefs.filter_label = "Filter:";
481  prefs.font = HELV_SMALL;
482  prefs.ok_button = "OK";
483  prefs.remove_menu = "REMOVE";
484  prefs.rename_menu = "RENAME";
485  prefs.transparent_tree = False;
486 
487  strcpy (dirname, BIL.DFILEM.LOGDIR);
488  fname[0] = '\0';
489 
490 
491 
492 
493  if(MFileBrowseExt("Select LOG file", "*.log", fname, dirname, &prefs))
494  {
495 
496  sprintf(buf, "%s%s", dirname, fname);
497  }
498  else
499  return 1;
500 
501  OMUTEMP.dimx = ReadLogFile(0, dirname, fname, 0, 0, OMUTEMP);
502  if (OMUTEMP.dimx >=5)
503  {
504  //Remenber to de-alloc theese arrays
505  OMUTEMP.pTempMat = AllocFloatMat(OMUTEMP.dimx, OMUTEMP.dimy);
506 
507  mx = (unsigned long) OMUTEMP.dimx;
508  OMUTEMP.ptimeMat = (struct dtime *) calloc( mx, sizeof(struct dtime ));
509  OMUTEMP.CCDTemp = (float *) calloc( mx, sizeof(float));
510  OMUTEMP.CCDPwr = (float *) calloc( mx, sizeof(float));
511  OMUTEMP.PltPwr = (float *) calloc( mx, sizeof(float));
512 
513  }
514  else
515  return 1;
516 
517  ReadLogFile(1, dirname, fname, OMUTEMP.dimx, OMUTEMP.dimy, OMUTEMP);
518 
519  sprintf(buf,"TEMPERATURE HISTORY - File:%s", fname);
520 
521  DB_2DPlot(buf, OMUTEMP.dimx, OMUTEMP.dimy, 512, 256, SET2D_GRID);
522 
523  return 0;
524 
525 }
526 
527 void PBTempHistoCB(MOBJECT o, void *a, void *v)
528 {
529 
530  int er = 0;
531 
532  er = BrowseLog();
533 
534 
535 
536 
537 }
538 
539 
540 void DB_TempHistCB(MOBJECT o, void *a, void *v)
541 {
542 
543  int er = 0;
544  int c = (int) v;
545 
546 
548 
549  if(er)
550  {
551  switch (c)
552  {
553  case 0:
554  DAS.DOption.refertemp = 0; //AVGPINT;
555  break;
556  case 1:
557  DAS.DOption.refertemp = 1; //OPTIC;
558  break;
559  case 2:
560  DAS.DOption.refertemp = 2; //GRATING;
561  break;
562 
563  case 3:
564  OMUTHR.TRType = TRTCOOL; //;
565  break;
566  case 4:
567  OMUTHR.TRType = TRTHEAT; //;
568  break;
569  case 5:
570  OMUTHR.TRType = TRTBOTH; //;
571  break;
572  case 6:
573  OMUTHR.PID_On = 0; //;
574  break;
575  case 7:
576  OMUTHR.PID_On = 1; //;
577  break;
578  }
579  }
580 
581 }
582 
583 
584 void DB_EqTypeCB(MOBJECT o, void *a, void *v)
585 {
586 
587  int er = 0;
588  int c = (int) v;
589 
590 
592 
593  if(er)
594  {
595  switch (c)
596  {
597  case 0:
598  DAS.Paramini.EqType = 0; //SPATRAM;
599  sprintf(BIL.DFILEM.CONFIGDIREQUIPMENT, "%s\\SPATRAM",BIL.DFILEM.CONFIGDIRCOMMON);
600  break;
601  case 1:
602  DAS.Paramini.EqType = 1; //TROPOGAS;
603  sprintf(BIL.DFILEM.CONFIGDIREQUIPMENT, "%s\\TROPOGAS",BIL.DFILEM.CONFIGDIRCOMMON);
604  break;
605  case 2:
606  DAS.Paramini.EqType = 2; //LIS;
607  sprintf(BIL.DFILEM.CONFIGDIREQUIPMENT, "%s\\LIS",BIL.DFILEM.CONFIGDIRCOMMON);
608  break;
609  case 3:
610  DAS.Paramini.EqType = 3; //SPATRAMPLUS;
611  sprintf(BIL.DFILEM.CONFIGDIREQUIPMENT, "%s\\SPATRAMPLUS",BIL.DFILEM.CONFIGDIRCOMMON);
612  break;
613  case 4:
614  DAS.Paramini.EqType = 4; //GASCODNG1;
615  sprintf(BIL.DFILEM.CONFIGDIREQUIPMENT, "%s\\GASCODNG1",BIL.DFILEM.CONFIGDIRCOMMON);
616  break;
617  case 5:
618  DAS.Paramini.EqType = 5; //GASCODOffAxis;
619  sprintf(BIL.DFILEM.CONFIGDIREQUIPMENT, "%s\\GASCODOA",BIL.DFILEM.CONFIGDIRCOMMON);
620  break;
621  case 6:
622  DAS.Paramini.EqType = 6; //GASCODNG2;
623  sprintf(BIL.DFILEM.CONFIGDIREQUIPMENT, "%s\\GASCODNG2",BIL.DFILEM.CONFIGDIRCOMMON);
624  break;
625  case 7:
626  DAS.Paramini.EqType = 7; //GASCODNG3;
627  sprintf(BIL.DFILEM.CONFIGDIREQUIPMENT, "%s\\GASCODNG3",BIL.DFILEM.CONFIGDIRCOMMON);
628  break;
629  case 8:
630  DAS.Paramini.EqType = 8; //GASCODNG4;
631  sprintf(BIL.DFILEM.CONFIGDIREQUIPMENT, "%s\\GASCODNG4",BIL.DFILEM.CONFIGDIRCOMMON);
632  break;
633  case 9:
634  DAS.Paramini.EqType = 9; //SPATRAM2;
635  sprintf(BIL.DFILEM.CONFIGDIREQUIPMENT, "%s\\SPATRAM2",BIL.DFILEM.CONFIGDIRCOMMON);
636  break;
637  case 10:
638  DAS.Paramini.EqType = 10; //SPATRAM3;
639  sprintf(BIL.DFILEM.CONFIGDIREQUIPMENT, "%s\\SPATRAM3",BIL.DFILEM.CONFIGDIRCOMMON);
640  break;
641  }
642  }
643  WriteEquipini();
644 
645  er = LoadDB_DispCoeff();
646 
647 
648 
649 }
650 /****************************************************************/
651 /* Create the Configuration Panel for Camera, Options, Color, Fonts, Motor settings */
652 /****************************************************************/
653 
654 void DB_HomeTypeCB(MOBJECT p, LIST_ACT *la, void *ad)
655 {
656  int er = 0;
657  int c = (int) ad;
658  int i = 3;
659 
660 
661  //er = MRButtonGetActivationStatus(p);
662 // DAS.StepM.hometype[id][snum]
663 
664 
665  switch (c)
666  {
667  case 0:
668  if (la->pos ==0)
669  DAS.StepM.hometype[0][0] = 0;
670  if (la->pos ==1)
671  DAS.StepM.hometype[0][0] = 1;
672  if (la->pos ==2)
673  DAS.StepM.hometype[0][0] = 2;
674  break;
675  case 1:
676  if (la->pos ==0)
677  DAS.StepM.hometype[0][1] = 0;
678  if (la->pos ==1)
679  DAS.StepM.hometype[0][1] = 1;
680  if (la->pos ==2)
681  DAS.StepM.hometype[0][1] = 2;
682  break;
683  case 2:
684  if (la->pos ==0)
685  DAS.StepM.hometype[1][0] = 0;
686  if (la->pos ==1)
687  DAS.StepM.hometype[1][0] = 1;
688  if (la->pos ==2)
689  DAS.StepM.hometype[1][0] = 2;
690  break;
691 
692  case 3:
693  if (la->pos ==0)
694  DAS.StepM.hometype[1][1] = 0;
695  if (la->pos ==1)
696  DAS.StepM.hometype[1][1] = 1;
697  if (la->pos ==2)
698  DAS.StepM.hometype[1][1] = 2;
699  break;
700  case 4:
701  if (la->pos ==0)
702  DAS.StepM.hometype[2][0] = 0;
703  if (la->pos ==1)
704  DAS.StepM.hometype[2][0] = 1;
705  if (la->pos ==2)
706  DAS.StepM.hometype[2][0] = 2;
707  break;
708 
709  case 5:
710  if (la->pos ==0)
711  DAS.StepM.hometype[2][1] = 0;
712  if (la->pos ==1)
713  DAS.StepM.hometype[2][1] = 1;
714  if (la->pos ==2)
715  DAS.StepM.hometype[2][1] = 2;
716  break;
717 
718  }
719 
720 
721 
722 }
723 
724 void DB_TestHomeTypeCB(MOBJECT p, void *od, void *ad)
725 {
726 
727  int c = (int) ad;
728 // int id;
729 
730 
731  switch (c)
732  {
733  case 0:
734  HomeMirror();
735  break;
736  case 1:
737  HomeGratingFast(0);
738  break;
739  case 2:
740  HomeFiltersFast();
741  break;
742  case 3:
743 
744  break;
745  case 4:
746  HomeZenithFast();
747 
748  break;
749  case 5:
750  HomeAzimFast();
751  break;
752  }
753 
754 }
755 
756 
757 void CONFP_AMS_TabSingMotor(int id, int snum, MOBJECT tb1)
758 {
759  char buf[64], str[64];
760  MOBJECT lbl, tb;
761  int i;
762  double percentuale, speedhz;
763  MOBJECT list;
764  float multip;
765  int selectedmult;
766 
767  tb = MCreateTableForm(tb1, 2);
768  MObjectSetBackgroundRGB(tb, 80, 60, 0);
769  MObjectSetResize(tb, True, True);
770 
771 /*********************************************************************/
772  //Power
773  lbl = MCreateLabel(tb, "Power:", HELV_SMALL);
776  MObjectSetForegroundRGB(lbl, 255, 255, 255);
777  MObjectSetTransparency(lbl, 0);
779 
780 
781  sprintf(buf, "%.1f%%",DAS.StepM.cop_perc[id][snum]);
782  DAS.Gui.ConfigPanel.SM_power[id][snum] = MCreateOptionEdit(tb, buf, 6, 6, 6, FIXED_SMALL);
783  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_power[id][snum], 255, 255, 255);
784  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_power[id][snum], 120, 100, 0);
786  list = MOptionEditGetList(DAS.Gui.ConfigPanel.SM_power[id][snum] );
787  for(i=1; i<77; i++)
788  {
789  percentuale = int2perc(0, i);
790  sprintf(buf, "%.1f%%",percentuale);
791  MSListAddItem(list, buf, 0L);
792  }
793 
794  MSListSelectElement(list, DAS.StepM.power[id][snum] - 1);
795 /**********************************************************************/
796 
797 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
798  //Step
799  lbl = MCreateLabel(tb, "Step:", HELV_SMALL);
802  MObjectSetForegroundRGB(lbl, 255, 255, 255);
803  MObjectSetTransparency(lbl, 0);
805 
806  //DAS.StepM.step_fraz[id][snum];
807  //MObjectGetText(DAS.Gui.ContrPanel.step[id][snum], buf);
808  DAS.Gui.ConfigPanel.SM_step[id][snum] = MCreateOptionEdit(tb, DAS.StepM.step_fraz[id][snum], 6, 6, 6, FIXED_SMALL);
809  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_step[id][snum], 255, 255, 255);
810  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_step[id][snum], 120, 100, 0);
812  list = MOptionEditGetList(DAS.Gui.ConfigPanel.SM_step[id][snum] );
813  for(i=0; i<14; i++)
814  {
815  listval2fraz(0, i);
816  sprintf(lfraz, "%s", lfraz);
817  MSListAddItem(list, lfraz, 0L);
818  }
819  MSListSelectElement(list, DAS.StepM.step[id][snum]);
820 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
821 
822  /*ççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççç/ // Slope lbl = MCreateLabel(tb, "Slope:", HELV_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); sprintf(buf, "%d",DAS.StepM.slope[id][snum]); DAS.Gui.ConfigPanel.SM_slope[id][snum] = MCreateOptionEdit(tb, buf, 5, 5, 6, FIXED_SMALL); MEditSetFilter(DAS.Gui.ConfigPanel.SM_slope[id][snum], 260, ""); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_slope[id][snum], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_slope[id][snum], 120, 100, 0); MObjectAlign(DAS.Gui.ConfigPanel.SM_slope[id][snum], RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.SM_slope[id][snum]); list = MOptionEditGetList(DAS.Gui.ConfigPanel.SM_slope[id][snum]); for(i=1; i<256; i++) { sprintf(buf, "%d", i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, DAS.StepM.slope[id][snum] - 1); /*ççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççç*/ /********ùùùùùùùùùùùùùùùùùùùùùùùùùù********/ //Speed lbl = MCreateLabel(tb, "Speed(Hz):", HELV_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); sprintf(buf, "%.3lf",DAS.StepM.speed_Hz[id][snum]); DAS.Gui.ConfigPanel.SM_speed[id][snum]= MCreateOptionEdit(tb, buf, 6, 6, 6, FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.SM_speed[id][snum], RIGHT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_speed[id][snum], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_speed[id][snum], 120, 100, 0); MEditDisableEditing(DAS.Gui.ConfigPanel.SM_speed[id][snum] ); list = MOptionEditGetList(DAS.Gui.ConfigPanel.SM_speed[id][snum] ); for(i=0; i<256; i++) { speedhz = int2hertz(0, i); sprintf(buf, "%.3lf", speedhz); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, DAS.StepM.speed[id][snum]); /********ùùùùùùùùùùùùùùùùùùùùùùùùùù********/ /*****+++++++++++++++++++++++++++++++*******/ //Multiplier lbl = MCreateLabel(tb, "Multiplier", HELV_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 74, 60, 0); MObjectSetResize(lbl, False, False); sprintf(buf, "%d",DAS.StepM.multiplier[id][snum]); DAS.Gui.ConfigPanel.SM_multiplier[id][snum] = MCreateOptionEdit(tb, buf, 4, 4, 6, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_multiplier[id][snum] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_multiplier[id][snum] , 120, 100, 0); MObjectAlign(DAS.Gui.ConfigPanel.SM_multiplier[id][snum], RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.SM_multiplier[id][snum]); list = MOptionEditGetList(DAS.Gui.ConfigPanel.SM_multiplier[id][snum]); for(i=1; i<31; i++) { if (i!=0) { multip = (float)i/2 + 0.5; sprintf(buf, "%.1lf", multip); MSListAddItem(list, buf, (void *) i); if (atof(buf) == DAS.StepM.multiplier[id][snum]) { selectedmult = i; sprintf(str, "%s", buf); } } } MSListSelectElement(list, selectedmult-1); MObjectSetText (DAS.Gui.ConfigPanel.SM_multiplier[id][snum], str); //MSTextSetString(list, str); //MSListSelectItem(list, str); //MSListSelectElement(list, DAS.StepM.multiplier[id][snum] - 1); // MOptionEditSetListCallback(CONFP.multip[nams][STEPM.SM1], ListMultipCB, (void *) STEPM.SM1); /*****+++++++++++++++++++++++++++++++++******/ DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum] = MCreatePButton(tb, "HOME", TIMES_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], 94, 111, 0); if (id == 0 && snum == 0) MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) 0); if (id == 0 && snum == 1) MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) 1); if (id == 1 && snum == 0) MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) 2); if (id == 1 && snum == 1) MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) 3); if (id == 2 && snum == 0) MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) 4); if (id == 2 && snum == 1) MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) 5); // MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) snum); if (DAS.StepM.hometype[id][snum] == 0) sprintf(buf, "%s","Standard"); if (DAS.StepM.hometype[id][snum] == 1) sprintf(buf, "%s","Default"); if (DAS.StepM.hometype[id][snum] == 2) sprintf(buf, "%s","Track"); DAS.Gui.ConfigPanel.SM_hometype[id][snum] = MCreateOptionEdit(tb, buf, 8, 8, 2, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_hometype[id][snum] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_hometype[id][snum] , 120, 100, 0); MObjectAlign(DAS.Gui.ConfigPanel.SM_hometype[id][snum], RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.SM_hometype[id][snum]); list = MOptionEditGetList(DAS.Gui.ConfigPanel.SM_hometype[id][snum]); for(i=0; i<3; i++) { if (i==0) { sprintf(buf, "%s", "Standard"); MSListAddItem(list, buf, (void *) i); } if (i==1) { sprintf(buf, "%s", "Default"); MSListAddItem(list, buf, (void *) i); } if (i==2) { sprintf(buf, "%s", "Track"); MSListAddItem(list, buf, (void *) i); } } MSListSelectElement(list, DAS.StepM.hometype[id][snum]); if (id == 0 && snum == 0) MOptionEditSetListCallback(DAS.Gui.ConfigPanel.SM_hometype[id][snum], DB_HomeTypeCB, (void *) 0); if (id == 0 && snum == 1) MOptionEditSetListCallback(DAS.Gui.ConfigPanel.SM_hometype[id][snum], DB_HomeTypeCB, (void *) 1); if (id == 1 && snum == 0) MOptionEditSetListCallback(DAS.Gui.ConfigPanel.SM_hometype[id][snum], DB_HomeTypeCB, (void *) 2); if (id == 1 && snum == 1) MOptionEditSetListCallback(DAS.Gui.ConfigPanel.SM_hometype[id][snum], DB_HomeTypeCB, (void *) 3); if (id == 2 && snum == 0) MOptionEditSetListCallback(DAS.Gui.ConfigPanel.SM_hometype[id][snum], DB_HomeTypeCB, (void *) 4); if (id == 2 && snum == 1) MOptionEditSetListCallback(DAS.Gui.ConfigPanel.SM_hometype[id][snum], DB_HomeTypeCB, (void *) 5); // pla = MSListGetSelected(list); // sprintf(buf, "%s",pla->item); // MObjectSetText(CONFP.power[nams][STEPM.SM1], buf); } int ChkDigIO(unsigned char word, int bitn) { int bn = bitn; int sts = 2; char str[80], *s; int er; unsigned long stbyte = 0; er = 0; // strcpy( sprintf(str,"0x%0x",word); stbyte = strtol(str, &s, 16); //stbyte = strtol(word, &s, 16); sts = stbyte & (unsigned char) pow(2,(double)(bn)); sts = sts >> bn; if (sts == 2) return 2; else return sts; } void OOP_CB(MOBJECT obj, MVALUE value, void *ad) { int c = (int) ad; int er, id, tmp; int actadd; // char buf[16]; actadd = MPagedFormGetActivePage(PFAMS); id = DAS.StepM.Addr[actadd]; tmp = c; er = ChkDigIO(DAS.StepM.OOP[id], tmp); if ( er == 1) { DAS.StepM.OOP[id] &= ~((unsigned char) pow(2,(double)(tmp))); MPixmapSetImageFile(DAS.Gui.ConfigPanel.OOP[id][tmp], "SYS\\ledoff.bmp"); } else if (er == 0) { DAS.StepM.OOP[id] |= (unsigned char) pow(2,(double)(tmp)); MPixmapSetImageFile(DAS.Gui.ConfigPanel.OOP[id][tmp], "SYS\\ledon.bmp"); } DAS.StepM.OOP[id] = ~DAS.StepM.OOP[id]; AMS_wopto(id, DAS.StepM.OOP[id]); delay(50); DAS.StepM.OOP[id] = ~DAS.StepM.OOP[id]; } void ReadInputCB(MOBJECT p, void *od, void *ad) { int i, er; // char buf[80]; int actadd, id; actadd = MPagedFormGetActivePage(PFAMS); id = DAS.StepM.Addr[actadd]; /* if (!CONFP.InitF[id]) { MMessageDialog("AMS Tester Inf.", "AMS Not Initialized!.\nPlease push ""Init"" button first", "OK", NULL); return ; } */ for (i=7;i>=0;i--) { er = AMS_chkbitsts(id, i); if(er==1) MPixmapSetImageFile(DAS.Gui.ConfigPanel.IOP[id][i], "SYS\\ledon.bmp"); else if(er==0) MPixmapSetImageFile(DAS.Gui.ConfigPanel.IOP[id][i], "SYS\\ledoff.bmp"); else Message("Unable to read AMS\nPlease check if AMS Switched ON", er); } } void DMessage(char *str) { MMessageDialog("AMS Informations", str, "OK", NULL); } void PBH_CB(MOBJECT p, void *od, void *ad) { int c = (int) ad; char buf[4096]; switch (c) { case 0: sprintf(buf, "Set the power for the motors\n\ Min = 0.02A; Max = 2.00A."); DMessage(buf); break; case 1: sprintf(buf, "Set the step fraction for the motors\n\ 1/n = 200*n steps/round\n\ n = 2,4,5,8,10,16,25,32,50,64,125,128,250,256.\n\ Min = 400 s/r; Max = 51200 s/r"); DMessage(buf); break; case 2: sprintf(buf, "Set the number of step used for slope"); DMessage(buf); break; case 3: sprintf(buf, "Set the speed of positioning of the motors ( 0.125 - 32 KHz)\n\ The value is obtained with the formula F2 (Hz) = F1(Hz) * (n + 1);\n n = 0, 1, ... 255. - Hex 00_FF.\n\n\ (i.e. n=1 --> F2 = 250 Hz)\n\ WARNING - The formula is valid only if F1 = 125Hz"); DMessage(buf); break; case 4: sprintf(buf, "Set the multiplier for the stepper motors."); DMessage(buf); break; case 5: sprintf(buf, "Set and Test the Home for the Motors\n\n - Standard: the stepper rounds counterclockwise with \ 2000 s/r (1/10) and f = 1KHz.\nThe sampling is done 1000 times per second (1KHZ)\n\n\ - Default: similar to ""Standard"", but using the actual setted stepping and frequency\n\n\ - Track: the tracking procedure is used.\n The stepper rounds fast since when the optoswitch is found,\n then the stepper\ inverts the direction and rounds slowly\n since when the status bit change again.\n\n"); DMessage(buf); break; case 6: sprintf(buf, "Read the Input port of AMS."); DMessage(buf); break; case 7: if (DAS.Paramini.EqType == SPATRAMPLUS) { sprintf(buf, "Set and Read the Output port of the AMS.\n\n\ AMS1:\n\ OOP[0] --> Peltier\n\ OOP[1] --> Fan Peltier\n\ OOP[2] --> HG Lamp\n\ OOP[3] --> QJ Lamp\n\ OOP[4] --> Peltier Power Supply\n\ OOP[5] --> Hires Power Supply\n\ OOP[6] --> SPARE\n\ OOP[7] --> SPARE\n"); } if (DAS.Paramini.EqType == GASCODNG1) { sprintf(buf, "Set and Read the Output port of the AMS.\n\n\ AMS1:\n\ OOP[0] - Peltier\n\ OOP[1] - Fan Peltier\n\ OOP[2] - HG Lamp\n\ OOP[3] - QJ Lamp\n\ OOP[4] - Peltier Power Supply\n\ OOP[5] - Hires Power Supply\n\ OOP[6] - Ext. Shutter or Torque Motor Shutter\n\ OOP[7] - Ext. Lamp\n\ AMS2:\n\ OOP[0] - Duty Cycle Peltier\n\ OOP[1] - SPARE\n\ OOP[2] - SPARE\n\ OOP[3] - SPARE\n\ OOP[4] - SPARE\n\ OOP[5] - SPARE\n\ OOP[6] - SPARE\n\ OOP[7] - SPARE\n\ AMS3:\n\ OOP[0] - SPARE\n\ OOP[1] - Fan ECU\n\ OOP[2] - SPARE\n\ OOP[3] - SPARE\n\ OOP[4] - SPARE\n\ OOP[5] - SPARE\n\ OOP[6] - SPARE\n\ OOP[7] - SPARE\n"); } if (DAS.Paramini.EqType == TROPOGAS) { sprintf(buf, "Set and Read the Output port of the AMS.\n\n\ AMS1:\n\ OOP[0] --> Peltier\n\ OOP[1] --> Fan Peltier\n\ OOP[2] --> HG Lamp\n\ OOP[3] --> QJ Lamp\n\ OOP[4] --> Peltier Power Supply\n\ OOP[5] --> Hires Power Supply\n\ OOP[6] --> Ext. Shutter\n\ OOP[7] --> Ext. Lamp\n"); } DMessage(buf); break; case 8: sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\ set the polarity for HOME and WORK Positions."); DMessage(buf); break; case 9: sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\ set the polarity for HOME and WORK Positions."); DMessage(buf); break; case 10: sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\ set the polarity for HOME and WORK Positions."); DMessage(buf); break; case 11: sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\ set the polarity for HOME and WORK Positions."); DMessage(buf); break; case 12: sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\ set the polarity for HOME and WORK Positions."); DMessage(buf); break; case 13: sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\ set the polarity for HOME and WORK Positions."); DMessage(buf); break; case 14: sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\ set the polarity for HOME and WORK Positions."); DMessage(buf); break; } } void CONFP_AMS_IOPort(MOBJECT dtb, int amsn) { MOBJECT lbl; int i; unsigned char er = 0; MOBJECT rowform, colform, rowform1, pb, pbh; MOBJECT tb, pixmap; char buf[32]; lbl = MCreateLabel(dtb, " TEST I/O Ports", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetCompositeWidth(lbl, 347); //era rowform017 rowform = MCreateRowForm(dtb); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); MObjectSetFGColorFromParent(rowform, False); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetShadow(rowform, WS_SHADOW_OUT, 2, 0); MObjectSetResize(rowform, True, True); //era _colform003 colform = MCreateColForm(rowform); MObjectSetForegroundRGB(colform, 255, 255, 255); MObjectSetBackgroundRGB(colform, 74, 60, 0); MObjectSetShadow(colform, WS_NONE, 0, 0); MObjectSetResize(colform, True, True); //era _rowform018 rowform1 = MCreateRowForm(colform); MObjectSetForegroundRGB(rowform1, 255, 255, 255); MObjectSetBackgroundRGB(rowform1, 74, 60, 0); MObjectSetResize(rowform1, True, True); lbl = MCreateLabel(rowform1, "Input Port", HELV_SMALL); MObjectAlign(lbl, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 74, 60, 0); MObjectSetResize(lbl, False, False); pb = MCreatePButton(rowform1, "Read Input", TIMES_SMALL); MBottomAttach(pb, F_ATT_FORM, 0, NULL); MObjectAlign(pb, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(pb, 255, 255, 255); MObjectSetBackgroundRGB(pb, 71, 126, 246); MPButtonSetCallback(pb, ReadInputCB, (void *) 0); //era _tablefrm018 tb = MCreateTableForm(colform, 8); MObjectAlign(tb, CENTER_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(tb, 255, 255, 255); MObjectSetBackgroundRGB(tb, 120, 100, 0); MObjectSetResize(tb, False, False); for (i=7;i>=0;i--) { sprintf(buf,"%d", i); lbl = MCreateLabel(tb, buf, HELV_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 91, 91, 91); } for (i=7;i>=0;i--) { DAS.Gui.ConfigPanel.IOP[amsn][i] = MCreatePixmapFromFile(tb, "SYS\\ledoff.bmp"); MObjectSetShadow(DAS.Gui.ConfigPanel.IOP[amsn][i], WS_NONE, 0, 0); } pbh = MCreateImagePButtonExt(colform, "sys\\qmarkyellow.bmp", "sys\\qmarkblue.bmp", "", "sys\\qmarkred.bmp", "", ""); MButtonSetImageMaskByPixel(pbh, 0, 0); MObjectSetTransparency(pbh, 255); MObjectSetShadow(pbh, WS_NONE, 0, 0); MObjectSetBackgroundRGB(pbh, 80, 60, 0); MPButtonSetCallback(pbh, PBH_CB, (void *) 6); MObjectSetResize(pbh, False, True); //era _rowform019 rowform = MCreateRowForm(dtb); MObjectAlign(rowform, UNDEF_ALIGN, TOP_ALIGN); MObjectSetFGColorFromParent(rowform, False); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, True, True); //era _colform004 colform = MCreateColForm(rowform); MObjectSetForegroundRGB(colform, 255, 255, 255); MObjectSetBackgroundRGB(colform, 74, 60, 0); MObjectSetShadow(colform, WS_NONE, 0, 0); MObjectSetResize(colform, True, True); //era _rowform020 rowform1 = MCreateRowForm(colform); MObjectSetBackgroundRGB(rowform1, 74, 60, 0); MObjectSetResize(rowform1, True, True); lbl = MCreateLabel(rowform1, "Output Port", HELV_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 74, 60, 0); MObjectSetResize(lbl, False, False); //era _tablefrm019 tb = MCreateTableForm(rowform1, 2); MFormSetSpacing(tb, 1); MTableFormSetColAlign(tb, 1, LEFT_ALIGN); // MTopAttach(_tablefrm019, F_ATT_OBJ, 0, _label033); MObjectAlign(tb, UNDEF_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, False, False); pixmap = MCreatePixmapFromFile(tb, "sys\\LEDOFFsmall.BMP"); lbl = MCreateLabel(tb, "OFF = 0", HELV_SMALL); MLabelSetMargin(lbl, 3, 1); MObjectSetBackgroundRGB(lbl, 74, 60, 0); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); pixmap = MCreatePixmapFromFile(tb, "sys\\LEDONsmall.BMP"); lbl = MCreateLabel(tb, "ON = 1", HELV_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MLabelSetMargin(lbl, 3, 1); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(lbl, 74, 60, 0); MObjectSetTransparency(lbl, 0); //era _tablefrm020 e colform004 tb = MCreateTableForm(colform, 8); MObjectAlign(tb, CENTER_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(tb, 255, 255, 255); MObjectSetBackgroundRGB(tb, 120, 100, 0); MObjectSetResize(tb, False, False); for (i=7;i>=0;i--) { sprintf(buf,"%d", i); lbl = MCreateLabel(tb, buf, HELV_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 91, 91, 91); } for (i=7;i>=0;i--) { sprintf(buf,"%d", i); DAS.Gui.ConfigPanel.OOP[amsn][i] = MCreateImageTButtonExt(tb, "sys\\ledoff.bmp", "sys\\ledon.bmp", "", "", "", ""); //MCreatePixmapFromFile(tb, "SYS\\ledoff.bmp"); MObjectSetShadow(DAS.Gui.ConfigPanel.OOP[amsn][i], WS_NONE, 0, 0); //MTButtonSetCallback(DAS.Gui.ConfigPanel.OOP[amsn][i], OOP_CB , (void *) i); er = ChkDigIO(DAS.StepM.OOP[amsn], i); if(er==1) MTButtonActivate(DAS.Gui.ConfigPanel.OOP[amsn][i]); else if(er==0) MTButtonDeactivate(DAS.Gui.ConfigPanel.OOP[amsn][i]); // the callback has to be after the creation and the setting of the buttons status!!!!!!!!!! MTButtonSetCallback(DAS.Gui.ConfigPanel.OOP[amsn][i], OOP_CB , (void *) i); } pbh = MCreateImagePButtonExt(colform, "sys\\qmarkyellow.bmp", "sys\\qmarkblue.bmp", "", "sys\\qmarkred.bmp", "", ""); MButtonSetImageMaskByPixel(pbh, 0, 0); MObjectSetTransparency(pbh, 255); MObjectSetShadow(pbh, WS_NONE, 0, 0); MObjectSetBackgroundRGB(pbh, 80, 60, 0); MPButtonSetCallback(pbh, PBH_CB, (void *) 7); MObjectSetResize(pbh, False, True); } void FrmStepperHomeMode(int mod, MOBJECT obj) { MOBJECT lbl, tb, rowfrm, rb, pb; // char buf[32]; int c = mod; int i = 3; // int k; const char *lblstring[] = {{"Mirror"}, {"Grating"}, {"Filter Wheel"}, {"Not Conn."}, {"Zenith"}, {"Azimut"}}; const char *helpoutput[] = {{"Standard - This command search the reference position of the device (Home).\nThe motor moves in the CCW direction until the input port became active.\nThe process is done with 2000 s/r and 1KHz of frequency.\nThe scanning for the end-run is done each 1 ms "}, {"Default - As the standard command, but with the actual values of step, power and frequancy "}, {"Fast - The frequency is setted in the program (see AMS User Guide and contact DanBo for modifications)"}}; rowfrm = MCreateRowForm(obj); MObjectSetBackgroundRGB(rowfrm, 80, 60, 0); lbl = MCreateLabel(rowfrm, lblstring[mod], FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 192, 80, 80); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowfrm,2); MObjectSetBackgroundRGB(tb, 80, 60, 0); rb= MCreateRButton(tb, "Standard", FIXED_SMALL); MPButtonSetCallback(rb, DB_HomeTypeCB, (void *) (c*i+0)); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetPopupHelp(rb, helpoutput[0], 200, 5000); // MObjectSetCompositeWidth(rb, 123); if(DAS.StepM.hometype[mod] == 0) MRButtonActivate(rb); pb= MCreatePButton(tb, "Test", FIXED_SMALL); MPButtonSetCallback(pb, DB_TestHomeTypeCB, (void *) (c*i+0)); MObjectAlign(pb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(pb, 0, 0, 0); MObjectSetBackgroundRGB(pb, 127, 220, 120); rb= MCreateRButton(tb, "Default", FIXED_SMALL); MPButtonSetCallback(rb, DB_HomeTypeCB, (void *) (c*i+1)); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetPopupHelp(rb, helpoutput[1], 200, 5000); // MObjectSetCompositeWidth(rb, 123); // if(DAS.DAS.StepM.hometype[mod] == 1) // MRButtonActivate(rb); pb= MCreatePButton(tb, "Test", FIXED_SMALL); MPButtonSetCallback(pb, DB_TestHomeTypeCB, (void *) (c*i+1)); MObjectAlign(pb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(pb, 0, 0, 0); MObjectSetBackgroundRGB(pb, 127, 220, 120); rb= MCreateRButton(tb, "Fast ", FIXED_SMALL); MPButtonSetCallback(rb, DB_HomeTypeCB, (void *) (c*i+2)); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetPopupHelp(rb, helpoutput[2], 200, 5000); // MObjectSetCompositeWidth(rb, 123); // if(DAS.DAS.StepM.hometype[mod] == 2) // MRButtonActivate(rb); pb= MCreatePButton(tb, "Test", FIXED_SMALL); MPButtonSetCallback(pb, DB_TestHomeTypeCB, (void *) (c*i+2)); MObjectAlign(pb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(pb, 0, 0, 0); MObjectSetBackgroundRGB(pb, 127, 220, 120); } void FrmNOVA_IO_Test(int mod, MOBJECT obj) { MOBJECT lbl, tb, rowfrm, rb, pb; // char buf[32]; int c = mod; int i = 3; // int k; const char *lblstring[] = {{"Mirror"}, {"Grating"}, {"Filter Wheel"}, {"Not Conn."}, {"Zenith"}, {"Azimut"}}; const char *helpoutput[] = {{"Standard - This command search the reference position of the device (Home).\nThe motor moves in the CCW direction until the input port became active.\nThe process is done with 2000 s/r and 1KHz of frequency.\nThe scanning for the end-run is done each 1 ms "}, {"Default - As the standard command, but with the actual values of step, power and frequancy "}, {"Fast - The frequency is setted in the program (see AMS User Guide and contact DanBo for modifications)"}}; rowfrm = MCreateRowForm(obj); MObjectSetBackgroundRGB(rowfrm, 80, 60, 0); lbl = MCreateLabel(rowfrm, lblstring[mod], FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 192, 80, 80); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowfrm,2); MObjectSetBackgroundRGB(tb, 80, 60, 0); rb= MCreateRButton(tb, "Standard", FIXED_SMALL); MPButtonSetCallback(rb, DB_HomeTypeCB, (void *) (c*i+0)); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetPopupHelp(rb, helpoutput[0], 200, 5000); // MObjectSetCompositeWidth(rb, 123); if(DAS.StepM.hometype[mod] == 0) MRButtonActivate(rb); pb= MCreatePButton(tb, "Test", FIXED_SMALL); MPButtonSetCallback(pb, DB_TestHomeTypeCB, (void *) (c*i+0)); MObjectAlign(pb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(pb, 0, 0, 0); MObjectSetBackgroundRGB(pb, 127, 220, 120); rb= MCreateRButton(tb, "Default", FIXED_SMALL); MPButtonSetCallback(rb, DB_HomeTypeCB, (void *) (c*i+1)); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetPopupHelp(rb, helpoutput[1], 200, 5000); // MObjectSetCompositeWidth(rb, 123); // if(DAS.DAS.StepM.hometype[mod] == 1) // MRButtonActivate(rb); pb= MCreatePButton(tb, "Test", FIXED_SMALL); MPButtonSetCallback(pb, DB_TestHomeTypeCB, (void *) (c*i+1)); MObjectAlign(pb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(pb, 0, 0, 0); MObjectSetBackgroundRGB(pb, 127, 220, 120); rb= MCreateRButton(tb, "Fast ", FIXED_SMALL); MPButtonSetCallback(rb, DB_HomeTypeCB, (void *) (c*i+2)); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetPopupHelp(rb, helpoutput[2], 200, 5000); // MObjectSetCompositeWidth(rb, 123); // if(DAS.DAS.StepM.hometype[mod] == 2) // MRButtonActivate(rb); pb= MCreatePButton(tb, "Test", FIXED_SMALL); MPButtonSetCallback(pb, DB_TestHomeTypeCB, (void *) (c*i+2)); MObjectAlign(pb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(pb, 0, 0, 0); MObjectSetBackgroundRGB(pb, 127, 220, 120); } //short _stdcall Inp32(short PortAddress); //void _stdcall Out32(short PortAddress, short data); void NOVAIn_CB(MOBJECT obj, void *od, void *ad) { int c = (int) ad; int i, er, tmp; // int actadd; // char buf[16]; tmp = c; er = NOVA_In(DAS.Nova.type, DAS.Nova.DigIn); //DAS.Nova.DigIn = 7; for (i=3;i>=0;i--) { er = ChkDigIO(DAS.Nova.DigIn, i); if(er==1) MPixmapSetImageFile(DAS.Nova.INP[i], "SYS\\ledon.bmp"); else if(er==0) MPixmapSetImageFile(DAS.Nova.INP[i], "SYS\\ledoff.bmp"); } } void NOVAOut_CB(MOBJECT obj, MVALUE value, void *ad) { int c = (int) ad; int er, tmp; // int actadd; // char buf[16]; tmp = c; er = ChkDigIO((unsigned char)DAS.Nova.DigOut, tmp); if ( er == 1) { DAS.Nova.DigOut &= ~((unsigned char) pow(2,(double)(tmp))); MPixmapSetImageFile(obj, "SYS\\ledoff.bmp"); } else if (er == 0) { DAS.Nova.DigOut |= (unsigned char) pow(2,(double)(tmp)); MPixmapSetImageFile(obj, "SYS\\ledon.bmp"); } //OutByte(576, DAS.Nova.DigOut); er = NOVA_Out(DAS.Nova.type, DAS.Nova.DigOut); } void CONFP_AMS_SM_OFFSET(MOBJECT obj, int nams) { char buf[64]; char str[512]; MOBJECT lbl, tb, rowform1, edit; int i, k; lbl = MCreateLabel(obj, "Devices Offsets", FIXED_SMALL); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetCompositeWidth(lbl, 347); rowform1 = MCreateRowForm(obj); MObjectSetBackgroundRGB(rowform1, 80, 60, 0); MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); lbl = MCreateLabel(rowform1, "Input Mirror", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetCompositeWidth(lbl, 347); tb = MCreateTableForm(rowform1, 5); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); MTableFormSetColAlign(tb, 0, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 80, 60, 0); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); lbl = MCreateLabel(tb, "Home", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); for(i=0;i<4;i++) { if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) sprintf(buf, "%s",Mir_CodeTropo[i]); else sprintf(buf, "%s",Mir_Code[i]); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); } for(i=0;i<5;i++) { sprintf(buf, "%d",DAS.Paramini.Offset[i]); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 120, 100, 0); MObjectSetCompositeWidth(edit, 65); k= i + 300; MEditSetValCallback(edit, ValidateCB, (void *) k); MEditSetActCallback(edit, ActEditCB, (void *) k); } sprintf(str," Type the new 'offset' value for the Home position\n then push TAB\n then go to the MAIN PANEL\n then push 'H_Mirr'\n DO NOT PUSH the 'Apply' button to test the new offset!"); lbl = MCreateLabel(obj, str, FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); } void CONFP_AMS_NOVA(MOBJECT pf) { MOBJECT lbl, tb, pb, rb, rowfrm; int i, er; char buf[64]; sprintf(buf, "SET NOVA MB"); MObjectSetText(pf, buf); rowfrm = MCreateRowForm(pf); MObjectSetBackgroundRGB(rowfrm, 80, 60, 0); MObjectSetResize(rowfrm, True, False); MObjectAlign(rowfrm, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(rowfrm, "Select NOVA board", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowfrm, 3); MObjectSetBackgroundRGB(tb, 80, 60, 0); MObjectSetResize(tb, True, True); rb = MCreateRButton(tb, "7892", FIXED_SMALL); MPButtonSetCallback(rb, NovaTypeCB, (void *) NOVA7892); MObjectAlign(rb, CENTER_ALIGN, TOP_ALIGN); MObjectSetShadow(rb, WS_NONE, 0, 0); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetBackgroundRGB(rb, 48, 20, 255); if(DAS.Nova.type == NOVA7892) MTButtonActivate(rb); else MTButtonDeactivate(rb); rb = MCreateRButton(tb, "6612G2", FIXED_SMALL); MPButtonSetCallback(rb, NovaTypeCB, (void *) NOVA6612G2); MObjectAlign(rb, CENTER_ALIGN, TOP_ALIGN); MObjectSetShadow(rb, WS_NONE, 0, 0); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetBackgroundRGB(rb, 48, 20, 255); if(DAS.Nova.type == NOVA6612G2) MTButtonActivate(rb); else MTButtonDeactivate(rb); rb = MCreateRButton(tb, "945GSE", FIXED_SMALL); MPButtonSetCallback(rb, NovaTypeCB, (void *) NOVA945GSE); MObjectAlign(rb, CENTER_ALIGN, TOP_ALIGN); MObjectSetShadow(rb, WS_NONE, 0, 0); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetBackgroundRGB(rb, 48, 20, 255); //MObjectSetUnsensitive(rb); if(DAS.Nova.type == NOVA945GSE) MTButtonActivate(rb); else MTButtonDeactivate(rb); pb = MCreatePButton(rowfrm, "Store", HELV_SMALL); MPButtonSetCallback(pb, WriteHardwareiniCB, (void *) 0); /**************************************************************/ lbl = MCreateLabel(rowfrm, "Output Port", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowfrm, 4); MObjectSetBackgroundRGB(tb, 80, 60, 0); MObjectSetResize(tb, True, True); //********************** for (i=3;i>=0;i--) { sprintf(buf,"%d", i); lbl = MCreateLabel(tb, buf, HELV_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 91, 91, 91); } for (i=3;i>=0;i--) { sprintf(buf,"%d", i); pb = MCreateImageTButtonExt(tb, "sys\\ledoff.bmp", "sys\\ledon.bmp", "", "", "", ""); MObjectSetShadow(pb, WS_NONE, 0, 0); er = ChkDigIO((unsigned char)DAS.Nova.DigOut, i); if(er == 1) MTButtonActivate(pb); else if(er==0) MTButtonDeactivate(pb); // the callback has to be after the creation and the setting of the buttons status!!!!!!!!!! MTButtonSetCallback(pb, NOVAOut_CB , (void *) i); } lbl = MCreateLabel(rowfrm, "Input Port", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); pb = MCreatePButton(rowfrm, "Read Input", TIMES_SMALL); MBottomAttach(pb, F_ATT_FORM, 0, NULL); MObjectAlign(pb, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(pb, 255, 255, 255); MObjectSetBackgroundRGB(pb, 71, 126, 246); MPButtonSetCallback(pb, NOVAIn_CB, (void *) 0); tb = MCreateTableForm(rowfrm, 4); MObjectSetBackgroundRGB(tb, 80, 60, 0); MObjectSetResize(tb, True, True); //********************** for (i=3;i>=0;i--) { sprintf(buf,"%d", i); lbl = MCreateLabel(tb, buf, HELV_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 91, 91, 91); } er = NOVA_In(DAS.Nova.type, DAS.Nova.DigIn); for (i=3;i>=0;i--) { er = ChkDigIO(DAS.Nova.DigIn, i); sprintf(buf,"%d", i); //DAS.Nova.INP[i] = MCreateImageTButtonExt(tb, "sys\\ledoff.bmp", "sys\\ledon.bmp", "", "", "", ""); if(er == 0) { DAS.Nova.INP[i] = MCreatePixmapFromFile(tb, "SYS\\ledoff.bmp"); MObjectSetShadow(DAS.Nova.INP[i], WS_NONE, 0, 0); } else if(er == 1) { DAS.Nova.INP[i] = MCreatePixmapFromFile(tb, "SYS\\ledon.bmp"); MObjectSetShadow(DAS.Nova.INP[i], WS_NONE, 0, 0); } //er = ChkDigIO(DAS.Nova.DigIn, i); //if(er == 1) // MTButtonActivate(DAS.Nova.INP[i]); //else if(er==0) // MTButtonDeactivate(DAS.Nova.INP[i]); // the callback has to be after the creation and the setting of the buttons status!!!!!!!!!! //MTButtonSetCallback(pb, NOVAIn_CB , (void *) i); } /*******************************************************/ // Set Reset Time tb = MCreateTableForm(rowfrm, 2); MObjectSetBackgroundRGB(tb, 80, 60, 0); MObjectSetResize(tb, True, True); lbl = MCreateLabel(tb, "Set reset time (1-255s)", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); sprintf(buf,"%d", DAS.Nova.WDT_TOUT); //sprintf(buf,"%d", 15); DAS.Gui.ConfigPanel.WDT_edt = MCreateEdit(tb, buf, 5, FIXED_SMALL); lbl = MCreateLabel(tb, "Time Elapsed", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); DAS.Gui.ConfigPanel.lbltelap = MCreateLabel(tb, " ", FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lbltelap, 48, 20, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lbltelap, 192, 192, 192); MObjectSetTransparency(DAS.Gui.ConfigPanel.lbltelap, 0); tb = MCreateTableForm(rowfrm, 3); MObjectSetBackgroundRGB(tb, 80, 60, 0); MObjectSetResize(tb, True, True); pb = MCreatePButton(tb, "Start", HELV_SMALL); MPButtonSetCallback(pb, WDT_CB , (void *) 0); pb = MCreatePButton(tb, "Exit", HELV_SMALL); // MPButtonSetCallback(pb, MDQuitCB, (void *) 0); pb = MCreatePButton(tb, "Launch Task", HELV_SMALL); MPButtonSetCallback(pb, WDT_Task_CB, (void *) 0); } void CONFP_AMS_Utility(MOBJECT pf) { MOBJECT rowfrm, rowfrm1; // int er; char buf[64]; sprintf(buf, "OFFSET"); MObjectSetText(pf, buf); rowfrm = MCreateRowForm(pf); MObjectSetBackgroundRGB(rowfrm, 80, 60, 0); MObjectSetResize(rowfrm, True, False); MObjectAlign(rowfrm, CENTER_ALIGN, TOP_ALIGN); /* lbl = MCreateLabel(rowfrm, "HOME MODE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowfrm, 2); MObjectSetBackgroundRGB(tb, 80, 60, 0); MObjectSetResize(tb, True, True); if(DAS.Paramini.EqType == SPATRAM) { for(i=0;i<6;i++) FrmStepperHomeMode(i, tb); } else { for(i=0;i<4;i++) FrmStepperHomeMode(i, tb); } */ //NOVA DIGITAL I/O rowfrm1 = MCreateRowForm(pf); MObjectSetBackgroundRGB(rowfrm1, 80, 60, 0); MObjectSetResize(rowfrm1, True, False); MObjectAlign(rowfrm1, CENTER_ALIGN, TOP_ALIGN); CONFP_AMS_SM_OFFSET(rowfrm, 0); } //void FrmStepperConfP(MOBJECT pf, int amsn) void CONFP_AMS(MOBJECT pf, int amsn) { char buf[64]; MOBJECT lbl, tb, tb1, pb, pbh, rowform; int i; // double speedhz; // MOBJECT list; sprintf(buf, "AMS%d",amsn+1); MObjectSetText(pf, buf); tb = MCreateTableForm(pf, 3); MObjectSetBackgroundRGB(tb, 80, 60, 0); MObjectSetResize(tb, False, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "ADDRESS:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 80, 60, 0); MObjectSetTransparency(lbl, 0); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetResize(lbl, True, True); sprintf(buf," %d ", amsn); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 120, 100, 0); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, True, True); pb = MCreatePButton(tb, "New Address", FIXED_SMALL); MObjectSetUnsensitive(pb); //MPButtonSetCallback(pb, TestFontCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectAlign(pb, RIGHT_ALIGN, TOP_ALIGN); tb1 = MCreateTableForm(pf, 3); MObjectSetBackgroundRGB(tb1, 80, 60, 0); MObjectSetResize(tb1, True, True); switch (amsn) { case 0: lbl = MCreateLabel(tb1, "SM-A, SM1 - MIRROR", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); lbl = MCreateLabel(tb1, "SM-B, SM2 - GRATING", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); lbl = MCreateLabel(tb1, "Help", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); break; case 1: lbl = MCreateLabel(tb1, "SM-A, SM3 - FILTERS ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); lbl = MCreateLabel(tb1, "SM-B, SM4 - Not Conn", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); lbl = MCreateLabel(tb1, "Help", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); break; case 2: lbl = MCreateLabel(tb1, "SM-A, SM5 - ZENITH", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); lbl = MCreateLabel(tb1, "SM-B, SM6 - AZIMUTH", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); lbl = MCreateLabel(tb1, "Help", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); break; } for (i=0;i<2;i++) { //TabSingleMotor(amsn, i, tb1); CONFP_AMS_TabSingMotor(amsn, i, tb1); } /*****+++++++++++++++++++++++++++++++++******/ //Help Buttons rowform = MCreateRowForm(tb1); MObjectSetResize(rowform, True, True); MObjectSetBackgroundRGB(rowform, 74, 60, 0); MObjectSetShadow(rowform, WS_NONE, 0, 0); for(i=0;i<6;i++) { pbh = MCreateImagePButtonExt(rowform, "sys\\qmarkyellow.bmp", "sys\\qmarkblue.bmp", "", "sys\\qmarkred.bmp", "", ""); MButtonSetImageMaskByPixel(pbh, 0, 0); MObjectSetTransparency(pbh, 255); MObjectSetShadow(pbh, WS_NONE, 0, 0); MObjectSetBackgroundRGB(pbh, 74, 60, 0); MPButtonSetCallback(pbh, PBH_CB, (void *) i); MObjectSetResize(pbh, False, True); } /*****************************************************/ CONFP_AMS_IOPort(pf, amsn); // FrmStepperOFFSET(pf, amsn); } void wledtCB(MOBJECT edit, char *text, void *ed) { int c = (int) ed; wl[c] = (int) strtod( text, &text ); } void valwledt(MOBJECT edit, EDIT_VAL *ev, void *ii) { int c = (int) ii; if (ev->focus_leave == True) wl[c] = (int) strtod( ev->text, &ev->text ); } void stedtCB(MOBJECT edit, char *text, void *ed) { int c = (int) ed; switch (c) { case 1: { DAS.Paramini.ITemp = strtod( text, &text ); break; } } } void valstedt(MOBJECT edit, EDIT_VAL *ev, void *ii) { int c = (int) ii; if (ev->focus_leave == True) wav[c] = (long)strtod( ev->text, &ev->text ); } /*******************************************************************************************/ /*******************************************************************************************/ int ApplyGeoCB(MOBJECT shell, void *od, void *ad) { FILE *fs; char str[180]; char buff[_MAX_PATH]; // int i; sprintf(buff, "%s\\GeoCoord.INI", BIL.DFILEM.CONFIGDIREQUIPMENT); fs = fopen(buff, "w"); if(fs == NULL) return 1; sprintf(str, "Geographical Coordinates file for %s station.\n"); fprintf(fs,str); sprintf(str, "%s Station name (3 CHAR)\n",DAS.DGeo.s_name); fprintf(fs,str); sprintf(str, "%.3f Latitude [ 90N, -90S]\n",DAS.DGeo.latitude); fprintf(fs,str); sprintf(str, "%.3f Longitude [ 0, 180 E],[-180 W, 0]\n",DAS.DGeo.longitude); fprintf(fs,str); sprintf(str, "%.3f Altitude [ masl]\n",DAS.DGeo.alititude); fprintf(fs,str); sprintf(str, "%d TimeZone\n",DAS.DGeo.timezone); fprintf(fs,str); fclose(fs); return 0; } //mode =0 --> DAS.DGeo.nitem; for deleting station //mode =1 --> DAS.DGeo.nitem++ ; for Adding Station int WriteGeo(int mode ) { FILE *fs; char str[180]; char buff[_MAX_PATH]; int i; // if (mode) // DAS.DGeo.nitem++; sprintf(buff, "%s\\GeoDB.ini", BIL.DFILEM.CONFIGDIREQUIPMENT); fs = fopen(buff, "w"); /*********************************/ if(fs == NULL) { MMessageDialog("DAS information", "Problems in opening file", " Ok ", NULL); return 1; } sprintf(str, "Geographical Coordinates file.\n"); fprintf(fs,str); sprintf(str, "the format is: \n"); fprintf(fs,str); sprintf(str, "Station name ( Max 3 CHAR)\n"); fprintf(fs,str); sprintf(str, "Latitude[90N,-90S] Longitude[0,180E],[-180W,0] Altitude(m/asl) TimeZone\n"); fprintf(fs,str); for (i=0;i<DAS.DGeo.nitem;i++) { sprintf(str, "%s\n",DAS.DGeo.news_name[i]); fprintf(fs,str); sprintf(str, "%.3f %.3f %.3f %d\n", DAS.DGeo.newlatitude[i], DAS.DGeo.newlongitude[i],DAS.DGeo.newalititude[i],DAS.DGeo.newtimezone[i]); fprintf(fs,str); } fclose(fs); DAS.DGeo.flagnewstation = 0; sprintf(str,"The current coordinates have been saved in '%s\\GeoDB.ini' file", BIL.DFILEM.CONFIGDIREQUIPMENT); MMessageDialog("DAS information", str, " Ok ", NULL); return 0; } void DB_GeocoordCB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; char str[16]; er = MRButtonGetActivationStatus(o); if(er) { if (c==100) { /* sprintf(str, "%s"," "); for(i=0;i<5;i++) MObjectSetText(DAS.DGeo.edit[i], str); MSelectObject(DAS.DGeo.edit[0]); DAS.DGeo.flagnewstation = 1; DAS.DGeo.selitem = DAS.DGeo.nitem; */ } else { DAS.DGeo.selitem = c; sprintf(DAS.DGeo.s_name, "%s", DAS.DGeo.news_name[c]); MObjectSetText(DAS.DGeo.edit[0], DAS.DGeo.s_name); DAS.DGeo.latitude = DAS.DGeo.newlatitude[c]; _gcvt(DAS.DGeo.latitude , 6, str ); MObjectSetText(DAS.DGeo.edit[1], str); DAS.DGeo.longitude = DAS.DGeo.newlongitude[c]; _gcvt(DAS.DGeo.longitude , 6, str ); MObjectSetText(DAS.DGeo.edit[2], str); DAS.DGeo.timezone = DAS.DGeo.newtimezone[c]; itoa(DAS.DGeo.timezone ,str, 10 ); MObjectSetText(DAS.DGeo.edit[3], str); DAS.DGeo.alititude = DAS.DGeo.newalititude[c]; _gcvt(DAS.DGeo.alititude , 6, str ); MObjectSetText(DAS.DGeo.edit[4], str); } } } void Rebuildrb(int mode) { int i; // char buf[16]; if (mode) //Delete Station for (i=0; i<DAS.DGeo.nitem+1; i++) MObjectDestroy(DAS.DGeo.rb[i]); else //Add Station for (i=0; i<DAS.DGeo.nitem-1; i++) MObjectDestroy(DAS.DGeo.rb[i]); for (i=0; i<DAS.DGeo.nitem; i++) { DAS.DGeo.rb[i] = MCreateRButton(DAS.DGeo.tbrb, DAS.DGeo.news_name[i], FIXED_SMALL); MPButtonSetCallback(DAS.DGeo.rb[i], DB_GeocoordCB, (void *) i); MObjectAlign(DAS.DGeo.rb[i], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.rb[i], 255, 255, 255); MObjectSetCompositeWidth(DAS.DGeo.rb[i], 85); } if(DAS.DGeo.selitem>0) DAS.DGeo.selitem = DAS.DGeo.selitem -1; else DAS.DGeo.selitem = DAS.DGeo.selitem; MRButtonActivate(DAS.DGeo.rb[DAS.DGeo.selitem]); /* sprintf(buf, "%s", "New St."); DAS.DGeo.rb[DAS.DGeo.nitem] = MCreateRButton(DAS.DGeo.tbrb, buf, FIXED_SMALL); MPButtonSetCallback(DAS.DGeo.rb[DAS.DGeo.nitem], DB_GeocoordCB, (void *) 100); MObjectAlign(DAS.DGeo.rb[DAS.DGeo.nitem], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.rb[DAS.DGeo.nitem], 255, 255, 255); MObjectSetCompositeWidth(DAS.DGeo.rb[DAS.DGeo.nitem], 85); */ } int StoreGeoCB(MOBJECT shell, void *od, void *ad) { int er = 0; er = WriteGeo(1); Rebuildrb(0); return 0; } int AddStCB(MOBJECT shell, void *od, void *ad) { int er = 0, i; char str[16]; sprintf(str, "%s"," "); for(i=0;i<5;i++) MObjectSetText(DAS.DGeo.edit[i], str); MSelectObject(DAS.DGeo.edit[0]); DAS.DGeo.flagnewstation = 1; DAS.DGeo.nitem++; DAS.DGeo.selitem = DAS.DGeo.nitem-1; return 0; } int DeleteGeoCB(MOBJECT shell, void *od, void *ad) { int c,i; char buf[80]; c=DAS.DGeo.selitem; for (i=0;i<c-1;i++) { DAS.DGeo.news_name[i]; } for (i=c+1;i<DAS.DGeo.nitem;i++) { sprintf(buf,"%s", DAS.DGeo.news_name[i]); sprintf(DAS.DGeo.news_name[i-1], "%s",buf); DAS.DGeo.newlatitude[i-1] = DAS.DGeo.newlatitude[i]; DAS.DGeo.newlongitude[i-1] = DAS.DGeo.newlongitude[i]; DAS.DGeo.newalititude[i-1] = DAS.DGeo.newalititude[i]; DAS.DGeo.newtimezone[i-1] = DAS.DGeo.newtimezone[i]; } sprintf(buf,"%s", DAS.DGeo.news_name[DAS.DGeo.nitem]); sprintf(DAS.DGeo.news_name[DAS.DGeo.nitem-1], "%s",buf); DAS.DGeo.newlatitude[DAS.DGeo.nitem-1] = DAS.DGeo.newlatitude[DAS.DGeo.nitem]; DAS.DGeo.newlongitude[DAS.DGeo.nitem-1] = DAS.DGeo.newlongitude[DAS.DGeo.nitem]; DAS.DGeo.newalititude[DAS.DGeo.nitem-1] = DAS.DGeo.newalititude[DAS.DGeo.nitem]; DAS.DGeo.newtimezone[DAS.DGeo.nitem-1] = DAS.DGeo.newtimezone[DAS.DGeo.nitem]; DAS.DGeo.nitem--; DAS.DGeo.selitem = c; WriteGeo(0); Rebuildrb(1); /* sprintf(str, "%.3f %.3f %.3f %d\n", DAS.DGeo.newlatitude[i], DAS.DGeo.newlongitude[i],DAS.DGeo.newalititude[i],DAS.DGeo.newtimezone[i]); fprintf(fs,str); */ return 0; } void DGeoeditCB(MOBJECT edit, EDIT_VAL *ev, void *ii) { int c = (int) ii; switch (c) { case 0: sprintf(DAS.DGeo.news_name[DAS.DGeo.selitem ], "%s", ev->text); break; case 1: DAS.DGeo.newlatitude[DAS.DGeo.selitem ] = (float)strtod( ev->text, &ev->text ); break; case 2: DAS.DGeo.newlongitude[DAS.DGeo.selitem] = (float)strtod( ev->text, &ev->text ); break; case 3: DAS.DGeo.newtimezone[DAS.DGeo.selitem ] = atoi( ev->text); break; case 4: DAS.DGeo.newalititude[DAS.DGeo.selitem] = (float)strtod( ev->text, &ev->text ); break; } } void DB_StorePB(MOBJECT obj, MAnyWindowEvent *pe, void *a_data) { if(DAS.DGeo.flagnewstation) MObjectSetSensitive(obj); else MObjectSetUnsensitive(obj); } /******************************************************/ void DSZArb_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; // char str[16]; switch (c) { case 0: DAS.Flag.DeltaSZA = 0; MObjectSetUnsensitive(DAS.Gui.ConfigPanel.lblSZA[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.lblSZA[1]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.lblSZA[2]); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtDSZA, 192, 192, 192); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[0], 192, 192, 192); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[1], 192, 192, 192); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.edtDSZA); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.edtSZA[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.edtSZA[1]); break; case 1: DAS.Flag.DeltaSZA = 1; MObjectSetSensitive(DAS.Gui.ConfigPanel.lblSZA[0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.lblSZA[1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.lblSZA[2]); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtDSZA, 40, 96, 72); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[0], 40, 96, 72); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[1], 40, 96, 72); MObjectSetSensitive(DAS.Gui.ConfigPanel.edtDSZA); MObjectSetSensitive(DAS.Gui.ConfigPanel.edtSZA[0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.edtSZA[1]); break; } } void edtDSZA_CB(MOBJECT p, LIST_ACT *la, void *ad) { int c = (int) ad; int er = 0; SZADelta.DeltaSZA = atof(la->item); } void edtSZA_CB(MOBJECT p, LIST_ACT *la, void *ad) { int c = (int) ad; int er = 0; switch (c) { case 0: SZADelta.MinSZA=atof(la->item); break; case 1: SZADelta.MaxSZA=atof(la->item); break; } } void CONFP_param_page5(int mod, MOBJECT obj) { MOBJECT rowform1; // generic row form // MOBJECT wledt; // generic edit object // MOBJECT stedt; // generic edit object // MOBJECT colform; MOBJECT pb; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; MOBJECT lbl; MOBJECT tb; // generic table object // char buf[64]; int k=0; float f=0; // FILE *fd; // char str[80]; // char buff[_MAX_PATH]; // LIST_ACT * pla; MObjectSetText(obj, "Page 5"); lbl = MCreateLabel(obj, "INSTALLED FILTERS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); /* tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True,False); DAS.Gui.ConfigPanel.rbDSZA[0] = MCreateRButton(tb, "Continuous", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDSZA[0], DSZArb_CB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbDSZA[0], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDSZA[0], 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbDSZA[0], 100); DAS.Gui.ConfigPanel.rbDSZA[1] = MCreateRButton(tb, "DeltaSZA", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDSZA[1], DSZArb_CB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbDSZA[1], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDSZA[1], 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbDSZA[1], 100); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True,False); DAS.Gui.ConfigPanel.lblSZA[0] = MCreateLabel(tb, "DeltaSZA (deg):", FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 255, 255, 255); //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblSZA[0], 0); sprintf(buff, "%.3f", SZADelta.DeltaSZA); DAS.Gui.ConfigPanel.edtDSZA = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtDSZA, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtDSZA, 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edtDSZA, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.edtDSZA); list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtDSZA); for(i=0; i<20; i++) { f = f+0.10; sprintf(str, "%.3f",f); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDSZA, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDSZA, edtDSZA_CB, (void *) 0); SZADelta.DeltaSZA = atof(pla->item); DAS.Gui.ConfigPanel.lblSZA[1] = MCreateLabel(tb, "SZA Min. (deg):", FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[1], 255, 255, 255); //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblSZA[1], 0); sprintf(buff, "%d", (int)SZADelta.MinSZA); DAS.Gui.ConfigPanel.edtSZA[0] = MCreateOptionEdit(tb, buff, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtSZA[0], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[0], 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edtSZA[0], CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.edtSZA[0]); list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtSZA[0]); for(i=0; i<21; i++) { sprintf(str, "%d",i); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtSZA[0], str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtSZA[0], edtSZA_CB, (void *) 0); SZADelta.MinSZA = atof(pla->item); DAS.Gui.ConfigPanel.lblSZA[2] = MCreateLabel(tb, "SZA Max. (deg):", FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[2], 255, 255, 255); //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblSZA[2], 0); sprintf(buff, "%d", (int)SZADelta.MaxSZA); DAS.Gui.ConfigPanel.edtSZA[1] = MCreateOptionEdit(tb, buff, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtSZA[1], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[1], 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edtSZA[1], CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.edtSZA[1]); list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtSZA[1]); starti = 20; for(i=starti; i<161; i++) { sprintf(str, "%d",i); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i - starti; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtSZA[1], str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtSZA[1], edtSZA_CB, (void *) 1); SZADelta.MaxSZA = atof(pla->item); if(DAS.Flag.DeltaSZA) MRButtonActivate(DAS.Gui.ConfigPanel.rbDSZA[1]); else MRButtonActivate(DAS.Gui.ConfigPanel.rbDSZA[0]); */ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, True); // Command Button Section /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/ rowform1 = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); // MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); /* pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL); MPButtonSetCallback(pb, ApplyGeoCB, (void *) 0); if((DAS.Flag.exemode == DOASMODE)) MObjectSetUnsensitive(pb); // Set the button as Unensitive MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); MObjectSetPopupHelp(pb,"Apply the selected setting to DAS (and write to file ..GeoCoord.ini)" , 200, 5000); */ pb = MCreatePButton(rowform1, "Save", FIXED_SMALL); MPButtonSetCallback(pb, WriteOptioniniCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(rowform1, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); MObjectSetPopupHelp(pb,"Close Config Panel" , 200, 5000); /* End Command Button Section æææææææææææææææææææææææææææææææææææ*/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ } void CONFP_param_page4(int mod, MOBJECT obj) { MOBJECT rowform1; // generic row form // MOBJECT wledt; // generic edit object // MOBJECT stedt; // generic edit object // MOBJECT colform; MOBJECT pb; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; MOBJECT lbl, list; MOBJECT tb; // generic table object // char buf[64]; int i, k=0, starti; float f=0; // FILE *fd; char str[80]; char buff[_MAX_PATH]; LIST_ACT * pla; MObjectSetText(obj, "Page 4"); lbl = MCreateLabel(obj, "Measurement Scheduling", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True,False); DAS.Gui.ConfigPanel.rbDSZA[0] = MCreateRButton(tb, "Continuous", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDSZA[0], DSZArb_CB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbDSZA[0], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDSZA[0], 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbDSZA[0], 100); DAS.Gui.ConfigPanel.rbDSZA[1] = MCreateRButton(tb, "DeltaSZA", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDSZA[1], DSZArb_CB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbDSZA[1], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDSZA[1], 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbDSZA[1], 100); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True,False); DAS.Gui.ConfigPanel.lblSZA[0] = MCreateLabel(tb, "DeltaSZA (deg):", FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 255, 255, 255); //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblSZA[0], 0); sprintf(buff, "%.3f", SZADelta.DeltaSZA); DAS.Gui.ConfigPanel.edtDSZA = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtDSZA, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtDSZA, 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edtDSZA, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.edtDSZA); list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtDSZA); for(i=0; i<20; i++) { f = f+(float)0.10; sprintf(str, "%.3f",f); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDSZA, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDSZA, edtDSZA_CB, (void *) 0); SZADelta.DeltaSZA = atof(pla->item); DAS.Gui.ConfigPanel.lblSZA[1] = MCreateLabel(tb, "SZA Min. (deg):", FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[1], 255, 255, 255); //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblSZA[1], 0); sprintf(buff, "%d", (int)SZADelta.MinSZA); DAS.Gui.ConfigPanel.edtSZA[0] = MCreateOptionEdit(tb, buff, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtSZA[0], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[0], 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edtSZA[0], CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.edtSZA[0]); list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtSZA[0]); for(i=0; i<21; i++) { sprintf(str, "%d",i); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtSZA[0], str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtSZA[0], edtSZA_CB, (void *) 0); SZADelta.MinSZA = atof(pla->item); DAS.Gui.ConfigPanel.lblSZA[2] = MCreateLabel(tb, "SZA Max. (deg):", FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[2], 255, 255, 255); //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblSZA[2], 0); sprintf(buff, "%d", (int)SZADelta.MaxSZA); DAS.Gui.ConfigPanel.edtSZA[1] = MCreateOptionEdit(tb, buff, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtSZA[1], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[1], 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edtSZA[1], CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.edtSZA[1]); list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtSZA[1]); starti = 20; for(i=starti; i<161; i++) { sprintf(str, "%d",i); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i - starti; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtSZA[1], str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtSZA[1], edtSZA_CB, (void *) 1); SZADelta.MaxSZA = atof(pla->item); if(DAS.Flag.DeltaSZA) MRButtonActivate(DAS.Gui.ConfigPanel.rbDSZA[1]); else MRButtonActivate(DAS.Gui.ConfigPanel.rbDSZA[0]); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, True); // Command Button Section /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/ rowform1 = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); // MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); /* pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL); MPButtonSetCallback(pb, ApplyGeoCB, (void *) 0); if((DAS.Flag.exemode == DOASMODE)) MObjectSetUnsensitive(pb); // Set the button as Unensitive MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); MObjectSetPopupHelp(pb,"Apply the selected setting to DAS (and write to file ..GeoCoord.ini)" , 200, 5000); */ pb = MCreatePButton(rowform1, "Save", FIXED_SMALL); MPButtonSetCallback(pb, WriteOptioniniCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(rowform1, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); MObjectSetPopupHelp(pb,"Close Config Panel" , 200, 5000); /* End Command Button Section æææææææææææææææææææææææææææææææææææ*/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ } void CONFP_param_page3(int mod, MOBJECT obj) { MOBJECT rowform1; // generic row form // MOBJECT wledt; // generic edit object // MOBJECT stedt; // generic edit object MOBJECT pb; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; MOBJECT lbl; MOBJECT tb; // generic table object char buf[64]; int i, k=0; // FILE *fd; // char str[80]; // char buff[_MAX_PATH]; MObjectSetText(obj, "Page 3"); lbl = MCreateLabel(obj, "Station Geo. Coordinates", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Actual Setting" ); lbl = MCreateLabel(obj, buf, FIXED_SMALL); MLabelSetAlignment(lbl, CENTER_ALIGN); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 5); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, False); sprintf(buf, "Stat." ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Lat." ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Long." ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "TZ" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Alt." ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%s", DAS.DGeo.s_name ); DAS.DGeo.edit[0] = MCreateEdit(tb, buf, 3, FIXED_SMALL); MObjectAlign(DAS.DGeo.edit[0] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.edit[0] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.DGeo.edit[0] , 40, 96, 72); MEditSetValCallback(DAS.DGeo.edit[0] , DGeoeditCB, (void *) 0); sprintf(buf, "%.2f", DAS.DGeo.latitude ); DAS.DGeo.edit[1] = MCreateEdit(tb, buf, 7, FIXED_SMALL); MObjectAlign(DAS.DGeo.edit[1] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.edit[1] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.DGeo.edit[1] , 40, 96, 72); MEditSetValCallback(DAS.DGeo.edit[1] , DGeoeditCB, (void *) 1); sprintf(buf, "%.2f", DAS.DGeo.longitude ); DAS.DGeo.edit[2] = MCreateEdit(tb, buf, 7, FIXED_SMALL); MObjectAlign(DAS.DGeo.edit[2] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.edit[2] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.DGeo.edit[2] , 40, 96, 72); MEditSetValCallback(DAS.DGeo.edit[2] , DGeoeditCB, (void *) 2); sprintf(buf, "%d", DAS.DGeo.timezone ); DAS.DGeo.edit[3] = MCreateEdit(tb, buf, 4, FIXED_SMALL); MObjectAlign(DAS.DGeo.edit[3] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.edit[3] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.DGeo.edit[3] , 40, 96, 72); MEditSetValCallback(DAS.DGeo.edit[3] , DGeoeditCB, (void *) 3); sprintf(buf, "%.1f", DAS.DGeo.alititude); DAS.DGeo.edit[4] = MCreateEdit(tb, buf, 7, FIXED_SMALL); MObjectAlign(DAS.DGeo.edit[4] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.edit[4] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.DGeo.edit[4] , 40, 96, 72); MEditSetValCallback(DAS.DGeo.edit[4] , DGeoeditCB, (void *) 4); DAS.DGeo.tbrb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(DAS.DGeo.tbrb, 112, 128, 112); MObjectSetBackgroundRGB(DAS.DGeo.tbrb, 56, 112, 112); MObjectSetResize(DAS.DGeo.tbrb, True,False); // sprintf(buff, "%s\\GeoDB.ini", BIL.DFILEM.CONFIGDIREQUIPMENT); // fd = fopen(buff, "r"); // if(fd == NULL) return 1; // fgets(str, 80, fd); // Read Header // fscanf(fd, "%d", &DAS.DGeo.nitem); // fgets(str, 80, fd); for (i=0; i<DAS.DGeo.nitem; i++) { // fscanf(fd, "%hs",&DAS.DGeo.news_name[i]); DAS.DGeo.rb[i] = MCreateRButton(DAS.DGeo.tbrb, DAS.DGeo.news_name[i], FIXED_SMALL); MPButtonSetCallback(DAS.DGeo.rb[i], DB_GeocoordCB, (void *) i); MObjectAlign(DAS.DGeo.rb[i], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.rb[i], 255, 255, 255); MObjectSetCompositeWidth(DAS.DGeo.rb[i], 85); // fscanf(fd, "%lf %lf %lf %d", &DAS.DGeo.newlatitude[i], // &DAS.DGeo.newlongitude[i],&DAS.DGeo.newalititude[i],&DAS.DGeo.newtimezone[i]); if( strcmp(DAS.DGeo.s_name,DAS.DGeo.news_name[i]) ==0 ) { MRButtonActivate(DAS.DGeo.rb[i]); DAS.DGeo.selitem = i; } } // fclose(fd); /* sprintf(buf, "%s", "New St."); DAS.DGeo.rb[DAS.DGeo.nitem] = MCreateRButton(DAS.DGeo.tbrb, buf, FIXED_SMALL); MPButtonSetCallback(DAS.DGeo.rb[DAS.DGeo.nitem], DB_GeocoordCB, (void *) 100); MObjectAlign(DAS.DGeo.rb[DAS.DGeo.nitem], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.rb[DAS.DGeo.nitem], 255, 255, 255); MObjectSetCompositeWidth(DAS.DGeo.rb[DAS.DGeo.nitem], 85); */ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, True); pb = MCreatePButton(tb, "Add St.", FIXED_SMALL); //MObjectSetUnsensitive(pb); MPButtonSetCallback(pb, AddStCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); //MObjectAddEventNotifyCallback(pb, (OBJ_EVENT_CB) DB_StorePB, EM_MOTION, NULL); MObjectSetPopupHelp(pb,"Add a new station " , 200, 5000); MObjectAlign(pb, UNDEF_ALIGN, BOTTOM_ALIGN); pb = MCreatePButton(tb, "Delete", FIXED_SMALL); //MObjectSetUnsensitive(pb); MPButtonSetCallback(pb, DeleteGeoCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); //MObjectAddEventNotifyCallback(pb, (OBJ_EVENT_CB) DB_StorePB, EM_MOTION, NULL); MObjectSetPopupHelp(pb,"Delete the selected station" , 200, 5000); MObjectAlign(pb, UNDEF_ALIGN, BOTTOM_ALIGN); // Command Button Section /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/ rowform1 = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); // MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL); MPButtonSetCallback(pb, ApplyGeoCB, (void *) 0); if((DAS.Flag.exemode == DOASMODE)) MObjectSetUnsensitive(pb); // Set the button as Unensitive MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); MObjectSetPopupHelp(pb,"Apply the selected setting to DAS (and write to file ..GeoCoord.ini)" , 200, 5000); pb = MCreatePButton(rowform1, "Store", FIXED_SMALL); MObjectSetUnsensitive(pb); MPButtonSetCallback(pb, StoreGeoCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); MObjectAddEventNotifyCallback(pb, (OBJ_EVENT_CB) DB_StorePB, EM_MOTION, NULL); MObjectSetPopupHelp(pb,"If a new station has been created store it in ..GeoDB.ini" , 200, 5000); pb = MCreatePButton(rowform1, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); MObjectSetPopupHelp(pb,"Close Config Panel" , 200, 5000); /* End Command Button Section æææææææææææææææææææææææææææææææææææ*/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ } void CONFP_param_page2(int mod, MOBJECT obj) { MOBJECT rowform, rowform1; // generic row form MOBJECT wledt; // generic edit object MOBJECT stedt; // generic edit object MOBJECT pb ; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; MOBJECT lbl; MOBJECT tb; // generic table object char buf[64]; int i; MObjectSetText(obj, "Page 2"); lbl = MCreateLabel(obj, "Ref. Wavelength and Grating positioning", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); rowform = MCreateColForm(obj); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetBackgroundRGB(rowform, 56, 112, 112); MObjectAlign(rowform, LEFT_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); MTableFormSetColAlign(tb, 0, TOP_ALIGN); MObjectSetResize(tb, False, True); //for(i=0;i<2;i++) //{ sprintf(buf, "Win" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Cent.Wl" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Steps" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); // } for(i=0;i<9;i++) { sprintf(buf, "%d", i); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%d", wl[i]); wledt = MCreateEdit(tb, buf, 5, FIXED_SMALL); MObjectAlign(wledt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(wledt, 255, 255, 255); MObjectSetBackgroundRGB(wledt, 40, 96, 72); MEditSetValCallback(wledt, valwledt, (void *) i); //MEditSetActCallback(wledt, wledtCB, (void *) i); sprintf(buf, "%d", wav[i]); stedt = MCreateEdit(tb, buf, 8, FIXED_SMALL); MObjectAlign(stedt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(stedt, 255, 255, 255); MObjectSetBackgroundRGB(stedt, 40, 96, 72); MEditSetValCallback(stedt, valstedt, (void *) i); //MEditSetActCallback(stedt, stedtCB, (void *) i); } tb = MCreateTableForm(rowform, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); MTableFormSetColAlign(tb, 0, TOP_ALIGN); MObjectSetResize(tb, False, True); sprintf(buf, "Win" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Cent.Wl" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Steps" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); for(i=9;i<18;i++) { sprintf(buf, "%d", i); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%d", wl[i]); wledt = MCreateEdit(tb, buf, 5, FIXED_SMALL); MObjectAlign(wledt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(wledt, 255, 255, 255); MObjectSetBackgroundRGB(wledt, 40, 96, 72); MEditSetValCallback(wledt, valwledt, (void *) i); //MEditSetActCallback(wledt, wledtCB, (void *) i); sprintf(buf, "%d", wav[i]); stedt = MCreateEdit(tb, buf, 8, FIXED_SMALL); MObjectAlign(stedt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(stedt, 255, 255, 255); MObjectSetBackgroundRGB(stedt, 40, 96, 72); MEditSetValCallback(stedt, valstedt, (void *) i); //MEditSetActCallback(stedt, stedtCB, (void *) i); } // Command Button Section /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/ rowform1 = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); // MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL); //MPButtonSetCallback(pb, ApplyChCB, (void *) 0); //if((DAS.Flag.exemode == DOASMODE) | (DAS.Flag.exemode == DBDEMO)) MObjectSetUnsensitive(pb); // Set the button as Unensitive MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(rowform1, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WritewlstepiniCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(rowform1, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); /* End Command Button Section æææææææææææææææææææææææææææææææææææ*/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ } void edtCCDOffSet_CB(MOBJECT p, LIST_ACT *la, void *ad) { int c = (int) ad; int er = 0; DAS.Marconi.Offset = atoi(la->item); if(DAS.Flag.exemode != DBDEMO) DC_SetUsrGain(0, 0 , DAS.Marconi.Offset , 0); } void CONFP_param_page1(int mod, MOBJECT obj) { MOBJECT rowform1; // generic row form MOBJECT edit; // generic edit object MOBJECT pb, rb ; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; MOBJECT lbl; MOBJECT tb; // generic table object char buf[64]; int i, k, *p; MOBJECT list; int t=0; char str[80]; char buff[_MAX_PATH]; LIST_ACT * pla; MObjectSetText(obj, "Page 1"); /******************************************************************************************************************/ //Equipment Type section /*--------- Start ----------------*/ lbl = MCreateLabel(obj, "Equipment Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(obj, 3); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); // Instrument Type(0 = SPATRAM, // 1 = TROPOGAS, 2 = LIS, // 3 = SPATRAMPLUS, 4 = GASCODNG, ) rb = MCreateRButton(tb, "SPATRAMPLUS", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 3); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 3) MRButtonActivate(rb); rb = MCreateRButton(tb, "SPATRAM2", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 9); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 9) MRButtonActivate(rb); rb = MCreateRButton(tb, "SPATRAM3", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 10); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 10) MRButtonActivate(rb); /* rb = MCreateRButton(tb, "SPATRAM", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if( DAS.Paramini.EqType == 0) MRButtonActivate(rb); */ rb = MCreateRButton(tb, "TROPOGAS", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Paramini.EqType == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "LIS", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Paramini.EqType == 2) MRButtonActivate(rb); rb = MCreateRButton(tb, "GASCODNG1", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 4); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Paramini.EqType == 4) MRButtonActivate(rb); /* rb = MCreateRButton(tb, "GASCODOffAxis", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 5); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 5) MRButtonActivate(rb); */ rb = MCreateRButton(tb, "GASCODNG2", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 6); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 6) MRButtonActivate(rb); rb = MCreateRButton(tb, "GASCODNG3", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 7); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 7) MRButtonActivate(rb); rb = MCreateRButton(tb, "GASCODNG4", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 8); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 8) MRButtonActivate(rb); /* pb = MCreatePButton(tb, "Save", FIXED_SMALL); MPButtonSetCallback(pb, WriteEquipiniCB, 0); MObjectAlign(pb, LEFT_ALIGN, UNDEF_ALIGN); //MObjectSetForegroundRGB(pb, 255, 255, 255); MObjectSetCompositeWidth(pb, 105); */ //CCD & OMU Temperature section /*--------- Start ----------------*/ lbl = MCreateLabel(obj, "CCD & OMU Temp", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(obj, 2); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, False); MObjectSetCompositeWidth(tb, 347); lbl = MCreateLabel(tb, "CCD Target Temperature:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%.1lf", DAS.Paramini.ITemp); edit = MCreateEdit(tb, buf, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MEditSetValCallback(edit, ValidateCB, (void *) 1); MEditSetActCallback(edit, ActEditCB, (void *) 1); lbl = MCreateLabel(tb, "CCD Peltier Init Power:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%.1lf%%",(double)DAS.Paramini.CoolPw / 10); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MEditSetValCallback(edit, ValidateCB, (void *) 2); MEditSetActCallback(edit, ActEditCB, (void *) 2); lbl = MCreateLabel(tb, "Optical Unit Target Temp:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); sprintf(buf, "%.1lf", DAS.Paramini.TPelt); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MEditSetValCallback(edit, ValidateCB, (void *) 3); MEditSetActCallback(edit, ActEditCB, (void *) 3); lbl = MCreateLabel(tb, "OMU Peltier Init Power:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%.1lf%%",(double)OMUTHR.PCPower / 10); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MEditSetValCallback(edit, ValidateCB, (void *) 2000); MEditSetActCallback(edit, ActEditCB, (void *) 2000); /*------------------- End CCD & OMU Temperature section -------------*/ //CCD Window and vertical binning section /*##################### Start ##################################################*/ lbl = MCreateLabel(obj, "CCD WINDOW - SETUP", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectSetCompositeWidth(lbl, 347); rowform1 = MCreateRowForm(obj); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); //357 MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform1, 4); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetResize(tb, True, True); // MObjectSetCompositeWidth(tb, 347); MObjectSetShadow(tb, WS_NONE, 0, 0); lbl = MCreateLabel(tb, "X Start:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",DAS.Paramini.ccdXoff); //sprintf(buf, "%d",(DC_CCD.dx - DC_CCD.dx)); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MEditSetValCallback(edit, ValidateCB, (void *) 4); MEditSetActCallback(edit, ActEditCB, (void *) 4); //MEditDisableEditing(edit); lbl = MCreateLabel(tb, "X End:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",DAS.Paramini.ccdWx); //sprintf(buf, "%d",DC_CCD.dx); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MEditSetValCallback(edit, ValidateCB, (void *) 5); MEditSetActCallback(edit, ActEditCB, (void *) 5); // MEditDisableEditing(edit); lbl = MCreateLabel(tb, "Y Start:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",DAS.Paramini.ccdYoff); //sprintf(buf, "%d", (DC_CCD.dy-DC_CCD.dy)); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MEditSetValCallback(edit, ValidateCB, (void *) 6); MEditSetActCallback(edit, ActEditCB, (void *) 6); // MEditDisableEditing(edit); lbl = MCreateLabel(tb, "Y End:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",DAS.Paramini.ccdWy); //sprintf(buf, "%d",DC_CCD.dy); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MEditSetValCallback(edit, ValidateCB, (void *) 7); MEditSetActCallback(edit, ActEditCB, (void *) 7); // MEditDisableEditing(edit); tb = MCreateTableForm(rowform1, 3); MTableFormSetColAlign(tb, 0, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); MObjectSetShadow(tb, WS_NONE, 0, 0); lbl = MCreateLabel(tb, "Vertical Binning:", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); sprintf(buf, "%d",DAS.Paramini.VBin); edit = MCreateClippedEdit(tb, buf, 3, 3, FIXED_SMALL); MObjectAlign(edit, RIGHT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MEditSetValCallback(edit, ValidateCB, (void *) 8); MEditSetActCallback(edit, ActEditCB, (void *) 8); pb = MCreatePButton(tb, "CCD Setup (DCS)", FIXED_SMALL); MPButtonSetCallback(pb, CCDSetupCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); /* tb = MCreateTableForm(rowform1, 3); MTableFormSetColAlign(tb, 0, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); */ lbl = MCreateLabel(tb, "Max. Exp. Time (s) :", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MLabelSetAlignment(lbl, LEFT_ALIGN); sprintf(buf, "%.1lf", DAS.Paramini.maxtexp); edit = MCreateClippedEdit(tb, buf, 5, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); //MObjectSetCompositeWidth(edit, 35); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); k = 123; p = (void *) k; MEditSetValCallback(edit, ValidateCB, p); MEditSetActCallback(edit, ActEditCB, p); pb = MCreateImagePButtonExt(tb, "sys\\qmarkyellow.bmp", "sys\\qmarkblue.bmp", "", "sys\\qmarkred.bmp", "", ""); MButtonSetImageMaskByPixel(pb, 0, 0); MObjectSetTransparency(pb, 255); MObjectSetShadow(pb, WS_NONE, 0, 0); MObjectSetBackgroundRGB(pb, 56, 112, 112); MPButtonSetCallback(pb, PB_H_CB, (void *) 0); /* End CCD Window and vertical binning section ###############*/ /* lbl = MCreateLabel(obj, "Devices Offsets", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); */ rowform1 = MCreateRowForm(obj); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); MObjectSetResize(rowform1, True, True); MObjectSetCompositeWidth(rowform1, 347); /**************************************************************************/ //OFFSET HIRES 5 SECTION if (Cfg.Platform == 28) { lbl = MCreateLabel(rowform1, "HiresV OFFSET", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True,False); lbl = MCreateLabel(tb, "Offset", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255); MObjectSetTransparency(lbl, 0); if(DAS.Paramini.EqType == 9) //SPATRAM2 DAS.Marconi.Offset = 250; if(DAS.Paramini.EqType == 8) //GASCODNG4 DAS.Marconi.Offset = 270; sprintf(buff, "%d", DAS.Marconi.Offset); edit = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectAlign(edit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(edit); list = MOptionEditGetList(edit); for(i=0; i<512; i++) { t = i; sprintf(str, "%d", t); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(edit, str); MOptionEditSetListCallback(edit, edtCCDOffSet_CB, (void *) 0); DAS.Marconi.Offset = atoi(pla->item); } /**************************************************************************/ /*************************************************************************/ /* lbl = MCreateLabel(rowform1, "Input Mirror", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetCompositeWidth(lbl, 347); tb = MCreateTableForm(rowform1, 5); MTableFormSetColAlign(tb, 0, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); lbl = MCreateLabel(tb, "Home", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); for(i=0;i<4;i++) { if (DAS.Paramini.EqType != TROPOGAS) sprintf(buf, "%s",Mir_Code[i]); else sprintf(buf, "%s",Mir_CodeTropo[i]); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); } for(i=0;i<5;i++) { sprintf(buf, "%d",DAS.Paramini.Offset[i]); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 65); k= i + 300; MEditSetValCallback(edit, ValidateCB, (void *) k); MEditSetActCallback(edit, ActEditCB, (void *) k); } /* // Command Button Section /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/ rowform1 = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); // MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL); MPButtonSetCallback(pb, ApplyChCB, (void *) 0); if((DAS.Flag.exemode == DOASMODE) ) MObjectSetUnsensitive(pb); // Set the button as Unensitive MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(rowform1, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteParaminiCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(rowform1, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); /* End Command Button Section æææææææææææææææææææææææææææææææææææ*/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ /**************************************************************************************************************/ } // Create the Parameters page void CONFP_Param(int mod, MOBJECT mo) { MOBJECT rowform; // generic row form // MOBJECT rowform1; // generic row form // MOBJECT edit; // generic edit object // MOBJECT pb; // generic pushbutton and radiobutton // MOBJECT lbl; //generic label // MOBJECT tb; // generic table object MOBJECT PPARAM; // char buf[64]; // int k; MObjectSetText(mo, "Parametrs"); rowform = MCreateRowForm(mo); MObjectSetBackgroundRGB(rowform, 56, 112, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); //357 MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); PPARAM = MCreateTabbedRowForm(rowform, 5, FIXED_SMALL); MObjectSetForegroundRGB(PPARAM, 255, 255, 255); MObjectSetBackgroundRGB(PPARAM, 56, 112, 112); MObjectAlign(PPARAM, CENTER_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(PPARAM, 357); MObjectSetResize(PPARAM, False, False); CONFP_param_page1(0, PPARAM); MPagedFormSetActivePage(PPARAM, 1); //Creation page 2 CONFP_param_page2(0, PPARAM); MPagedFormSetActivePage(PPARAM, 2); //Creation page 3 CONFP_param_page3(0, PPARAM); MPagedFormSetActivePage(PPARAM, 3); //Creation page 4 CONFP_param_page4(0, PPARAM); MPagedFormSetActivePage(PPARAM, 4); //Creation page 5 CONFP_param_page5(0, PPARAM); MPagedFormSetActivePage(PPARAM, 0); } void DB_MeasMode_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case 0: DAS.DOption.measmode = 0; //Single Meas MObjectSetUnsensitive(DAS.Gui.ConfigPanel.tbavg); //if (DAS.Marconi.AVGmat != 0) // free(DAS.Marconi.AVGmat); break; case 1: DAS.DOption.measmode = 1; //Average MObjectSetSensitive(DAS.Gui.ConfigPanel.tbavg); //if (DAS.Marconi.AVGmat != 0) //DAS.Marconi.AVGmat = AllocFloatMat(IDX, IDY); //np = (long) IDX * IDY * 2; //AVGmat = malloc(np * 4); //memset(AVGmat, 0, np * 4); break; } } } void DB_AVGAutoR_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case 0: DAS.DOption.avgautor = 1; //Autorange before average break; case 1: DAS.DOption.avgautor = 0; //NO Autorange before average break; } } } void SelDefPixFileCB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; char buf[_MAX_PATH]; char fname[_MAX_PATH], dirname[_MAX_PATH]; char str[_MAX_PATH]; // unsigned long ns; FB_PREFS fbp; strcpy (dirname, MGetCurrentDirectory ()); fname[0] = '\0'; memset (&fbp, 0, sizeof (fbp)); fbp.change_cwd = True; fbp.allow_dir_create = True; fbp.allow_dir_rename = True; fbp.allow_dir_delete = True; fbp.transparent_tree = False; fbp.font = HELV_SMALL; fbp.button_font = HELV_SMALL; //Set Img file sprintf(buf, "%s\\%s", BIL.DFILEM.HOMEDIRECTORY, "sys\\Tile2.bmp" ); fbp.bg_image_file =buf; er = MFileBrowseExt ("Select CCD Mask File", "*.cor", fname, dirname, &fbp); sprintf(DAS.DOption.DEFPIXFILENAME, "%s", fname); sprintf(buf, "%s%s", dirname, DAS.DOption.DEFPIXFILENAME); //if(DI_FileExist(buff)) // DI_FileExist --> Return: 1 if PATH exist, else return 0 // return 37; MObjectSetText(DAS.Gui.ConfigPanel.lblCorrPixF, DAS.DOption.DEFPIXFILENAME); //Load File er = LoadDB_DefectPixel(buf); if (er) { sprintf (str, "File: %s, Not FOUND", buf); MMessageDialog("DAS Inf.", str, "OK", NULL); } } // create the 1st page of the option page void CONFP_opt_page1(int mod, MOBJECT obj) { MOBJECT rowform; // generic row form MOBJECT pb, rb ; MOBJECT colform; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT tbavg; MOBJECT lbl; MOBJECT tb; // generic table object char buf[64]; int k, *p; MObjectSetText(obj, "Page 1"); /***************************************************************************/ /*********** Saving Mode Section - Start ****************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "SAVING OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Saving Mode:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 150); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "ASCII", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioModeSelCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(!DAS.DOption.savingmode) MRButtonActivate(rb); rb = MCreateRButton(tb, "Binary", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioModeSelCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.savingmode) MRButtonActivate(rb); /***************************************************************************/ /*********** Saving Mode Section - End ******************************/ /***************************************************************************/ /***************************************************************************/ /*********** File Name Type Section - Start *************************/ /***************************************************************************/ tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Saving File Names:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 150); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Free ", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFNSelCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(!DAS.DOption.filename) MRButtonActivate(rb); rb = MCreateRButton(tb, "Automatic", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFNSelCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); //MObjectSetResize(rb, False, False); if(DAS.DOption.filename) MRButtonActivate(rb); /***************************************************************************/ /*********** File Name Type Section - End ***************************/ /***************************************************************************/ /***************************************************************************/ /*********** START IMAGE TYPE SECTION *******************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "Type of Images:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); rowform = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, True, False); rb = MCreateRButton(rowform, "MONO ", FIXED_SMALL); MPButtonSetCallback(rb, DB_ImgTypeCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(!DAS.DOption.imgtype) MRButtonActivate(rb); rb = MCreateRButton(rowform, "RGB", FIXED_SMALL); MPButtonSetCallback(rb, DB_ImgTypeCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, False, False); if(DAS.DOption.imgtype) MRButtonActivate(rb); pb = MCreatePButton(rowform, "Apply img", FIXED_SMALL); MPButtonSetCallback(pb, ApplyImgCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); /***************************************************************************/ /*********** END IMAGE TYPE SECTION *******************************/ /***************************************************************************/ /***************************************************************************/ /*********** START AVERAGING SECTION *******************************/ /***************************************************************************/ DAS.Gui.ConfigPanel.tbavg = MCreateTableForm(obj, 1); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.tbavg, 112, 128, 112); MObjectSetResize(DAS.Gui.ConfigPanel.tbavg, True, False); // lbl = MCreateLabel(obj, "AVERAGE", FIXED_SMALL); lbl = MCreateLabel(DAS.Gui.ConfigPanel.tbavg, "AVERAGE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetBackgroundRGB(lbl, 96, 132, 152); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); /////////////////////////////////////////////////////// //tb = MCreateTableForm(obj, 3); tb = MCreateTableForm(DAS.Gui.ConfigPanel.tbavg, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Automatic ARange for AVG ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); //MObjectSetCompositeWidth(lbl, 200); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_AVGAutoR_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.avgautor == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_AVGAutoR_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.avgautor == 0) MRButtonActivate(rb); //tb = MCreateTableForm(obj, 2); tb = MCreateTableForm(DAS.Gui.ConfigPanel.tbavg, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.FixTExp = MCreateRButton(tb, "Fix TExp. ", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.FixTExp, DB_RadioAvgModeCB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.FixTExp, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.FixTExp, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.FixTExp, 85); DAS.Gui.ConfigPanel.FixMeasNum = MCreateRButton(tb, "Fix Meas. Number", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.FixMeasNum, DB_RadioAvgModeCB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.FixMeasNum, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.FixMeasNum, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.FixMeasNum, 123); if(DAS.DOption.avgmode) { DAS.Gui.ConfigPanel.lblAvg = MCreateLabel(tb, "TOT Exposure Time :", FIXED_SMALL); MLabelSetAlignment(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblAvg, 255, 255, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblAvg, 0); MObjectSetResize(DAS.Gui.ConfigPanel.lblAvg, False, False); MObjectAlign(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d", TOTTEXP); DAS.Gui.ConfigPanel.n_avg = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.n_avg, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.n_avg, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.n_avg, 35); MObjectAlign(DAS.Gui.ConfigPanel.n_avg, LEFT_ALIGN, TOP_ALIGN); k = 111; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.n_avg, ActEditCB, p); MRButtonActivate(DAS.Gui.ConfigPanel.FixTExp); } else { DAS.Gui.ConfigPanel.lblAvg = MCreateLabel(tb, "Repeat measure for: ", FIXED_SMALL); MLabelSetAlignment(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblAvg, 255, 255, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblAvg, 0); MObjectSetResize(DAS.Gui.ConfigPanel.lblAvg, False, False); MObjectAlign(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",N_AVG); DAS.Gui.ConfigPanel.n_avg = MCreateClippedEdit(tb, " ", 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.n_avg, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.n_avg, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.n_avg, 35); MObjectAlign(DAS.Gui.ConfigPanel.n_avg, LEFT_ALIGN, TOP_ALIGN); k = 111; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.n_avg, ActEditCB, p); MRButtonActivate(DAS.Gui.ConfigPanel.FixMeasNum); } /***************************************************************************/ /*********** END AVERAGING SECTION *******************************/ /***************************************************************************/ /***************************************************************************/ /*********** START MEASURING mode SECTION *******************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "MEASURING MODE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetBackgroundRGB(lbl, 96, 132, 152); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); //table for selecting Single or Averaged measurements tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "SINGLE", FIXED_SMALL); MPButtonSetCallback(rb, DB_MeasMode_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.measmode == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "AVERAGE", FIXED_SMALL); MPButtonSetCallback(rb, DB_MeasMode_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.measmode == 1) MRButtonActivate(rb); /***************************************************************************/ /*********** END MEASURING mode SECTION *******************************/ /***************************************************************************/ /*******************************************************************************/ /************* START Defective Pixel Correction SECTION ***********************/ /*******************************************************************************/ lbl = MCreateLabel(obj, "DEFECTIVE PIXELS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); pb = MCreatePButton(tb, "Map UNDER Exp", FIXED_SMALL); MPButtonSetCallback(pb, UnderOverPixCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); //MObjectSetCompositeWidth(pb, 250); pb = MCreatePButton(tb, "Map OVER Exp (T=0)", FIXED_SMALL); MPButtonSetCallback(pb, UnderOverPixCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); //MObjectSetCompositeWidth(pb, 220); pb = MCreatePButton(tb, "Map OVER Exp (T=5)", FIXED_SMALL); MPButtonSetCallback(pb, UnderOverPixCB, (void *) 2); MObjectSetBackgroundRGB(pb, 224, 224, 176); //MObjectSetCompositeWidth(pb, 220); lbl = MCreateLabel(obj, "Defective Pixel Correction:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 220); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbCorrPix[0] = MCreateRButton(tb, "DISABLE", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbCorrPix[0], DB_RadioPixCorrCB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbCorrPix[0], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbCorrPix[0], 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbCorrPix[0], 85); DAS.Gui.ConfigPanel.rbCorrPix[1] = MCreateRButton(tb, "ENABLE", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbCorrPix[1], DB_RadioPixCorrCB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbCorrPix[1], RIGHT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbCorrPix[1], 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbCorrPix[1], 123); colform = MCreateColForm(obj); MObjectSetBackgroundRGB(colform, 112, 128, 112); MObjectSetResize(colform, True, False); DAS.Gui.ConfigPanel.lblCorrPixF = MCreateLabel(colform, DAS.DOption.DEFPIXFILENAME, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblCorrPixF, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblCorrPixF, 96, 132, 152); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblCorrPixF, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); //MObjectSetCompositeWidth(lbl, 220); DAS.Gui.ConfigPanel.pbBrowseCorrPixF = MCreatePButton(colform, "...", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, SelDefPixFileCB, (void *) 0); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, 224, 224, 176); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, 30); MObjectAlign(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, RIGHT_ALIGN, TOP_ALIGN); if(!DAS.DOption.pixcorr) MRButtonActivate(DAS.Gui.ConfigPanel.rbCorrPix[0]); if(DAS.DOption.pixcorr) MRButtonActivate(DAS.Gui.ConfigPanel.rbCorrPix[1]); /*******************************************************************************/ /************* END Defective Pixel Correction SECTION ***********************/ /*******************************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 2nd page of the option page void CONFP_opt_page2(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT pb, rb ; MOBJECT lbl; MOBJECT tb ; // generic table object char buf[64]; int i,k, *p; MObjectSetText(obj, "Page 2"); /***************************************************************************/ /***************************************************************************/ /*********** START DARK MEASUREMENT SECTION *******************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "DARK IMAGE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Remove Dark from Measurements ? ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.DOption.darkremove) MRButtonActivate(rb); MPButtonSetCallback(rb, DB_RadioDarkCB, (void *) 1); rb = MCreateRButton(tb, "No", FIXED_SMALL); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if(!DAS.DOption.darkremove) MRButtonActivate(rb); MPButtonSetCallback(rb, DB_RadioDarkCB, (void *) 0); lbl = MCreateLabel(obj, "Dark Source", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.FFDark = MCreateRButton(tb, "Full Frame", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.FFDark, DB_RadDrkSourceCB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.FFDark, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.FFDark, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.FFDark, 85); // if(DAS.DOption.darkremove) if(DAS.DOption.darksource) MRButtonActivate(DAS.Gui.ConfigPanel.FFDark); DAS.Gui.ConfigPanel.BPDark = MCreateRButton(tb, "Blind Pixels", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.BPDark, DB_RadDrkSourceCB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.BPDark, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.BPDark, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.BPDark, 123); // if(DAS.DOption.darkremove) if(!DAS.DOption.darksource) MRButtonActivate(DAS.Gui.ConfigPanel.BPDark); if (DAS.DOption.darkremove==0) { MObjectSetUnsensitive(DAS.Gui.ConfigPanel.FFDark); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.BPDark); } else { MObjectSetSensitive(DAS.Gui.ConfigPanel.FFDark); MObjectSetSensitive(DAS.Gui.ConfigPanel.BPDark); } /***************************************************************************/ /*********** END DARK MEASUREMENT SECTION ****************************/ /***************************************************************************/ /*---------------------------------------------------------------*/ /***************************************************************************/ /*********** START CCD TARGET TEMPERATURE SECTION *********************/ /***************************************************************************/ lbl = MCreateLabel(obj, "CCD TARGET TEMPERATURE", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "FIXED", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetCCDTargetTempCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(!FLAG.settempvar) MRButtonActivate(rb); rb = MCreateRButton(tb, "SZA DRIVED", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetCCDTargetTempCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if(FLAG.settempvar) MRButtonActivate(rb); /***************************************************************************/ /*********** END CCD TARGET TEMPERATURE SECTION *********************/ /***************************************************************************/ /*-----------------------------------------------------------------------*/ /***************************************************************************/ /***************************************************************************/ /************** START AUTORANGING SECTION ************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "AUTORANGING", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); //MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Max Autoranging value (<= 63000) ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); //MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%d",DAS.DOption.maxlvlar); DAS.Gui.ConfigPanel.edmaxlvlar = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edmaxlvlar, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edmaxlvlar, 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edmaxlvlar, LEFT_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.edmaxlvlar, 50); k = 600; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.edmaxlvlar, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.edmaxlvlar, ActEditCB, p); /***************************************************************************/ /************** STOP AUTORANGING SECTION ************************/ /***************************************************************************/ /***************************************************************************/ /***************************************************************************/ /************** START CONFIGURATION FILES SECTION ************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "CONFIG FILES", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "View/Modify", FIXED_SMALL); MPButtonSetCallback(rb, DB_VMRsfCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if(!FLAG.VMRsf) MRButtonActivate(rb); rb= MCreateRButton(tb, "ReLoad", FIXED_SMALL); MPButtonSetCallback(rb, DB_VMRsfCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); MObjectSetUnsensitive(rb); if(FLAG.VMRsf) MRButtonActivate(rb); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); pb = MCreatePButton(tb, "Param.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "DASSysColor.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "Options.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 2); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "ccd_defect_Danbo.cor", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 3); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "GeoCoord.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 4); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "AMS.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 6); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "Equipment.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 7); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "WlStep.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 8); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "Free Editor", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 5); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); /***************************************************************************/ /************** END CONFIGURATION FILES SECTION ************************/ /***************************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 3rd page of the option page void CONFP_opt_page3(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT rb ; MOBJECT lbl; MOBJECT tb ; // generic table object int k, *p; char buf[64]; MObjectSetText(obj, "Page 3"); /***************************************************************************/ /***************************************************************************/ /******************* START PLOT OPTIONS SECTION **********************/ /***************************************************************************/ lbl = MCreateLabel(obj, "PLOT OPTIONS", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "X Axis Units", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "PIXEL", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(FLAG.Wl == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "WAVEL [A]", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(FLAG.Wl == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "WAVEL [nm]", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(FLAG.Wl == 2) MRButtonActivate(rb); /* if(FLAG.Wl == 0) MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[0]); else if(FLAG.Wl == 1) MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[1]); else if(FLAG.Wl == 2) MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[2]); */ /*----------------- DISPLAY or NOT Plot after measurement -----------------*/ lbl = MCreateLabel(obj, "Display PLOT after measurement ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 300); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "No ", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotDisplayCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Flag.plotW == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotDisplayCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(DAS.Flag.plotW == 1) MRButtonActivate(rb); /* if(FLAG.plotW == 0) MRButtonActivate(DAS.Gui.ConfigPanel.PlotDisp[0]); else if(FLAG.plotW == 1) MRButtonActivate(DAS.Gui.ConfigPanel.PlotDisp[1]); */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " Y Axis", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Full Range", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotYAxisCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); MObjectSetResize(rb, True, False); if(FLAG.plotYRange == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Min/Max", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotYAxisCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); MObjectSetResize(rb, True, False); if(FLAG.plotYRange == 1) MRButtonActivate(rb); /* if(FLAG.plotYRange == 0) MRButtonActivate(DAS.Gui.ConfigPanel.PlotYAxis[0]); else if(FLAG.plotYRange == 1) MRButtonActivate(DAS.Gui.ConfigPanel.PlotYAxis[1]); /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*-------------------------------------------------------------------------*/ /* Hidden Lines section */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " Hidden lines ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Before Central Line ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%d",DAS.DOption.hlinebefore); DAS.Gui.ConfigPanel.HiddenL = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.HiddenL, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.HiddenL, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.HiddenL, 35); MObjectAlign(DAS.Gui.ConfigPanel.HiddenL, LEFT_ALIGN, TOP_ALIGN); k = 130; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.HiddenL, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.HiddenL, ActEditCB, p); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "After Central Line ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%d",DAS.DOption.hlineafter); DAS.Gui.ConfigPanel.HiddenL = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.HiddenL, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.HiddenL, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.HiddenL, 35); MObjectAlign(DAS.Gui.ConfigPanel.HiddenL, LEFT_ALIGN, TOP_ALIGN); k = 135; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.HiddenL, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.HiddenL, ActEditCB, p); /*-------------------------------------------------------------------------*/ /* Blind Pixel section */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " Display Blind Pixel? ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_DispBlindPixCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); MObjectSetResize(rb, True, False); if(FLAG.DispBlindPix == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_DispBlindPixCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); MObjectSetResize(rb, True, False); if(FLAG.DispBlindPix == 1) MRButtonActivate(rb); /*-------------------------------------------------------------------------*/ /***************************************************************************/ /******************* END PLOT OPTIONS SECTION **********************/ /***************************************************************************/ /*-------------------------------------------------------------------------*/ /* SZA Limit section */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " SZA Limit ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Perform Measurements for SZA <= ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%d",SZAMax); DAS.Gui.ConfigPanel.SZAMax = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SZAMax, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SZAMax, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.SZAMax, 35); MObjectAlign(DAS.Gui.ConfigPanel.SZAMax, LEFT_ALIGN, TOP_ALIGN); k = 120; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.SZAMax, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.SZAMax, ActEditCB, p); lbl = MCreateLabel(tb, " ° ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); /**************************************************************/ /***************************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 4th page of the option page void CONFP_opt_page4(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT pb, rb ; MOBJECT lbl; MOBJECT tb ; // generic table object int k, *p; char buf[64]; MObjectSetText(obj, "Page 4"); /***************************************************************************/ /******************* BACK-UP SECTION *************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "BACK-UP OPTIONS", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Perform FTP Back-Up", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFTPCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if (DAS.DOption.ftpbackup) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFTPCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if (!DAS.DOption.ftpbackup) MRButtonActivate(rb); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Server FTP Address:", FIXED_SMALL); MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%s",DFTP.ftpserver); DFTP.edServerFTP = MCreateClippedEdit(tb, buf, 15, 15, FIXED_SMALL); MObjectSetForegroundRGB(DFTP.edServerFTP, 255, 255, 255); MObjectSetBackgroundRGB(DFTP.edServerFTP, 40, 96, 72); // MObjectSetCompositeWidth(DFTP.edServerFTP, 35); MObjectAlign(DFTP.edServerFTP, RIGHT_ALIGN, TOP_ALIGN); k = 200; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DFTP.edServerFTP, ActEditCB, p); if (!DAS.DOption.ftpbackup) MEditEnableEditing(DFTP.edServerFTP); lbl = MCreateLabel(tb, "UserName:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%s",DFTP.ftpuser); DFTP.edid = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DFTP.edid, 255, 255, 255); MObjectSetBackgroundRGB(DFTP.edid, 40, 96, 72); // MObjectSetCompositeWidth(DFTP.edid, 35); MObjectAlign(DFTP.edid, RIGHT_ALIGN, TOP_ALIGN); k = 210; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DFTP.edid, ActEditCB, p); lbl = MCreateLabel(tb, "PWD:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%s",DFTP.ftppwd); DFTP.edpwd= MCreateHiddenEdit(tb, buf, 10, FIXED_SMALL, '*'); MObjectSetForegroundRGB(DFTP.edpwd, 255, 255, 255); MObjectSetBackgroundRGB(DFTP.edpwd, 40, 96, 72); // MObjectSetCompositeWidth(DFTP.edpwd, 35); MObjectAlign(DFTP.edpwd, RIGHT_ALIGN, TOP_ALIGN); k = 220; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DFTP.edpwd, ActEditCB, p); /* if (DAS.DOption.ftpbackup) MRButtonActivate(DFTP.rb[0]); else MRButtonActivate(DFTP.rb[1]); */ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); pb = MCreatePButton(tb, "Save FTP.INI", FIXED_SMALL); MPButtonSetCallback(pb, PbftpCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 94); pb = MCreatePButton(tb, "Test FTP", FIXED_SMALL); MPButtonSetCallback(pb, PbftpCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 94); /***************************************************************************/ /**************** OMU Thermo-regulation SECTION ***********************/ /***************************************************************************/ lbl = MCreateLabel(obj, "OMU THERMO-REGULATION", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Choose the Reference temp", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Pelt. Int.", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.refertemp == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Optic", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.refertemp == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "Grating", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.refertemp == 2) MRButtonActivate(rb); lbl = MCreateLabel(obj, "Choose the Thermo-regulation mode", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Cold only", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 3); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(OMUTHR.TRType == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Heat only", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 4); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(OMUTHR.TRType == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "Cold/Heat", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 5); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(OMUTHR.TRType == 2) MRButtonActivate(rb); /***************/ lbl = MCreateLabel(obj, "Choose the Thermo-reg. Algorithm", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Progressive", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 6); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(OMUTHR.PID_On == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "PID", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 7); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(OMUTHR.PID_On == 1) MRButtonActivate(rb); if(OMUTHR.PID_On == 1) //Create the field for PID Parameters { tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Prop.", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 90); lbl = MCreateLabel(tb, "Integral", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 90); lbl = MCreateLabel(tb, "Deriv.", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 90); sprintf(buf, "%.1lf",OMUTHR.PID_kp); DAS.Gui.ConfigPanel.PID_edt[0] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[0], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.PID_edt[0], 40, 96, 72); k = 500; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.PID_edt[0], ActEditCB, p); sprintf(buf, "%.3lf",OMUTHR.PID_ki); DAS.Gui.ConfigPanel.PID_edt[1] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[1], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.PID_edt[1], 40, 96, 72); k = 501; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.PID_edt[1], ActEditCB, p); sprintf(buf, "%.4lf",OMUTHR.PID_kd); DAS.Gui.ConfigPanel.PID_edt[2] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[2], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.PID_edt[2], 40, 96, 72); k = 502; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.PID_edt[2], ActEditCB, p); } pb = MCreatePButton(obj, "Temp History", FIXED_SMALL); MPButtonSetCallback(pb, PBTempHistoCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 123); /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 5th page of the option page void CONFP_opt_page5(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT rb ; MOBJECT lbl; MOBJECT tb,tb1 ; // generic table object // int i,k, *p; // char buf[64]; MObjectSetText(obj, "Page 5"); lbl = MCreateLabel(obj, "MIRROR IMAGE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb1 = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb1, 112, 128, 112); MObjectSetResize(tb1, True, False); lbl = MCreateLabel(tb1, "Along the X Axis ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); lbl = MCreateLabel(tb1, "Along the Y Axis ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(tb1, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.mirrorimg[XAX] == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.mirrorimg[XAX] == 0) MRButtonActivate(rb); tb = MCreateTableForm(tb1, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.mirrorimg[YAX] == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 3); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.mirrorimg[YAX] == 0) MRButtonActivate(rb); lbl = MCreateLabel(obj, "AMS OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Positioning Mode", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Simultaneous", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSposmode_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.smposmode == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "Sequential", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSposmode_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.smposmode == 0) MRButtonActivate(rb); lbl = MCreateLabel(obj, "Display progression bars?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSProgBar_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.amsprogbar == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSProgBar_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.amsprogbar == 0) MRButtonActivate(rb); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ lbl = MCreateLabel(obj, "MIGE Platform OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "MIGE Status", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbMIGEStatus[0]=MCreateRButton(tb, "NOT Connected", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEStatus[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEStatus[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEStatus[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.linked == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[0]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEStatus[0], DB_MIGE_CB, (void *) 0); DAS.Gui.ConfigPanel.rbMIGEStatus[1] = MCreateRButton(tb, "Connected", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEStatus[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEStatus[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEStatus[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.linked == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[1]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEStatus[1], DB_MIGE_CB, (void *) 1); lbl = MCreateLabel(obj, "MIGE Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbMIGEtype[0] = MCreateRButton(tb, "Ver. 0.5", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEtype[0], DB_MIGEType_CB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEtype[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEtype[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEtype[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.type == 0 ) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEtype[0]); DAS.Gui.ConfigPanel.rbMIGEtype[1] = MCreateRButton(tb, "Ver. 1.5", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEtype[1], DB_MIGEType_CB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEtype[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEtype[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEtype[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.type == 1 ) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEtype[1]); DAS.Gui.ConfigPanel.rbMIGEtype[2] = MCreateRButton(tb, "Ver. 2.0", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEtype[2], DB_MIGEType_CB, (void *) 2); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEtype[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEtype[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEtype[2], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.type == 2 ) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEtype[2]); lbl = MCreateLabel(obj, "Operating mode", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbMIGEopmode[0] = MCreateRButton(tb, "Solar Tracker", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEopmode[0], DB_MIGEopmode_CB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEopmode[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEopmode[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEopmode[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.aaopmode == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEopmode[0]); DAS.Gui.ConfigPanel.rbMIGEopmode[1] = MCreateRButton(tb, "Anti Solar Tracker", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEopmode[1], DB_MIGEopmode_CB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEopmode[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEopmode[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEopmode[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.aaopmode == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEopmode[1]); DAS.Gui.ConfigPanel.rbMIGEopmode[2] = MCreateRButton(tb, "Free positions", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEopmode[2], DB_MIGEopmode_CB, (void *) 2); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEopmode[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEopmode[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEopmode[2], True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.aaopmode == 2) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEopmode[2]); if(DAS.MIGE.linked == 0) { MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[1]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[2]); } else MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[2]); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } void edtDASReset_CB(MOBJECT p, LIST_ACT *la, void *ad) { int c = (int) ad; int er = 0; DAS.DOption.resetFreq = atoi(la->item); } void DB_ResetEnable_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; // char buff[64], str[32]; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case 0: DAS.DOption.resetEnabled = 0; MObjectSetUnsensitive(DAS.Gui.ConfigPanel.listReset); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.edtDASReset); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.lblReset); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbDASResPer[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbDASResPer[1]); break; case 1: DAS.DOption.resetEnabled = 1; MObjectSetSensitive(DAS.Gui.ConfigPanel.listReset); MObjectSetSensitive(DAS.Gui.ConfigPanel.edtDASReset); MObjectSetSensitive(DAS.Gui.ConfigPanel.lblReset); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbDASResPer[0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbDASResPer[1]); break; } } } void DB_ResetType_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v,i,k; char buff[64], str[32]; LIST_ACT * pla; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case RHOUR: DAS.DOption.resetType = RHOUR; if (DAS.Gui.ConfigPanel.lblReset != 0) { sprintf(buff, "%d", (int)DAS.DOption.resetFreq); MSListClear(DAS.Gui.ConfigPanel.listReset); for(i=1; i<24; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(DAS.Gui.ConfigPanel.listReset, k-1); pla = MSListGetSelected(DAS.Gui.ConfigPanel.listReset); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDASReset, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDASReset, edtDASReset_CB, (void *) 0); DAS.DOption.resetFreq = atoi(pla->item); sprintf(buff, "Hour(s)"); MObjectSetText(DAS.Gui.ConfigPanel.lblReset, buff); } break; case RDAY: DAS.DOption.resetType = RDAY; if (DAS.Gui.ConfigPanel.lblReset != 0) { sprintf(buff, "%d", (int)DAS.DOption.resetFreq); MSListClear(DAS.Gui.ConfigPanel.listReset); for(i=1; i<365; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(DAS.Gui.ConfigPanel.listReset, k-1); pla = MSListGetSelected(DAS.Gui.ConfigPanel.listReset); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDASReset, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDASReset, edtDASReset_CB, (void *) 0); DAS.DOption.resetFreq = atoi(pla->item); sprintf(buff, "Day(s)"); MObjectSetText(DAS.Gui.ConfigPanel.lblReset, buff); } break; } } } // create the 7th page of the option page void CONFP_opt_page7(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form // MOBJECT pb, rb ; MOBJECT lbl; MOBJECT tb; // generic table object int i,k; // char buf[64]; // MOBJECT list; // int starti; float f=0; char str[80]; char buff[_MAX_PATH]; LIST_ACT * pla; MObjectSetText(obj, "Page 7"); /******************************************************************/ /*************** SHUTTER ******************************************/ /******************************************************************/ lbl = MCreateLabel(obj, "SHUTTER OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Is the EMShutter Installed?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbSHUTStatus[0] = MCreateRButton(tb, "Yes", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTStatus[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTStatus[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTStatus[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.emshutter == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTStatus[0]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTStatus[0], DB_Shutter_CB, (void *) 1); DAS.Gui.ConfigPanel.rbSHUTStatus[1] = MCreateRButton(tb, "No", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.emshutter == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTStatus[1] ); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , DB_Shutter_CB, (void *) 0); lbl = MCreateLabel(obj, "Choose Shutter Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbSHUTType [0] = MCreateRButton(tb, "UniBlitz VS25", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTType [0], DB_ShutterType_CB, (void *) VS25); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTType [0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTType [0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTType [0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.shuttertype == VS25) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTType [0]); DAS.Gui.ConfigPanel.rbSHUTType [1] = MCreateRButton(tb, "Rotating Sh.", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTType [1], DB_ShutterType_CB, (void *) ROTSHUT); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTType [1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTType [1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTType [1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.shuttertype == ROTSHUT) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTType [1]); DAS.Gui.ConfigPanel.rbSHUTType[2] = MCreateRButton(tb, "Torque Motor", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTType[2], DB_ShutterType_CB, (void *) TORQUEM); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTType[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTType[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTType[2], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.shuttertype == TORQUEM) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTType[2]); if(DAS.DOption.emshutter == 0) { MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } else { MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } /******************************************************************/ /*************** END SHUTTER **************************************/ /******************************************************************/ /******************************************************************/ /*************** FILTER WHEEL *************************************/ /******************************************************************/ lbl = MCreateLabel(obj, "FILTER WHEEL OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Choose Installed Module", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbFilterType [0] = MCreateRButton(tb, "Simple-SM3", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbFilterType [0], DB_FilterType_CB, (void *) FSIMPLE); MObjectAlign(DAS.Gui.ConfigPanel.rbFilterType [0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbFilterType [0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbFilterType [0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.filtertype == FSIMPLE) MRButtonActivate(DAS.Gui.ConfigPanel.rbFilterType [0]); DAS.Gui.ConfigPanel.rbFilterType [1] = MCreateRButton(tb, "Double-SM3+SM4", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbFilterType [1], DB_FilterType_CB, (void *) FDOUBLE); MObjectAlign(DAS.Gui.ConfigPanel.rbFilterType [1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbFilterType [1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbFilterType [1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.filtertype == FDOUBLE) MRButtonActivate(DAS.Gui.ConfigPanel.rbFilterType [1]); DAS.Gui.ConfigPanel.rbFilterType[2] = MCreateRButton(tb, "Plus-SM3+TM", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbFilterType[2], DB_FilterType_CB, (void *) FPLUS); MObjectAlign(DAS.Gui.ConfigPanel.rbFilterType[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbFilterType[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbFilterType[2], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.filtertype == FPLUS) MRButtonActivate(DAS.Gui.ConfigPanel.rbFilterType[2]); /* if(DAS.DOption.emshutter == 0) { MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } else { MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } */ /******************************************************************/ /*************** END FILTER WHEEL ********************************/ /******************************************************************/ /******************************************************************/ /*************** RESET DAS Windows Restart ***********************/ /******************************************************************/ lbl = MCreateLabel(obj, "RESET WINDOWS OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); /*----------------------------------------------------------------*/ lbl = MCreateLabel(obj, "DAS/SYSTEM Reset ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbResetEnab[0] = MCreateRButton(tb, "Disabled", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbResetEnab[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbResetEnab[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbResetEnab[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.resetEnabled == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbResetEnab[0]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbResetEnab[0], DB_ResetEnable_CB, (void *) 0); DAS.Gui.ConfigPanel.rbResetEnab[1] = MCreateRButton(tb, "Enabled", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbResetEnab[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbResetEnab[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbResetEnab[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.resetEnabled == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbResetEnab[1]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbResetEnab[1], DB_ResetEnable_CB, (void *) 1); /*----------------------------------------------------------------*/ lbl = MCreateLabel(obj, "Reset Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbDASResPer[0] = MCreateRButton(tb, "HOUR(s)", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDASResPer[0], DB_ResetType_CB, (void *) RHOUR); MObjectAlign(DAS.Gui.ConfigPanel.rbDASResPer[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDASResPer[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbDASResPer[0], True, False); //MObjectSetCompositeWidth(rb, 100); DAS.Gui.ConfigPanel.rbDASResPer[1] = MCreateRButton(tb, "DAY(s)", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDASResPer[1], DB_ResetType_CB, (void *) RDAY); MObjectAlign(DAS.Gui.ConfigPanel.rbDASResPer[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDASResPer[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbDASResPer[1], True, False); //MObjectSetCompositeWidth(rb, 100); lbl = MCreateLabel(obj, "Reset Frequency", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Re-start every ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); //MObjectSetCompositeWidth(lbl, 250); sprintf(buff, "%d", (int)DAS.DOption.resetFreq); DAS.Gui.ConfigPanel.edtDASReset = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtDASReset, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtDASReset, 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edtDASReset, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.edtDASReset); DAS.Gui.ConfigPanel.listReset = MOptionEditGetList(DAS.Gui.ConfigPanel.edtDASReset); if (DAS.DOption.resetType) // Days { for(i=1; i<365; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } } else //hours { for(i=1; i<24; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } } /* list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtDSZA); for(i=0; i<20; i++) { f = f+0.10; sprintf(str, "%.3f",f); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDSZA, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDSZA, edtDSZA_CB, (void *) 0); SZADelta.DeltaSZA = atof(pla->item); */ MSListSelectElement(DAS.Gui.ConfigPanel.listReset, k-1); pla = MSListGetSelected(DAS.Gui.ConfigPanel.listReset); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDASReset, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDASReset, edtDASReset_CB, (void *) 0); DAS.DOption.resetFreq = atoi(pla->item); if (DAS.DOption.resetType) // Days sprintf(buff, "Day(s)", DAS.DOption.resetFreq); else sprintf(buff, "Hour(s)", DAS.DOption.resetFreq); DAS.Gui.ConfigPanel.lblReset = MCreateLabel(tb, buff, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblReset, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblReset, 96, 132, 152); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblReset, 0); MObjectSetShadow(DAS.Gui.ConfigPanel.lblReset, WS_ETCHED_IN, 1, 1); if(DAS.DOption.resetType == RHOUR) MRButtonActivate(DAS.Gui.ConfigPanel.rbDASResPer[0]); if(DAS.DOption.resetType == RDAY) MRButtonActivate(DAS.Gui.ConfigPanel.rbDASResPer[1]); /******************************************************************/ /*************** END RESET DAS ********************************/ /******************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } void CONFP_opt_ScheMeas(int mod, MOBJECT p) { // MOBJECT rowform; // generic row form MOBJECT rowform1; MOBJECT colform, colform2,colform3,colform4; MOBJECT rb ; MOBJECT lbl, list, optedit; // MOBJECT tb ; // generic table object int i; int lenedit = 12; char buf[64]; int maxangle; if (mod == 1) maxangle = 181; else maxangle = 96; colform = MCreateColForm(p); MFormSetSpacing(colform, 0); MObjectSetResize(colform, False, False); MObjectAlign(colform, CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform, 255); MObjectSetShadow(colform, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, True); MObjectAlign(rowform1, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(rowform1, 255); MObjectSetShadow(rowform1, WS_NONE, 0, 0); rb = MCreateRButton(rowform1, "", FIXED_SMALL); // MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetTransparency(rb, 255); MObjectSetResize(rb, True, False); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 1) // MRButtonActivate(rb); rb = MCreateRButton(rowform1, "", FIXED_SMALL); // MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); MObjectSetTransparency(rb, 255); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 0) // MRButtonActivate(rb); colform2 = MCreateColForm(colform); MFormSetSpacing(colform2, 0); MObjectSetResize(colform2, False, False); MObjectSetTransparency(colform2, 255); MObjectSetShadow(colform2, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform2); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, False); MObjectSetShadow(rowform1, WS_NONE, 0, 0); MObjectSetTransparency(rowform1, 255); colform3 = MCreateColForm(rowform1); MFormSetSpacing(colform3, 0); MObjectSetResize(colform3, False, False); MObjectAlign(colform3, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform3, 255); MObjectSetShadow(colform3, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); lbl = MCreateLabel(colform3, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, False, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } if (mod == 1) MSListSelectElement(list, 180); else MSListSelectElement(list, 95); colform4 = MCreateColForm(rowform1); MFormSetSpacing(colform4, 0); MObjectSetTransparency(colform4, 255); MObjectSetShadow(colform4, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); sprintf(buf, "<SZA<"); lbl = MCreateLabel(colform4, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "50"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 50); lbl = MCreateLabel(colform4, "OR", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "75"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 75); lbl = MCreateLabel(colform4, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } if (mod == 1) MSListSelectElement(list, 180); else MSListSelectElement(list, 95); } // create the 6th page of the option page void CONFP_opt_page6(int mod, MOBJECT obj) { MOBJECT rowform; // generic row form // MOBJECT colform, colform1,colform2,colform3,colform4; // MOBJECT pb, rb ; MOBJECT lbl, list, optedit; MOBJECT tb ; // generic table object int i; int lenedit = 12; char buf[64], str[16]; unsigned char lesseq = 242, greateq=241; MObjectSetText(obj, "Page 6"); lbl = MCreateLabel(obj, "INPUTS <--> DEVICES", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); /* lbl = MCreateLabel(obj, "Input <--> Device", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ tb = MCreateTableForm(obj, 4); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, False, False); if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) sprintf(str, "%s",Mir_CodeTropo[0]); else sprintf(str, "%s",Mir_Code[0]); sprintf(buf, "%s",str); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%s",DeviceTypeInput[0]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) MSListSelectElement(list, 2); else MSListSelectElement(list, 0); sprintf(buf, "%s",Mir_Code[1]); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%s",DeviceTypeInput[6]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 1); if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) sprintf(str, "%s",Mir_CodeTropo[2]); else sprintf(str, "%s",Mir_Code[2]); sprintf(buf, "%s",str); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) sprintf(buf, "%s",DeviceTypeInput[7]); else sprintf(buf, "%s",DeviceTypeInput[2]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) MSListSelectElement(list, 7); else MSListSelectElement(list, 2); sprintf(buf, "%s",Mir_Code[3]); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%s",DeviceTypeInput[3]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 3); lbl = MCreateLabel(obj, "MEASUREMENTS SCHEDULING", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); /***************************************************************/ // 1 start rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "ZenithSky", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(0, rowform); /* colform = MCreateColForm(rowform); MFormSetSpacing(colform, 0); MObjectSetResize(colform, False, False); MObjectAlign(colform, CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform, 255); MObjectSetShadow(colform, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, True); MObjectAlign(rowform1, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(rowform1, 255); MObjectSetShadow(rowform1, WS_NONE, 0, 0); rb = MCreateRButton(rowform1, "", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetTransparency(rb, 255); MObjectSetResize(rb, True, False); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 1) // MRButtonActivate(rb); rb = MCreateRButton(rowform1, "", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); MObjectSetTransparency(rb, 255); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 0) // MRButtonActivate(rb); colform2 = MCreateColForm(colform); MFormSetSpacing(colform2, 0); MObjectSetResize(colform2, False, False); MObjectSetTransparency(colform2, 255); MObjectSetShadow(colform2, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform2); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, False); MObjectSetShadow(rowform1, WS_NONE, 0, 0); MObjectSetTransparency(rowform1, 255); colform3 = MCreateColForm(rowform1); MFormSetSpacing(colform3, 0); MObjectSetResize(colform3, False, False); MObjectAlign(colform3, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform3, 255); MObjectSetShadow(colform3, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); lbl = MCreateLabel(colform3, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, False, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 95); colform4 = MCreateColForm(rowform1); MFormSetSpacing(colform4, 0); MObjectSetTransparency(colform4, 255); MObjectSetShadow(colform4, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); sprintf(buf, "<SZA<"); lbl = MCreateLabel(colform4, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "50"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 50); lbl = MCreateLabel(colform4, "OR", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "75"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 75); lbl = MCreateLabel(colform4, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 95); // 1 End /***************************************************************/ /***************************************************************/ // 2 start rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "Horizontal", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(1, rowform); /* lbl = MCreateLabel(obj, "Horizontal", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "Radiometric", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(0, rowform); /* lbl = MCreateLabel(obj, "Radiometric", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "Off-Axis", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(0, rowform); /* lbl = MCreateLabel(obj, "Off-Axis", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } //Create the Option page (with 6 sub-pages) void CONFP_Options(int mod, MOBJECT mo) { MOBJECT rowform; // generic row form MOBJECT rowform1; // generic row form // MOBJECT PFAMS; // paged form for AMS MOBJECT POPT; // paged form for AMS // MOBJECT edit; // generic edit object // MOBJECT radiobutt[2]; // generic radio button // MOBJECT RColButt; MOBJECT pb; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; // MOBJECT lbl; MOBJECT tb; // generic table object // char buf[64]; // int *p; MObjectSetText(mo, "Options"); rowform = MCreateRowForm(mo); MObjectSetBackgroundRGB(rowform, 112, 128, 112); // MObjectSetResize(rowform, True, True); MObjectSetCompositeWidth(rowform, 400); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); POPT = MCreateTabbedRowForm(rowform, 7, FIXED_SMALL); MObjectSetForegroundRGB(POPT, 255, 255, 255); MObjectSetBackgroundRGB(POPT, 112, 128, 112); MObjectAlign(POPT, CENTER_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(POPT, 390); MObjectSetResize(POPT, False, False); //Creation page 1 CONFP_opt_page1(0, POPT); MPagedFormSetActivePage(POPT, 1); //Creation page 2 CONFP_opt_page2(0, POPT); MPagedFormSetActivePage(POPT, 2); //Creation page 3 CONFP_opt_page3(0, POPT); MPagedFormSetActivePage(POPT, 3); //Creation page 4 CONFP_opt_page4(0, POPT); MPagedFormSetActivePage(POPT, 4); //Creation page 5 CONFP_opt_page5(0, POPT); MPagedFormSetActivePage(POPT, 5); //Creation page 6 CONFP_opt_page6(0, POPT); MPagedFormSetActivePage(POPT, 6); //Creation page 7 CONFP_opt_page7(0, POPT); MPagedFormSetActivePage(POPT, 0); // Command Button Section rowform1 = MCreateRowForm(mo); MObjectSetBackgroundRGB(rowform1, 112, 128, 112); //MObjectSetResize(rowform, False, True); MObjectSetCompositeWidth(rowform1, 357); MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform1, 2); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); pb = MCreatePButton(tb, "Save", FIXED_SMALL); MPButtonSetCallback(pb, WriteOptioniniCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); } void AMS_AdvancedCB(MOBJECT o, void *od, void *ad) { char buff[_MAX_PATH]; int f; STARTUPINFO si; PROCESS_INFORMATION pi; // chdir(buff); sprintf(buff,"%s\\%s",BIL.DFILEM.HOMEDIRECTORY, "\\AMSTester50\\AMS50.exe"); // WinExec(buff, 1); // // perform the equivalent of WinExec in NT, but we use a Unicode string // memset(&si, 0, sizeof(si)); si.cb = sizeof(si); si.dwFlags= STARTF_USESHOWWINDOW; si.wShowWindow = SW_SHOW; f = CreateProcess(NULL, buff, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); // sprintf(buff,"%ss",BIL.DFILEM.HOMEDIRECTORY, "SolPosCalc"); chdir(BIL.DFILEM.HOMEDIRECTORY); } MOBJECT MDCreateDASConfig(void) { // MOBJECT _shell000; MOBJECT POCF; //Paged form for configuration panel // MOBJECT POPT; //Paged form for options MOBJECT rowform; // generic row form MOBJECT rowform1; // generic row form // MOBJECT PFAMS; // paged form for AMS // MOBJECT edit; // generic edit object // MOBJECT radiobutt[2]; // generic radio button MOBJECT RColButt; MOBJECT pb; // generic push button // MOBJECT rb; // generic radio button MOBJECT list; MOBJECT _tbutton000; MOBJECT _tbutton001; MOBJECT form2; MOBJECT label, lbl; MOBJECT tb; // generic table object // MOBJECT frm2_tb4; int r, g, b; int i; char buf[64]; // double percentuale,speedhz; const char *fontfamily; // struct confp *pconfp; LoadGeoDB(); MGetDefaultBackgroundRGB(&r, &g, &b); drawarea_bgc = MAllocColor(r, g, b); /********************************************************/ /************* MAIN SHELL *************************/ /********************************************************/ DAS.Gui.ConfigPanel.ShellConfig = MCreateShell("DAS Config", 0); MObjectSetResize(DAS.Gui.ConfigPanel.ShellConfig, True, True); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.ShellConfig, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.ShellConfig, 96, 132, 152); MObjectSetResize(DAS.Gui.ConfigPanel.ShellConfig, True, True); MObjectAlign(DAS.Gui.ConfigPanel.ShellConfig, CENTER_ALIGN, TOP_ALIGN); // MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.ShellConfig, 670); // MObjectSetCompositeHeight(DAS.Gui.ConfigPanel.ShellConfig, 483); /********************************************************/ /************* CONFIG PAGED FORM **********************/ /********************************************************/ POCF = MCreateTabbedRowForm(DAS.Gui.ConfigPanel.ShellConfig, 6, FIXED_SMALL); MObjectSetForegroundRGB(POCF, 255, 255, 255); MObjectSetBackgroundRGB(POCF, 96, 132, 152); MObjectSetResize(POCF, True, True); MObjectAlign(POCF, CENTER_ALIGN, TOP_ALIGN); // MObjectSetCompositeWidth(POCF, 457); //457 /* Activation of POCF page 0 - Parameters*/ /* 00000000000000000000000000000000000000000000000000000000 */ MPagedFormSetActivePage(POCF, 0); // Creation page 0 - Parameters CONFP_Param(0, POCF); /* End Activation and creation of page 0 */ /* 0000000000000000000000000000000000000000000000000000000 */ /* Activation of POCF page 1 - Option */ /* 11111111111111111111111111111111111111111111111111111111 */ /* Start Creation of page 1 111111111111111111111*/ /* 11111111111111111111111111111111111111111111111111111111111111111*/ MPagedFormSetActivePage(POCF, 1); // Creation Page 1 - Options CONFP_Options(0, POCF); /* End Activation and creation of page 1 11111111111111111111*/ /* 11111111111111111111111111111111111111111111111111111111111111*/ /****************************************************************************/ /* Start Activation and creation of page 2 - Colors 2222222222*/ /* 22222222222222222222222222222222222222222222222222222222222222*/ MPagedFormSetActivePage(POCF, 2); MObjectSetText(POCF, "Colors"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(rowform, "SELECT OBJECT", FIXED_SMALL); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform, 2); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 112, 68, 72); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.RBColObj[0] = MCreateRButton(tb, "Unsel. Push Button", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[0], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[0], ColObjCB, (void *) 0); DAS.Gui.ConfigPanel.RBColObj[1] = MCreateRButton(tb, "Sel. Push Button", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[1], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[1], ColObjCB, (void *) 1); DAS.Gui.ConfigPanel.RBColObj[2] = MCreateRButton(tb, "Active Labels", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[2], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[2], ColObjCB, (void *) 2); DAS.Gui.ConfigPanel.RBColObj[3] = MCreateRButton(tb, "Passive LAbels", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[3], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[3], ColObjCB, (void *) 3); DAS.Gui.ConfigPanel.RBColObj[4] = MCreateRButton(tb, "Forms", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[4], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[4], ColObjCB, (void *) 4); DAS.Gui.ConfigPanel.RBColObj[5] = MCreateRButton(tb, "Capital Labels", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[5], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[5], ColObjCB, (void *) 5); if (DAS.Flag.exemode == DOASMODE ) { DAS.Gui.ConfigPanel.RBColObj[6] = MCreateRButton(tb, "Radio Button", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[6], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[6], ColObjCB, (void *) 6); } /* RColButt = MCreateRButton(tb, "UnSel. Comm.", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 0); RColButt = MCreateRButton(tb, "Sel. Comm.", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 1); RColButt = MCreateRButton(tb, "Active labels", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 2); RColButt = MCreateRButton(tb, "Passive labels", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 3); RColButt = MCreateRButton(tb, "Forms", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 4); RColButt = MCreateRButton(tb, "K_labelsUP", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 5); if (DAS.Flag.exemode == DOASMODE ) { RColButt = MCreateRButton(tb, "Radio Buttons", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 6); } */ tb = MCreateTableForm(rowform, 2); MTableFormSetColAlign(tb, 1, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 160, 112, 112); MObjectSetResize(tb, True, False); RColButt = MCreateRButton(tb, "Background", FIXED_SMALL); MRButtonSetCallback(RColButt, (OBJ_VALUE_CB) ColPickBackForeGCB, (void *) 0); MObjectAlign(RColButt, CENTER_ALIGN, TOP_ALIGN); MRButtonActivate(RColButt); MObjectSetForegroundRGB(RColButt, 255, 255, 0); RColButt = MCreateRButton(tb, "Foreground", FIXED_SMALL); MRButtonSetCallback(RColButt, (OBJ_VALUE_CB) ColPickBackForeGCB, (void *) 1); MObjectAlign(RColButt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(RColButt, 255, 255, 0); rowform1 = MCreateRowForm(rowform); MObjectSetBackgroundRGB(rowform1 , 80, 56, 56); MObjectSetResize(rowform1 , True, True); lbl = MCreateLabel(rowform1 , "COLORS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1 , 1); MObjectSetBackgroundRGB(tb, 112, 68, 72); MObjectSetResize(tb, True, False); /******************************************/ form2 = MCreateRowForm(tb); MFormSetPrefAtt(form2, F_PREF_ATT_COL); label = MCreateLabel(form2, "Red: ", FIXED_SMALL); MObjectSetForegroundRGB(label, 255, 0, 0); r_label = MCreateLabel(form2, "000", FIXED_SMALL); MObjectSetForegroundRGB(r_label, 255, 0, 0); MObjectSetResize(label, False, False); MObjectSetResize(r_label, False, False); r_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32); MScrollBarSetPosCallback(r_sbar, DB_ChangeColorCellCB, 0L); form2 = MCreateRowForm(tb); MFormSetPrefAtt(form2, F_PREF_ATT_COL); label = MCreateLabel(form2, "Green: ", FIXED_SMALL); MObjectSetForegroundRGB(label, 0, 105, 0); g_label = MCreateLabel(form2, "000", FIXED_SMALL); MObjectSetForegroundRGB(g_label, 0, 105, 0); MObjectSetResize(label, False, False); MObjectSetResize(g_label, False, False); g_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32); MScrollBarSetPosCallback(g_sbar, DB_ChangeColorCellCB, (void *) 1); form2 = MCreateRowForm(tb); MFormSetPrefAtt(form2, F_PREF_ATT_COL); label = MCreateLabel(form2, "Blue: ", FIXED_SMALL); MObjectSetForegroundRGB(label, 0, 0, 255); b_label = MCreateLabel(form2, "000", FIXED_SMALL); MObjectSetForegroundRGB(b_label, 0, 0, 255); MObjectSetResize(label, False, False); MObjectSetResize(b_label, False, False); b_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32); MScrollBarSetPosCallback(b_sbar, DB_ChangeColorCellCB, (void *) 2); /************************************/ frm3_dr1 = MCreateDrawArea(rowform, 347, 30); MObjectSetResize(frm3_dr1, True, False); MDrawAreaSetExposeCallback(frm3_dr1, DB_CellExposeCB, 0L); MDrawAreaSetResizeCallback(frm3_dr1, DB_CellResizeCB, 0L); MObjectSetResize(frm3_dr1, True, False); r_c = g_c = b_c = 0; cell_color = MAllocCell(0, 0, 0); rowform1 = MCreateRowForm(rowform); MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rowform1, 56, 84, 128); MObjectSetBackgroundRGB(rowform1, 112, 68, 72); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); lbl = MCreateLabel(rowform1, "COMMANDS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); pb = MCreatePButton(rowform1, "Load Palette", FIXED_SMALL); MPButtonSetCallback(pb, LoadPaletteCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); tb = MCreateTableForm(rowform1, 4); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 112, 68, 72); MObjectSetResize(tb, True, False); pb = MCreatePButton(tb, "Preview", FIXED_SMALL); MPButtonSetCallback(pb, ColorAssignCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); pb = MCreatePButton(tb, "Undo", FIXED_SMALL); MPButtonSetCallback(pb, D_UndoCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteColorsCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); /* End Activation and creation of page 2 Colors 22222222222222222222*/ /* 22222222222222222222222222222222222222222222222222222222222222*/ /*********************** FONTS ***********************/ MPagedFormSetActivePage(POCF, 3); MObjectSetText(POCF, "Fonts"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(rowform, "SELECT OBJECT", FIXED_SMALL); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectSetCompositeWidth(lbl, 347); tb = MCreateTableForm(rowform, 2); MTableFormSetColAlign(tb, 1, LEFT_ALIGN); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 84, 128); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); RColButt = MCreateRButton(tb, "UnSel. Comm.", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 0); MObjectAlign(RColButt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); MRButtonActivate(RColButt); RColButt = MCreateRButton(tb, "Sel. Comm.", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 1); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "Active labels", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 2); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "Passive labels", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 3); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "K_labelsUP", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 4); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "K_labelsDW", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 5); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); DAS.Gui.ConfigPanel.frm4_dr1 = MCreateDrawArea(rowform, 347, 62); MObjectAlign(DAS.Gui.ConfigPanel.frm4_dr1, CENTER_ALIGN, TOP_ALIGN); MObjectSetResize(DAS.Gui.ConfigPanel.frm4_dr1, True, False); MObjectSetCompositeHeight(DAS.Gui.ConfigPanel.frm4_dr1, 62); MDrawAreaSetExposeCallback(DAS.Gui.ConfigPanel.frm4_dr1, DrawAreaExpFontCB, 0L); rowform1 = MCreateRowForm(rowform); MObjectSetBackgroundRGB(rowform1, 56, 84, 128); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); lbl = MCreateLabel(rowform1, "FONTS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1, 2); MTableFormSetColAlign(tb, 1, RIGHT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 84, 128); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Type:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); fontfamily = MGetFirstFontFamily (); e_fname = MCreateOptionEdit (tb, fontfamily, 22, 10, 6, FIXED_SMALL); MObjectSetForegroundRGB(e_fname, 255, 255, 255); MObjectSetBackgroundRGB(e_fname, 0, 24, 96); MEditDisableEditing (e_fname); list = MOptionEditGetList (e_fname); MSListSetSortCallback (list, stricmp); while (fontfamily) { MSListAddItem (list, fontfamily, 0L); fontfamily = MGetNextFontFamily (); } lbl = MCreateLabel(tb, "Dim.:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); e_fsize = MCreateOptionEdit(tb, "22", 22, 10, 6, FIXED_SMALL); MObjectSetForegroundRGB(e_fsize, 255, 255, 255); MObjectSetBackgroundRGB(e_fsize, 0, 24, 96); list = MOptionEditGetList(e_fsize); MSListAddItem(list, "12", 0L); MSListAddItem(list, "14", 0L); MSListAddItem(list, "16", 0L); MSListAddItem(list, "18", 0L); MSListAddItem(list, "20", 0L); MSListAddItem(list, "22", 0L); MSListAddItem(list, "24", 0L); MSListAddItem(list, "26", 0L); MSListAddItem(list, "28", 0L); MSListAddItem(list, "30", 0L); MSListAddItem(list, "32", 0L); MSListAddItem(list, "34", 0L); MSListAddItem(list, "36", 0L); MSListAddItem(list, "38", 0L); MSListAddItem(list, "40", 0L); MSListAddItem(list, "42", 0L); _tbutton000 = MCreateTButton(tb, "Bold", FIXED_SMALL); MTButtonSetCallback(_tbutton000, SetBoldCB, 0L); MObjectSetForegroundRGB(_tbutton000, 255, 255, 0); _tbutton001 = MCreateTButton(tb, "Italic", FIXED_SMALL); MTButtonSetCallback(_tbutton001, SetItalicCB, 0L); MObjectSetForegroundRGB(_tbutton001, 255, 255, 0); /*******************/ rowform1 = MCreateRowForm(rowform); MObjectSetForegroundRGB(rowform1, 56, 84, 128); MObjectSetBackgroundRGB(rowform1, 56, 84, 128); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); lbl = MCreateLabel(rowform1, "COMMANDS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1, 5); MObjectSetBackgroundRGB(tb, 56, 84, 128); MObjectSetResize(tb, True, False); pb = MCreatePButton(tb, "Test", FIXED_SMALL); MPButtonSetCallback(pb, TestFontCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Preview", FIXED_SMALL); MPButtonSetCallback(pb, LoadFontCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Undo", FIXED_SMALL); MPButtonSetCallback(pb, UndoFCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteFontCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); /******************* STEPPER MOTORS ***************************/ MPagedFormSetActivePage(POCF, 4); MObjectSetText(POCF, "Motors"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 457); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); /***************************************************************************/ /**************** STEPPER MOTORS SECTION ***********************************/ lbl = MCreateLabel(rowform, "STEPPER MOTORS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetCompositeWidth(lbl, 447); PFAMS = MCreateTabbedRowForm(rowform, (DAS.StepM.NAMS + 2), FIXED_SMALL); MObjectSetForegroundRGB(PFAMS, 255, 255, 255); MObjectSetBackgroundRGB(PFAMS, 80, 60, 0); MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2); MObjectSetCompositeWidth(PFAMS, 420); // MObjectSetResize(PFAMS, True, True); for (i=0;i<DAS.StepM.NAMS; i++) { MPagedFormSetActivePage(PFAMS, i); CONFP_AMS(PFAMS, i); //FrmStepperConfP(PFAMS, i); } MPagedFormSetActivePage(PFAMS, i); CONFP_AMS_Utility(PFAMS); MPagedFormSetActivePage(PFAMS, i+1); CONFP_AMS_NOVA(PFAMS); MPagedFormSetActivePage(PFAMS, 0); /* if (DAS.Paramini.EqType == TROPOGAS) { PFAMS = MCreateTabbedRowForm(rowform, 4, FIXED_SMALL); MObjectSetForegroundRGB(PFAMS, 255, 255, 255); MObjectSetBackgroundRGB(PFAMS, 80, 60, 0); MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2); } else { PFAMS = MCreateTabbedRowForm(rowform, 3, FIXED_SMALL); MObjectSetForegroundRGB(PFAMS, 255, 255, 255); MObjectSetBackgroundRGB(PFAMS, 80, 60, 0); MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2); } MPagedFormSetActivePage(PFAMS, 0); FrmStepperConfP(PFAMS, AMS1, &STEPM, &CONFP, &CPL); MPagedFormSetActivePage(PFAMS, 1); FrmStepperConfP(PFAMS, AMS2, &STEPM, &CONFP, &CPL); if (DAS.Paramini.EqType == TROPOGAS) { MPagedFormSetActivePage(PFAMS, 2); FrmStepperConfP(PFAMS, AMS3, &STEPM, &CONFP, &CPL); MPagedFormSetActivePage(PFAMS, 3); FrmAMS_Utility(PFAMS, &STEPM, &CONFP, &CPL); } else { MPagedFormSetActivePage(PFAMS, 2); FrmAMS_Utility(PFAMS, &STEPM, &CONFP, &CPL); } */ MPagedFormSetActivePage(PFAMS, 0); /*++++++++++++++++++++++++++++++++++++++++++++++++++++*/ tb = MCreateTableForm(rowform, 4); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); pb = MCreatePButton(tb, "Apply", FIXED_SMALL); MPButtonSetCallback(pb, ApplyChCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(tb, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteAMSCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(tb, "ADVANCED", FIXED_SMALL); MPButtonSetCallback(pb, AMS_AdvancedCB, (void *) 0); MObjectSetBackgroundRGB(pb, 24, 24, 255); MObjectSetForegroundRGB(pb, 255, 245, 255); MObjectSetCompositeWidth(pb, 74); /*********************************************************/ /*********************************************************/ /*************** TEST AD Converter **************/ /*********************************************************/ MPagedFormSetActivePage(POCF, 5); MObjectSetText(POCF, "TEST AD Converter"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); /*+++++++++++++++++ START CURRENT SETUP ++++++++++*/ lbl = MCreateLabel(rowform , "AD Converter Current Setup", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform, 4); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); lbl = MCreateLabel(tb , "Board Type:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); // sprintf(buf, "%s", DSCCB2STR()); ADTESTER.lblADsetup[0] = MCreateLabel(tb , "DMM", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[0], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[0], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[0], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[0], 0); lbl = MCreateLabel(tb , "Base Addr:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[1] = MCreateLabel(tb , "0x300", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[1], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[1], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[1], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[1], 0); lbl = MCreateLabel(tb , "Int.Lvl:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[2] = MCreateLabel(tb , "3", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[2], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[2], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[2], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[2], 0); lbl = MCreateLabel(tb , "DMA Lvl:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[3] = MCreateLabel(tb , "3", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[3], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[3], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[3], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[3], 0); lbl = MCreateLabel(tb , "ClockFreq:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[4] = MCreateLabel(tb , "10MHz", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[4], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[4], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[4], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[4], 0); lbl = MCreateLabel(tb , "Range:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[5] = MCreateLabel(tb , "5V", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[5], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[5], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[5], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[5], 0); lbl = MCreateLabel(tb , "Pol.:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[6] = MCreateLabel(tb , "UNIPOL", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[6], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[6], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[6], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[6], 0); lbl = MCreateLabel(tb , "Gain:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[7] = MCreateLabel(tb , "2", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[7], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[7], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[7], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[7], 0); lbl = MCreateLabel(tb , "LowCh:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[8] = MCreateLabel(tb , "0", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[8], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[8], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[8], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[8], 0); lbl = MCreateLabel(tb , "HighCh:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[9] = MCreateLabel(tb , "15", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[9], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[9], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[9], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[9], 0); // LoadDMMSetup(); /*+++++++++++++++++ END CURRENT SETUP ++++++++++*/ tb = MCreateTableForm(rowform, 2); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); ADTESTER.ADrb[0]= MCreateRButton(tb, "Volts", FIXED_SMALL); MPButtonSetCallback(ADTESTER.ADrb[0], DB_SelOutModeCB, (void *) 0); MObjectAlign(ADTESTER.ADrb[0], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(ADTESTER.ADrb[0], 255, 255, 255); MObjectSetCompositeWidth(ADTESTER.ADrb[0], 85); ADTESTER.ADrb[1] = MCreateRButton(tb, "Celsius", FIXED_SMALL); MPButtonSetCallback(ADTESTER.ADrb[1], DB_SelOutModeCB, (void *) 1); MObjectAlign(ADTESTER.ADrb[1], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(ADTESTER.ADrb[1], 255, 255, 255); MObjectSetCompositeWidth(ADTESTER.ADrb[1], 85); if(ADTESTER.OutputMode == 0) MRButtonActivate(ADTESTER.ADrb[0]); else MRButtonActivate(ADTESTER.ADrb[0]); lbl = MCreateLabel(rowform , "Output", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform, 4); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); for(i=0;i<16;i++) { sprintf(buf, "Ch.%d:", i); ADTESTER.lblADch[i] = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(ADTESTER.lblADch[i], LEFT_ALIGN); MObjectSetForegroundRGB(ADTESTER.lblADch[i], 255, 255, 255); MObjectSetTransparency(ADTESTER.lblADch[i], 0); MObjectSetResize(ADTESTER.lblADch[i], False, False); MObjectAlign(ADTESTER.lblADch[i], LEFT_ALIGN, TOP_ALIGN); // MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblADch[i], 40, 96, 72); ADTESTER.lblADvalue[i] = MCreateLabel(tb, " 0.0", FIXED_SMALL); MLabelSetAlignment(ADTESTER.lblADvalue[i], RIGHT_ALIGN); MObjectSetForegroundRGB(ADTESTER.lblADvalue[i], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADvalue[i], 40, 96, 72); MObjectSetTransparency(ADTESTER.lblADvalue[i], 0); MObjectSetResize(ADTESTER.lblADvalue[i], False, False); MObjectAlign(ADTESTER.lblADvalue[i], LEFT_ALIGN, TOP_ALIGN); } tb = MCreateTableForm(rowform, 3); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); ADTESTER.ADpb = MCreatePButton(tb, "Start", FIXED_SMALL); MPButtonSetCallback(ADTESTER.ADpb, ADTesterCB, (void *) 0); MObjectSetBackgroundRGB(ADTESTER.ADpb, 224, 224, 176); // MObjectSetBackgroundRGB(ADTESTER.ADpb, 192, 192, 192); MObjectSetCompositeWidth(ADTESTER.ADpb, 84); ADTESTER.ADInflbl = MCreateLabel(tb, "Click Start to test ", FIXED_SMALL); // MPButtonSetCallback(ADTESTER.ADpb, ADTesterCB, (void *) 0); MObjectSetForegroundRGB(ADTESTER.ADInflbl, 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.ADInflbl, 48, 20, 255); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); /*********************************************************/ MPagedFormSetActivePage(POCF, 0); MShellRealize(DAS.Gui.ConfigPanel.ShellConfig); // MShellRealizeXYWH(DAS.Gui.ConfigPanel.ShellConfig, 0,0,600,800); return 0; } */
823  // Slope
824 
825  lbl = MCreateLabel(tb, "Slope:", HELV_SMALL);
828  MObjectSetForegroundRGB(lbl, 255, 255, 255);
829  MObjectSetTransparency(lbl, 0);
831 
832 
833  sprintf(buf, "%d",DAS.StepM.slope[id][snum]);
834  DAS.Gui.ConfigPanel.SM_slope[id][snum] = MCreateOptionEdit(tb, buf, 5, 5, 6, FIXED_SMALL);
835  MEditSetFilter(DAS.Gui.ConfigPanel.SM_slope[id][snum], 260, "");
836  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_slope[id][snum], 255, 255, 255);
837  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_slope[id][snum], 120, 100, 0);
840 
841  list = MOptionEditGetList(DAS.Gui.ConfigPanel.SM_slope[id][snum]);
842  for(i=1; i<256; i++)
843  {
844  sprintf(buf, "%d", i);
845  MSListAddItem(list, buf, 0L);
846  }
847  MSListSelectElement(list, DAS.StepM.slope[id][snum] - 1);
848  /*ççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççç/ /********ùùùùùùùùùùùùùùùùùùùùùùùùùù********/ //Speed lbl = MCreateLabel(tb, "Speed(Hz):", HELV_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); sprintf(buf, "%.3lf",DAS.StepM.speed_Hz[id][snum]); DAS.Gui.ConfigPanel.SM_speed[id][snum]= MCreateOptionEdit(tb, buf, 6, 6, 6, FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.SM_speed[id][snum], RIGHT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_speed[id][snum], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_speed[id][snum], 120, 100, 0); MEditDisableEditing(DAS.Gui.ConfigPanel.SM_speed[id][snum] ); list = MOptionEditGetList(DAS.Gui.ConfigPanel.SM_speed[id][snum] ); for(i=0; i<256; i++) { speedhz = int2hertz(0, i); sprintf(buf, "%.3lf", speedhz); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, DAS.StepM.speed[id][snum]); /********ùùùùùùùùùùùùùùùùùùùùùùùùùù********/ /*****+++++++++++++++++++++++++++++++*******/ //Multiplier lbl = MCreateLabel(tb, "Multiplier", HELV_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 74, 60, 0); MObjectSetResize(lbl, False, False); sprintf(buf, "%d",DAS.StepM.multiplier[id][snum]); DAS.Gui.ConfigPanel.SM_multiplier[id][snum] = MCreateOptionEdit(tb, buf, 4, 4, 6, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_multiplier[id][snum] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_multiplier[id][snum] , 120, 100, 0); MObjectAlign(DAS.Gui.ConfigPanel.SM_multiplier[id][snum], RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.SM_multiplier[id][snum]); list = MOptionEditGetList(DAS.Gui.ConfigPanel.SM_multiplier[id][snum]); for(i=1; i<31; i++) { if (i!=0) { multip = (float)i/2 + 0.5; sprintf(buf, "%.1lf", multip); MSListAddItem(list, buf, (void *) i); if (atof(buf) == DAS.StepM.multiplier[id][snum]) { selectedmult = i; sprintf(str, "%s", buf); } } } MSListSelectElement(list, selectedmult-1); MObjectSetText (DAS.Gui.ConfigPanel.SM_multiplier[id][snum], str); //MSTextSetString(list, str); //MSListSelectItem(list, str); //MSListSelectElement(list, DAS.StepM.multiplier[id][snum] - 1); // MOptionEditSetListCallback(CONFP.multip[nams][STEPM.SM1], ListMultipCB, (void *) STEPM.SM1); /*****+++++++++++++++++++++++++++++++++******/ DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum] = MCreatePButton(tb, "HOME", TIMES_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], 94, 111, 0); if (id == 0 && snum == 0) MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) 0); if (id == 0 && snum == 1) MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) 1); if (id == 1 && snum == 0) MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) 2); if (id == 1 && snum == 1) MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) 3); if (id == 2 && snum == 0) MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) 4); if (id == 2 && snum == 1) MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) 5); // MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) snum); if (DAS.StepM.hometype[id][snum] == 0) sprintf(buf, "%s","Standard"); if (DAS.StepM.hometype[id][snum] == 1) sprintf(buf, "%s","Default"); if (DAS.StepM.hometype[id][snum] == 2) sprintf(buf, "%s","Track"); DAS.Gui.ConfigPanel.SM_hometype[id][snum] = MCreateOptionEdit(tb, buf, 8, 8, 2, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_hometype[id][snum] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_hometype[id][snum] , 120, 100, 0); MObjectAlign(DAS.Gui.ConfigPanel.SM_hometype[id][snum], RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.SM_hometype[id][snum]); list = MOptionEditGetList(DAS.Gui.ConfigPanel.SM_hometype[id][snum]); for(i=0; i<3; i++) { if (i==0) { sprintf(buf, "%s", "Standard"); MSListAddItem(list, buf, (void *) i); } if (i==1) { sprintf(buf, "%s", "Default"); MSListAddItem(list, buf, (void *) i); } if (i==2) { sprintf(buf, "%s", "Track"); MSListAddItem(list, buf, (void *) i); } } MSListSelectElement(list, DAS.StepM.hometype[id][snum]); if (id == 0 && snum == 0) MOptionEditSetListCallback(DAS.Gui.ConfigPanel.SM_hometype[id][snum], DB_HomeTypeCB, (void *) 0); if (id == 0 && snum == 1) MOptionEditSetListCallback(DAS.Gui.ConfigPanel.SM_hometype[id][snum], DB_HomeTypeCB, (void *) 1); if (id == 1 && snum == 0) MOptionEditSetListCallback(DAS.Gui.ConfigPanel.SM_hometype[id][snum], DB_HomeTypeCB, (void *) 2); if (id == 1 && snum == 1) MOptionEditSetListCallback(DAS.Gui.ConfigPanel.SM_hometype[id][snum], DB_HomeTypeCB, (void *) 3); if (id == 2 && snum == 0) MOptionEditSetListCallback(DAS.Gui.ConfigPanel.SM_hometype[id][snum], DB_HomeTypeCB, (void *) 4); if (id == 2 && snum == 1) MOptionEditSetListCallback(DAS.Gui.ConfigPanel.SM_hometype[id][snum], DB_HomeTypeCB, (void *) 5); // pla = MSListGetSelected(list); // sprintf(buf, "%s",pla->item); // MObjectSetText(CONFP.power[nams][STEPM.SM1], buf); } int ChkDigIO(unsigned char word, int bitn) { int bn = bitn; int sts = 2; char str[80], *s; int er; unsigned long stbyte = 0; er = 0; // strcpy( sprintf(str,"0x%0x",word); stbyte = strtol(str, &s, 16); //stbyte = strtol(word, &s, 16); sts = stbyte & (unsigned char) pow(2,(double)(bn)); sts = sts >> bn; if (sts == 2) return 2; else return sts; } void OOP_CB(MOBJECT obj, MVALUE value, void *ad) { int c = (int) ad; int er, id, tmp; int actadd; // char buf[16]; actadd = MPagedFormGetActivePage(PFAMS); id = DAS.StepM.Addr[actadd]; tmp = c; er = ChkDigIO(DAS.StepM.OOP[id], tmp); if ( er == 1) { DAS.StepM.OOP[id] &= ~((unsigned char) pow(2,(double)(tmp))); MPixmapSetImageFile(DAS.Gui.ConfigPanel.OOP[id][tmp], "SYS\\ledoff.bmp"); } else if (er == 0) { DAS.StepM.OOP[id] |= (unsigned char) pow(2,(double)(tmp)); MPixmapSetImageFile(DAS.Gui.ConfigPanel.OOP[id][tmp], "SYS\\ledon.bmp"); } DAS.StepM.OOP[id] = ~DAS.StepM.OOP[id]; AMS_wopto(id, DAS.StepM.OOP[id]); delay(50); DAS.StepM.OOP[id] = ~DAS.StepM.OOP[id]; } void ReadInputCB(MOBJECT p, void *od, void *ad) { int i, er; // char buf[80]; int actadd, id; actadd = MPagedFormGetActivePage(PFAMS); id = DAS.StepM.Addr[actadd]; /* if (!CONFP.InitF[id]) { MMessageDialog("AMS Tester Inf.", "AMS Not Initialized!.\nPlease push ""Init"" button first", "OK", NULL); return ; } */ for (i=7;i>=0;i--) { er = AMS_chkbitsts(id, i); if(er==1) MPixmapSetImageFile(DAS.Gui.ConfigPanel.IOP[id][i], "SYS\\ledon.bmp"); else if(er==0) MPixmapSetImageFile(DAS.Gui.ConfigPanel.IOP[id][i], "SYS\\ledoff.bmp"); else Message("Unable to read AMS\nPlease check if AMS Switched ON", er); } } void DMessage(char *str) { MMessageDialog("AMS Informations", str, "OK", NULL); } void PBH_CB(MOBJECT p, void *od, void *ad) { int c = (int) ad; char buf[4096]; switch (c) { case 0: sprintf(buf, "Set the power for the motors\n\ Min = 0.02A; Max = 2.00A."); DMessage(buf); break; case 1: sprintf(buf, "Set the step fraction for the motors\n\ 1/n = 200*n steps/round\n\ n = 2,4,5,8,10,16,25,32,50,64,125,128,250,256.\n\ Min = 400 s/r; Max = 51200 s/r"); DMessage(buf); break; case 2: sprintf(buf, "Set the number of step used for slope"); DMessage(buf); break; case 3: sprintf(buf, "Set the speed of positioning of the motors ( 0.125 - 32 KHz)\n\ The value is obtained with the formula F2 (Hz) = F1(Hz) * (n + 1);\n n = 0, 1, ... 255. - Hex 00_FF.\n\n\ (i.e. n=1 --> F2 = 250 Hz)\n\ WARNING - The formula is valid only if F1 = 125Hz"); DMessage(buf); break; case 4: sprintf(buf, "Set the multiplier for the stepper motors."); DMessage(buf); break; case 5: sprintf(buf, "Set and Test the Home for the Motors\n\n - Standard: the stepper rounds counterclockwise with \ 2000 s/r (1/10) and f = 1KHz.\nThe sampling is done 1000 times per second (1KHZ)\n\n\ - Default: similar to ""Standard"", but using the actual setted stepping and frequency\n\n\ - Track: the tracking procedure is used.\n The stepper rounds fast since when the optoswitch is found,\n then the stepper\ inverts the direction and rounds slowly\n since when the status bit change again.\n\n"); DMessage(buf); break; case 6: sprintf(buf, "Read the Input port of AMS."); DMessage(buf); break; case 7: if (DAS.Paramini.EqType == SPATRAMPLUS) { sprintf(buf, "Set and Read the Output port of the AMS.\n\n\ AMS1:\n\ OOP[0] --> Peltier\n\ OOP[1] --> Fan Peltier\n\ OOP[2] --> HG Lamp\n\ OOP[3] --> QJ Lamp\n\ OOP[4] --> Peltier Power Supply\n\ OOP[5] --> Hires Power Supply\n\ OOP[6] --> SPARE\n\ OOP[7] --> SPARE\n"); } if (DAS.Paramini.EqType == GASCODNG1) { sprintf(buf, "Set and Read the Output port of the AMS.\n\n\ AMS1:\n\ OOP[0] - Peltier\n\ OOP[1] - Fan Peltier\n\ OOP[2] - HG Lamp\n\ OOP[3] - QJ Lamp\n\ OOP[4] - Peltier Power Supply\n\ OOP[5] - Hires Power Supply\n\ OOP[6] - Ext. Shutter or Torque Motor Shutter\n\ OOP[7] - Ext. Lamp\n\ AMS2:\n\ OOP[0] - Duty Cycle Peltier\n\ OOP[1] - SPARE\n\ OOP[2] - SPARE\n\ OOP[3] - SPARE\n\ OOP[4] - SPARE\n\ OOP[5] - SPARE\n\ OOP[6] - SPARE\n\ OOP[7] - SPARE\n\ AMS3:\n\ OOP[0] - SPARE\n\ OOP[1] - Fan ECU\n\ OOP[2] - SPARE\n\ OOP[3] - SPARE\n\ OOP[4] - SPARE\n\ OOP[5] - SPARE\n\ OOP[6] - SPARE\n\ OOP[7] - SPARE\n"); } if (DAS.Paramini.EqType == TROPOGAS) { sprintf(buf, "Set and Read the Output port of the AMS.\n\n\ AMS1:\n\ OOP[0] --> Peltier\n\ OOP[1] --> Fan Peltier\n\ OOP[2] --> HG Lamp\n\ OOP[3] --> QJ Lamp\n\ OOP[4] --> Peltier Power Supply\n\ OOP[5] --> Hires Power Supply\n\ OOP[6] --> Ext. Shutter\n\ OOP[7] --> Ext. Lamp\n"); } DMessage(buf); break; case 8: sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\ set the polarity for HOME and WORK Positions."); DMessage(buf); break; case 9: sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\ set the polarity for HOME and WORK Positions."); DMessage(buf); break; case 10: sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\ set the polarity for HOME and WORK Positions."); DMessage(buf); break; case 11: sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\ set the polarity for HOME and WORK Positions."); DMessage(buf); break; case 12: sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\ set the polarity for HOME and WORK Positions."); DMessage(buf); break; case 13: sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\ set the polarity for HOME and WORK Positions."); DMessage(buf); break; case 14: sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\ set the polarity for HOME and WORK Positions."); DMessage(buf); break; } } void CONFP_AMS_IOPort(MOBJECT dtb, int amsn) { MOBJECT lbl; int i; unsigned char er = 0; MOBJECT rowform, colform, rowform1, pb, pbh; MOBJECT tb, pixmap; char buf[32]; lbl = MCreateLabel(dtb, " TEST I/O Ports", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetCompositeWidth(lbl, 347); //era rowform017 rowform = MCreateRowForm(dtb); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); MObjectSetFGColorFromParent(rowform, False); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetShadow(rowform, WS_SHADOW_OUT, 2, 0); MObjectSetResize(rowform, True, True); //era _colform003 colform = MCreateColForm(rowform); MObjectSetForegroundRGB(colform, 255, 255, 255); MObjectSetBackgroundRGB(colform, 74, 60, 0); MObjectSetShadow(colform, WS_NONE, 0, 0); MObjectSetResize(colform, True, True); //era _rowform018 rowform1 = MCreateRowForm(colform); MObjectSetForegroundRGB(rowform1, 255, 255, 255); MObjectSetBackgroundRGB(rowform1, 74, 60, 0); MObjectSetResize(rowform1, True, True); lbl = MCreateLabel(rowform1, "Input Port", HELV_SMALL); MObjectAlign(lbl, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 74, 60, 0); MObjectSetResize(lbl, False, False); pb = MCreatePButton(rowform1, "Read Input", TIMES_SMALL); MBottomAttach(pb, F_ATT_FORM, 0, NULL); MObjectAlign(pb, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(pb, 255, 255, 255); MObjectSetBackgroundRGB(pb, 71, 126, 246); MPButtonSetCallback(pb, ReadInputCB, (void *) 0); //era _tablefrm018 tb = MCreateTableForm(colform, 8); MObjectAlign(tb, CENTER_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(tb, 255, 255, 255); MObjectSetBackgroundRGB(tb, 120, 100, 0); MObjectSetResize(tb, False, False); for (i=7;i>=0;i--) { sprintf(buf,"%d", i); lbl = MCreateLabel(tb, buf, HELV_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 91, 91, 91); } for (i=7;i>=0;i--) { DAS.Gui.ConfigPanel.IOP[amsn][i] = MCreatePixmapFromFile(tb, "SYS\\ledoff.bmp"); MObjectSetShadow(DAS.Gui.ConfigPanel.IOP[amsn][i], WS_NONE, 0, 0); } pbh = MCreateImagePButtonExt(colform, "sys\\qmarkyellow.bmp", "sys\\qmarkblue.bmp", "", "sys\\qmarkred.bmp", "", ""); MButtonSetImageMaskByPixel(pbh, 0, 0); MObjectSetTransparency(pbh, 255); MObjectSetShadow(pbh, WS_NONE, 0, 0); MObjectSetBackgroundRGB(pbh, 80, 60, 0); MPButtonSetCallback(pbh, PBH_CB, (void *) 6); MObjectSetResize(pbh, False, True); //era _rowform019 rowform = MCreateRowForm(dtb); MObjectAlign(rowform, UNDEF_ALIGN, TOP_ALIGN); MObjectSetFGColorFromParent(rowform, False); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, True, True); //era _colform004 colform = MCreateColForm(rowform); MObjectSetForegroundRGB(colform, 255, 255, 255); MObjectSetBackgroundRGB(colform, 74, 60, 0); MObjectSetShadow(colform, WS_NONE, 0, 0); MObjectSetResize(colform, True, True); //era _rowform020 rowform1 = MCreateRowForm(colform); MObjectSetBackgroundRGB(rowform1, 74, 60, 0); MObjectSetResize(rowform1, True, True); lbl = MCreateLabel(rowform1, "Output Port", HELV_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 74, 60, 0); MObjectSetResize(lbl, False, False); //era _tablefrm019 tb = MCreateTableForm(rowform1, 2); MFormSetSpacing(tb, 1); MTableFormSetColAlign(tb, 1, LEFT_ALIGN); // MTopAttach(_tablefrm019, F_ATT_OBJ, 0, _label033); MObjectAlign(tb, UNDEF_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, False, False); pixmap = MCreatePixmapFromFile(tb, "sys\\LEDOFFsmall.BMP"); lbl = MCreateLabel(tb, "OFF = 0", HELV_SMALL); MLabelSetMargin(lbl, 3, 1); MObjectSetBackgroundRGB(lbl, 74, 60, 0); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); pixmap = MCreatePixmapFromFile(tb, "sys\\LEDONsmall.BMP"); lbl = MCreateLabel(tb, "ON = 1", HELV_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MLabelSetMargin(lbl, 3, 1); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(lbl, 74, 60, 0); MObjectSetTransparency(lbl, 0); //era _tablefrm020 e colform004 tb = MCreateTableForm(colform, 8); MObjectAlign(tb, CENTER_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(tb, 255, 255, 255); MObjectSetBackgroundRGB(tb, 120, 100, 0); MObjectSetResize(tb, False, False); for (i=7;i>=0;i--) { sprintf(buf,"%d", i); lbl = MCreateLabel(tb, buf, HELV_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 91, 91, 91); } for (i=7;i>=0;i--) { sprintf(buf,"%d", i); DAS.Gui.ConfigPanel.OOP[amsn][i] = MCreateImageTButtonExt(tb, "sys\\ledoff.bmp", "sys\\ledon.bmp", "", "", "", ""); //MCreatePixmapFromFile(tb, "SYS\\ledoff.bmp"); MObjectSetShadow(DAS.Gui.ConfigPanel.OOP[amsn][i], WS_NONE, 0, 0); //MTButtonSetCallback(DAS.Gui.ConfigPanel.OOP[amsn][i], OOP_CB , (void *) i); er = ChkDigIO(DAS.StepM.OOP[amsn], i); if(er==1) MTButtonActivate(DAS.Gui.ConfigPanel.OOP[amsn][i]); else if(er==0) MTButtonDeactivate(DAS.Gui.ConfigPanel.OOP[amsn][i]); // the callback has to be after the creation and the setting of the buttons status!!!!!!!!!! MTButtonSetCallback(DAS.Gui.ConfigPanel.OOP[amsn][i], OOP_CB , (void *) i); } pbh = MCreateImagePButtonExt(colform, "sys\\qmarkyellow.bmp", "sys\\qmarkblue.bmp", "", "sys\\qmarkred.bmp", "", ""); MButtonSetImageMaskByPixel(pbh, 0, 0); MObjectSetTransparency(pbh, 255); MObjectSetShadow(pbh, WS_NONE, 0, 0); MObjectSetBackgroundRGB(pbh, 80, 60, 0); MPButtonSetCallback(pbh, PBH_CB, (void *) 7); MObjectSetResize(pbh, False, True); } void FrmStepperHomeMode(int mod, MOBJECT obj) { MOBJECT lbl, tb, rowfrm, rb, pb; // char buf[32]; int c = mod; int i = 3; // int k; const char *lblstring[] = {{"Mirror"}, {"Grating"}, {"Filter Wheel"}, {"Not Conn."}, {"Zenith"}, {"Azimut"}}; const char *helpoutput[] = {{"Standard - This command search the reference position of the device (Home).\nThe motor moves in the CCW direction until the input port became active.\nThe process is done with 2000 s/r and 1KHz of frequency.\nThe scanning for the end-run is done each 1 ms "}, {"Default - As the standard command, but with the actual values of step, power and frequancy "}, {"Fast - The frequency is setted in the program (see AMS User Guide and contact DanBo for modifications)"}}; rowfrm = MCreateRowForm(obj); MObjectSetBackgroundRGB(rowfrm, 80, 60, 0); lbl = MCreateLabel(rowfrm, lblstring[mod], FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 192, 80, 80); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowfrm,2); MObjectSetBackgroundRGB(tb, 80, 60, 0); rb= MCreateRButton(tb, "Standard", FIXED_SMALL); MPButtonSetCallback(rb, DB_HomeTypeCB, (void *) (c*i+0)); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetPopupHelp(rb, helpoutput[0], 200, 5000); // MObjectSetCompositeWidth(rb, 123); if(DAS.StepM.hometype[mod] == 0) MRButtonActivate(rb); pb= MCreatePButton(tb, "Test", FIXED_SMALL); MPButtonSetCallback(pb, DB_TestHomeTypeCB, (void *) (c*i+0)); MObjectAlign(pb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(pb, 0, 0, 0); MObjectSetBackgroundRGB(pb, 127, 220, 120); rb= MCreateRButton(tb, "Default", FIXED_SMALL); MPButtonSetCallback(rb, DB_HomeTypeCB, (void *) (c*i+1)); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetPopupHelp(rb, helpoutput[1], 200, 5000); // MObjectSetCompositeWidth(rb, 123); // if(DAS.DAS.StepM.hometype[mod] == 1) // MRButtonActivate(rb); pb= MCreatePButton(tb, "Test", FIXED_SMALL); MPButtonSetCallback(pb, DB_TestHomeTypeCB, (void *) (c*i+1)); MObjectAlign(pb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(pb, 0, 0, 0); MObjectSetBackgroundRGB(pb, 127, 220, 120); rb= MCreateRButton(tb, "Fast ", FIXED_SMALL); MPButtonSetCallback(rb, DB_HomeTypeCB, (void *) (c*i+2)); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetPopupHelp(rb, helpoutput[2], 200, 5000); // MObjectSetCompositeWidth(rb, 123); // if(DAS.DAS.StepM.hometype[mod] == 2) // MRButtonActivate(rb); pb= MCreatePButton(tb, "Test", FIXED_SMALL); MPButtonSetCallback(pb, DB_TestHomeTypeCB, (void *) (c*i+2)); MObjectAlign(pb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(pb, 0, 0, 0); MObjectSetBackgroundRGB(pb, 127, 220, 120); } void FrmNOVA_IO_Test(int mod, MOBJECT obj) { MOBJECT lbl, tb, rowfrm, rb, pb; // char buf[32]; int c = mod; int i = 3; // int k; const char *lblstring[] = {{"Mirror"}, {"Grating"}, {"Filter Wheel"}, {"Not Conn."}, {"Zenith"}, {"Azimut"}}; const char *helpoutput[] = {{"Standard - This command search the reference position of the device (Home).\nThe motor moves in the CCW direction until the input port became active.\nThe process is done with 2000 s/r and 1KHz of frequency.\nThe scanning for the end-run is done each 1 ms "}, {"Default - As the standard command, but with the actual values of step, power and frequancy "}, {"Fast - The frequency is setted in the program (see AMS User Guide and contact DanBo for modifications)"}}; rowfrm = MCreateRowForm(obj); MObjectSetBackgroundRGB(rowfrm, 80, 60, 0); lbl = MCreateLabel(rowfrm, lblstring[mod], FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 192, 80, 80); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowfrm,2); MObjectSetBackgroundRGB(tb, 80, 60, 0); rb= MCreateRButton(tb, "Standard", FIXED_SMALL); MPButtonSetCallback(rb, DB_HomeTypeCB, (void *) (c*i+0)); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetPopupHelp(rb, helpoutput[0], 200, 5000); // MObjectSetCompositeWidth(rb, 123); if(DAS.StepM.hometype[mod] == 0) MRButtonActivate(rb); pb= MCreatePButton(tb, "Test", FIXED_SMALL); MPButtonSetCallback(pb, DB_TestHomeTypeCB, (void *) (c*i+0)); MObjectAlign(pb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(pb, 0, 0, 0); MObjectSetBackgroundRGB(pb, 127, 220, 120); rb= MCreateRButton(tb, "Default", FIXED_SMALL); MPButtonSetCallback(rb, DB_HomeTypeCB, (void *) (c*i+1)); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetPopupHelp(rb, helpoutput[1], 200, 5000); // MObjectSetCompositeWidth(rb, 123); // if(DAS.DAS.StepM.hometype[mod] == 1) // MRButtonActivate(rb); pb= MCreatePButton(tb, "Test", FIXED_SMALL); MPButtonSetCallback(pb, DB_TestHomeTypeCB, (void *) (c*i+1)); MObjectAlign(pb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(pb, 0, 0, 0); MObjectSetBackgroundRGB(pb, 127, 220, 120); rb= MCreateRButton(tb, "Fast ", FIXED_SMALL); MPButtonSetCallback(rb, DB_HomeTypeCB, (void *) (c*i+2)); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetPopupHelp(rb, helpoutput[2], 200, 5000); // MObjectSetCompositeWidth(rb, 123); // if(DAS.DAS.StepM.hometype[mod] == 2) // MRButtonActivate(rb); pb= MCreatePButton(tb, "Test", FIXED_SMALL); MPButtonSetCallback(pb, DB_TestHomeTypeCB, (void *) (c*i+2)); MObjectAlign(pb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(pb, 0, 0, 0); MObjectSetBackgroundRGB(pb, 127, 220, 120); } //short _stdcall Inp32(short PortAddress); //void _stdcall Out32(short PortAddress, short data); void NOVAIn_CB(MOBJECT obj, void *od, void *ad) { int c = (int) ad; int i, er, tmp; // int actadd; // char buf[16]; tmp = c; er = NOVA_In(DAS.Nova.type, DAS.Nova.DigIn); //DAS.Nova.DigIn = 7; for (i=3;i>=0;i--) { er = ChkDigIO(DAS.Nova.DigIn, i); if(er==1) MPixmapSetImageFile(DAS.Nova.INP[i], "SYS\\ledon.bmp"); else if(er==0) MPixmapSetImageFile(DAS.Nova.INP[i], "SYS\\ledoff.bmp"); } } void NOVAOut_CB(MOBJECT obj, MVALUE value, void *ad) { int c = (int) ad; int er, tmp; // int actadd; // char buf[16]; tmp = c; er = ChkDigIO((unsigned char)DAS.Nova.DigOut, tmp); if ( er == 1) { DAS.Nova.DigOut &= ~((unsigned char) pow(2,(double)(tmp))); MPixmapSetImageFile(obj, "SYS\\ledoff.bmp"); } else if (er == 0) { DAS.Nova.DigOut |= (unsigned char) pow(2,(double)(tmp)); MPixmapSetImageFile(obj, "SYS\\ledon.bmp"); } //OutByte(576, DAS.Nova.DigOut); er = NOVA_Out(DAS.Nova.type, DAS.Nova.DigOut); } void CONFP_AMS_SM_OFFSET(MOBJECT obj, int nams) { char buf[64]; char str[512]; MOBJECT lbl, tb, rowform1, edit; int i, k; lbl = MCreateLabel(obj, "Devices Offsets", FIXED_SMALL); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetCompositeWidth(lbl, 347); rowform1 = MCreateRowForm(obj); MObjectSetBackgroundRGB(rowform1, 80, 60, 0); MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); lbl = MCreateLabel(rowform1, "Input Mirror", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetCompositeWidth(lbl, 347); tb = MCreateTableForm(rowform1, 5); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); MTableFormSetColAlign(tb, 0, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 80, 60, 0); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); lbl = MCreateLabel(tb, "Home", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); for(i=0;i<4;i++) { if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) sprintf(buf, "%s",Mir_CodeTropo[i]); else sprintf(buf, "%s",Mir_Code[i]); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); } for(i=0;i<5;i++) { sprintf(buf, "%d",DAS.Paramini.Offset[i]); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 120, 100, 0); MObjectSetCompositeWidth(edit, 65); k= i + 300; MEditSetValCallback(edit, ValidateCB, (void *) k); MEditSetActCallback(edit, ActEditCB, (void *) k); } sprintf(str," Type the new 'offset' value for the Home position\n then push TAB\n then go to the MAIN PANEL\n then push 'H_Mirr'\n DO NOT PUSH the 'Apply' button to test the new offset!"); lbl = MCreateLabel(obj, str, FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); } void CONFP_AMS_NOVA(MOBJECT pf) { MOBJECT lbl, tb, pb, rb, rowfrm; int i, er; char buf[64]; sprintf(buf, "SET NOVA MB"); MObjectSetText(pf, buf); rowfrm = MCreateRowForm(pf); MObjectSetBackgroundRGB(rowfrm, 80, 60, 0); MObjectSetResize(rowfrm, True, False); MObjectAlign(rowfrm, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(rowfrm, "Select NOVA board", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowfrm, 3); MObjectSetBackgroundRGB(tb, 80, 60, 0); MObjectSetResize(tb, True, True); rb = MCreateRButton(tb, "7892", FIXED_SMALL); MPButtonSetCallback(rb, NovaTypeCB, (void *) NOVA7892); MObjectAlign(rb, CENTER_ALIGN, TOP_ALIGN); MObjectSetShadow(rb, WS_NONE, 0, 0); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetBackgroundRGB(rb, 48, 20, 255); if(DAS.Nova.type == NOVA7892) MTButtonActivate(rb); else MTButtonDeactivate(rb); rb = MCreateRButton(tb, "6612G2", FIXED_SMALL); MPButtonSetCallback(rb, NovaTypeCB, (void *) NOVA6612G2); MObjectAlign(rb, CENTER_ALIGN, TOP_ALIGN); MObjectSetShadow(rb, WS_NONE, 0, 0); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetBackgroundRGB(rb, 48, 20, 255); if(DAS.Nova.type == NOVA6612G2) MTButtonActivate(rb); else MTButtonDeactivate(rb); rb = MCreateRButton(tb, "945GSE", FIXED_SMALL); MPButtonSetCallback(rb, NovaTypeCB, (void *) NOVA945GSE); MObjectAlign(rb, CENTER_ALIGN, TOP_ALIGN); MObjectSetShadow(rb, WS_NONE, 0, 0); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetBackgroundRGB(rb, 48, 20, 255); //MObjectSetUnsensitive(rb); if(DAS.Nova.type == NOVA945GSE) MTButtonActivate(rb); else MTButtonDeactivate(rb); pb = MCreatePButton(rowfrm, "Store", HELV_SMALL); MPButtonSetCallback(pb, WriteHardwareiniCB, (void *) 0); /**************************************************************/ lbl = MCreateLabel(rowfrm, "Output Port", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowfrm, 4); MObjectSetBackgroundRGB(tb, 80, 60, 0); MObjectSetResize(tb, True, True); //********************** for (i=3;i>=0;i--) { sprintf(buf,"%d", i); lbl = MCreateLabel(tb, buf, HELV_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 91, 91, 91); } for (i=3;i>=0;i--) { sprintf(buf,"%d", i); pb = MCreateImageTButtonExt(tb, "sys\\ledoff.bmp", "sys\\ledon.bmp", "", "", "", ""); MObjectSetShadow(pb, WS_NONE, 0, 0); er = ChkDigIO((unsigned char)DAS.Nova.DigOut, i); if(er == 1) MTButtonActivate(pb); else if(er==0) MTButtonDeactivate(pb); // the callback has to be after the creation and the setting of the buttons status!!!!!!!!!! MTButtonSetCallback(pb, NOVAOut_CB , (void *) i); } lbl = MCreateLabel(rowfrm, "Input Port", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); pb = MCreatePButton(rowfrm, "Read Input", TIMES_SMALL); MBottomAttach(pb, F_ATT_FORM, 0, NULL); MObjectAlign(pb, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(pb, 255, 255, 255); MObjectSetBackgroundRGB(pb, 71, 126, 246); MPButtonSetCallback(pb, NOVAIn_CB, (void *) 0); tb = MCreateTableForm(rowfrm, 4); MObjectSetBackgroundRGB(tb, 80, 60, 0); MObjectSetResize(tb, True, True); //********************** for (i=3;i>=0;i--) { sprintf(buf,"%d", i); lbl = MCreateLabel(tb, buf, HELV_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 91, 91, 91); } er = NOVA_In(DAS.Nova.type, DAS.Nova.DigIn); for (i=3;i>=0;i--) { er = ChkDigIO(DAS.Nova.DigIn, i); sprintf(buf,"%d", i); //DAS.Nova.INP[i] = MCreateImageTButtonExt(tb, "sys\\ledoff.bmp", "sys\\ledon.bmp", "", "", "", ""); if(er == 0) { DAS.Nova.INP[i] = MCreatePixmapFromFile(tb, "SYS\\ledoff.bmp"); MObjectSetShadow(DAS.Nova.INP[i], WS_NONE, 0, 0); } else if(er == 1) { DAS.Nova.INP[i] = MCreatePixmapFromFile(tb, "SYS\\ledon.bmp"); MObjectSetShadow(DAS.Nova.INP[i], WS_NONE, 0, 0); } //er = ChkDigIO(DAS.Nova.DigIn, i); //if(er == 1) // MTButtonActivate(DAS.Nova.INP[i]); //else if(er==0) // MTButtonDeactivate(DAS.Nova.INP[i]); // the callback has to be after the creation and the setting of the buttons status!!!!!!!!!! //MTButtonSetCallback(pb, NOVAIn_CB , (void *) i); } /*******************************************************/ // Set Reset Time tb = MCreateTableForm(rowfrm, 2); MObjectSetBackgroundRGB(tb, 80, 60, 0); MObjectSetResize(tb, True, True); lbl = MCreateLabel(tb, "Set reset time (1-255s)", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); sprintf(buf,"%d", DAS.Nova.WDT_TOUT); //sprintf(buf,"%d", 15); DAS.Gui.ConfigPanel.WDT_edt = MCreateEdit(tb, buf, 5, FIXED_SMALL); lbl = MCreateLabel(tb, "Time Elapsed", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); DAS.Gui.ConfigPanel.lbltelap = MCreateLabel(tb, " ", FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lbltelap, 48, 20, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lbltelap, 192, 192, 192); MObjectSetTransparency(DAS.Gui.ConfigPanel.lbltelap, 0); tb = MCreateTableForm(rowfrm, 3); MObjectSetBackgroundRGB(tb, 80, 60, 0); MObjectSetResize(tb, True, True); pb = MCreatePButton(tb, "Start", HELV_SMALL); MPButtonSetCallback(pb, WDT_CB , (void *) 0); pb = MCreatePButton(tb, "Exit", HELV_SMALL); // MPButtonSetCallback(pb, MDQuitCB, (void *) 0); pb = MCreatePButton(tb, "Launch Task", HELV_SMALL); MPButtonSetCallback(pb, WDT_Task_CB, (void *) 0); } void CONFP_AMS_Utility(MOBJECT pf) { MOBJECT rowfrm, rowfrm1; // int er; char buf[64]; sprintf(buf, "OFFSET"); MObjectSetText(pf, buf); rowfrm = MCreateRowForm(pf); MObjectSetBackgroundRGB(rowfrm, 80, 60, 0); MObjectSetResize(rowfrm, True, False); MObjectAlign(rowfrm, CENTER_ALIGN, TOP_ALIGN); /* lbl = MCreateLabel(rowfrm, "HOME MODE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowfrm, 2); MObjectSetBackgroundRGB(tb, 80, 60, 0); MObjectSetResize(tb, True, True); if(DAS.Paramini.EqType == SPATRAM) { for(i=0;i<6;i++) FrmStepperHomeMode(i, tb); } else { for(i=0;i<4;i++) FrmStepperHomeMode(i, tb); } */ //NOVA DIGITAL I/O rowfrm1 = MCreateRowForm(pf); MObjectSetBackgroundRGB(rowfrm1, 80, 60, 0); MObjectSetResize(rowfrm1, True, False); MObjectAlign(rowfrm1, CENTER_ALIGN, TOP_ALIGN); CONFP_AMS_SM_OFFSET(rowfrm, 0); } //void FrmStepperConfP(MOBJECT pf, int amsn) void CONFP_AMS(MOBJECT pf, int amsn) { char buf[64]; MOBJECT lbl, tb, tb1, pb, pbh, rowform; int i; // double speedhz; // MOBJECT list; sprintf(buf, "AMS%d",amsn+1); MObjectSetText(pf, buf); tb = MCreateTableForm(pf, 3); MObjectSetBackgroundRGB(tb, 80, 60, 0); MObjectSetResize(tb, False, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "ADDRESS:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 80, 60, 0); MObjectSetTransparency(lbl, 0); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetResize(lbl, True, True); sprintf(buf," %d ", amsn); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 120, 100, 0); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, True, True); pb = MCreatePButton(tb, "New Address", FIXED_SMALL); MObjectSetUnsensitive(pb); //MPButtonSetCallback(pb, TestFontCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectAlign(pb, RIGHT_ALIGN, TOP_ALIGN); tb1 = MCreateTableForm(pf, 3); MObjectSetBackgroundRGB(tb1, 80, 60, 0); MObjectSetResize(tb1, True, True); switch (amsn) { case 0: lbl = MCreateLabel(tb1, "SM-A, SM1 - MIRROR", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); lbl = MCreateLabel(tb1, "SM-B, SM2 - GRATING", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); lbl = MCreateLabel(tb1, "Help", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); break; case 1: lbl = MCreateLabel(tb1, "SM-A, SM3 - FILTERS ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); lbl = MCreateLabel(tb1, "SM-B, SM4 - Not Conn", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); lbl = MCreateLabel(tb1, "Help", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); break; case 2: lbl = MCreateLabel(tb1, "SM-A, SM5 - ZENITH", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); lbl = MCreateLabel(tb1, "SM-B, SM6 - AZIMUTH", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); lbl = MCreateLabel(tb1, "Help", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); break; } for (i=0;i<2;i++) { //TabSingleMotor(amsn, i, tb1); CONFP_AMS_TabSingMotor(amsn, i, tb1); } /*****+++++++++++++++++++++++++++++++++******/ //Help Buttons rowform = MCreateRowForm(tb1); MObjectSetResize(rowform, True, True); MObjectSetBackgroundRGB(rowform, 74, 60, 0); MObjectSetShadow(rowform, WS_NONE, 0, 0); for(i=0;i<6;i++) { pbh = MCreateImagePButtonExt(rowform, "sys\\qmarkyellow.bmp", "sys\\qmarkblue.bmp", "", "sys\\qmarkred.bmp", "", ""); MButtonSetImageMaskByPixel(pbh, 0, 0); MObjectSetTransparency(pbh, 255); MObjectSetShadow(pbh, WS_NONE, 0, 0); MObjectSetBackgroundRGB(pbh, 74, 60, 0); MPButtonSetCallback(pbh, PBH_CB, (void *) i); MObjectSetResize(pbh, False, True); } /*****************************************************/ CONFP_AMS_IOPort(pf, amsn); // FrmStepperOFFSET(pf, amsn); } void wledtCB(MOBJECT edit, char *text, void *ed) { int c = (int) ed; wl[c] = (int) strtod( text, &text ); } void valwledt(MOBJECT edit, EDIT_VAL *ev, void *ii) { int c = (int) ii; if (ev->focus_leave == True) wl[c] = (int) strtod( ev->text, &ev->text ); } void stedtCB(MOBJECT edit, char *text, void *ed) { int c = (int) ed; switch (c) { case 1: { DAS.Paramini.ITemp = strtod( text, &text ); break; } } } void valstedt(MOBJECT edit, EDIT_VAL *ev, void *ii) { int c = (int) ii; if (ev->focus_leave == True) wav[c] = (long)strtod( ev->text, &ev->text ); } /*******************************************************************************************/ /*******************************************************************************************/ int ApplyGeoCB(MOBJECT shell, void *od, void *ad) { FILE *fs; char str[180]; char buff[_MAX_PATH]; // int i; sprintf(buff, "%s\\GeoCoord.INI", BIL.DFILEM.CONFIGDIREQUIPMENT); fs = fopen(buff, "w"); if(fs == NULL) return 1; sprintf(str, "Geographical Coordinates file for %s station.\n"); fprintf(fs,str); sprintf(str, "%s Station name (3 CHAR)\n",DAS.DGeo.s_name); fprintf(fs,str); sprintf(str, "%.3f Latitude [ 90N, -90S]\n",DAS.DGeo.latitude); fprintf(fs,str); sprintf(str, "%.3f Longitude [ 0, 180 E],[-180 W, 0]\n",DAS.DGeo.longitude); fprintf(fs,str); sprintf(str, "%.3f Altitude [ masl]\n",DAS.DGeo.alititude); fprintf(fs,str); sprintf(str, "%d TimeZone\n",DAS.DGeo.timezone); fprintf(fs,str); fclose(fs); return 0; } //mode =0 --> DAS.DGeo.nitem; for deleting station //mode =1 --> DAS.DGeo.nitem++ ; for Adding Station int WriteGeo(int mode ) { FILE *fs; char str[180]; char buff[_MAX_PATH]; int i; // if (mode) // DAS.DGeo.nitem++; sprintf(buff, "%s\\GeoDB.ini", BIL.DFILEM.CONFIGDIREQUIPMENT); fs = fopen(buff, "w"); /*********************************/ if(fs == NULL) { MMessageDialog("DAS information", "Problems in opening file", " Ok ", NULL); return 1; } sprintf(str, "Geographical Coordinates file.\n"); fprintf(fs,str); sprintf(str, "the format is: \n"); fprintf(fs,str); sprintf(str, "Station name ( Max 3 CHAR)\n"); fprintf(fs,str); sprintf(str, "Latitude[90N,-90S] Longitude[0,180E],[-180W,0] Altitude(m/asl) TimeZone\n"); fprintf(fs,str); for (i=0;i<DAS.DGeo.nitem;i++) { sprintf(str, "%s\n",DAS.DGeo.news_name[i]); fprintf(fs,str); sprintf(str, "%.3f %.3f %.3f %d\n", DAS.DGeo.newlatitude[i], DAS.DGeo.newlongitude[i],DAS.DGeo.newalititude[i],DAS.DGeo.newtimezone[i]); fprintf(fs,str); } fclose(fs); DAS.DGeo.flagnewstation = 0; sprintf(str,"The current coordinates have been saved in '%s\\GeoDB.ini' file", BIL.DFILEM.CONFIGDIREQUIPMENT); MMessageDialog("DAS information", str, " Ok ", NULL); return 0; } void DB_GeocoordCB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; char str[16]; er = MRButtonGetActivationStatus(o); if(er) { if (c==100) { /* sprintf(str, "%s"," "); for(i=0;i<5;i++) MObjectSetText(DAS.DGeo.edit[i], str); MSelectObject(DAS.DGeo.edit[0]); DAS.DGeo.flagnewstation = 1; DAS.DGeo.selitem = DAS.DGeo.nitem; */ } else { DAS.DGeo.selitem = c; sprintf(DAS.DGeo.s_name, "%s", DAS.DGeo.news_name[c]); MObjectSetText(DAS.DGeo.edit[0], DAS.DGeo.s_name); DAS.DGeo.latitude = DAS.DGeo.newlatitude[c]; _gcvt(DAS.DGeo.latitude , 6, str ); MObjectSetText(DAS.DGeo.edit[1], str); DAS.DGeo.longitude = DAS.DGeo.newlongitude[c]; _gcvt(DAS.DGeo.longitude , 6, str ); MObjectSetText(DAS.DGeo.edit[2], str); DAS.DGeo.timezone = DAS.DGeo.newtimezone[c]; itoa(DAS.DGeo.timezone ,str, 10 ); MObjectSetText(DAS.DGeo.edit[3], str); DAS.DGeo.alititude = DAS.DGeo.newalititude[c]; _gcvt(DAS.DGeo.alititude , 6, str ); MObjectSetText(DAS.DGeo.edit[4], str); } } } void Rebuildrb(int mode) { int i; // char buf[16]; if (mode) //Delete Station for (i=0; i<DAS.DGeo.nitem+1; i++) MObjectDestroy(DAS.DGeo.rb[i]); else //Add Station for (i=0; i<DAS.DGeo.nitem-1; i++) MObjectDestroy(DAS.DGeo.rb[i]); for (i=0; i<DAS.DGeo.nitem; i++) { DAS.DGeo.rb[i] = MCreateRButton(DAS.DGeo.tbrb, DAS.DGeo.news_name[i], FIXED_SMALL); MPButtonSetCallback(DAS.DGeo.rb[i], DB_GeocoordCB, (void *) i); MObjectAlign(DAS.DGeo.rb[i], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.rb[i], 255, 255, 255); MObjectSetCompositeWidth(DAS.DGeo.rb[i], 85); } if(DAS.DGeo.selitem>0) DAS.DGeo.selitem = DAS.DGeo.selitem -1; else DAS.DGeo.selitem = DAS.DGeo.selitem; MRButtonActivate(DAS.DGeo.rb[DAS.DGeo.selitem]); /* sprintf(buf, "%s", "New St."); DAS.DGeo.rb[DAS.DGeo.nitem] = MCreateRButton(DAS.DGeo.tbrb, buf, FIXED_SMALL); MPButtonSetCallback(DAS.DGeo.rb[DAS.DGeo.nitem], DB_GeocoordCB, (void *) 100); MObjectAlign(DAS.DGeo.rb[DAS.DGeo.nitem], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.rb[DAS.DGeo.nitem], 255, 255, 255); MObjectSetCompositeWidth(DAS.DGeo.rb[DAS.DGeo.nitem], 85); */ } int StoreGeoCB(MOBJECT shell, void *od, void *ad) { int er = 0; er = WriteGeo(1); Rebuildrb(0); return 0; } int AddStCB(MOBJECT shell, void *od, void *ad) { int er = 0, i; char str[16]; sprintf(str, "%s"," "); for(i=0;i<5;i++) MObjectSetText(DAS.DGeo.edit[i], str); MSelectObject(DAS.DGeo.edit[0]); DAS.DGeo.flagnewstation = 1; DAS.DGeo.nitem++; DAS.DGeo.selitem = DAS.DGeo.nitem-1; return 0; } int DeleteGeoCB(MOBJECT shell, void *od, void *ad) { int c,i; char buf[80]; c=DAS.DGeo.selitem; for (i=0;i<c-1;i++) { DAS.DGeo.news_name[i]; } for (i=c+1;i<DAS.DGeo.nitem;i++) { sprintf(buf,"%s", DAS.DGeo.news_name[i]); sprintf(DAS.DGeo.news_name[i-1], "%s",buf); DAS.DGeo.newlatitude[i-1] = DAS.DGeo.newlatitude[i]; DAS.DGeo.newlongitude[i-1] = DAS.DGeo.newlongitude[i]; DAS.DGeo.newalititude[i-1] = DAS.DGeo.newalititude[i]; DAS.DGeo.newtimezone[i-1] = DAS.DGeo.newtimezone[i]; } sprintf(buf,"%s", DAS.DGeo.news_name[DAS.DGeo.nitem]); sprintf(DAS.DGeo.news_name[DAS.DGeo.nitem-1], "%s",buf); DAS.DGeo.newlatitude[DAS.DGeo.nitem-1] = DAS.DGeo.newlatitude[DAS.DGeo.nitem]; DAS.DGeo.newlongitude[DAS.DGeo.nitem-1] = DAS.DGeo.newlongitude[DAS.DGeo.nitem]; DAS.DGeo.newalititude[DAS.DGeo.nitem-1] = DAS.DGeo.newalititude[DAS.DGeo.nitem]; DAS.DGeo.newtimezone[DAS.DGeo.nitem-1] = DAS.DGeo.newtimezone[DAS.DGeo.nitem]; DAS.DGeo.nitem--; DAS.DGeo.selitem = c; WriteGeo(0); Rebuildrb(1); /* sprintf(str, "%.3f %.3f %.3f %d\n", DAS.DGeo.newlatitude[i], DAS.DGeo.newlongitude[i],DAS.DGeo.newalititude[i],DAS.DGeo.newtimezone[i]); fprintf(fs,str); */ return 0; } void DGeoeditCB(MOBJECT edit, EDIT_VAL *ev, void *ii) { int c = (int) ii; switch (c) { case 0: sprintf(DAS.DGeo.news_name[DAS.DGeo.selitem ], "%s", ev->text); break; case 1: DAS.DGeo.newlatitude[DAS.DGeo.selitem ] = (float)strtod( ev->text, &ev->text ); break; case 2: DAS.DGeo.newlongitude[DAS.DGeo.selitem] = (float)strtod( ev->text, &ev->text ); break; case 3: DAS.DGeo.newtimezone[DAS.DGeo.selitem ] = atoi( ev->text); break; case 4: DAS.DGeo.newalititude[DAS.DGeo.selitem] = (float)strtod( ev->text, &ev->text ); break; } } void DB_StorePB(MOBJECT obj, MAnyWindowEvent *pe, void *a_data) { if(DAS.DGeo.flagnewstation) MObjectSetSensitive(obj); else MObjectSetUnsensitive(obj); } /******************************************************/ void DSZArb_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; // char str[16]; switch (c) { case 0: DAS.Flag.DeltaSZA = 0; MObjectSetUnsensitive(DAS.Gui.ConfigPanel.lblSZA[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.lblSZA[1]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.lblSZA[2]); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtDSZA, 192, 192, 192); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[0], 192, 192, 192); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[1], 192, 192, 192); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.edtDSZA); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.edtSZA[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.edtSZA[1]); break; case 1: DAS.Flag.DeltaSZA = 1; MObjectSetSensitive(DAS.Gui.ConfigPanel.lblSZA[0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.lblSZA[1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.lblSZA[2]); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtDSZA, 40, 96, 72); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[0], 40, 96, 72); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[1], 40, 96, 72); MObjectSetSensitive(DAS.Gui.ConfigPanel.edtDSZA); MObjectSetSensitive(DAS.Gui.ConfigPanel.edtSZA[0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.edtSZA[1]); break; } } void edtDSZA_CB(MOBJECT p, LIST_ACT *la, void *ad) { int c = (int) ad; int er = 0; SZADelta.DeltaSZA = atof(la->item); } void edtSZA_CB(MOBJECT p, LIST_ACT *la, void *ad) { int c = (int) ad; int er = 0; switch (c) { case 0: SZADelta.MinSZA=atof(la->item); break; case 1: SZADelta.MaxSZA=atof(la->item); break; } } void CONFP_param_page5(int mod, MOBJECT obj) { MOBJECT rowform1; // generic row form // MOBJECT wledt; // generic edit object // MOBJECT stedt; // generic edit object // MOBJECT colform; MOBJECT pb; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; MOBJECT lbl; MOBJECT tb; // generic table object // char buf[64]; int k=0; float f=0; // FILE *fd; // char str[80]; // char buff[_MAX_PATH]; // LIST_ACT * pla; MObjectSetText(obj, "Page 5"); lbl = MCreateLabel(obj, "INSTALLED FILTERS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); /* tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True,False); DAS.Gui.ConfigPanel.rbDSZA[0] = MCreateRButton(tb, "Continuous", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDSZA[0], DSZArb_CB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbDSZA[0], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDSZA[0], 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbDSZA[0], 100); DAS.Gui.ConfigPanel.rbDSZA[1] = MCreateRButton(tb, "DeltaSZA", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDSZA[1], DSZArb_CB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbDSZA[1], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDSZA[1], 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbDSZA[1], 100); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True,False); DAS.Gui.ConfigPanel.lblSZA[0] = MCreateLabel(tb, "DeltaSZA (deg):", FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 255, 255, 255); //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblSZA[0], 0); sprintf(buff, "%.3f", SZADelta.DeltaSZA); DAS.Gui.ConfigPanel.edtDSZA = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtDSZA, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtDSZA, 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edtDSZA, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.edtDSZA); list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtDSZA); for(i=0; i<20; i++) { f = f+0.10; sprintf(str, "%.3f",f); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDSZA, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDSZA, edtDSZA_CB, (void *) 0); SZADelta.DeltaSZA = atof(pla->item); DAS.Gui.ConfigPanel.lblSZA[1] = MCreateLabel(tb, "SZA Min. (deg):", FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[1], 255, 255, 255); //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblSZA[1], 0); sprintf(buff, "%d", (int)SZADelta.MinSZA); DAS.Gui.ConfigPanel.edtSZA[0] = MCreateOptionEdit(tb, buff, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtSZA[0], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[0], 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edtSZA[0], CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.edtSZA[0]); list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtSZA[0]); for(i=0; i<21; i++) { sprintf(str, "%d",i); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtSZA[0], str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtSZA[0], edtSZA_CB, (void *) 0); SZADelta.MinSZA = atof(pla->item); DAS.Gui.ConfigPanel.lblSZA[2] = MCreateLabel(tb, "SZA Max. (deg):", FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[2], 255, 255, 255); //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblSZA[2], 0); sprintf(buff, "%d", (int)SZADelta.MaxSZA); DAS.Gui.ConfigPanel.edtSZA[1] = MCreateOptionEdit(tb, buff, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtSZA[1], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[1], 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edtSZA[1], CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.edtSZA[1]); list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtSZA[1]); starti = 20; for(i=starti; i<161; i++) { sprintf(str, "%d",i); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i - starti; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtSZA[1], str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtSZA[1], edtSZA_CB, (void *) 1); SZADelta.MaxSZA = atof(pla->item); if(DAS.Flag.DeltaSZA) MRButtonActivate(DAS.Gui.ConfigPanel.rbDSZA[1]); else MRButtonActivate(DAS.Gui.ConfigPanel.rbDSZA[0]); */ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, True); // Command Button Section /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/ rowform1 = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); // MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); /* pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL); MPButtonSetCallback(pb, ApplyGeoCB, (void *) 0); if((DAS.Flag.exemode == DOASMODE)) MObjectSetUnsensitive(pb); // Set the button as Unensitive MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); MObjectSetPopupHelp(pb,"Apply the selected setting to DAS (and write to file ..GeoCoord.ini)" , 200, 5000); */ pb = MCreatePButton(rowform1, "Save", FIXED_SMALL); MPButtonSetCallback(pb, WriteOptioniniCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(rowform1, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); MObjectSetPopupHelp(pb,"Close Config Panel" , 200, 5000); /* End Command Button Section æææææææææææææææææææææææææææææææææææ*/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ } void CONFP_param_page4(int mod, MOBJECT obj) { MOBJECT rowform1; // generic row form // MOBJECT wledt; // generic edit object // MOBJECT stedt; // generic edit object // MOBJECT colform; MOBJECT pb; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; MOBJECT lbl, list; MOBJECT tb; // generic table object // char buf[64]; int i, k=0, starti; float f=0; // FILE *fd; char str[80]; char buff[_MAX_PATH]; LIST_ACT * pla; MObjectSetText(obj, "Page 4"); lbl = MCreateLabel(obj, "Measurement Scheduling", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True,False); DAS.Gui.ConfigPanel.rbDSZA[0] = MCreateRButton(tb, "Continuous", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDSZA[0], DSZArb_CB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbDSZA[0], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDSZA[0], 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbDSZA[0], 100); DAS.Gui.ConfigPanel.rbDSZA[1] = MCreateRButton(tb, "DeltaSZA", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDSZA[1], DSZArb_CB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbDSZA[1], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDSZA[1], 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbDSZA[1], 100); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True,False); DAS.Gui.ConfigPanel.lblSZA[0] = MCreateLabel(tb, "DeltaSZA (deg):", FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 255, 255, 255); //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblSZA[0], 0); sprintf(buff, "%.3f", SZADelta.DeltaSZA); DAS.Gui.ConfigPanel.edtDSZA = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtDSZA, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtDSZA, 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edtDSZA, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.edtDSZA); list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtDSZA); for(i=0; i<20; i++) { f = f+(float)0.10; sprintf(str, "%.3f",f); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDSZA, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDSZA, edtDSZA_CB, (void *) 0); SZADelta.DeltaSZA = atof(pla->item); DAS.Gui.ConfigPanel.lblSZA[1] = MCreateLabel(tb, "SZA Min. (deg):", FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[1], 255, 255, 255); //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblSZA[1], 0); sprintf(buff, "%d", (int)SZADelta.MinSZA); DAS.Gui.ConfigPanel.edtSZA[0] = MCreateOptionEdit(tb, buff, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtSZA[0], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[0], 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edtSZA[0], CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.edtSZA[0]); list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtSZA[0]); for(i=0; i<21; i++) { sprintf(str, "%d",i); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtSZA[0], str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtSZA[0], edtSZA_CB, (void *) 0); SZADelta.MinSZA = atof(pla->item); DAS.Gui.ConfigPanel.lblSZA[2] = MCreateLabel(tb, "SZA Max. (deg):", FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[2], 255, 255, 255); //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblSZA[2], 0); sprintf(buff, "%d", (int)SZADelta.MaxSZA); DAS.Gui.ConfigPanel.edtSZA[1] = MCreateOptionEdit(tb, buff, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtSZA[1], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[1], 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edtSZA[1], CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.edtSZA[1]); list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtSZA[1]); starti = 20; for(i=starti; i<161; i++) { sprintf(str, "%d",i); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i - starti; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtSZA[1], str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtSZA[1], edtSZA_CB, (void *) 1); SZADelta.MaxSZA = atof(pla->item); if(DAS.Flag.DeltaSZA) MRButtonActivate(DAS.Gui.ConfigPanel.rbDSZA[1]); else MRButtonActivate(DAS.Gui.ConfigPanel.rbDSZA[0]); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, True); // Command Button Section /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/ rowform1 = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); // MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); /* pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL); MPButtonSetCallback(pb, ApplyGeoCB, (void *) 0); if((DAS.Flag.exemode == DOASMODE)) MObjectSetUnsensitive(pb); // Set the button as Unensitive MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); MObjectSetPopupHelp(pb,"Apply the selected setting to DAS (and write to file ..GeoCoord.ini)" , 200, 5000); */ pb = MCreatePButton(rowform1, "Save", FIXED_SMALL); MPButtonSetCallback(pb, WriteOptioniniCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(rowform1, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); MObjectSetPopupHelp(pb,"Close Config Panel" , 200, 5000); /* End Command Button Section æææææææææææææææææææææææææææææææææææ*/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ } void CONFP_param_page3(int mod, MOBJECT obj) { MOBJECT rowform1; // generic row form // MOBJECT wledt; // generic edit object // MOBJECT stedt; // generic edit object MOBJECT pb; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; MOBJECT lbl; MOBJECT tb; // generic table object char buf[64]; int i, k=0; // FILE *fd; // char str[80]; // char buff[_MAX_PATH]; MObjectSetText(obj, "Page 3"); lbl = MCreateLabel(obj, "Station Geo. Coordinates", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Actual Setting" ); lbl = MCreateLabel(obj, buf, FIXED_SMALL); MLabelSetAlignment(lbl, CENTER_ALIGN); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 5); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, False); sprintf(buf, "Stat." ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Lat." ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Long." ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "TZ" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Alt." ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%s", DAS.DGeo.s_name ); DAS.DGeo.edit[0] = MCreateEdit(tb, buf, 3, FIXED_SMALL); MObjectAlign(DAS.DGeo.edit[0] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.edit[0] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.DGeo.edit[0] , 40, 96, 72); MEditSetValCallback(DAS.DGeo.edit[0] , DGeoeditCB, (void *) 0); sprintf(buf, "%.2f", DAS.DGeo.latitude ); DAS.DGeo.edit[1] = MCreateEdit(tb, buf, 7, FIXED_SMALL); MObjectAlign(DAS.DGeo.edit[1] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.edit[1] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.DGeo.edit[1] , 40, 96, 72); MEditSetValCallback(DAS.DGeo.edit[1] , DGeoeditCB, (void *) 1); sprintf(buf, "%.2f", DAS.DGeo.longitude ); DAS.DGeo.edit[2] = MCreateEdit(tb, buf, 7, FIXED_SMALL); MObjectAlign(DAS.DGeo.edit[2] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.edit[2] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.DGeo.edit[2] , 40, 96, 72); MEditSetValCallback(DAS.DGeo.edit[2] , DGeoeditCB, (void *) 2); sprintf(buf, "%d", DAS.DGeo.timezone ); DAS.DGeo.edit[3] = MCreateEdit(tb, buf, 4, FIXED_SMALL); MObjectAlign(DAS.DGeo.edit[3] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.edit[3] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.DGeo.edit[3] , 40, 96, 72); MEditSetValCallback(DAS.DGeo.edit[3] , DGeoeditCB, (void *) 3); sprintf(buf, "%.1f", DAS.DGeo.alititude); DAS.DGeo.edit[4] = MCreateEdit(tb, buf, 7, FIXED_SMALL); MObjectAlign(DAS.DGeo.edit[4] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.edit[4] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.DGeo.edit[4] , 40, 96, 72); MEditSetValCallback(DAS.DGeo.edit[4] , DGeoeditCB, (void *) 4); DAS.DGeo.tbrb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(DAS.DGeo.tbrb, 112, 128, 112); MObjectSetBackgroundRGB(DAS.DGeo.tbrb, 56, 112, 112); MObjectSetResize(DAS.DGeo.tbrb, True,False); // sprintf(buff, "%s\\GeoDB.ini", BIL.DFILEM.CONFIGDIREQUIPMENT); // fd = fopen(buff, "r"); // if(fd == NULL) return 1; // fgets(str, 80, fd); // Read Header // fscanf(fd, "%d", &DAS.DGeo.nitem); // fgets(str, 80, fd); for (i=0; i<DAS.DGeo.nitem; i++) { // fscanf(fd, "%hs",&DAS.DGeo.news_name[i]); DAS.DGeo.rb[i] = MCreateRButton(DAS.DGeo.tbrb, DAS.DGeo.news_name[i], FIXED_SMALL); MPButtonSetCallback(DAS.DGeo.rb[i], DB_GeocoordCB, (void *) i); MObjectAlign(DAS.DGeo.rb[i], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.rb[i], 255, 255, 255); MObjectSetCompositeWidth(DAS.DGeo.rb[i], 85); // fscanf(fd, "%lf %lf %lf %d", &DAS.DGeo.newlatitude[i], // &DAS.DGeo.newlongitude[i],&DAS.DGeo.newalititude[i],&DAS.DGeo.newtimezone[i]); if( strcmp(DAS.DGeo.s_name,DAS.DGeo.news_name[i]) ==0 ) { MRButtonActivate(DAS.DGeo.rb[i]); DAS.DGeo.selitem = i; } } // fclose(fd); /* sprintf(buf, "%s", "New St."); DAS.DGeo.rb[DAS.DGeo.nitem] = MCreateRButton(DAS.DGeo.tbrb, buf, FIXED_SMALL); MPButtonSetCallback(DAS.DGeo.rb[DAS.DGeo.nitem], DB_GeocoordCB, (void *) 100); MObjectAlign(DAS.DGeo.rb[DAS.DGeo.nitem], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.rb[DAS.DGeo.nitem], 255, 255, 255); MObjectSetCompositeWidth(DAS.DGeo.rb[DAS.DGeo.nitem], 85); */ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, True); pb = MCreatePButton(tb, "Add St.", FIXED_SMALL); //MObjectSetUnsensitive(pb); MPButtonSetCallback(pb, AddStCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); //MObjectAddEventNotifyCallback(pb, (OBJ_EVENT_CB) DB_StorePB, EM_MOTION, NULL); MObjectSetPopupHelp(pb,"Add a new station " , 200, 5000); MObjectAlign(pb, UNDEF_ALIGN, BOTTOM_ALIGN); pb = MCreatePButton(tb, "Delete", FIXED_SMALL); //MObjectSetUnsensitive(pb); MPButtonSetCallback(pb, DeleteGeoCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); //MObjectAddEventNotifyCallback(pb, (OBJ_EVENT_CB) DB_StorePB, EM_MOTION, NULL); MObjectSetPopupHelp(pb,"Delete the selected station" , 200, 5000); MObjectAlign(pb, UNDEF_ALIGN, BOTTOM_ALIGN); // Command Button Section /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/ rowform1 = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); // MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL); MPButtonSetCallback(pb, ApplyGeoCB, (void *) 0); if((DAS.Flag.exemode == DOASMODE)) MObjectSetUnsensitive(pb); // Set the button as Unensitive MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); MObjectSetPopupHelp(pb,"Apply the selected setting to DAS (and write to file ..GeoCoord.ini)" , 200, 5000); pb = MCreatePButton(rowform1, "Store", FIXED_SMALL); MObjectSetUnsensitive(pb); MPButtonSetCallback(pb, StoreGeoCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); MObjectAddEventNotifyCallback(pb, (OBJ_EVENT_CB) DB_StorePB, EM_MOTION, NULL); MObjectSetPopupHelp(pb,"If a new station has been created store it in ..GeoDB.ini" , 200, 5000); pb = MCreatePButton(rowform1, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); MObjectSetPopupHelp(pb,"Close Config Panel" , 200, 5000); /* End Command Button Section æææææææææææææææææææææææææææææææææææ*/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ } void CONFP_param_page2(int mod, MOBJECT obj) { MOBJECT rowform, rowform1; // generic row form MOBJECT wledt; // generic edit object MOBJECT stedt; // generic edit object MOBJECT pb ; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; MOBJECT lbl; MOBJECT tb; // generic table object char buf[64]; int i; MObjectSetText(obj, "Page 2"); lbl = MCreateLabel(obj, "Ref. Wavelength and Grating positioning", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); rowform = MCreateColForm(obj); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetBackgroundRGB(rowform, 56, 112, 112); MObjectAlign(rowform, LEFT_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); MTableFormSetColAlign(tb, 0, TOP_ALIGN); MObjectSetResize(tb, False, True); //for(i=0;i<2;i++) //{ sprintf(buf, "Win" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Cent.Wl" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Steps" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); // } for(i=0;i<9;i++) { sprintf(buf, "%d", i); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%d", wl[i]); wledt = MCreateEdit(tb, buf, 5, FIXED_SMALL); MObjectAlign(wledt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(wledt, 255, 255, 255); MObjectSetBackgroundRGB(wledt, 40, 96, 72); MEditSetValCallback(wledt, valwledt, (void *) i); //MEditSetActCallback(wledt, wledtCB, (void *) i); sprintf(buf, "%d", wav[i]); stedt = MCreateEdit(tb, buf, 8, FIXED_SMALL); MObjectAlign(stedt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(stedt, 255, 255, 255); MObjectSetBackgroundRGB(stedt, 40, 96, 72); MEditSetValCallback(stedt, valstedt, (void *) i); //MEditSetActCallback(stedt, stedtCB, (void *) i); } tb = MCreateTableForm(rowform, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); MTableFormSetColAlign(tb, 0, TOP_ALIGN); MObjectSetResize(tb, False, True); sprintf(buf, "Win" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Cent.Wl" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Steps" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); for(i=9;i<18;i++) { sprintf(buf, "%d", i); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%d", wl[i]); wledt = MCreateEdit(tb, buf, 5, FIXED_SMALL); MObjectAlign(wledt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(wledt, 255, 255, 255); MObjectSetBackgroundRGB(wledt, 40, 96, 72); MEditSetValCallback(wledt, valwledt, (void *) i); //MEditSetActCallback(wledt, wledtCB, (void *) i); sprintf(buf, "%d", wav[i]); stedt = MCreateEdit(tb, buf, 8, FIXED_SMALL); MObjectAlign(stedt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(stedt, 255, 255, 255); MObjectSetBackgroundRGB(stedt, 40, 96, 72); MEditSetValCallback(stedt, valstedt, (void *) i); //MEditSetActCallback(stedt, stedtCB, (void *) i); } // Command Button Section /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/ rowform1 = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); // MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL); //MPButtonSetCallback(pb, ApplyChCB, (void *) 0); //if((DAS.Flag.exemode == DOASMODE) | (DAS.Flag.exemode == DBDEMO)) MObjectSetUnsensitive(pb); // Set the button as Unensitive MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(rowform1, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WritewlstepiniCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(rowform1, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); /* End Command Button Section æææææææææææææææææææææææææææææææææææ*/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ } void edtCCDOffSet_CB(MOBJECT p, LIST_ACT *la, void *ad) { int c = (int) ad; int er = 0; DAS.Marconi.Offset = atoi(la->item); if(DAS.Flag.exemode != DBDEMO) DC_SetUsrGain(0, 0 , DAS.Marconi.Offset , 0); } void CONFP_param_page1(int mod, MOBJECT obj) { MOBJECT rowform1; // generic row form MOBJECT edit; // generic edit object MOBJECT pb, rb ; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; MOBJECT lbl; MOBJECT tb; // generic table object char buf[64]; int i, k, *p; MOBJECT list; int t=0; char str[80]; char buff[_MAX_PATH]; LIST_ACT * pla; MObjectSetText(obj, "Page 1"); /******************************************************************************************************************/ //Equipment Type section /*--------- Start ----------------*/ lbl = MCreateLabel(obj, "Equipment Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(obj, 3); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); // Instrument Type(0 = SPATRAM, // 1 = TROPOGAS, 2 = LIS, // 3 = SPATRAMPLUS, 4 = GASCODNG, ) rb = MCreateRButton(tb, "SPATRAMPLUS", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 3); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 3) MRButtonActivate(rb); rb = MCreateRButton(tb, "SPATRAM2", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 9); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 9) MRButtonActivate(rb); rb = MCreateRButton(tb, "SPATRAM3", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 10); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 10) MRButtonActivate(rb); /* rb = MCreateRButton(tb, "SPATRAM", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if( DAS.Paramini.EqType == 0) MRButtonActivate(rb); */ rb = MCreateRButton(tb, "TROPOGAS", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Paramini.EqType == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "LIS", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Paramini.EqType == 2) MRButtonActivate(rb); rb = MCreateRButton(tb, "GASCODNG1", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 4); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Paramini.EqType == 4) MRButtonActivate(rb); /* rb = MCreateRButton(tb, "GASCODOffAxis", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 5); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 5) MRButtonActivate(rb); */ rb = MCreateRButton(tb, "GASCODNG2", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 6); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 6) MRButtonActivate(rb); rb = MCreateRButton(tb, "GASCODNG3", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 7); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 7) MRButtonActivate(rb); rb = MCreateRButton(tb, "GASCODNG4", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 8); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 8) MRButtonActivate(rb); /* pb = MCreatePButton(tb, "Save", FIXED_SMALL); MPButtonSetCallback(pb, WriteEquipiniCB, 0); MObjectAlign(pb, LEFT_ALIGN, UNDEF_ALIGN); //MObjectSetForegroundRGB(pb, 255, 255, 255); MObjectSetCompositeWidth(pb, 105); */ //CCD & OMU Temperature section /*--------- Start ----------------*/ lbl = MCreateLabel(obj, "CCD & OMU Temp", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(obj, 2); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, False); MObjectSetCompositeWidth(tb, 347); lbl = MCreateLabel(tb, "CCD Target Temperature:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%.1lf", DAS.Paramini.ITemp); edit = MCreateEdit(tb, buf, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MEditSetValCallback(edit, ValidateCB, (void *) 1); MEditSetActCallback(edit, ActEditCB, (void *) 1); lbl = MCreateLabel(tb, "CCD Peltier Init Power:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%.1lf%%",(double)DAS.Paramini.CoolPw / 10); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MEditSetValCallback(edit, ValidateCB, (void *) 2); MEditSetActCallback(edit, ActEditCB, (void *) 2); lbl = MCreateLabel(tb, "Optical Unit Target Temp:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); sprintf(buf, "%.1lf", DAS.Paramini.TPelt); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MEditSetValCallback(edit, ValidateCB, (void *) 3); MEditSetActCallback(edit, ActEditCB, (void *) 3); lbl = MCreateLabel(tb, "OMU Peltier Init Power:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%.1lf%%",(double)OMUTHR.PCPower / 10); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MEditSetValCallback(edit, ValidateCB, (void *) 2000); MEditSetActCallback(edit, ActEditCB, (void *) 2000); /*------------------- End CCD & OMU Temperature section -------------*/ //CCD Window and vertical binning section /*##################### Start ##################################################*/ lbl = MCreateLabel(obj, "CCD WINDOW - SETUP", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectSetCompositeWidth(lbl, 347); rowform1 = MCreateRowForm(obj); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); //357 MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform1, 4); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetResize(tb, True, True); // MObjectSetCompositeWidth(tb, 347); MObjectSetShadow(tb, WS_NONE, 0, 0); lbl = MCreateLabel(tb, "X Start:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",DAS.Paramini.ccdXoff); //sprintf(buf, "%d",(DC_CCD.dx - DC_CCD.dx)); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MEditSetValCallback(edit, ValidateCB, (void *) 4); MEditSetActCallback(edit, ActEditCB, (void *) 4); //MEditDisableEditing(edit); lbl = MCreateLabel(tb, "X End:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",DAS.Paramini.ccdWx); //sprintf(buf, "%d",DC_CCD.dx); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MEditSetValCallback(edit, ValidateCB, (void *) 5); MEditSetActCallback(edit, ActEditCB, (void *) 5); // MEditDisableEditing(edit); lbl = MCreateLabel(tb, "Y Start:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",DAS.Paramini.ccdYoff); //sprintf(buf, "%d", (DC_CCD.dy-DC_CCD.dy)); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MEditSetValCallback(edit, ValidateCB, (void *) 6); MEditSetActCallback(edit, ActEditCB, (void *) 6); // MEditDisableEditing(edit); lbl = MCreateLabel(tb, "Y End:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",DAS.Paramini.ccdWy); //sprintf(buf, "%d",DC_CCD.dy); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MEditSetValCallback(edit, ValidateCB, (void *) 7); MEditSetActCallback(edit, ActEditCB, (void *) 7); // MEditDisableEditing(edit); tb = MCreateTableForm(rowform1, 3); MTableFormSetColAlign(tb, 0, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); MObjectSetShadow(tb, WS_NONE, 0, 0); lbl = MCreateLabel(tb, "Vertical Binning:", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); sprintf(buf, "%d",DAS.Paramini.VBin); edit = MCreateClippedEdit(tb, buf, 3, 3, FIXED_SMALL); MObjectAlign(edit, RIGHT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MEditSetValCallback(edit, ValidateCB, (void *) 8); MEditSetActCallback(edit, ActEditCB, (void *) 8); pb = MCreatePButton(tb, "CCD Setup (DCS)", FIXED_SMALL); MPButtonSetCallback(pb, CCDSetupCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); /* tb = MCreateTableForm(rowform1, 3); MTableFormSetColAlign(tb, 0, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); */ lbl = MCreateLabel(tb, "Max. Exp. Time (s) :", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MLabelSetAlignment(lbl, LEFT_ALIGN); sprintf(buf, "%.1lf", DAS.Paramini.maxtexp); edit = MCreateClippedEdit(tb, buf, 5, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); //MObjectSetCompositeWidth(edit, 35); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); k = 123; p = (void *) k; MEditSetValCallback(edit, ValidateCB, p); MEditSetActCallback(edit, ActEditCB, p); pb = MCreateImagePButtonExt(tb, "sys\\qmarkyellow.bmp", "sys\\qmarkblue.bmp", "", "sys\\qmarkred.bmp", "", ""); MButtonSetImageMaskByPixel(pb, 0, 0); MObjectSetTransparency(pb, 255); MObjectSetShadow(pb, WS_NONE, 0, 0); MObjectSetBackgroundRGB(pb, 56, 112, 112); MPButtonSetCallback(pb, PB_H_CB, (void *) 0); /* End CCD Window and vertical binning section ###############*/ /* lbl = MCreateLabel(obj, "Devices Offsets", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); */ rowform1 = MCreateRowForm(obj); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); MObjectSetResize(rowform1, True, True); MObjectSetCompositeWidth(rowform1, 347); /**************************************************************************/ //OFFSET HIRES 5 SECTION if (Cfg.Platform == 28) { lbl = MCreateLabel(rowform1, "HiresV OFFSET", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True,False); lbl = MCreateLabel(tb, "Offset", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255); MObjectSetTransparency(lbl, 0); if(DAS.Paramini.EqType == 9) //SPATRAM2 DAS.Marconi.Offset = 250; if(DAS.Paramini.EqType == 8) //GASCODNG4 DAS.Marconi.Offset = 270; sprintf(buff, "%d", DAS.Marconi.Offset); edit = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectAlign(edit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(edit); list = MOptionEditGetList(edit); for(i=0; i<512; i++) { t = i; sprintf(str, "%d", t); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(edit, str); MOptionEditSetListCallback(edit, edtCCDOffSet_CB, (void *) 0); DAS.Marconi.Offset = atoi(pla->item); } /**************************************************************************/ /*************************************************************************/ /* lbl = MCreateLabel(rowform1, "Input Mirror", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetCompositeWidth(lbl, 347); tb = MCreateTableForm(rowform1, 5); MTableFormSetColAlign(tb, 0, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); lbl = MCreateLabel(tb, "Home", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); for(i=0;i<4;i++) { if (DAS.Paramini.EqType != TROPOGAS) sprintf(buf, "%s",Mir_Code[i]); else sprintf(buf, "%s",Mir_CodeTropo[i]); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); } for(i=0;i<5;i++) { sprintf(buf, "%d",DAS.Paramini.Offset[i]); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 65); k= i + 300; MEditSetValCallback(edit, ValidateCB, (void *) k); MEditSetActCallback(edit, ActEditCB, (void *) k); } /* // Command Button Section /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/ rowform1 = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); // MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL); MPButtonSetCallback(pb, ApplyChCB, (void *) 0); if((DAS.Flag.exemode == DOASMODE) ) MObjectSetUnsensitive(pb); // Set the button as Unensitive MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(rowform1, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteParaminiCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(rowform1, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); /* End Command Button Section æææææææææææææææææææææææææææææææææææ*/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ /**************************************************************************************************************/ } // Create the Parameters page void CONFP_Param(int mod, MOBJECT mo) { MOBJECT rowform; // generic row form // MOBJECT rowform1; // generic row form // MOBJECT edit; // generic edit object // MOBJECT pb; // generic pushbutton and radiobutton // MOBJECT lbl; //generic label // MOBJECT tb; // generic table object MOBJECT PPARAM; // char buf[64]; // int k; MObjectSetText(mo, "Parametrs"); rowform = MCreateRowForm(mo); MObjectSetBackgroundRGB(rowform, 56, 112, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); //357 MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); PPARAM = MCreateTabbedRowForm(rowform, 5, FIXED_SMALL); MObjectSetForegroundRGB(PPARAM, 255, 255, 255); MObjectSetBackgroundRGB(PPARAM, 56, 112, 112); MObjectAlign(PPARAM, CENTER_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(PPARAM, 357); MObjectSetResize(PPARAM, False, False); CONFP_param_page1(0, PPARAM); MPagedFormSetActivePage(PPARAM, 1); //Creation page 2 CONFP_param_page2(0, PPARAM); MPagedFormSetActivePage(PPARAM, 2); //Creation page 3 CONFP_param_page3(0, PPARAM); MPagedFormSetActivePage(PPARAM, 3); //Creation page 4 CONFP_param_page4(0, PPARAM); MPagedFormSetActivePage(PPARAM, 4); //Creation page 5 CONFP_param_page5(0, PPARAM); MPagedFormSetActivePage(PPARAM, 0); } void DB_MeasMode_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case 0: DAS.DOption.measmode = 0; //Single Meas MObjectSetUnsensitive(DAS.Gui.ConfigPanel.tbavg); //if (DAS.Marconi.AVGmat != 0) // free(DAS.Marconi.AVGmat); break; case 1: DAS.DOption.measmode = 1; //Average MObjectSetSensitive(DAS.Gui.ConfigPanel.tbavg); //if (DAS.Marconi.AVGmat != 0) //DAS.Marconi.AVGmat = AllocFloatMat(IDX, IDY); //np = (long) IDX * IDY * 2; //AVGmat = malloc(np * 4); //memset(AVGmat, 0, np * 4); break; } } } void DB_AVGAutoR_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case 0: DAS.DOption.avgautor = 1; //Autorange before average break; case 1: DAS.DOption.avgautor = 0; //NO Autorange before average break; } } } void SelDefPixFileCB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; char buf[_MAX_PATH]; char fname[_MAX_PATH], dirname[_MAX_PATH]; char str[_MAX_PATH]; // unsigned long ns; FB_PREFS fbp; strcpy (dirname, MGetCurrentDirectory ()); fname[0] = '\0'; memset (&fbp, 0, sizeof (fbp)); fbp.change_cwd = True; fbp.allow_dir_create = True; fbp.allow_dir_rename = True; fbp.allow_dir_delete = True; fbp.transparent_tree = False; fbp.font = HELV_SMALL; fbp.button_font = HELV_SMALL; //Set Img file sprintf(buf, "%s\\%s", BIL.DFILEM.HOMEDIRECTORY, "sys\\Tile2.bmp" ); fbp.bg_image_file =buf; er = MFileBrowseExt ("Select CCD Mask File", "*.cor", fname, dirname, &fbp); sprintf(DAS.DOption.DEFPIXFILENAME, "%s", fname); sprintf(buf, "%s%s", dirname, DAS.DOption.DEFPIXFILENAME); //if(DI_FileExist(buff)) // DI_FileExist --> Return: 1 if PATH exist, else return 0 // return 37; MObjectSetText(DAS.Gui.ConfigPanel.lblCorrPixF, DAS.DOption.DEFPIXFILENAME); //Load File er = LoadDB_DefectPixel(buf); if (er) { sprintf (str, "File: %s, Not FOUND", buf); MMessageDialog("DAS Inf.", str, "OK", NULL); } } // create the 1st page of the option page void CONFP_opt_page1(int mod, MOBJECT obj) { MOBJECT rowform; // generic row form MOBJECT pb, rb ; MOBJECT colform; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT tbavg; MOBJECT lbl; MOBJECT tb; // generic table object char buf[64]; int k, *p; MObjectSetText(obj, "Page 1"); /***************************************************************************/ /*********** Saving Mode Section - Start ****************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "SAVING OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Saving Mode:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 150); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "ASCII", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioModeSelCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(!DAS.DOption.savingmode) MRButtonActivate(rb); rb = MCreateRButton(tb, "Binary", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioModeSelCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.savingmode) MRButtonActivate(rb); /***************************************************************************/ /*********** Saving Mode Section - End ******************************/ /***************************************************************************/ /***************************************************************************/ /*********** File Name Type Section - Start *************************/ /***************************************************************************/ tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Saving File Names:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 150); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Free ", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFNSelCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(!DAS.DOption.filename) MRButtonActivate(rb); rb = MCreateRButton(tb, "Automatic", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFNSelCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); //MObjectSetResize(rb, False, False); if(DAS.DOption.filename) MRButtonActivate(rb); /***************************************************************************/ /*********** File Name Type Section - End ***************************/ /***************************************************************************/ /***************************************************************************/ /*********** START IMAGE TYPE SECTION *******************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "Type of Images:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); rowform = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, True, False); rb = MCreateRButton(rowform, "MONO ", FIXED_SMALL); MPButtonSetCallback(rb, DB_ImgTypeCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(!DAS.DOption.imgtype) MRButtonActivate(rb); rb = MCreateRButton(rowform, "RGB", FIXED_SMALL); MPButtonSetCallback(rb, DB_ImgTypeCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, False, False); if(DAS.DOption.imgtype) MRButtonActivate(rb); pb = MCreatePButton(rowform, "Apply img", FIXED_SMALL); MPButtonSetCallback(pb, ApplyImgCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); /***************************************************************************/ /*********** END IMAGE TYPE SECTION *******************************/ /***************************************************************************/ /***************************************************************************/ /*********** START AVERAGING SECTION *******************************/ /***************************************************************************/ DAS.Gui.ConfigPanel.tbavg = MCreateTableForm(obj, 1); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.tbavg, 112, 128, 112); MObjectSetResize(DAS.Gui.ConfigPanel.tbavg, True, False); // lbl = MCreateLabel(obj, "AVERAGE", FIXED_SMALL); lbl = MCreateLabel(DAS.Gui.ConfigPanel.tbavg, "AVERAGE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetBackgroundRGB(lbl, 96, 132, 152); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); /////////////////////////////////////////////////////// //tb = MCreateTableForm(obj, 3); tb = MCreateTableForm(DAS.Gui.ConfigPanel.tbavg, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Automatic ARange for AVG ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); //MObjectSetCompositeWidth(lbl, 200); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_AVGAutoR_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.avgautor == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_AVGAutoR_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.avgautor == 0) MRButtonActivate(rb); //tb = MCreateTableForm(obj, 2); tb = MCreateTableForm(DAS.Gui.ConfigPanel.tbavg, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.FixTExp = MCreateRButton(tb, "Fix TExp. ", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.FixTExp, DB_RadioAvgModeCB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.FixTExp, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.FixTExp, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.FixTExp, 85); DAS.Gui.ConfigPanel.FixMeasNum = MCreateRButton(tb, "Fix Meas. Number", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.FixMeasNum, DB_RadioAvgModeCB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.FixMeasNum, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.FixMeasNum, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.FixMeasNum, 123); if(DAS.DOption.avgmode) { DAS.Gui.ConfigPanel.lblAvg = MCreateLabel(tb, "TOT Exposure Time :", FIXED_SMALL); MLabelSetAlignment(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblAvg, 255, 255, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblAvg, 0); MObjectSetResize(DAS.Gui.ConfigPanel.lblAvg, False, False); MObjectAlign(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d", TOTTEXP); DAS.Gui.ConfigPanel.n_avg = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.n_avg, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.n_avg, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.n_avg, 35); MObjectAlign(DAS.Gui.ConfigPanel.n_avg, LEFT_ALIGN, TOP_ALIGN); k = 111; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.n_avg, ActEditCB, p); MRButtonActivate(DAS.Gui.ConfigPanel.FixTExp); } else { DAS.Gui.ConfigPanel.lblAvg = MCreateLabel(tb, "Repeat measure for: ", FIXED_SMALL); MLabelSetAlignment(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblAvg, 255, 255, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblAvg, 0); MObjectSetResize(DAS.Gui.ConfigPanel.lblAvg, False, False); MObjectAlign(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",N_AVG); DAS.Gui.ConfigPanel.n_avg = MCreateClippedEdit(tb, " ", 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.n_avg, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.n_avg, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.n_avg, 35); MObjectAlign(DAS.Gui.ConfigPanel.n_avg, LEFT_ALIGN, TOP_ALIGN); k = 111; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.n_avg, ActEditCB, p); MRButtonActivate(DAS.Gui.ConfigPanel.FixMeasNum); } /***************************************************************************/ /*********** END AVERAGING SECTION *******************************/ /***************************************************************************/ /***************************************************************************/ /*********** START MEASURING mode SECTION *******************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "MEASURING MODE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetBackgroundRGB(lbl, 96, 132, 152); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); //table for selecting Single or Averaged measurements tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "SINGLE", FIXED_SMALL); MPButtonSetCallback(rb, DB_MeasMode_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.measmode == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "AVERAGE", FIXED_SMALL); MPButtonSetCallback(rb, DB_MeasMode_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.measmode == 1) MRButtonActivate(rb); /***************************************************************************/ /*********** END MEASURING mode SECTION *******************************/ /***************************************************************************/ /*******************************************************************************/ /************* START Defective Pixel Correction SECTION ***********************/ /*******************************************************************************/ lbl = MCreateLabel(obj, "DEFECTIVE PIXELS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); pb = MCreatePButton(tb, "Map UNDER Exp", FIXED_SMALL); MPButtonSetCallback(pb, UnderOverPixCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); //MObjectSetCompositeWidth(pb, 250); pb = MCreatePButton(tb, "Map OVER Exp (T=0)", FIXED_SMALL); MPButtonSetCallback(pb, UnderOverPixCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); //MObjectSetCompositeWidth(pb, 220); pb = MCreatePButton(tb, "Map OVER Exp (T=5)", FIXED_SMALL); MPButtonSetCallback(pb, UnderOverPixCB, (void *) 2); MObjectSetBackgroundRGB(pb, 224, 224, 176); //MObjectSetCompositeWidth(pb, 220); lbl = MCreateLabel(obj, "Defective Pixel Correction:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 220); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbCorrPix[0] = MCreateRButton(tb, "DISABLE", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbCorrPix[0], DB_RadioPixCorrCB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbCorrPix[0], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbCorrPix[0], 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbCorrPix[0], 85); DAS.Gui.ConfigPanel.rbCorrPix[1] = MCreateRButton(tb, "ENABLE", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbCorrPix[1], DB_RadioPixCorrCB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbCorrPix[1], RIGHT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbCorrPix[1], 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbCorrPix[1], 123); colform = MCreateColForm(obj); MObjectSetBackgroundRGB(colform, 112, 128, 112); MObjectSetResize(colform, True, False); DAS.Gui.ConfigPanel.lblCorrPixF = MCreateLabel(colform, DAS.DOption.DEFPIXFILENAME, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblCorrPixF, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblCorrPixF, 96, 132, 152); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblCorrPixF, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); //MObjectSetCompositeWidth(lbl, 220); DAS.Gui.ConfigPanel.pbBrowseCorrPixF = MCreatePButton(colform, "...", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, SelDefPixFileCB, (void *) 0); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, 224, 224, 176); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, 30); MObjectAlign(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, RIGHT_ALIGN, TOP_ALIGN); if(!DAS.DOption.pixcorr) MRButtonActivate(DAS.Gui.ConfigPanel.rbCorrPix[0]); if(DAS.DOption.pixcorr) MRButtonActivate(DAS.Gui.ConfigPanel.rbCorrPix[1]); /*******************************************************************************/ /************* END Defective Pixel Correction SECTION ***********************/ /*******************************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 2nd page of the option page void CONFP_opt_page2(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT pb, rb ; MOBJECT lbl; MOBJECT tb ; // generic table object char buf[64]; int i,k, *p; MObjectSetText(obj, "Page 2"); /***************************************************************************/ /***************************************************************************/ /*********** START DARK MEASUREMENT SECTION *******************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "DARK IMAGE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Remove Dark from Measurements ? ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.DOption.darkremove) MRButtonActivate(rb); MPButtonSetCallback(rb, DB_RadioDarkCB, (void *) 1); rb = MCreateRButton(tb, "No", FIXED_SMALL); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if(!DAS.DOption.darkremove) MRButtonActivate(rb); MPButtonSetCallback(rb, DB_RadioDarkCB, (void *) 0); lbl = MCreateLabel(obj, "Dark Source", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.FFDark = MCreateRButton(tb, "Full Frame", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.FFDark, DB_RadDrkSourceCB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.FFDark, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.FFDark, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.FFDark, 85); // if(DAS.DOption.darkremove) if(DAS.DOption.darksource) MRButtonActivate(DAS.Gui.ConfigPanel.FFDark); DAS.Gui.ConfigPanel.BPDark = MCreateRButton(tb, "Blind Pixels", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.BPDark, DB_RadDrkSourceCB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.BPDark, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.BPDark, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.BPDark, 123); // if(DAS.DOption.darkremove) if(!DAS.DOption.darksource) MRButtonActivate(DAS.Gui.ConfigPanel.BPDark); if (DAS.DOption.darkremove==0) { MObjectSetUnsensitive(DAS.Gui.ConfigPanel.FFDark); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.BPDark); } else { MObjectSetSensitive(DAS.Gui.ConfigPanel.FFDark); MObjectSetSensitive(DAS.Gui.ConfigPanel.BPDark); } /***************************************************************************/ /*********** END DARK MEASUREMENT SECTION ****************************/ /***************************************************************************/ /*---------------------------------------------------------------*/ /***************************************************************************/ /*********** START CCD TARGET TEMPERATURE SECTION *********************/ /***************************************************************************/ lbl = MCreateLabel(obj, "CCD TARGET TEMPERATURE", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "FIXED", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetCCDTargetTempCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(!FLAG.settempvar) MRButtonActivate(rb); rb = MCreateRButton(tb, "SZA DRIVED", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetCCDTargetTempCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if(FLAG.settempvar) MRButtonActivate(rb); /***************************************************************************/ /*********** END CCD TARGET TEMPERATURE SECTION *********************/ /***************************************************************************/ /*-----------------------------------------------------------------------*/ /***************************************************************************/ /***************************************************************************/ /************** START AUTORANGING SECTION ************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "AUTORANGING", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); //MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Max Autoranging value (<= 63000) ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); //MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%d",DAS.DOption.maxlvlar); DAS.Gui.ConfigPanel.edmaxlvlar = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edmaxlvlar, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edmaxlvlar, 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edmaxlvlar, LEFT_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.edmaxlvlar, 50); k = 600; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.edmaxlvlar, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.edmaxlvlar, ActEditCB, p); /***************************************************************************/ /************** STOP AUTORANGING SECTION ************************/ /***************************************************************************/ /***************************************************************************/ /***************************************************************************/ /************** START CONFIGURATION FILES SECTION ************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "CONFIG FILES", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "View/Modify", FIXED_SMALL); MPButtonSetCallback(rb, DB_VMRsfCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if(!FLAG.VMRsf) MRButtonActivate(rb); rb= MCreateRButton(tb, "ReLoad", FIXED_SMALL); MPButtonSetCallback(rb, DB_VMRsfCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); MObjectSetUnsensitive(rb); if(FLAG.VMRsf) MRButtonActivate(rb); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); pb = MCreatePButton(tb, "Param.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "DASSysColor.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "Options.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 2); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "ccd_defect_Danbo.cor", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 3); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "GeoCoord.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 4); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "AMS.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 6); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "Equipment.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 7); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "WlStep.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 8); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "Free Editor", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 5); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); /***************************************************************************/ /************** END CONFIGURATION FILES SECTION ************************/ /***************************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 3rd page of the option page void CONFP_opt_page3(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT rb ; MOBJECT lbl; MOBJECT tb ; // generic table object int k, *p; char buf[64]; MObjectSetText(obj, "Page 3"); /***************************************************************************/ /***************************************************************************/ /******************* START PLOT OPTIONS SECTION **********************/ /***************************************************************************/ lbl = MCreateLabel(obj, "PLOT OPTIONS", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "X Axis Units", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "PIXEL", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(FLAG.Wl == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "WAVEL [A]", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(FLAG.Wl == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "WAVEL [nm]", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(FLAG.Wl == 2) MRButtonActivate(rb); /* if(FLAG.Wl == 0) MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[0]); else if(FLAG.Wl == 1) MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[1]); else if(FLAG.Wl == 2) MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[2]); */ /*----------------- DISPLAY or NOT Plot after measurement -----------------*/ lbl = MCreateLabel(obj, "Display PLOT after measurement ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 300); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "No ", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotDisplayCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Flag.plotW == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotDisplayCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(DAS.Flag.plotW == 1) MRButtonActivate(rb); /* if(FLAG.plotW == 0) MRButtonActivate(DAS.Gui.ConfigPanel.PlotDisp[0]); else if(FLAG.plotW == 1) MRButtonActivate(DAS.Gui.ConfigPanel.PlotDisp[1]); */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " Y Axis", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Full Range", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotYAxisCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); MObjectSetResize(rb, True, False); if(FLAG.plotYRange == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Min/Max", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotYAxisCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); MObjectSetResize(rb, True, False); if(FLAG.plotYRange == 1) MRButtonActivate(rb); /* if(FLAG.plotYRange == 0) MRButtonActivate(DAS.Gui.ConfigPanel.PlotYAxis[0]); else if(FLAG.plotYRange == 1) MRButtonActivate(DAS.Gui.ConfigPanel.PlotYAxis[1]); /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*-------------------------------------------------------------------------*/ /* Hidden Lines section */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " Hidden lines ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Before Central Line ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%d",DAS.DOption.hlinebefore); DAS.Gui.ConfigPanel.HiddenL = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.HiddenL, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.HiddenL, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.HiddenL, 35); MObjectAlign(DAS.Gui.ConfigPanel.HiddenL, LEFT_ALIGN, TOP_ALIGN); k = 130; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.HiddenL, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.HiddenL, ActEditCB, p); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "After Central Line ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%d",DAS.DOption.hlineafter); DAS.Gui.ConfigPanel.HiddenL = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.HiddenL, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.HiddenL, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.HiddenL, 35); MObjectAlign(DAS.Gui.ConfigPanel.HiddenL, LEFT_ALIGN, TOP_ALIGN); k = 135; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.HiddenL, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.HiddenL, ActEditCB, p); /*-------------------------------------------------------------------------*/ /* Blind Pixel section */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " Display Blind Pixel? ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_DispBlindPixCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); MObjectSetResize(rb, True, False); if(FLAG.DispBlindPix == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_DispBlindPixCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); MObjectSetResize(rb, True, False); if(FLAG.DispBlindPix == 1) MRButtonActivate(rb); /*-------------------------------------------------------------------------*/ /***************************************************************************/ /******************* END PLOT OPTIONS SECTION **********************/ /***************************************************************************/ /*-------------------------------------------------------------------------*/ /* SZA Limit section */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " SZA Limit ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Perform Measurements for SZA <= ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%d",SZAMax); DAS.Gui.ConfigPanel.SZAMax = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SZAMax, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SZAMax, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.SZAMax, 35); MObjectAlign(DAS.Gui.ConfigPanel.SZAMax, LEFT_ALIGN, TOP_ALIGN); k = 120; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.SZAMax, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.SZAMax, ActEditCB, p); lbl = MCreateLabel(tb, " ° ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); /**************************************************************/ /***************************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 4th page of the option page void CONFP_opt_page4(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT pb, rb ; MOBJECT lbl; MOBJECT tb ; // generic table object int k, *p; char buf[64]; MObjectSetText(obj, "Page 4"); /***************************************************************************/ /******************* BACK-UP SECTION *************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "BACK-UP OPTIONS", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Perform FTP Back-Up", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFTPCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if (DAS.DOption.ftpbackup) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFTPCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if (!DAS.DOption.ftpbackup) MRButtonActivate(rb); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Server FTP Address:", FIXED_SMALL); MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%s",DFTP.ftpserver); DFTP.edServerFTP = MCreateClippedEdit(tb, buf, 15, 15, FIXED_SMALL); MObjectSetForegroundRGB(DFTP.edServerFTP, 255, 255, 255); MObjectSetBackgroundRGB(DFTP.edServerFTP, 40, 96, 72); // MObjectSetCompositeWidth(DFTP.edServerFTP, 35); MObjectAlign(DFTP.edServerFTP, RIGHT_ALIGN, TOP_ALIGN); k = 200; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DFTP.edServerFTP, ActEditCB, p); if (!DAS.DOption.ftpbackup) MEditEnableEditing(DFTP.edServerFTP); lbl = MCreateLabel(tb, "UserName:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%s",DFTP.ftpuser); DFTP.edid = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DFTP.edid, 255, 255, 255); MObjectSetBackgroundRGB(DFTP.edid, 40, 96, 72); // MObjectSetCompositeWidth(DFTP.edid, 35); MObjectAlign(DFTP.edid, RIGHT_ALIGN, TOP_ALIGN); k = 210; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DFTP.edid, ActEditCB, p); lbl = MCreateLabel(tb, "PWD:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%s",DFTP.ftppwd); DFTP.edpwd= MCreateHiddenEdit(tb, buf, 10, FIXED_SMALL, '*'); MObjectSetForegroundRGB(DFTP.edpwd, 255, 255, 255); MObjectSetBackgroundRGB(DFTP.edpwd, 40, 96, 72); // MObjectSetCompositeWidth(DFTP.edpwd, 35); MObjectAlign(DFTP.edpwd, RIGHT_ALIGN, TOP_ALIGN); k = 220; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DFTP.edpwd, ActEditCB, p); /* if (DAS.DOption.ftpbackup) MRButtonActivate(DFTP.rb[0]); else MRButtonActivate(DFTP.rb[1]); */ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); pb = MCreatePButton(tb, "Save FTP.INI", FIXED_SMALL); MPButtonSetCallback(pb, PbftpCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 94); pb = MCreatePButton(tb, "Test FTP", FIXED_SMALL); MPButtonSetCallback(pb, PbftpCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 94); /***************************************************************************/ /**************** OMU Thermo-regulation SECTION ***********************/ /***************************************************************************/ lbl = MCreateLabel(obj, "OMU THERMO-REGULATION", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Choose the Reference temp", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Pelt. Int.", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.refertemp == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Optic", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.refertemp == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "Grating", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.refertemp == 2) MRButtonActivate(rb); lbl = MCreateLabel(obj, "Choose the Thermo-regulation mode", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Cold only", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 3); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(OMUTHR.TRType == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Heat only", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 4); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(OMUTHR.TRType == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "Cold/Heat", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 5); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(OMUTHR.TRType == 2) MRButtonActivate(rb); /***************/ lbl = MCreateLabel(obj, "Choose the Thermo-reg. Algorithm", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Progressive", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 6); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(OMUTHR.PID_On == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "PID", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 7); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(OMUTHR.PID_On == 1) MRButtonActivate(rb); if(OMUTHR.PID_On == 1) //Create the field for PID Parameters { tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Prop.", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 90); lbl = MCreateLabel(tb, "Integral", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 90); lbl = MCreateLabel(tb, "Deriv.", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 90); sprintf(buf, "%.1lf",OMUTHR.PID_kp); DAS.Gui.ConfigPanel.PID_edt[0] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[0], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.PID_edt[0], 40, 96, 72); k = 500; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.PID_edt[0], ActEditCB, p); sprintf(buf, "%.3lf",OMUTHR.PID_ki); DAS.Gui.ConfigPanel.PID_edt[1] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[1], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.PID_edt[1], 40, 96, 72); k = 501; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.PID_edt[1], ActEditCB, p); sprintf(buf, "%.4lf",OMUTHR.PID_kd); DAS.Gui.ConfigPanel.PID_edt[2] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[2], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.PID_edt[2], 40, 96, 72); k = 502; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.PID_edt[2], ActEditCB, p); } pb = MCreatePButton(obj, "Temp History", FIXED_SMALL); MPButtonSetCallback(pb, PBTempHistoCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 123); /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 5th page of the option page void CONFP_opt_page5(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT rb ; MOBJECT lbl; MOBJECT tb,tb1 ; // generic table object // int i,k, *p; // char buf[64]; MObjectSetText(obj, "Page 5"); lbl = MCreateLabel(obj, "MIRROR IMAGE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb1 = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb1, 112, 128, 112); MObjectSetResize(tb1, True, False); lbl = MCreateLabel(tb1, "Along the X Axis ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); lbl = MCreateLabel(tb1, "Along the Y Axis ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(tb1, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.mirrorimg[XAX] == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.mirrorimg[XAX] == 0) MRButtonActivate(rb); tb = MCreateTableForm(tb1, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.mirrorimg[YAX] == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 3); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.mirrorimg[YAX] == 0) MRButtonActivate(rb); lbl = MCreateLabel(obj, "AMS OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Positioning Mode", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Simultaneous", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSposmode_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.smposmode == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "Sequential", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSposmode_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.smposmode == 0) MRButtonActivate(rb); lbl = MCreateLabel(obj, "Display progression bars?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSProgBar_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.amsprogbar == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSProgBar_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.amsprogbar == 0) MRButtonActivate(rb); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ lbl = MCreateLabel(obj, "MIGE Platform OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "MIGE Status", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbMIGEStatus[0]=MCreateRButton(tb, "NOT Connected", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEStatus[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEStatus[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEStatus[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.linked == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[0]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEStatus[0], DB_MIGE_CB, (void *) 0); DAS.Gui.ConfigPanel.rbMIGEStatus[1] = MCreateRButton(tb, "Connected", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEStatus[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEStatus[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEStatus[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.linked == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[1]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEStatus[1], DB_MIGE_CB, (void *) 1); lbl = MCreateLabel(obj, "MIGE Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbMIGEtype[0] = MCreateRButton(tb, "Ver. 0.5", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEtype[0], DB_MIGEType_CB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEtype[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEtype[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEtype[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.type == 0 ) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEtype[0]); DAS.Gui.ConfigPanel.rbMIGEtype[1] = MCreateRButton(tb, "Ver. 1.5", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEtype[1], DB_MIGEType_CB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEtype[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEtype[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEtype[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.type == 1 ) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEtype[1]); DAS.Gui.ConfigPanel.rbMIGEtype[2] = MCreateRButton(tb, "Ver. 2.0", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEtype[2], DB_MIGEType_CB, (void *) 2); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEtype[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEtype[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEtype[2], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.type == 2 ) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEtype[2]); lbl = MCreateLabel(obj, "Operating mode", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbMIGEopmode[0] = MCreateRButton(tb, "Solar Tracker", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEopmode[0], DB_MIGEopmode_CB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEopmode[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEopmode[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEopmode[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.aaopmode == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEopmode[0]); DAS.Gui.ConfigPanel.rbMIGEopmode[1] = MCreateRButton(tb, "Anti Solar Tracker", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEopmode[1], DB_MIGEopmode_CB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEopmode[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEopmode[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEopmode[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.aaopmode == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEopmode[1]); DAS.Gui.ConfigPanel.rbMIGEopmode[2] = MCreateRButton(tb, "Free positions", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEopmode[2], DB_MIGEopmode_CB, (void *) 2); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEopmode[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEopmode[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEopmode[2], True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.aaopmode == 2) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEopmode[2]); if(DAS.MIGE.linked == 0) { MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[1]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[2]); } else MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[2]); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } void edtDASReset_CB(MOBJECT p, LIST_ACT *la, void *ad) { int c = (int) ad; int er = 0; DAS.DOption.resetFreq = atoi(la->item); } void DB_ResetEnable_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; // char buff[64], str[32]; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case 0: DAS.DOption.resetEnabled = 0; MObjectSetUnsensitive(DAS.Gui.ConfigPanel.listReset); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.edtDASReset); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.lblReset); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbDASResPer[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbDASResPer[1]); break; case 1: DAS.DOption.resetEnabled = 1; MObjectSetSensitive(DAS.Gui.ConfigPanel.listReset); MObjectSetSensitive(DAS.Gui.ConfigPanel.edtDASReset); MObjectSetSensitive(DAS.Gui.ConfigPanel.lblReset); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbDASResPer[0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbDASResPer[1]); break; } } } void DB_ResetType_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v,i,k; char buff[64], str[32]; LIST_ACT * pla; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case RHOUR: DAS.DOption.resetType = RHOUR; if (DAS.Gui.ConfigPanel.lblReset != 0) { sprintf(buff, "%d", (int)DAS.DOption.resetFreq); MSListClear(DAS.Gui.ConfigPanel.listReset); for(i=1; i<24; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(DAS.Gui.ConfigPanel.listReset, k-1); pla = MSListGetSelected(DAS.Gui.ConfigPanel.listReset); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDASReset, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDASReset, edtDASReset_CB, (void *) 0); DAS.DOption.resetFreq = atoi(pla->item); sprintf(buff, "Hour(s)"); MObjectSetText(DAS.Gui.ConfigPanel.lblReset, buff); } break; case RDAY: DAS.DOption.resetType = RDAY; if (DAS.Gui.ConfigPanel.lblReset != 0) { sprintf(buff, "%d", (int)DAS.DOption.resetFreq); MSListClear(DAS.Gui.ConfigPanel.listReset); for(i=1; i<365; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(DAS.Gui.ConfigPanel.listReset, k-1); pla = MSListGetSelected(DAS.Gui.ConfigPanel.listReset); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDASReset, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDASReset, edtDASReset_CB, (void *) 0); DAS.DOption.resetFreq = atoi(pla->item); sprintf(buff, "Day(s)"); MObjectSetText(DAS.Gui.ConfigPanel.lblReset, buff); } break; } } } // create the 7th page of the option page void CONFP_opt_page7(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form // MOBJECT pb, rb ; MOBJECT lbl; MOBJECT tb; // generic table object int i,k; // char buf[64]; // MOBJECT list; // int starti; float f=0; char str[80]; char buff[_MAX_PATH]; LIST_ACT * pla; MObjectSetText(obj, "Page 7"); /******************************************************************/ /*************** SHUTTER ******************************************/ /******************************************************************/ lbl = MCreateLabel(obj, "SHUTTER OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Is the EMShutter Installed?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbSHUTStatus[0] = MCreateRButton(tb, "Yes", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTStatus[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTStatus[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTStatus[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.emshutter == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTStatus[0]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTStatus[0], DB_Shutter_CB, (void *) 1); DAS.Gui.ConfigPanel.rbSHUTStatus[1] = MCreateRButton(tb, "No", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.emshutter == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTStatus[1] ); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , DB_Shutter_CB, (void *) 0); lbl = MCreateLabel(obj, "Choose Shutter Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbSHUTType [0] = MCreateRButton(tb, "UniBlitz VS25", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTType [0], DB_ShutterType_CB, (void *) VS25); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTType [0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTType [0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTType [0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.shuttertype == VS25) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTType [0]); DAS.Gui.ConfigPanel.rbSHUTType [1] = MCreateRButton(tb, "Rotating Sh.", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTType [1], DB_ShutterType_CB, (void *) ROTSHUT); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTType [1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTType [1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTType [1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.shuttertype == ROTSHUT) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTType [1]); DAS.Gui.ConfigPanel.rbSHUTType[2] = MCreateRButton(tb, "Torque Motor", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTType[2], DB_ShutterType_CB, (void *) TORQUEM); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTType[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTType[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTType[2], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.shuttertype == TORQUEM) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTType[2]); if(DAS.DOption.emshutter == 0) { MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } else { MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } /******************************************************************/ /*************** END SHUTTER **************************************/ /******************************************************************/ /******************************************************************/ /*************** FILTER WHEEL *************************************/ /******************************************************************/ lbl = MCreateLabel(obj, "FILTER WHEEL OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Choose Installed Module", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbFilterType [0] = MCreateRButton(tb, "Simple-SM3", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbFilterType [0], DB_FilterType_CB, (void *) FSIMPLE); MObjectAlign(DAS.Gui.ConfigPanel.rbFilterType [0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbFilterType [0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbFilterType [0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.filtertype == FSIMPLE) MRButtonActivate(DAS.Gui.ConfigPanel.rbFilterType [0]); DAS.Gui.ConfigPanel.rbFilterType [1] = MCreateRButton(tb, "Double-SM3+SM4", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbFilterType [1], DB_FilterType_CB, (void *) FDOUBLE); MObjectAlign(DAS.Gui.ConfigPanel.rbFilterType [1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbFilterType [1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbFilterType [1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.filtertype == FDOUBLE) MRButtonActivate(DAS.Gui.ConfigPanel.rbFilterType [1]); DAS.Gui.ConfigPanel.rbFilterType[2] = MCreateRButton(tb, "Plus-SM3+TM", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbFilterType[2], DB_FilterType_CB, (void *) FPLUS); MObjectAlign(DAS.Gui.ConfigPanel.rbFilterType[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbFilterType[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbFilterType[2], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.filtertype == FPLUS) MRButtonActivate(DAS.Gui.ConfigPanel.rbFilterType[2]); /* if(DAS.DOption.emshutter == 0) { MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } else { MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } */ /******************************************************************/ /*************** END FILTER WHEEL ********************************/ /******************************************************************/ /******************************************************************/ /*************** RESET DAS Windows Restart ***********************/ /******************************************************************/ lbl = MCreateLabel(obj, "RESET WINDOWS OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); /*----------------------------------------------------------------*/ lbl = MCreateLabel(obj, "DAS/SYSTEM Reset ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbResetEnab[0] = MCreateRButton(tb, "Disabled", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbResetEnab[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbResetEnab[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbResetEnab[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.resetEnabled == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbResetEnab[0]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbResetEnab[0], DB_ResetEnable_CB, (void *) 0); DAS.Gui.ConfigPanel.rbResetEnab[1] = MCreateRButton(tb, "Enabled", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbResetEnab[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbResetEnab[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbResetEnab[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.resetEnabled == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbResetEnab[1]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbResetEnab[1], DB_ResetEnable_CB, (void *) 1); /*----------------------------------------------------------------*/ lbl = MCreateLabel(obj, "Reset Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbDASResPer[0] = MCreateRButton(tb, "HOUR(s)", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDASResPer[0], DB_ResetType_CB, (void *) RHOUR); MObjectAlign(DAS.Gui.ConfigPanel.rbDASResPer[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDASResPer[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbDASResPer[0], True, False); //MObjectSetCompositeWidth(rb, 100); DAS.Gui.ConfigPanel.rbDASResPer[1] = MCreateRButton(tb, "DAY(s)", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDASResPer[1], DB_ResetType_CB, (void *) RDAY); MObjectAlign(DAS.Gui.ConfigPanel.rbDASResPer[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDASResPer[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbDASResPer[1], True, False); //MObjectSetCompositeWidth(rb, 100); lbl = MCreateLabel(obj, "Reset Frequency", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Re-start every ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); //MObjectSetCompositeWidth(lbl, 250); sprintf(buff, "%d", (int)DAS.DOption.resetFreq); DAS.Gui.ConfigPanel.edtDASReset = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtDASReset, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtDASReset, 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edtDASReset, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.edtDASReset); DAS.Gui.ConfigPanel.listReset = MOptionEditGetList(DAS.Gui.ConfigPanel.edtDASReset); if (DAS.DOption.resetType) // Days { for(i=1; i<365; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } } else //hours { for(i=1; i<24; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } } /* list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtDSZA); for(i=0; i<20; i++) { f = f+0.10; sprintf(str, "%.3f",f); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDSZA, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDSZA, edtDSZA_CB, (void *) 0); SZADelta.DeltaSZA = atof(pla->item); */ MSListSelectElement(DAS.Gui.ConfigPanel.listReset, k-1); pla = MSListGetSelected(DAS.Gui.ConfigPanel.listReset); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDASReset, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDASReset, edtDASReset_CB, (void *) 0); DAS.DOption.resetFreq = atoi(pla->item); if (DAS.DOption.resetType) // Days sprintf(buff, "Day(s)", DAS.DOption.resetFreq); else sprintf(buff, "Hour(s)", DAS.DOption.resetFreq); DAS.Gui.ConfigPanel.lblReset = MCreateLabel(tb, buff, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblReset, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblReset, 96, 132, 152); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblReset, 0); MObjectSetShadow(DAS.Gui.ConfigPanel.lblReset, WS_ETCHED_IN, 1, 1); if(DAS.DOption.resetType == RHOUR) MRButtonActivate(DAS.Gui.ConfigPanel.rbDASResPer[0]); if(DAS.DOption.resetType == RDAY) MRButtonActivate(DAS.Gui.ConfigPanel.rbDASResPer[1]); /******************************************************************/ /*************** END RESET DAS ********************************/ /******************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } void CONFP_opt_ScheMeas(int mod, MOBJECT p) { // MOBJECT rowform; // generic row form MOBJECT rowform1; MOBJECT colform, colform2,colform3,colform4; MOBJECT rb ; MOBJECT lbl, list, optedit; // MOBJECT tb ; // generic table object int i; int lenedit = 12; char buf[64]; int maxangle; if (mod == 1) maxangle = 181; else maxangle = 96; colform = MCreateColForm(p); MFormSetSpacing(colform, 0); MObjectSetResize(colform, False, False); MObjectAlign(colform, CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform, 255); MObjectSetShadow(colform, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, True); MObjectAlign(rowform1, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(rowform1, 255); MObjectSetShadow(rowform1, WS_NONE, 0, 0); rb = MCreateRButton(rowform1, "", FIXED_SMALL); // MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetTransparency(rb, 255); MObjectSetResize(rb, True, False); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 1) // MRButtonActivate(rb); rb = MCreateRButton(rowform1, "", FIXED_SMALL); // MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); MObjectSetTransparency(rb, 255); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 0) // MRButtonActivate(rb); colform2 = MCreateColForm(colform); MFormSetSpacing(colform2, 0); MObjectSetResize(colform2, False, False); MObjectSetTransparency(colform2, 255); MObjectSetShadow(colform2, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform2); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, False); MObjectSetShadow(rowform1, WS_NONE, 0, 0); MObjectSetTransparency(rowform1, 255); colform3 = MCreateColForm(rowform1); MFormSetSpacing(colform3, 0); MObjectSetResize(colform3, False, False); MObjectAlign(colform3, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform3, 255); MObjectSetShadow(colform3, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); lbl = MCreateLabel(colform3, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, False, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } if (mod == 1) MSListSelectElement(list, 180); else MSListSelectElement(list, 95); colform4 = MCreateColForm(rowform1); MFormSetSpacing(colform4, 0); MObjectSetTransparency(colform4, 255); MObjectSetShadow(colform4, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); sprintf(buf, "<SZA<"); lbl = MCreateLabel(colform4, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "50"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 50); lbl = MCreateLabel(colform4, "OR", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "75"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 75); lbl = MCreateLabel(colform4, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } if (mod == 1) MSListSelectElement(list, 180); else MSListSelectElement(list, 95); } // create the 6th page of the option page void CONFP_opt_page6(int mod, MOBJECT obj) { MOBJECT rowform; // generic row form // MOBJECT colform, colform1,colform2,colform3,colform4; // MOBJECT pb, rb ; MOBJECT lbl, list, optedit; MOBJECT tb ; // generic table object int i; int lenedit = 12; char buf[64], str[16]; unsigned char lesseq = 242, greateq=241; MObjectSetText(obj, "Page 6"); lbl = MCreateLabel(obj, "INPUTS <--> DEVICES", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); /* lbl = MCreateLabel(obj, "Input <--> Device", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ tb = MCreateTableForm(obj, 4); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, False, False); if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) sprintf(str, "%s",Mir_CodeTropo[0]); else sprintf(str, "%s",Mir_Code[0]); sprintf(buf, "%s",str); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%s",DeviceTypeInput[0]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) MSListSelectElement(list, 2); else MSListSelectElement(list, 0); sprintf(buf, "%s",Mir_Code[1]); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%s",DeviceTypeInput[6]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 1); if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) sprintf(str, "%s",Mir_CodeTropo[2]); else sprintf(str, "%s",Mir_Code[2]); sprintf(buf, "%s",str); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) sprintf(buf, "%s",DeviceTypeInput[7]); else sprintf(buf, "%s",DeviceTypeInput[2]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) MSListSelectElement(list, 7); else MSListSelectElement(list, 2); sprintf(buf, "%s",Mir_Code[3]); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%s",DeviceTypeInput[3]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 3); lbl = MCreateLabel(obj, "MEASUREMENTS SCHEDULING", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); /***************************************************************/ // 1 start rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "ZenithSky", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(0, rowform); /* colform = MCreateColForm(rowform); MFormSetSpacing(colform, 0); MObjectSetResize(colform, False, False); MObjectAlign(colform, CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform, 255); MObjectSetShadow(colform, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, True); MObjectAlign(rowform1, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(rowform1, 255); MObjectSetShadow(rowform1, WS_NONE, 0, 0); rb = MCreateRButton(rowform1, "", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetTransparency(rb, 255); MObjectSetResize(rb, True, False); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 1) // MRButtonActivate(rb); rb = MCreateRButton(rowform1, "", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); MObjectSetTransparency(rb, 255); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 0) // MRButtonActivate(rb); colform2 = MCreateColForm(colform); MFormSetSpacing(colform2, 0); MObjectSetResize(colform2, False, False); MObjectSetTransparency(colform2, 255); MObjectSetShadow(colform2, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform2); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, False); MObjectSetShadow(rowform1, WS_NONE, 0, 0); MObjectSetTransparency(rowform1, 255); colform3 = MCreateColForm(rowform1); MFormSetSpacing(colform3, 0); MObjectSetResize(colform3, False, False); MObjectAlign(colform3, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform3, 255); MObjectSetShadow(colform3, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); lbl = MCreateLabel(colform3, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, False, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 95); colform4 = MCreateColForm(rowform1); MFormSetSpacing(colform4, 0); MObjectSetTransparency(colform4, 255); MObjectSetShadow(colform4, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); sprintf(buf, "<SZA<"); lbl = MCreateLabel(colform4, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "50"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 50); lbl = MCreateLabel(colform4, "OR", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "75"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 75); lbl = MCreateLabel(colform4, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 95); // 1 End /***************************************************************/ /***************************************************************/ // 2 start rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "Horizontal", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(1, rowform); /* lbl = MCreateLabel(obj, "Horizontal", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "Radiometric", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(0, rowform); /* lbl = MCreateLabel(obj, "Radiometric", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "Off-Axis", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(0, rowform); /* lbl = MCreateLabel(obj, "Off-Axis", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } //Create the Option page (with 6 sub-pages) void CONFP_Options(int mod, MOBJECT mo) { MOBJECT rowform; // generic row form MOBJECT rowform1; // generic row form // MOBJECT PFAMS; // paged form for AMS MOBJECT POPT; // paged form for AMS // MOBJECT edit; // generic edit object // MOBJECT radiobutt[2]; // generic radio button // MOBJECT RColButt; MOBJECT pb; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; // MOBJECT lbl; MOBJECT tb; // generic table object // char buf[64]; // int *p; MObjectSetText(mo, "Options"); rowform = MCreateRowForm(mo); MObjectSetBackgroundRGB(rowform, 112, 128, 112); // MObjectSetResize(rowform, True, True); MObjectSetCompositeWidth(rowform, 400); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); POPT = MCreateTabbedRowForm(rowform, 7, FIXED_SMALL); MObjectSetForegroundRGB(POPT, 255, 255, 255); MObjectSetBackgroundRGB(POPT, 112, 128, 112); MObjectAlign(POPT, CENTER_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(POPT, 390); MObjectSetResize(POPT, False, False); //Creation page 1 CONFP_opt_page1(0, POPT); MPagedFormSetActivePage(POPT, 1); //Creation page 2 CONFP_opt_page2(0, POPT); MPagedFormSetActivePage(POPT, 2); //Creation page 3 CONFP_opt_page3(0, POPT); MPagedFormSetActivePage(POPT, 3); //Creation page 4 CONFP_opt_page4(0, POPT); MPagedFormSetActivePage(POPT, 4); //Creation page 5 CONFP_opt_page5(0, POPT); MPagedFormSetActivePage(POPT, 5); //Creation page 6 CONFP_opt_page6(0, POPT); MPagedFormSetActivePage(POPT, 6); //Creation page 7 CONFP_opt_page7(0, POPT); MPagedFormSetActivePage(POPT, 0); // Command Button Section rowform1 = MCreateRowForm(mo); MObjectSetBackgroundRGB(rowform1, 112, 128, 112); //MObjectSetResize(rowform, False, True); MObjectSetCompositeWidth(rowform1, 357); MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform1, 2); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); pb = MCreatePButton(tb, "Save", FIXED_SMALL); MPButtonSetCallback(pb, WriteOptioniniCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); } void AMS_AdvancedCB(MOBJECT o, void *od, void *ad) { char buff[_MAX_PATH]; int f; STARTUPINFO si; PROCESS_INFORMATION pi; // chdir(buff); sprintf(buff,"%s\\%s",BIL.DFILEM.HOMEDIRECTORY, "\\AMSTester50\\AMS50.exe"); // WinExec(buff, 1); // // perform the equivalent of WinExec in NT, but we use a Unicode string // memset(&si, 0, sizeof(si)); si.cb = sizeof(si); si.dwFlags= STARTF_USESHOWWINDOW; si.wShowWindow = SW_SHOW; f = CreateProcess(NULL, buff, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); // sprintf(buff,"%ss",BIL.DFILEM.HOMEDIRECTORY, "SolPosCalc"); chdir(BIL.DFILEM.HOMEDIRECTORY); } MOBJECT MDCreateDASConfig(void) { // MOBJECT _shell000; MOBJECT POCF; //Paged form for configuration panel // MOBJECT POPT; //Paged form for options MOBJECT rowform; // generic row form MOBJECT rowform1; // generic row form // MOBJECT PFAMS; // paged form for AMS // MOBJECT edit; // generic edit object // MOBJECT radiobutt[2]; // generic radio button MOBJECT RColButt; MOBJECT pb; // generic push button // MOBJECT rb; // generic radio button MOBJECT list; MOBJECT _tbutton000; MOBJECT _tbutton001; MOBJECT form2; MOBJECT label, lbl; MOBJECT tb; // generic table object // MOBJECT frm2_tb4; int r, g, b; int i; char buf[64]; // double percentuale,speedhz; const char *fontfamily; // struct confp *pconfp; LoadGeoDB(); MGetDefaultBackgroundRGB(&r, &g, &b); drawarea_bgc = MAllocColor(r, g, b); /********************************************************/ /************* MAIN SHELL *************************/ /********************************************************/ DAS.Gui.ConfigPanel.ShellConfig = MCreateShell("DAS Config", 0); MObjectSetResize(DAS.Gui.ConfigPanel.ShellConfig, True, True); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.ShellConfig, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.ShellConfig, 96, 132, 152); MObjectSetResize(DAS.Gui.ConfigPanel.ShellConfig, True, True); MObjectAlign(DAS.Gui.ConfigPanel.ShellConfig, CENTER_ALIGN, TOP_ALIGN); // MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.ShellConfig, 670); // MObjectSetCompositeHeight(DAS.Gui.ConfigPanel.ShellConfig, 483); /********************************************************/ /************* CONFIG PAGED FORM **********************/ /********************************************************/ POCF = MCreateTabbedRowForm(DAS.Gui.ConfigPanel.ShellConfig, 6, FIXED_SMALL); MObjectSetForegroundRGB(POCF, 255, 255, 255); MObjectSetBackgroundRGB(POCF, 96, 132, 152); MObjectSetResize(POCF, True, True); MObjectAlign(POCF, CENTER_ALIGN, TOP_ALIGN); // MObjectSetCompositeWidth(POCF, 457); //457 /* Activation of POCF page 0 - Parameters*/ /* 00000000000000000000000000000000000000000000000000000000 */ MPagedFormSetActivePage(POCF, 0); // Creation page 0 - Parameters CONFP_Param(0, POCF); /* End Activation and creation of page 0 */ /* 0000000000000000000000000000000000000000000000000000000 */ /* Activation of POCF page 1 - Option */ /* 11111111111111111111111111111111111111111111111111111111 */ /* Start Creation of page 1 111111111111111111111*/ /* 11111111111111111111111111111111111111111111111111111111111111111*/ MPagedFormSetActivePage(POCF, 1); // Creation Page 1 - Options CONFP_Options(0, POCF); /* End Activation and creation of page 1 11111111111111111111*/ /* 11111111111111111111111111111111111111111111111111111111111111*/ /****************************************************************************/ /* Start Activation and creation of page 2 - Colors 2222222222*/ /* 22222222222222222222222222222222222222222222222222222222222222*/ MPagedFormSetActivePage(POCF, 2); MObjectSetText(POCF, "Colors"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(rowform, "SELECT OBJECT", FIXED_SMALL); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform, 2); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 112, 68, 72); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.RBColObj[0] = MCreateRButton(tb, "Unsel. Push Button", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[0], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[0], ColObjCB, (void *) 0); DAS.Gui.ConfigPanel.RBColObj[1] = MCreateRButton(tb, "Sel. Push Button", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[1], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[1], ColObjCB, (void *) 1); DAS.Gui.ConfigPanel.RBColObj[2] = MCreateRButton(tb, "Active Labels", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[2], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[2], ColObjCB, (void *) 2); DAS.Gui.ConfigPanel.RBColObj[3] = MCreateRButton(tb, "Passive LAbels", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[3], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[3], ColObjCB, (void *) 3); DAS.Gui.ConfigPanel.RBColObj[4] = MCreateRButton(tb, "Forms", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[4], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[4], ColObjCB, (void *) 4); DAS.Gui.ConfigPanel.RBColObj[5] = MCreateRButton(tb, "Capital Labels", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[5], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[5], ColObjCB, (void *) 5); if (DAS.Flag.exemode == DOASMODE ) { DAS.Gui.ConfigPanel.RBColObj[6] = MCreateRButton(tb, "Radio Button", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[6], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[6], ColObjCB, (void *) 6); } /* RColButt = MCreateRButton(tb, "UnSel. Comm.", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 0); RColButt = MCreateRButton(tb, "Sel. Comm.", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 1); RColButt = MCreateRButton(tb, "Active labels", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 2); RColButt = MCreateRButton(tb, "Passive labels", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 3); RColButt = MCreateRButton(tb, "Forms", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 4); RColButt = MCreateRButton(tb, "K_labelsUP", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 5); if (DAS.Flag.exemode == DOASMODE ) { RColButt = MCreateRButton(tb, "Radio Buttons", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 6); } */ tb = MCreateTableForm(rowform, 2); MTableFormSetColAlign(tb, 1, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 160, 112, 112); MObjectSetResize(tb, True, False); RColButt = MCreateRButton(tb, "Background", FIXED_SMALL); MRButtonSetCallback(RColButt, (OBJ_VALUE_CB) ColPickBackForeGCB, (void *) 0); MObjectAlign(RColButt, CENTER_ALIGN, TOP_ALIGN); MRButtonActivate(RColButt); MObjectSetForegroundRGB(RColButt, 255, 255, 0); RColButt = MCreateRButton(tb, "Foreground", FIXED_SMALL); MRButtonSetCallback(RColButt, (OBJ_VALUE_CB) ColPickBackForeGCB, (void *) 1); MObjectAlign(RColButt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(RColButt, 255, 255, 0); rowform1 = MCreateRowForm(rowform); MObjectSetBackgroundRGB(rowform1 , 80, 56, 56); MObjectSetResize(rowform1 , True, True); lbl = MCreateLabel(rowform1 , "COLORS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1 , 1); MObjectSetBackgroundRGB(tb, 112, 68, 72); MObjectSetResize(tb, True, False); /******************************************/ form2 = MCreateRowForm(tb); MFormSetPrefAtt(form2, F_PREF_ATT_COL); label = MCreateLabel(form2, "Red: ", FIXED_SMALL); MObjectSetForegroundRGB(label, 255, 0, 0); r_label = MCreateLabel(form2, "000", FIXED_SMALL); MObjectSetForegroundRGB(r_label, 255, 0, 0); MObjectSetResize(label, False, False); MObjectSetResize(r_label, False, False); r_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32); MScrollBarSetPosCallback(r_sbar, DB_ChangeColorCellCB, 0L); form2 = MCreateRowForm(tb); MFormSetPrefAtt(form2, F_PREF_ATT_COL); label = MCreateLabel(form2, "Green: ", FIXED_SMALL); MObjectSetForegroundRGB(label, 0, 105, 0); g_label = MCreateLabel(form2, "000", FIXED_SMALL); MObjectSetForegroundRGB(g_label, 0, 105, 0); MObjectSetResize(label, False, False); MObjectSetResize(g_label, False, False); g_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32); MScrollBarSetPosCallback(g_sbar, DB_ChangeColorCellCB, (void *) 1); form2 = MCreateRowForm(tb); MFormSetPrefAtt(form2, F_PREF_ATT_COL); label = MCreateLabel(form2, "Blue: ", FIXED_SMALL); MObjectSetForegroundRGB(label, 0, 0, 255); b_label = MCreateLabel(form2, "000", FIXED_SMALL); MObjectSetForegroundRGB(b_label, 0, 0, 255); MObjectSetResize(label, False, False); MObjectSetResize(b_label, False, False); b_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32); MScrollBarSetPosCallback(b_sbar, DB_ChangeColorCellCB, (void *) 2); /************************************/ frm3_dr1 = MCreateDrawArea(rowform, 347, 30); MObjectSetResize(frm3_dr1, True, False); MDrawAreaSetExposeCallback(frm3_dr1, DB_CellExposeCB, 0L); MDrawAreaSetResizeCallback(frm3_dr1, DB_CellResizeCB, 0L); MObjectSetResize(frm3_dr1, True, False); r_c = g_c = b_c = 0; cell_color = MAllocCell(0, 0, 0); rowform1 = MCreateRowForm(rowform); MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rowform1, 56, 84, 128); MObjectSetBackgroundRGB(rowform1, 112, 68, 72); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); lbl = MCreateLabel(rowform1, "COMMANDS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); pb = MCreatePButton(rowform1, "Load Palette", FIXED_SMALL); MPButtonSetCallback(pb, LoadPaletteCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); tb = MCreateTableForm(rowform1, 4); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 112, 68, 72); MObjectSetResize(tb, True, False); pb = MCreatePButton(tb, "Preview", FIXED_SMALL); MPButtonSetCallback(pb, ColorAssignCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); pb = MCreatePButton(tb, "Undo", FIXED_SMALL); MPButtonSetCallback(pb, D_UndoCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteColorsCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); /* End Activation and creation of page 2 Colors 22222222222222222222*/ /* 22222222222222222222222222222222222222222222222222222222222222*/ /*********************** FONTS ***********************/ MPagedFormSetActivePage(POCF, 3); MObjectSetText(POCF, "Fonts"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(rowform, "SELECT OBJECT", FIXED_SMALL); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectSetCompositeWidth(lbl, 347); tb = MCreateTableForm(rowform, 2); MTableFormSetColAlign(tb, 1, LEFT_ALIGN); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 84, 128); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); RColButt = MCreateRButton(tb, "UnSel. Comm.", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 0); MObjectAlign(RColButt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); MRButtonActivate(RColButt); RColButt = MCreateRButton(tb, "Sel. Comm.", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 1); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "Active labels", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 2); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "Passive labels", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 3); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "K_labelsUP", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 4); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "K_labelsDW", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 5); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); DAS.Gui.ConfigPanel.frm4_dr1 = MCreateDrawArea(rowform, 347, 62); MObjectAlign(DAS.Gui.ConfigPanel.frm4_dr1, CENTER_ALIGN, TOP_ALIGN); MObjectSetResize(DAS.Gui.ConfigPanel.frm4_dr1, True, False); MObjectSetCompositeHeight(DAS.Gui.ConfigPanel.frm4_dr1, 62); MDrawAreaSetExposeCallback(DAS.Gui.ConfigPanel.frm4_dr1, DrawAreaExpFontCB, 0L); rowform1 = MCreateRowForm(rowform); MObjectSetBackgroundRGB(rowform1, 56, 84, 128); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); lbl = MCreateLabel(rowform1, "FONTS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1, 2); MTableFormSetColAlign(tb, 1, RIGHT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 84, 128); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Type:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); fontfamily = MGetFirstFontFamily (); e_fname = MCreateOptionEdit (tb, fontfamily, 22, 10, 6, FIXED_SMALL); MObjectSetForegroundRGB(e_fname, 255, 255, 255); MObjectSetBackgroundRGB(e_fname, 0, 24, 96); MEditDisableEditing (e_fname); list = MOptionEditGetList (e_fname); MSListSetSortCallback (list, stricmp); while (fontfamily) { MSListAddItem (list, fontfamily, 0L); fontfamily = MGetNextFontFamily (); } lbl = MCreateLabel(tb, "Dim.:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); e_fsize = MCreateOptionEdit(tb, "22", 22, 10, 6, FIXED_SMALL); MObjectSetForegroundRGB(e_fsize, 255, 255, 255); MObjectSetBackgroundRGB(e_fsize, 0, 24, 96); list = MOptionEditGetList(e_fsize); MSListAddItem(list, "12", 0L); MSListAddItem(list, "14", 0L); MSListAddItem(list, "16", 0L); MSListAddItem(list, "18", 0L); MSListAddItem(list, "20", 0L); MSListAddItem(list, "22", 0L); MSListAddItem(list, "24", 0L); MSListAddItem(list, "26", 0L); MSListAddItem(list, "28", 0L); MSListAddItem(list, "30", 0L); MSListAddItem(list, "32", 0L); MSListAddItem(list, "34", 0L); MSListAddItem(list, "36", 0L); MSListAddItem(list, "38", 0L); MSListAddItem(list, "40", 0L); MSListAddItem(list, "42", 0L); _tbutton000 = MCreateTButton(tb, "Bold", FIXED_SMALL); MTButtonSetCallback(_tbutton000, SetBoldCB, 0L); MObjectSetForegroundRGB(_tbutton000, 255, 255, 0); _tbutton001 = MCreateTButton(tb, "Italic", FIXED_SMALL); MTButtonSetCallback(_tbutton001, SetItalicCB, 0L); MObjectSetForegroundRGB(_tbutton001, 255, 255, 0); /*******************/ rowform1 = MCreateRowForm(rowform); MObjectSetForegroundRGB(rowform1, 56, 84, 128); MObjectSetBackgroundRGB(rowform1, 56, 84, 128); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); lbl = MCreateLabel(rowform1, "COMMANDS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1, 5); MObjectSetBackgroundRGB(tb, 56, 84, 128); MObjectSetResize(tb, True, False); pb = MCreatePButton(tb, "Test", FIXED_SMALL); MPButtonSetCallback(pb, TestFontCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Preview", FIXED_SMALL); MPButtonSetCallback(pb, LoadFontCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Undo", FIXED_SMALL); MPButtonSetCallback(pb, UndoFCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteFontCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); /******************* STEPPER MOTORS ***************************/ MPagedFormSetActivePage(POCF, 4); MObjectSetText(POCF, "Motors"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 457); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); /***************************************************************************/ /**************** STEPPER MOTORS SECTION ***********************************/ lbl = MCreateLabel(rowform, "STEPPER MOTORS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetCompositeWidth(lbl, 447); PFAMS = MCreateTabbedRowForm(rowform, (DAS.StepM.NAMS + 2), FIXED_SMALL); MObjectSetForegroundRGB(PFAMS, 255, 255, 255); MObjectSetBackgroundRGB(PFAMS, 80, 60, 0); MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2); MObjectSetCompositeWidth(PFAMS, 420); // MObjectSetResize(PFAMS, True, True); for (i=0;i<DAS.StepM.NAMS; i++) { MPagedFormSetActivePage(PFAMS, i); CONFP_AMS(PFAMS, i); //FrmStepperConfP(PFAMS, i); } MPagedFormSetActivePage(PFAMS, i); CONFP_AMS_Utility(PFAMS); MPagedFormSetActivePage(PFAMS, i+1); CONFP_AMS_NOVA(PFAMS); MPagedFormSetActivePage(PFAMS, 0); /* if (DAS.Paramini.EqType == TROPOGAS) { PFAMS = MCreateTabbedRowForm(rowform, 4, FIXED_SMALL); MObjectSetForegroundRGB(PFAMS, 255, 255, 255); MObjectSetBackgroundRGB(PFAMS, 80, 60, 0); MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2); } else { PFAMS = MCreateTabbedRowForm(rowform, 3, FIXED_SMALL); MObjectSetForegroundRGB(PFAMS, 255, 255, 255); MObjectSetBackgroundRGB(PFAMS, 80, 60, 0); MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2); } MPagedFormSetActivePage(PFAMS, 0); FrmStepperConfP(PFAMS, AMS1, &STEPM, &CONFP, &CPL); MPagedFormSetActivePage(PFAMS, 1); FrmStepperConfP(PFAMS, AMS2, &STEPM, &CONFP, &CPL); if (DAS.Paramini.EqType == TROPOGAS) { MPagedFormSetActivePage(PFAMS, 2); FrmStepperConfP(PFAMS, AMS3, &STEPM, &CONFP, &CPL); MPagedFormSetActivePage(PFAMS, 3); FrmAMS_Utility(PFAMS, &STEPM, &CONFP, &CPL); } else { MPagedFormSetActivePage(PFAMS, 2); FrmAMS_Utility(PFAMS, &STEPM, &CONFP, &CPL); } */ MPagedFormSetActivePage(PFAMS, 0); /*++++++++++++++++++++++++++++++++++++++++++++++++++++*/ tb = MCreateTableForm(rowform, 4); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); pb = MCreatePButton(tb, "Apply", FIXED_SMALL); MPButtonSetCallback(pb, ApplyChCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(tb, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteAMSCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(tb, "ADVANCED", FIXED_SMALL); MPButtonSetCallback(pb, AMS_AdvancedCB, (void *) 0); MObjectSetBackgroundRGB(pb, 24, 24, 255); MObjectSetForegroundRGB(pb, 255, 245, 255); MObjectSetCompositeWidth(pb, 74); /*********************************************************/ /*********************************************************/ /*************** TEST AD Converter **************/ /*********************************************************/ MPagedFormSetActivePage(POCF, 5); MObjectSetText(POCF, "TEST AD Converter"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); /*+++++++++++++++++ START CURRENT SETUP ++++++++++*/ lbl = MCreateLabel(rowform , "AD Converter Current Setup", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform, 4); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); lbl = MCreateLabel(tb , "Board Type:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); // sprintf(buf, "%s", DSCCB2STR()); ADTESTER.lblADsetup[0] = MCreateLabel(tb , "DMM", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[0], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[0], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[0], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[0], 0); lbl = MCreateLabel(tb , "Base Addr:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[1] = MCreateLabel(tb , "0x300", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[1], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[1], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[1], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[1], 0); lbl = MCreateLabel(tb , "Int.Lvl:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[2] = MCreateLabel(tb , "3", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[2], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[2], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[2], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[2], 0); lbl = MCreateLabel(tb , "DMA Lvl:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[3] = MCreateLabel(tb , "3", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[3], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[3], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[3], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[3], 0); lbl = MCreateLabel(tb , "ClockFreq:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[4] = MCreateLabel(tb , "10MHz", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[4], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[4], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[4], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[4], 0); lbl = MCreateLabel(tb , "Range:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[5] = MCreateLabel(tb , "5V", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[5], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[5], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[5], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[5], 0); lbl = MCreateLabel(tb , "Pol.:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[6] = MCreateLabel(tb , "UNIPOL", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[6], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[6], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[6], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[6], 0); lbl = MCreateLabel(tb , "Gain:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[7] = MCreateLabel(tb , "2", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[7], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[7], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[7], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[7], 0); lbl = MCreateLabel(tb , "LowCh:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[8] = MCreateLabel(tb , "0", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[8], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[8], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[8], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[8], 0); lbl = MCreateLabel(tb , "HighCh:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[9] = MCreateLabel(tb , "15", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[9], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[9], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[9], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[9], 0); // LoadDMMSetup(); /*+++++++++++++++++ END CURRENT SETUP ++++++++++*/ tb = MCreateTableForm(rowform, 2); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); ADTESTER.ADrb[0]= MCreateRButton(tb, "Volts", FIXED_SMALL); MPButtonSetCallback(ADTESTER.ADrb[0], DB_SelOutModeCB, (void *) 0); MObjectAlign(ADTESTER.ADrb[0], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(ADTESTER.ADrb[0], 255, 255, 255); MObjectSetCompositeWidth(ADTESTER.ADrb[0], 85); ADTESTER.ADrb[1] = MCreateRButton(tb, "Celsius", FIXED_SMALL); MPButtonSetCallback(ADTESTER.ADrb[1], DB_SelOutModeCB, (void *) 1); MObjectAlign(ADTESTER.ADrb[1], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(ADTESTER.ADrb[1], 255, 255, 255); MObjectSetCompositeWidth(ADTESTER.ADrb[1], 85); if(ADTESTER.OutputMode == 0) MRButtonActivate(ADTESTER.ADrb[0]); else MRButtonActivate(ADTESTER.ADrb[0]); lbl = MCreateLabel(rowform , "Output", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform, 4); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); for(i=0;i<16;i++) { sprintf(buf, "Ch.%d:", i); ADTESTER.lblADch[i] = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(ADTESTER.lblADch[i], LEFT_ALIGN); MObjectSetForegroundRGB(ADTESTER.lblADch[i], 255, 255, 255); MObjectSetTransparency(ADTESTER.lblADch[i], 0); MObjectSetResize(ADTESTER.lblADch[i], False, False); MObjectAlign(ADTESTER.lblADch[i], LEFT_ALIGN, TOP_ALIGN); // MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblADch[i], 40, 96, 72); ADTESTER.lblADvalue[i] = MCreateLabel(tb, " 0.0", FIXED_SMALL); MLabelSetAlignment(ADTESTER.lblADvalue[i], RIGHT_ALIGN); MObjectSetForegroundRGB(ADTESTER.lblADvalue[i], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADvalue[i], 40, 96, 72); MObjectSetTransparency(ADTESTER.lblADvalue[i], 0); MObjectSetResize(ADTESTER.lblADvalue[i], False, False); MObjectAlign(ADTESTER.lblADvalue[i], LEFT_ALIGN, TOP_ALIGN); } tb = MCreateTableForm(rowform, 3); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); ADTESTER.ADpb = MCreatePButton(tb, "Start", FIXED_SMALL); MPButtonSetCallback(ADTESTER.ADpb, ADTesterCB, (void *) 0); MObjectSetBackgroundRGB(ADTESTER.ADpb, 224, 224, 176); // MObjectSetBackgroundRGB(ADTESTER.ADpb, 192, 192, 192); MObjectSetCompositeWidth(ADTESTER.ADpb, 84); ADTESTER.ADInflbl = MCreateLabel(tb, "Click Start to test ", FIXED_SMALL); // MPButtonSetCallback(ADTESTER.ADpb, ADTesterCB, (void *) 0); MObjectSetForegroundRGB(ADTESTER.ADInflbl, 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.ADInflbl, 48, 20, 255); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); /*********************************************************/ MPagedFormSetActivePage(POCF, 0); MShellRealize(DAS.Gui.ConfigPanel.ShellConfig); // MShellRealizeXYWH(DAS.Gui.ConfigPanel.ShellConfig, 0,0,600,800); return 0; } */
849 
850 
851  /********ùùùùùùùùùùùùùùùùùùùùùùùùùù********/
852  //Speed
853  lbl = MCreateLabel(tb, "Speed(Hz):", HELV_SMALL);
856  MObjectSetForegroundRGB(lbl, 255, 255, 255);
857  MObjectSetTransparency(lbl, 0);
859 
860  sprintf(buf, "%.3lf",DAS.StepM.speed_Hz[id][snum]);
861  DAS.Gui.ConfigPanel.SM_speed[id][snum]= MCreateOptionEdit(tb, buf, 6, 6, 6, FIXED_SMALL);
863  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_speed[id][snum], 255, 255, 255);
864  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_speed[id][snum], 120, 100, 0);
866  list = MOptionEditGetList(DAS.Gui.ConfigPanel.SM_speed[id][snum] );
867  for(i=0; i<256; i++)
868  {
869  speedhz = int2hertz(0, i);
870  sprintf(buf, "%.3lf", speedhz);
871  MSListAddItem(list, buf, 0L);
872  }
873  MSListSelectElement(list, DAS.StepM.speed[id][snum]);
874 
875  /********ùùùùùùùùùùùùùùùùùùùùùùùùùù********/
876 
877 
878  /*****+++++++++++++++++++++++++++++++*******/
879  //Multiplier
880  lbl = MCreateLabel(tb, "Multiplier", HELV_SMALL);
883  MObjectSetForegroundRGB(lbl, 255, 255, 255);
884  MObjectSetBackgroundRGB(lbl, 74, 60, 0);
886 
887 
888  sprintf(buf, "%d",DAS.StepM.multiplier[id][snum]);
889  DAS.Gui.ConfigPanel.SM_multiplier[id][snum] = MCreateOptionEdit(tb, buf, 4, 4, 6, FIXED_SMALL);
890  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_multiplier[id][snum] , 255, 255, 255);
891  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_multiplier[id][snum] , 120, 100, 0);
894  list = MOptionEditGetList(DAS.Gui.ConfigPanel.SM_multiplier[id][snum]);
895  for(i=1; i<31; i++)
896  {
897 
898  if (i!=0)
899  {
900  multip = (float)i/2 + 0.5;
901 
902  sprintf(buf, "%.1lf", multip);
903  MSListAddItem(list, buf, (void *) i);
904  if (atof(buf) == DAS.StepM.multiplier[id][snum])
905  {
906  selectedmult = i;
907  sprintf(str, "%s", buf);
908  }
909  }
910  }
911 
912 
913  MSListSelectElement(list, selectedmult-1);
914  MObjectSetText (DAS.Gui.ConfigPanel.SM_multiplier[id][snum], str);
915  //MSTextSetString(list, str);
916  //MSListSelectItem(list, str);
917  //MSListSelectElement(list, DAS.StepM.multiplier[id][snum] - 1);
918 
919 // MOptionEditSetListCallback(CONFP.multip[nams][STEPM.SM1], ListMultipCB, (void *) STEPM.SM1);
920 
921  /*****+++++++++++++++++++++++++++++++++******/
922 
923 
924 
925  DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum] = MCreatePButton(tb, "HOME", TIMES_SMALL);
926  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], 255, 255, 255);
927  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], 94, 111, 0);
928 
929  if (id == 0 && snum == 0)
931  if (id == 0 && snum == 1)
933  if (id == 1 && snum == 0)
935  if (id == 1 && snum == 1)
937  if (id == 2 && snum == 0)
939  if (id == 2 && snum == 1)
941 
942 
943 // MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) snum);
944 
945  if (DAS.StepM.hometype[id][snum] == 0)
946  sprintf(buf, "%s","Standard");
947  if (DAS.StepM.hometype[id][snum] == 1)
948  sprintf(buf, "%s","Default");
949  if (DAS.StepM.hometype[id][snum] == 2)
950  sprintf(buf, "%s","Track");
951 
952  DAS.Gui.ConfigPanel.SM_hometype[id][snum] = MCreateOptionEdit(tb, buf, 8, 8, 2, FIXED_SMALL);
953  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_hometype[id][snum] , 255, 255, 255);
954  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_hometype[id][snum] , 120, 100, 0);
957  list = MOptionEditGetList(DAS.Gui.ConfigPanel.SM_hometype[id][snum]);
958  for(i=0; i<3; i++)
959  {
960 
961  if (i==0)
962  {
963  sprintf(buf, "%s", "Standard");
964  MSListAddItem(list, buf, (void *) i);
965  }
966  if (i==1)
967  {
968  sprintf(buf, "%s", "Default");
969  MSListAddItem(list, buf, (void *) i);
970  }
971  if (i==2)
972  {
973  sprintf(buf, "%s", "Track");
974  MSListAddItem(list, buf, (void *) i);
975  }
976  }
977 
978  MSListSelectElement(list, DAS.StepM.hometype[id][snum]);
979  if (id == 0 && snum == 0)
981  if (id == 0 && snum == 1)
983  if (id == 1 && snum == 0)
985  if (id == 1 && snum == 1)
987  if (id == 2 && snum == 0)
989  if (id == 2 && snum == 1)
991 // pla = MSListGetSelected(list);
992 // sprintf(buf, "%s",pla->item);
993 // MObjectSetText(CONFP.power[nams][STEPM.SM1], buf);
994 
995 }
996 
997 int ChkDigIO(unsigned char word, int bitn)
998 {
999 
1000 
1001  int bn = bitn;
1002  int sts = 2;
1003  char str[80], *s;
1004  int er;
1005  unsigned long stbyte = 0;
1006 
1007  er = 0;
1008 // strcpy(
1009  sprintf(str,"0x%0x",word);
1010  stbyte = strtol(str, &s, 16);
1011  //stbyte = strtol(word, &s, 16);
1012 
1013  sts = stbyte & (unsigned char) pow(2,(double)(bn));
1014  sts = sts >> bn;
1015  if (sts == 2)
1016  return 2;
1017  else
1018  return sts;
1019 
1020 
1021 }
1022 
1023 
1024 
1025 void OOP_CB(MOBJECT obj, MVALUE value, void *ad)
1026 {
1027 
1028  int c = (int) ad;
1029  int er, id, tmp;
1030  int actadd;
1031 // char buf[16];
1032 
1033  actadd = MPagedFormGetActivePage(PFAMS);
1034 
1035 
1036 
1037  id = DAS.StepM.Addr[actadd];
1038 
1039  tmp = c;
1040  er = ChkDigIO(DAS.StepM.OOP[id], tmp);
1041 
1042 
1043  if ( er == 1)
1044  {
1045  DAS.StepM.OOP[id] &= ~((unsigned char) pow(2,(double)(tmp)));
1046  MPixmapSetImageFile(DAS.Gui.ConfigPanel.OOP[id][tmp], "SYS\\ledoff.bmp");
1047 
1048  }
1049  else if (er == 0)
1050  {
1051  DAS.StepM.OOP[id] |= (unsigned char) pow(2,(double)(tmp));
1052  MPixmapSetImageFile(DAS.Gui.ConfigPanel.OOP[id][tmp], "SYS\\ledon.bmp");
1053 
1054  }
1055  DAS.StepM.OOP[id] = ~DAS.StepM.OOP[id];
1056  AMS_wopto(id, DAS.StepM.OOP[id]);
1057  delay(50);
1058  DAS.StepM.OOP[id] = ~DAS.StepM.OOP[id];
1059 
1060 
1061 }
1062 
1063 void ReadInputCB(MOBJECT p, void *od, void *ad)
1064 {
1065 
1066  int i, er;
1067 // char buf[80];
1068  int actadd, id;
1069 
1070  actadd = MPagedFormGetActivePage(PFAMS);
1071  id = DAS.StepM.Addr[actadd];
1072 
1073 /* if (!CONFP.InitF[id])
1074  {
1075  MMessageDialog("AMS Tester Inf.", "AMS Not Initialized!.\nPlease push ""Init"" button first", "OK", NULL);
1076  return ;
1077  }
1078 */
1079 
1080 
1081  for (i=7;i>=0;i--)
1082  {
1083  er = AMS_chkbitsts(id, i);
1084  if(er==1)
1085  MPixmapSetImageFile(DAS.Gui.ConfigPanel.IOP[id][i], "SYS\\ledon.bmp");
1086  else if(er==0)
1087  MPixmapSetImageFile(DAS.Gui.ConfigPanel.IOP[id][i], "SYS\\ledoff.bmp");
1088  else
1089  Message("Unable to read AMS\nPlease check if AMS Switched ON", er);
1090 
1091 
1092 
1093  }
1094 
1095 
1096 
1097 }
1098 
1099 void DMessage(char *str)
1100 {
1101 
1102  MMessageDialog("AMS Informations", str, "OK", NULL);
1103 }
1104 
1105 
1106 
1107 
1108 void PBH_CB(MOBJECT p, void *od, void *ad)
1109 {
1110  int c = (int) ad;
1111  char buf[4096];
1112  switch (c)
1113  {
1114  case 0:
1115  sprintf(buf, "Set the power for the motors\n\
1116 Min = 0.02A; Max = 2.00A.");
1117  DMessage(buf);
1118  break;
1119  case 1:
1120  sprintf(buf, "Set the step fraction for the motors\n\
1121 1/n = 200*n steps/round\n\
1122 n = 2,4,5,8,10,16,25,32,50,64,125,128,250,256.\n\
1123 Min = 400 s/r; Max = 51200 s/r");
1124  DMessage(buf);
1125 
1126  break;
1127 
1128  case 2:
1129  sprintf(buf, "Set the number of step used for slope");
1130  DMessage(buf);
1131  break;
1132 
1133  case 3:
1134  sprintf(buf, "Set the speed of positioning of the motors ( 0.125 - 32 KHz)\n\
1135 The value is obtained with the formula F2 (Hz) = F1(Hz) * (n + 1);\n n = 0, 1, ... 255. - Hex 00_FF.\n\n\
1136 (i.e. n=1 --> F2 = 250 Hz)\n\
1137 WARNING - The formula is valid only if F1 = 125Hz");
1138  DMessage(buf);
1139  break;
1140  case 4:
1141  sprintf(buf, "Set the multiplier for the stepper motors.");
1142  DMessage(buf);
1143  break;
1144  case 5:
1145  sprintf(buf, "Set and Test the Home for the Motors\n\n - Standard: the stepper rounds counterclockwise with \
1146 2000 s/r (1/10) and f = 1KHz.\nThe sampling is done 1000 times per second (1KHZ)\n\n\
1147  - Default: similar to ""Standard"", but using the actual setted stepping and frequency\n\n\
1148  - Track: the tracking procedure is used.\n The stepper rounds fast since when the optoswitch is found,\n then the stepper\
1149  inverts the direction and rounds slowly\n since when the status bit change again.\n\n");
1150  DMessage(buf);
1151  break;
1152  case 6:
1153  sprintf(buf, "Read the Input port of AMS.");
1154  DMessage(buf);
1155  break;
1156  case 7:
1157  if (DAS.Paramini.EqType == SPATRAMPLUS)
1158  {
1159  sprintf(buf, "Set and Read the Output port of the AMS.\n\n\
1160 AMS1:\n\
1161 OOP[0] --> Peltier\n\
1162 OOP[1] --> Fan Peltier\n\
1163 OOP[2] --> HG Lamp\n\
1164 OOP[3] --> QJ Lamp\n\
1165 OOP[4] --> Peltier Power Supply\n\
1166 OOP[5] --> Hires Power Supply\n\
1167 OOP[6] --> SPARE\n\
1168 OOP[7] --> SPARE\n");
1169  }
1170  if (DAS.Paramini.EqType == GASCODNG1)
1171  {
1172  sprintf(buf, "Set and Read the Output port of the AMS.\n\n\
1173 AMS1:\n\
1174 OOP[0] - Peltier\n\
1175 OOP[1] - Fan Peltier\n\
1176 OOP[2] - HG Lamp\n\
1177 OOP[3] - QJ Lamp\n\
1178 OOP[4] - Peltier Power Supply\n\
1179 OOP[5] - Hires Power Supply\n\
1180 OOP[6] - Ext. Shutter or Torque Motor Shutter\n\
1181 OOP[7] - Ext. Lamp\n\
1182 AMS2:\n\
1183 OOP[0] - Duty Cycle Peltier\n\
1184 OOP[1] - SPARE\n\
1185 OOP[2] - SPARE\n\
1186 OOP[3] - SPARE\n\
1187 OOP[4] - SPARE\n\
1188 OOP[5] - SPARE\n\
1189 OOP[6] - SPARE\n\
1190 OOP[7] - SPARE\n\
1191 AMS3:\n\
1192 OOP[0] - SPARE\n\
1193 OOP[1] - Fan ECU\n\
1194 OOP[2] - SPARE\n\
1195 OOP[3] - SPARE\n\
1196 OOP[4] - SPARE\n\
1197 OOP[5] - SPARE\n\
1198 OOP[6] - SPARE\n\
1199 OOP[7] - SPARE\n");
1200  }
1201  if (DAS.Paramini.EqType == TROPOGAS)
1202  {
1203  sprintf(buf, "Set and Read the Output port of the AMS.\n\n\
1204 AMS1:\n\
1205 OOP[0] --> Peltier\n\
1206 OOP[1] --> Fan Peltier\n\
1207 OOP[2] --> HG Lamp\n\
1208 OOP[3] --> QJ Lamp\n\
1209 OOP[4] --> Peltier Power Supply\n\
1210 OOP[5] --> Hires Power Supply\n\
1211 OOP[6] --> Ext. Shutter\n\
1212 OOP[7] --> Ext. Lamp\n");
1213  }
1214 
1215  DMessage(buf);
1216  break;
1217  case 8:
1218  sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\
1219 set the polarity for HOME and WORK Positions.");
1220  DMessage(buf);
1221  break;
1222  case 9:
1223  sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\
1224 set the polarity for HOME and WORK Positions.");
1225  DMessage(buf);
1226  break;
1227  case 10:
1228  sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\
1229 set the polarity for HOME and WORK Positions.");
1230  DMessage(buf);
1231  break;
1232  case 11:
1233  sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\
1234 set the polarity for HOME and WORK Positions.");
1235  DMessage(buf);
1236  break;
1237  case 12:
1238  sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\
1239 set the polarity for HOME and WORK Positions.");
1240  DMessage(buf);
1241  break;
1242  case 13:
1243  sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\
1244 set the polarity for HOME and WORK Positions.");
1245  DMessage(buf);
1246  break;
1247  case 14:
1248  sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\
1249 set the polarity for HOME and WORK Positions.");
1250  DMessage(buf);
1251  break;
1252 
1253  }
1254 
1255 }
1256 
1257 
1258 
1259 void CONFP_AMS_IOPort(MOBJECT dtb, int amsn)
1260 {
1261 
1262  MOBJECT lbl;
1263  int i;
1264  unsigned char er = 0;
1265  MOBJECT rowform, colform, rowform1, pb, pbh;
1266  MOBJECT tb, pixmap;
1267  char buf[32];
1268 
1269  lbl = MCreateLabel(dtb, " TEST I/O Ports", FIXED_SMALL);
1270  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1271  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
1272  MObjectSetTransparency(lbl, 0);
1273 // MObjectSetCompositeWidth(lbl, 347);
1274 
1275 
1276  //era rowform017
1277  rowform = MCreateRowForm(dtb);
1278  MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN);
1280  MObjectSetBackgroundRGB(rowform, 112, 128, 112);
1281  MObjectSetShadow(rowform, WS_SHADOW_OUT, 2, 0);
1282  MObjectSetResize(rowform, True, True);
1283 
1284  //era _colform003
1285  colform = MCreateColForm(rowform);
1286  MObjectSetForegroundRGB(colform, 255, 255, 255);
1287  MObjectSetBackgroundRGB(colform, 74, 60, 0);
1288  MObjectSetShadow(colform, WS_NONE, 0, 0);
1289  MObjectSetResize(colform, True, True);
1290 
1291  //era _rowform018
1292  rowform1 = MCreateRowForm(colform);
1293  MObjectSetForegroundRGB(rowform1, 255, 255, 255);
1294  MObjectSetBackgroundRGB(rowform1, 74, 60, 0);
1295  MObjectSetResize(rowform1, True, True);
1296 
1297  lbl = MCreateLabel(rowform1, "Input Port", HELV_SMALL);
1299  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1300  MObjectSetBackgroundRGB(lbl, 74, 60, 0);
1301  MObjectSetResize(lbl, False, False);
1302 
1303  pb = MCreatePButton(rowform1, "Read Input", TIMES_SMALL);
1304  MBottomAttach(pb, F_ATT_FORM, 0, NULL);
1306  MObjectSetForegroundRGB(pb, 255, 255, 255);
1307  MObjectSetBackgroundRGB(pb, 71, 126, 246);
1308  MPButtonSetCallback(pb, ReadInputCB, (void *) 0);
1309 
1310  //era _tablefrm018
1311  tb = MCreateTableForm(colform, 8);
1313  MObjectSetForegroundRGB(tb, 255, 255, 255);
1314  MObjectSetBackgroundRGB(tb, 120, 100, 0);
1316 
1317 
1318 
1319 
1320  for (i=7;i>=0;i--)
1321  {
1322  sprintf(buf,"%d", i);
1323  lbl = MCreateLabel(tb, buf, HELV_SMALL);
1324  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1325  MObjectSetBackgroundRGB(lbl, 91, 91, 91);
1326  }
1327 
1328  for (i=7;i>=0;i--)
1329  {
1330  DAS.Gui.ConfigPanel.IOP[amsn][i] = MCreatePixmapFromFile(tb, "SYS\\ledoff.bmp");
1331  MObjectSetShadow(DAS.Gui.ConfigPanel.IOP[amsn][i], WS_NONE, 0, 0);
1332  }
1333 
1334 
1335 
1336  pbh = MCreateImagePButtonExt(colform, "sys\\qmarkyellow.bmp", "sys\\qmarkblue.bmp", "", "sys\\qmarkred.bmp", "", "");
1337  MButtonSetImageMaskByPixel(pbh, 0, 0);
1338  MObjectSetTransparency(pbh, 255);
1339  MObjectSetShadow(pbh, WS_NONE, 0, 0);
1340  MObjectSetBackgroundRGB(pbh, 80, 60, 0);
1341  MPButtonSetCallback(pbh, PBH_CB, (void *) 6);
1342  MObjectSetResize(pbh, False, True);
1343 
1344  //era _rowform019
1345  rowform = MCreateRowForm(dtb);
1346  MObjectAlign(rowform, UNDEF_ALIGN, TOP_ALIGN);
1348  MObjectSetBackgroundRGB(rowform, 112, 128, 112);
1349  MObjectSetResize(rowform, True, True);
1350 
1351  //era _colform004
1352  colform = MCreateColForm(rowform);
1353  MObjectSetForegroundRGB(colform, 255, 255, 255);
1354  MObjectSetBackgroundRGB(colform, 74, 60, 0);
1355  MObjectSetShadow(colform, WS_NONE, 0, 0);
1356  MObjectSetResize(colform, True, True);
1357 
1358  //era _rowform020
1359  rowform1 = MCreateRowForm(colform);
1360  MObjectSetBackgroundRGB(rowform1, 74, 60, 0);
1361  MObjectSetResize(rowform1, True, True);
1362 
1363  lbl = MCreateLabel(rowform1, "Output Port", HELV_SMALL);
1364  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1365  MObjectSetBackgroundRGB(lbl, 74, 60, 0);
1366  MObjectSetResize(lbl, False, False);
1367 
1368  //era _tablefrm019
1369  tb = MCreateTableForm(rowform1, 2);
1370  MFormSetSpacing(tb, 1);
1372 // MTopAttach(_tablefrm019, F_ATT_OBJ, 0, _label033);
1374  MObjectSetBackgroundRGB(tb, 112, 128, 112);
1376 
1377  pixmap = MCreatePixmapFromFile(tb, "sys\\LEDOFFsmall.BMP");
1378 
1379  lbl = MCreateLabel(tb, "OFF = 0", HELV_SMALL);
1380  MLabelSetMargin(lbl, 3, 1);
1381  MObjectSetBackgroundRGB(lbl, 74, 60, 0);
1382  MObjectSetTransparency(lbl, 0);
1383  MObjectSetResize(lbl, False, False);
1384 
1385  pixmap = MCreatePixmapFromFile(tb, "sys\\LEDONsmall.BMP");
1386 
1387  lbl = MCreateLabel(tb, "ON = 1", HELV_SMALL);
1389  MLabelSetMargin(lbl, 3, 1);
1391  MObjectSetBackgroundRGB(lbl, 74, 60, 0);
1392  MObjectSetTransparency(lbl, 0);
1393 
1394  //era _tablefrm020 e colform004
1395  tb = MCreateTableForm(colform, 8);
1397  MObjectSetForegroundRGB(tb, 255, 255, 255);
1398  MObjectSetBackgroundRGB(tb, 120, 100, 0);
1400 
1401 
1402  for (i=7;i>=0;i--)
1403  {
1404  sprintf(buf,"%d", i);
1405  lbl = MCreateLabel(tb, buf, HELV_SMALL);
1406  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1407  MObjectSetBackgroundRGB(lbl, 91, 91, 91);
1408  }
1409 
1410  for (i=7;i>=0;i--)
1411  {
1412  sprintf(buf,"%d", i);
1413  DAS.Gui.ConfigPanel.OOP[amsn][i] = MCreateImageTButtonExt(tb, "sys\\ledoff.bmp", "sys\\ledon.bmp", "", "", "", "");
1414  //MCreatePixmapFromFile(tb, "SYS\\ledoff.bmp");
1415  MObjectSetShadow(DAS.Gui.ConfigPanel.OOP[amsn][i], WS_NONE, 0, 0);
1416  //MTButtonSetCallback(DAS.Gui.ConfigPanel.OOP[amsn][i], OOP_CB , (void *) i);
1417  er = ChkDigIO(DAS.StepM.OOP[amsn], i);
1418  if(er==1)
1419  MTButtonActivate(DAS.Gui.ConfigPanel.OOP[amsn][i]);
1420  else if(er==0)
1421  MTButtonDeactivate(DAS.Gui.ConfigPanel.OOP[amsn][i]);
1422 
1423  // the callback has to be after the creation and the setting of the buttons status!!!!!!!!!!
1424  MTButtonSetCallback(DAS.Gui.ConfigPanel.OOP[amsn][i], OOP_CB , (void *) i);
1425  }
1426 
1427 
1428 
1429  pbh = MCreateImagePButtonExt(colform, "sys\\qmarkyellow.bmp", "sys\\qmarkblue.bmp", "", "sys\\qmarkred.bmp", "", "");
1430  MButtonSetImageMaskByPixel(pbh, 0, 0);
1431  MObjectSetTransparency(pbh, 255);
1432  MObjectSetShadow(pbh, WS_NONE, 0, 0);
1433  MObjectSetBackgroundRGB(pbh, 80, 60, 0);
1434  MPButtonSetCallback(pbh, PBH_CB, (void *) 7);
1435  MObjectSetResize(pbh, False, True);
1436 
1437 
1438 
1439 
1440 
1441 }
1442 
1443 
1444 
1445 
1446 
1447 void FrmStepperHomeMode(int mod, MOBJECT obj)
1448 {
1449 
1450  MOBJECT lbl, tb, rowfrm, rb, pb;
1451 // char buf[32];
1452  int c = mod;
1453  int i = 3;
1454 // int k;
1455 
1456  const char *lblstring[] = {{"Mirror"}, {"Grating"}, {"Filter Wheel"}, {"Not Conn."}, {"Zenith"}, {"Azimut"}};
1457  const char *helpoutput[] = {{"Standard - This command search the reference position of the device (Home).\nThe motor moves in the CCW direction until the input port became active.\nThe process is done with 2000 s/r and 1KHz of frequency.\nThe scanning for the end-run is done each 1 ms "},
1458  {"Default - As the standard command, but with the actual values of step, power and frequancy "},
1459  {"Fast - The frequency is setted in the program (see AMS User Guide and contact DanBo for modifications)"}};
1460 
1461  rowfrm = MCreateRowForm(obj);
1462  MObjectSetBackgroundRGB(rowfrm, 80, 60, 0);
1463 
1464  lbl = MCreateLabel(rowfrm, lblstring[mod], FIXED_SMALL);
1465  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1466  MObjectSetBackgroundRGB(lbl, 192, 80, 80);
1467  MObjectSetTransparency(lbl, 0);
1468 
1469  tb = MCreateTableForm(rowfrm,2);
1470  MObjectSetBackgroundRGB(tb, 80, 60, 0);
1471 
1472 
1473  rb= MCreateRButton(tb, "Standard", FIXED_SMALL);
1474  MPButtonSetCallback(rb, DB_HomeTypeCB, (void *) (c*i+0));
1476  MObjectSetForegroundRGB(rb, 255, 255, 255);
1477  MObjectSetPopupHelp(rb, helpoutput[0], 200, 5000);
1478 // MObjectSetCompositeWidth(rb, 123);
1479  if(DAS.StepM.hometype[mod] == 0)
1480  MRButtonActivate(rb);
1481 
1482  pb= MCreatePButton(tb, "Test", FIXED_SMALL);
1483  MPButtonSetCallback(pb, DB_TestHomeTypeCB, (void *) (c*i+0));
1485  MObjectSetForegroundRGB(pb, 0, 0, 0);
1486  MObjectSetBackgroundRGB(pb, 127, 220, 120);
1487 
1488 
1489  rb= MCreateRButton(tb, "Default", FIXED_SMALL);
1490  MPButtonSetCallback(rb, DB_HomeTypeCB, (void *) (c*i+1));
1492  MObjectSetForegroundRGB(rb, 255, 255, 255);
1493  MObjectSetPopupHelp(rb, helpoutput[1], 200, 5000);
1494 // MObjectSetCompositeWidth(rb, 123);
1495 // if(DAS.DAS.StepM.hometype[mod] == 1)
1496 // MRButtonActivate(rb);
1497 
1498  pb= MCreatePButton(tb, "Test", FIXED_SMALL);
1499  MPButtonSetCallback(pb, DB_TestHomeTypeCB, (void *) (c*i+1));
1501  MObjectSetForegroundRGB(pb, 0, 0, 0);
1502  MObjectSetBackgroundRGB(pb, 127, 220, 120);
1503 
1504  rb= MCreateRButton(tb, "Fast ", FIXED_SMALL);
1505  MPButtonSetCallback(rb, DB_HomeTypeCB, (void *) (c*i+2));
1507  MObjectSetForegroundRGB(rb, 255, 255, 255);
1508  MObjectSetPopupHelp(rb, helpoutput[2], 200, 5000);
1509 // MObjectSetCompositeWidth(rb, 123);
1510 // if(DAS.DAS.StepM.hometype[mod] == 2)
1511 // MRButtonActivate(rb);
1512 
1513  pb= MCreatePButton(tb, "Test", FIXED_SMALL);
1514  MPButtonSetCallback(pb, DB_TestHomeTypeCB, (void *) (c*i+2));
1516  MObjectSetForegroundRGB(pb, 0, 0, 0);
1517  MObjectSetBackgroundRGB(pb, 127, 220, 120);
1518 
1519 
1520 }
1521 
1522 
1523 void FrmNOVA_IO_Test(int mod, MOBJECT obj)
1524 {
1525 
1526  MOBJECT lbl, tb, rowfrm, rb, pb;
1527 // char buf[32];
1528  int c = mod;
1529  int i = 3;
1530 // int k;
1531 
1532  const char *lblstring[] = {{"Mirror"}, {"Grating"}, {"Filter Wheel"}, {"Not Conn."}, {"Zenith"}, {"Azimut"}};
1533  const char *helpoutput[] = {{"Standard - This command search the reference position of the device (Home).\nThe motor moves in the CCW direction until the input port became active.\nThe process is done with 2000 s/r and 1KHz of frequency.\nThe scanning for the end-run is done each 1 ms "},
1534  {"Default - As the standard command, but with the actual values of step, power and frequancy "},
1535  {"Fast - The frequency is setted in the program (see AMS User Guide and contact DanBo for modifications)"}};
1536 
1537  rowfrm = MCreateRowForm(obj);
1538  MObjectSetBackgroundRGB(rowfrm, 80, 60, 0);
1539 
1540  lbl = MCreateLabel(rowfrm, lblstring[mod], FIXED_SMALL);
1541  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1542  MObjectSetBackgroundRGB(lbl, 192, 80, 80);
1543  MObjectSetTransparency(lbl, 0);
1544 
1545  tb = MCreateTableForm(rowfrm,2);
1546  MObjectSetBackgroundRGB(tb, 80, 60, 0);
1547 
1548 
1549  rb= MCreateRButton(tb, "Standard", FIXED_SMALL);
1550  MPButtonSetCallback(rb, DB_HomeTypeCB, (void *) (c*i+0));
1552  MObjectSetForegroundRGB(rb, 255, 255, 255);
1553  MObjectSetPopupHelp(rb, helpoutput[0], 200, 5000);
1554 // MObjectSetCompositeWidth(rb, 123);
1555  if(DAS.StepM.hometype[mod] == 0)
1556  MRButtonActivate(rb);
1557 
1558  pb= MCreatePButton(tb, "Test", FIXED_SMALL);
1559  MPButtonSetCallback(pb, DB_TestHomeTypeCB, (void *) (c*i+0));
1561  MObjectSetForegroundRGB(pb, 0, 0, 0);
1562  MObjectSetBackgroundRGB(pb, 127, 220, 120);
1563 
1564 
1565  rb= MCreateRButton(tb, "Default", FIXED_SMALL);
1566  MPButtonSetCallback(rb, DB_HomeTypeCB, (void *) (c*i+1));
1568  MObjectSetForegroundRGB(rb, 255, 255, 255);
1569  MObjectSetPopupHelp(rb, helpoutput[1], 200, 5000);
1570 // MObjectSetCompositeWidth(rb, 123);
1571 // if(DAS.DAS.StepM.hometype[mod] == 1)
1572 // MRButtonActivate(rb);
1573 
1574  pb= MCreatePButton(tb, "Test", FIXED_SMALL);
1575  MPButtonSetCallback(pb, DB_TestHomeTypeCB, (void *) (c*i+1));
1577  MObjectSetForegroundRGB(pb, 0, 0, 0);
1578  MObjectSetBackgroundRGB(pb, 127, 220, 120);
1579 
1580  rb= MCreateRButton(tb, "Fast ", FIXED_SMALL);
1581  MPButtonSetCallback(rb, DB_HomeTypeCB, (void *) (c*i+2));
1583  MObjectSetForegroundRGB(rb, 255, 255, 255);
1584  MObjectSetPopupHelp(rb, helpoutput[2], 200, 5000);
1585 // MObjectSetCompositeWidth(rb, 123);
1586 // if(DAS.DAS.StepM.hometype[mod] == 2)
1587 // MRButtonActivate(rb);
1588 
1589  pb= MCreatePButton(tb, "Test", FIXED_SMALL);
1590  MPButtonSetCallback(pb, DB_TestHomeTypeCB, (void *) (c*i+2));
1592  MObjectSetForegroundRGB(pb, 0, 0, 0);
1593  MObjectSetBackgroundRGB(pb, 127, 220, 120);
1594 
1595 
1596 }
1597 
1598 //short _stdcall Inp32(short PortAddress);
1599 //void _stdcall Out32(short PortAddress, short data);
1600 
1601 
1602 
1603 void NOVAIn_CB(MOBJECT obj, void *od, void *ad)
1604 {
1605 
1606  int c = (int) ad;
1607  int i, er, tmp;
1608 // int actadd;
1609 // char buf[16];
1610 
1611  tmp = c;
1612 
1613  er = NOVA_In(DAS.Nova.type, DAS.Nova.DigIn);
1614 
1615  //DAS.Nova.DigIn = 7;
1616  for (i=3;i>=0;i--)
1617  {
1618  er = ChkDigIO(DAS.Nova.DigIn, i);
1619 
1620  if(er==1)
1621  MPixmapSetImageFile(DAS.Nova.INP[i], "SYS\\ledon.bmp");
1622  else if(er==0)
1623  MPixmapSetImageFile(DAS.Nova.INP[i], "SYS\\ledoff.bmp");
1624  }
1625 
1626 }
1627 
1628 
1629 
1630 void NOVAOut_CB(MOBJECT obj, MVALUE value, void *ad)
1631 {
1632 
1633  int c = (int) ad;
1634  int er, tmp;
1635 // int actadd;
1636 // char buf[16];
1637 
1638  tmp = c;
1639 
1640  er = ChkDigIO((unsigned char)DAS.Nova.DigOut, tmp);
1641 
1642 
1643  if ( er == 1)
1644  {
1645  DAS.Nova.DigOut &= ~((unsigned char) pow(2,(double)(tmp)));
1646  MPixmapSetImageFile(obj, "SYS\\ledoff.bmp");
1647 
1648  }
1649  else if (er == 0)
1650  {
1651  DAS.Nova.DigOut |= (unsigned char) pow(2,(double)(tmp));
1652  MPixmapSetImageFile(obj, "SYS\\ledon.bmp");
1653 
1654  }
1655 
1656 
1657  //OutByte(576, DAS.Nova.DigOut);
1658  er = NOVA_Out(DAS.Nova.type, DAS.Nova.DigOut);
1659 
1660 }
1661 
1662 
1663 void CONFP_AMS_SM_OFFSET(MOBJECT obj, int nams)
1664 {
1665 
1666  char buf[64];
1667  char str[512];
1668  MOBJECT lbl, tb, rowform1, edit;
1669  int i, k;
1670 
1671 
1672  lbl = MCreateLabel(obj, "Devices Offsets", FIXED_SMALL);
1674  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1675  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
1676  MObjectSetTransparency(lbl, 0);
1677 // MObjectSetCompositeWidth(lbl, 347);
1678 
1679  rowform1 = MCreateRowForm(obj);
1680  MObjectSetBackgroundRGB(rowform1, 80, 60, 0);
1681  MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN);
1682  MObjectSetResize(rowform1, False, False);
1683  MObjectSetCompositeWidth(rowform1, 347);
1684 
1685  lbl = MCreateLabel(rowform1, "Input Mirror", FIXED_SMALL);
1686  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1687  MObjectSetTransparency(lbl, 0);
1688  MObjectSetCompositeWidth(lbl, 347);
1689 
1690  tb = MCreateTableForm(rowform1, 5);
1693  MObjectSetBackgroundRGB(tb, 80, 60, 0);
1695  MObjectSetCompositeWidth(tb, 347);
1696 
1697  lbl = MCreateLabel(tb, "Home", FIXED_SMALL);
1699  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1700  MObjectSetTransparency(lbl, 0);
1701  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
1702 
1703  for(i=0;i<4;i++)
1704  {
1705  if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 )
1706  sprintf(buf, "%s",Mir_CodeTropo[i]);
1707  else
1708  sprintf(buf, "%s",Mir_Code[i]);
1709 
1710  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
1712  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1713  MObjectSetTransparency(lbl, 0);
1714  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
1715  }
1716 
1717  for(i=0;i<5;i++)
1718  {
1719  sprintf(buf, "%d",DAS.Paramini.Offset[i]);
1720  edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL);
1722  MObjectSetForegroundRGB(edit, 255, 255, 255);
1723  MObjectSetBackgroundRGB(edit, 120, 100, 0);
1724 
1725  MObjectSetCompositeWidth(edit, 65);
1726  k= i + 300;
1727  MEditSetValCallback(edit, ValidateCB, (void *) k);
1728  MEditSetActCallback(edit, ActEditCB, (void *) k);
1729  }
1730 
1731 
1732  sprintf(str," Type the new 'offset' value for the Home position\n then push TAB\n then go to the MAIN PANEL\n then push 'H_Mirr'\n DO NOT PUSH the 'Apply' button to test the new offset!");
1733  lbl = MCreateLabel(obj, str, FIXED_SMALL);
1736  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1737  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
1738  MObjectSetTransparency(lbl, 0);
1739 
1740 
1741 
1742 }
1743 
1744 
1746 {
1747 
1748  MOBJECT lbl, tb, pb, rb, rowfrm;
1749  int i, er;
1750  char buf[64];
1751 
1752  sprintf(buf, "SET NOVA MB");
1753  MObjectSetText(pf, buf);
1754 
1755 
1756  rowfrm = MCreateRowForm(pf);
1757  MObjectSetBackgroundRGB(rowfrm, 80, 60, 0);
1758  MObjectSetResize(rowfrm, True, False);
1760 
1761 
1762  lbl = MCreateLabel(rowfrm, "Select NOVA board", FIXED_SMALL);
1763  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1764  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
1765  MObjectSetTransparency(lbl, 0);
1766 
1767  tb = MCreateTableForm(rowfrm, 3);
1768  MObjectSetBackgroundRGB(tb, 80, 60, 0);
1769  MObjectSetResize(tb, True, True);
1770 
1771  rb = MCreateRButton(tb, "7892", FIXED_SMALL);
1772  MPButtonSetCallback(rb, NovaTypeCB, (void *) NOVA7892);
1774  MObjectSetShadow(rb, WS_NONE, 0, 0);
1775  MObjectSetForegroundRGB(rb, 255, 255, 255);
1776  MObjectSetBackgroundRGB(rb, 48, 20, 255);
1777  if(DAS.Nova.type == NOVA7892)
1778  MTButtonActivate(rb);
1779  else
1780  MTButtonDeactivate(rb);
1781 
1782  rb = MCreateRButton(tb, "6612G2", FIXED_SMALL);
1783  MPButtonSetCallback(rb, NovaTypeCB, (void *) NOVA6612G2);
1785  MObjectSetShadow(rb, WS_NONE, 0, 0);
1786  MObjectSetForegroundRGB(rb, 255, 255, 255);
1787  MObjectSetBackgroundRGB(rb, 48, 20, 255);
1788  if(DAS.Nova.type == NOVA6612G2)
1789  MTButtonActivate(rb);
1790  else
1791  MTButtonDeactivate(rb);
1792 
1793  rb = MCreateRButton(tb, "945GSE", FIXED_SMALL);
1794  MPButtonSetCallback(rb, NovaTypeCB, (void *) NOVA945GSE);
1796  MObjectSetShadow(rb, WS_NONE, 0, 0);
1797  MObjectSetForegroundRGB(rb, 255, 255, 255);
1798  MObjectSetBackgroundRGB(rb, 48, 20, 255);
1799  //MObjectSetUnsensitive(rb);
1800  if(DAS.Nova.type == NOVA945GSE)
1801  MTButtonActivate(rb);
1802  else
1803  MTButtonDeactivate(rb);
1804 
1805 
1806  pb = MCreatePButton(rowfrm, "Store", HELV_SMALL);
1807  MPButtonSetCallback(pb, WriteHardwareiniCB, (void *) 0);
1808 
1809 /**************************************************************/
1810  lbl = MCreateLabel(rowfrm, "Output Port", FIXED_SMALL);
1811  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1812  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
1813  MObjectSetTransparency(lbl, 0);
1814 
1815  tb = MCreateTableForm(rowfrm, 4);
1816  MObjectSetBackgroundRGB(tb, 80, 60, 0);
1817  MObjectSetResize(tb, True, True);
1818 
1819 
1820 //**********************
1821  for (i=3;i>=0;i--)
1822  {
1823  sprintf(buf,"%d", i);
1824  lbl = MCreateLabel(tb, buf, HELV_SMALL);
1825  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1826  MObjectSetBackgroundRGB(lbl, 91, 91, 91);
1827  }
1828 
1829  for (i=3;i>=0;i--)
1830  {
1831  sprintf(buf,"%d", i);
1832  pb = MCreateImageTButtonExt(tb, "sys\\ledoff.bmp", "sys\\ledon.bmp", "", "", "", "");
1833  MObjectSetShadow(pb, WS_NONE, 0, 0);
1834  er = ChkDigIO((unsigned char)DAS.Nova.DigOut, i);
1835  if(er == 1)
1836  MTButtonActivate(pb);
1837  else if(er==0)
1838  MTButtonDeactivate(pb);
1839 
1840  // the callback has to be after the creation and the setting of the buttons status!!!!!!!!!!
1841  MTButtonSetCallback(pb, NOVAOut_CB , (void *) i);
1842  }
1843 
1844 
1845 
1846  lbl = MCreateLabel(rowfrm, "Input Port", FIXED_SMALL);
1847  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1848  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
1849  MObjectSetTransparency(lbl, 0);
1850 
1851 
1852  pb = MCreatePButton(rowfrm, "Read Input", TIMES_SMALL);
1853  MBottomAttach(pb, F_ATT_FORM, 0, NULL);
1855  MObjectSetForegroundRGB(pb, 255, 255, 255);
1856  MObjectSetBackgroundRGB(pb, 71, 126, 246);
1857  MPButtonSetCallback(pb, NOVAIn_CB, (void *) 0);
1858 
1859 
1860 
1861 
1862  tb = MCreateTableForm(rowfrm, 4);
1863  MObjectSetBackgroundRGB(tb, 80, 60, 0);
1864  MObjectSetResize(tb, True, True);
1865 
1866 
1867 //**********************
1868  for (i=3;i>=0;i--)
1869  {
1870  sprintf(buf,"%d", i);
1871  lbl = MCreateLabel(tb, buf, HELV_SMALL);
1872  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1873  MObjectSetBackgroundRGB(lbl, 91, 91, 91);
1874  }
1875 
1876 
1877  er = NOVA_In(DAS.Nova.type, DAS.Nova.DigIn);
1878  for (i=3;i>=0;i--)
1879  {
1880  er = ChkDigIO(DAS.Nova.DigIn, i);
1881  sprintf(buf,"%d", i);
1882  //DAS.Nova.INP[i] = MCreateImageTButtonExt(tb, "sys\\ledoff.bmp", "sys\\ledon.bmp", "", "", "", "");
1883  if(er == 0)
1884  {
1885  DAS.Nova.INP[i] = MCreatePixmapFromFile(tb, "SYS\\ledoff.bmp");
1886  MObjectSetShadow(DAS.Nova.INP[i], WS_NONE, 0, 0);
1887  }
1888  else if(er == 1)
1889  {
1890  DAS.Nova.INP[i] = MCreatePixmapFromFile(tb, "SYS\\ledon.bmp");
1891  MObjectSetShadow(DAS.Nova.INP[i], WS_NONE, 0, 0);
1892  }
1893  //er = ChkDigIO(DAS.Nova.DigIn, i);
1894  //if(er == 1)
1895  // MTButtonActivate(DAS.Nova.INP[i]);
1896  //else if(er==0)
1897  // MTButtonDeactivate(DAS.Nova.INP[i]);
1898 
1899  // the callback has to be after the creation and the setting of the buttons status!!!!!!!!!!
1900  //MTButtonSetCallback(pb, NOVAIn_CB , (void *) i);
1901  }
1902 
1903 /*******************************************************/
1904 // Set Reset Time
1905  tb = MCreateTableForm(rowfrm, 2);
1906  MObjectSetBackgroundRGB(tb, 80, 60, 0);
1907  MObjectSetResize(tb, True, True);
1908 
1909  lbl = MCreateLabel(tb, "Set reset time (1-255s)", FIXED_SMALL);
1910  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1911  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
1912  MObjectSetTransparency(lbl, 0);
1913 
1914  sprintf(buf,"%d", DAS.Nova.WDT_TOUT);
1915  //sprintf(buf,"%d", 15);
1916  DAS.Gui.ConfigPanel.WDT_edt = MCreateEdit(tb, buf, 5, FIXED_SMALL);
1917 
1918 
1919  lbl = MCreateLabel(tb, "Time Elapsed", FIXED_SMALL);
1920  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1921  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
1922  MObjectSetTransparency(lbl, 0);
1923 
1925  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lbltelap, 48, 20, 255);
1926  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lbltelap, 192, 192, 192);
1928 
1929 
1930  tb = MCreateTableForm(rowfrm, 3);
1931  MObjectSetBackgroundRGB(tb, 80, 60, 0);
1932  MObjectSetResize(tb, True, True);
1933 
1934 
1935  pb = MCreatePButton(tb, "Start", HELV_SMALL);
1936  MPButtonSetCallback(pb, WDT_CB , (void *) 0);
1937 
1938 
1939  pb = MCreatePButton(tb, "Exit", HELV_SMALL);
1940 // MPButtonSetCallback(pb, MDQuitCB, (void *) 0);
1941 
1942 
1943  pb = MCreatePButton(tb, "Launch Task", HELV_SMALL);
1944  MPButtonSetCallback(pb, WDT_Task_CB, (void *) 0);
1945 
1946 
1947 
1948 }
1949 
1951 {
1952 
1953  MOBJECT rowfrm, rowfrm1;
1954 // int er;
1955  char buf[64];
1956 
1957  sprintf(buf, "OFFSET");
1958  MObjectSetText(pf, buf);
1959 
1960 
1961  rowfrm = MCreateRowForm(pf);
1962  MObjectSetBackgroundRGB(rowfrm, 80, 60, 0);
1963  MObjectSetResize(rowfrm, True, False);
1965 /*
1966  lbl = MCreateLabel(rowfrm, "HOME MODE", FIXED_SMALL);
1967  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1968  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
1969  MObjectSetTransparency(lbl, 0);
1970 
1971  tb = MCreateTableForm(rowfrm, 2);
1972  MObjectSetBackgroundRGB(tb, 80, 60, 0);
1973  MObjectSetResize(tb, True, True);
1974 
1975  if(DAS.Paramini.EqType == SPATRAM)
1976  {
1977  for(i=0;i<6;i++)
1978  FrmStepperHomeMode(i, tb);
1979  }
1980  else
1981  {
1982  for(i=0;i<4;i++)
1983  FrmStepperHomeMode(i, tb);
1984  }
1985 */
1986  //NOVA DIGITAL I/O
1987  rowfrm1 = MCreateRowForm(pf);
1988  MObjectSetBackgroundRGB(rowfrm1, 80, 60, 0);
1989  MObjectSetResize(rowfrm1, True, False);
1990  MObjectAlign(rowfrm1, CENTER_ALIGN, TOP_ALIGN);
1991 
1992 
1993  CONFP_AMS_SM_OFFSET(rowfrm, 0);
1994 
1995 
1996 }
1997 
1998 
1999 
2000 
2001 
2002 
2003 //void FrmStepperConfP(MOBJECT pf, int amsn)
2004 void CONFP_AMS(MOBJECT pf, int amsn)
2005 {
2006 
2007  char buf[64];
2008  MOBJECT lbl, tb, tb1, pb, pbh, rowform;
2009  int i;
2010 // double speedhz;
2011 // MOBJECT list;
2012 
2013  sprintf(buf, "AMS%d",amsn+1);
2014  MObjectSetText(pf, buf);
2015 
2016  tb = MCreateTableForm(pf, 3);
2017  MObjectSetBackgroundRGB(tb, 80, 60, 0);
2020 
2021  lbl = MCreateLabel(tb, "ADDRESS:", FIXED_SMALL);
2022  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2023  MObjectSetBackgroundRGB(lbl, 80, 60, 0);
2024  MObjectSetTransparency(lbl, 0);
2026  MObjectSetResize(lbl, True, True);
2027 
2028  sprintf(buf," %d ", amsn);
2029  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
2030  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2031  MObjectSetBackgroundRGB(lbl, 120, 100, 0);
2032  MObjectSetTransparency(lbl, 0);
2033  MObjectSetResize(lbl, True, True);
2034 
2035  pb = MCreatePButton(tb, "New Address", FIXED_SMALL);
2037  //MPButtonSetCallback(pb, TestFontCB, 0L);
2038  MObjectSetBackgroundRGB(pb, 224, 224, 176);
2040 
2041 
2042  tb1 = MCreateTableForm(pf, 3);
2043  MObjectSetBackgroundRGB(tb1, 80, 60, 0);
2044  MObjectSetResize(tb1, True, True);
2045 
2046 
2047  switch (amsn)
2048  {
2049  case 0:
2050  lbl = MCreateLabel(tb1, "SM-A, SM1 - MIRROR", FIXED_SMALL);
2051  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2052 
2053 
2054  lbl = MCreateLabel(tb1, "SM-B, SM2 - GRATING", FIXED_SMALL);
2055  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2056 
2057  lbl = MCreateLabel(tb1, "Help", FIXED_SMALL);
2058  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2059 
2060  break;
2061  case 1:
2062  lbl = MCreateLabel(tb1, "SM-A, SM3 - FILTERS ", FIXED_SMALL);
2063  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2064 
2065  lbl = MCreateLabel(tb1, "SM-B, SM4 - Not Conn", FIXED_SMALL);
2066  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2067 
2068  lbl = MCreateLabel(tb1, "Help", FIXED_SMALL);
2069  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2070 
2071  break;
2072  case 2:
2073  lbl = MCreateLabel(tb1, "SM-A, SM5 - ZENITH", FIXED_SMALL);
2074  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2075 
2076  lbl = MCreateLabel(tb1, "SM-B, SM6 - AZIMUTH", FIXED_SMALL);
2077  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2078 
2079  lbl = MCreateLabel(tb1, "Help", FIXED_SMALL);
2080  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2081 
2082  break;
2083  }
2084 
2085 
2086  for (i=0;i<2;i++)
2087  {
2088  //TabSingleMotor(amsn, i, tb1);
2089  CONFP_AMS_TabSingMotor(amsn, i, tb1);
2090  }
2091 
2092  /*****+++++++++++++++++++++++++++++++++******/
2093 
2094  //Help Buttons
2095  rowform = MCreateRowForm(tb1);
2096  MObjectSetResize(rowform, True, True);
2097  MObjectSetBackgroundRGB(rowform, 74, 60, 0);
2098  MObjectSetShadow(rowform, WS_NONE, 0, 0);
2099 
2100 
2101  for(i=0;i<6;i++)
2102  {
2103  pbh = MCreateImagePButtonExt(rowform, "sys\\qmarkyellow.bmp", "sys\\qmarkblue.bmp", "", "sys\\qmarkred.bmp", "", "");
2104  MButtonSetImageMaskByPixel(pbh, 0, 0);
2105  MObjectSetTransparency(pbh, 255);
2106  MObjectSetShadow(pbh, WS_NONE, 0, 0);
2107  MObjectSetBackgroundRGB(pbh, 74, 60, 0);
2108  MPButtonSetCallback(pbh, PBH_CB, (void *) i);
2109  MObjectSetResize(pbh, False, True);
2110  }
2111 
2112 
2113  /*****************************************************/
2114 
2115 
2116  CONFP_AMS_IOPort(pf, amsn);
2117 
2118 // FrmStepperOFFSET(pf, amsn);
2119 
2120 
2121 
2122 }
2123 
2124 void wledtCB(MOBJECT edit, char *text, void *ed)
2125 {
2126 
2127  int c = (int) ed;
2128 
2129  wl[c] = (int) strtod( text, &text );
2130 
2131 }
2132 
2133 
2134 void valwledt(MOBJECT edit, EDIT_VAL *ev, void *ii)
2135 {
2136  int c = (int) ii;
2137 
2138 
2139  if (ev->focus_leave == True)
2140  wl[c] = (int) strtod( ev->text, &ev->text );
2141 
2142 
2143 }
2144 
2145 
2146 void stedtCB(MOBJECT edit, char *text, void *ed)
2147 {
2148 
2149  int c = (int) ed;
2150 
2151  switch (c)
2152  {
2153 
2154  case 1:
2155  {
2156  DAS.Paramini.ITemp = strtod( text, &text );
2157  break;
2158  }
2159  }
2160 
2161 }
2162 
2163 void valstedt(MOBJECT edit, EDIT_VAL *ev, void *ii)
2164 {
2165  int c = (int) ii;
2166 
2167 
2168  if (ev->focus_leave == True)
2169  wav[c] = (long)strtod( ev->text, &ev->text );
2170 
2171 
2172 }
2173 
2174 
2175 
2176 
2177 
2178 /*******************************************************************************************/
2179 /*******************************************************************************************/
2180 int ApplyGeoCB(MOBJECT shell, void *od, void *ad)
2181 {
2182 
2183 
2184 
2185  FILE *fs;
2186  char str[180];
2187  char buff[_MAX_PATH];
2188 // int i;
2189 
2190 
2191  sprintf(buff, "%s\\GeoCoord.INI", BIL.DFILEM.CONFIGDIREQUIPMENT);
2192  fs = fopen(buff, "w");
2193  if(fs == NULL) return 1;
2194 
2195  sprintf(str, "Geographical Coordinates file for %s station.\n");
2196  fprintf(fs,str);
2197 
2198 
2199  sprintf(str, "%s Station name (3 CHAR)\n",DAS.DGeo.s_name);
2200  fprintf(fs,str);
2201 
2202  sprintf(str, "%.3f Latitude [ 90N, -90S]\n",DAS.DGeo.latitude);
2203  fprintf(fs,str);
2204 
2205  sprintf(str, "%.3f Longitude [ 0, 180 E],[-180 W, 0]\n",DAS.DGeo.longitude);
2206  fprintf(fs,str);
2207 
2208  sprintf(str, "%.3f Altitude [ masl]\n",DAS.DGeo.alititude);
2209  fprintf(fs,str);
2210 
2211  sprintf(str, "%d TimeZone\n",DAS.DGeo.timezone);
2212  fprintf(fs,str);
2213 
2214  fclose(fs);
2215 
2216  return 0;
2217 
2218 }
2219 //mode =0 --> DAS.DGeo.nitem; for deleting station
2220 //mode =1 --> DAS.DGeo.nitem++ ; for Adding Station
2221 int WriteGeo(int mode )
2222 {
2223 
2224  FILE *fs;
2225  char str[180];
2226  char buff[_MAX_PATH];
2227  int i;
2228 
2229 // if (mode)
2230 // DAS.DGeo.nitem++;
2231 
2232  sprintf(buff, "%s\\GeoDB.ini", BIL.DFILEM.CONFIGDIREQUIPMENT);
2233  fs = fopen(buff, "w");
2234 
2235 /*********************************/
2236 
2237 
2238  if(fs == NULL)
2239  {
2240  MMessageDialog("DAS information", "Problems in opening file", " Ok ", NULL);
2241  return 1;
2242  }
2243 
2244  sprintf(str, "Geographical Coordinates file.\n");
2245  fprintf(fs,str);
2246  sprintf(str, "the format is: \n");
2247  fprintf(fs,str);
2248  sprintf(str, "Station name ( Max 3 CHAR)\n");
2249  fprintf(fs,str);
2250  sprintf(str, "Latitude[90N,-90S] Longitude[0,180E],[-180W,0] Altitude(m/asl) TimeZone\n");
2251  fprintf(fs,str);
2252 
2253  for (i=0;i<DAS.DGeo.nitem;i++)
2254  {
2255 
2256  sprintf(str, "%s\n",DAS.DGeo.news_name[i]);
2257  fprintf(fs,str);
2258 
2259  sprintf(str, "%.3f %.3f %.3f %d\n", DAS.DGeo.newlatitude[i],
2260  DAS.DGeo.newlongitude[i],DAS.DGeo.newalititude[i],DAS.DGeo.newtimezone[i]);
2261  fprintf(fs,str);
2262 
2263 
2264 
2265  }
2266 
2267 
2268  fclose(fs);
2269 
2270  DAS.DGeo.flagnewstation = 0;
2271  sprintf(str,"The current coordinates have been saved in '%s\\GeoDB.ini' file", BIL.DFILEM.CONFIGDIREQUIPMENT);
2272  MMessageDialog("DAS information", str, " Ok ", NULL);
2273 
2274  return 0;
2275 
2276 
2277 
2278 }
2279 
2280 void DB_GeocoordCB(MOBJECT o, void *a, void *v)
2281 {
2282 
2283  int er = 0;
2284  int c = (int) v;
2285  char str[16];
2286 
2287 
2289 
2290  if(er)
2291  {
2292  if (c==100)
2293  {
2294 /* sprintf(str, "%s"," ");
2295  for(i=0;i<5;i++)
2296  MObjectSetText(DAS.DGeo.edit[i], str);
2297 
2298 
2299  MSelectObject(DAS.DGeo.edit[0]);
2300 
2301  DAS.DGeo.flagnewstation = 1;
2302  DAS.DGeo.selitem = DAS.DGeo.nitem;
2303 
2304 */
2305 
2306  }
2307  else
2308  {
2309 
2310  DAS.DGeo.selitem = c;
2311  sprintf(DAS.DGeo.s_name, "%s", DAS.DGeo.news_name[c]);
2312  MObjectSetText(DAS.DGeo.edit[0], DAS.DGeo.s_name);
2313 
2314  DAS.DGeo.latitude = DAS.DGeo.newlatitude[c];
2315  _gcvt(DAS.DGeo.latitude , 6, str );
2316  MObjectSetText(DAS.DGeo.edit[1], str);
2317 
2318  DAS.DGeo.longitude = DAS.DGeo.newlongitude[c];
2319  _gcvt(DAS.DGeo.longitude , 6, str );
2320  MObjectSetText(DAS.DGeo.edit[2], str);
2321 
2322  DAS.DGeo.timezone = DAS.DGeo.newtimezone[c];
2323  itoa(DAS.DGeo.timezone ,str, 10 );
2324  MObjectSetText(DAS.DGeo.edit[3], str);
2325 
2326 
2327  DAS.DGeo.alititude = DAS.DGeo.newalititude[c];
2328  _gcvt(DAS.DGeo.alititude , 6, str );
2329  MObjectSetText(DAS.DGeo.edit[4], str);
2330 
2331  }
2332  }
2333 
2334 }
2335 
2336 
2337 void Rebuildrb(int mode)
2338 {
2339 
2340  int i;
2341 // char buf[16];
2342 
2343 
2344 
2345  if (mode) //Delete Station
2346  for (i=0; i<DAS.DGeo.nitem+1; i++)
2347  MObjectDestroy(DAS.DGeo.rb[i]);
2348  else //Add Station
2349  for (i=0; i<DAS.DGeo.nitem-1; i++)
2350  MObjectDestroy(DAS.DGeo.rb[i]);
2351 
2352  for (i=0; i<DAS.DGeo.nitem; i++)
2353  {
2354  DAS.DGeo.rb[i] = MCreateRButton(DAS.DGeo.tbrb, DAS.DGeo.news_name[i], FIXED_SMALL);
2355  MPButtonSetCallback(DAS.DGeo.rb[i], DB_GeocoordCB, (void *) i);
2357  MObjectSetForegroundRGB(DAS.DGeo.rb[i], 255, 255, 255);
2358  MObjectSetCompositeWidth(DAS.DGeo.rb[i], 85);
2359  }
2360  if(DAS.DGeo.selitem>0)
2361  DAS.DGeo.selitem = DAS.DGeo.selitem -1;
2362  else
2363  DAS.DGeo.selitem = DAS.DGeo.selitem;
2364  MRButtonActivate(DAS.DGeo.rb[DAS.DGeo.selitem]);
2365 
2366 
2367 
2368 /*
2369  sprintf(buf, "%s", "New St.");
2370  DAS.DGeo.rb[DAS.DGeo.nitem] = MCreateRButton(DAS.DGeo.tbrb, buf, FIXED_SMALL);
2371  MPButtonSetCallback(DAS.DGeo.rb[DAS.DGeo.nitem], DB_GeocoordCB, (void *) 100);
2372  MObjectAlign(DAS.DGeo.rb[DAS.DGeo.nitem], LEFT_ALIGN, UNDEF_ALIGN);
2373  MObjectSetForegroundRGB(DAS.DGeo.rb[DAS.DGeo.nitem], 255, 255, 255);
2374  MObjectSetCompositeWidth(DAS.DGeo.rb[DAS.DGeo.nitem], 85);
2375 */
2376 }
2377 
2378 
2379 int StoreGeoCB(MOBJECT shell, void *od, void *ad)
2380 {
2381 
2382  int er = 0;
2383 
2384  er = WriteGeo(1);
2385  Rebuildrb(0);
2386 
2387  return 0;
2388 
2389 
2390 }
2391 
2392 int AddStCB(MOBJECT shell, void *od, void *ad)
2393 {
2394 
2395  int er = 0, i;
2396  char str[16];
2397 
2398  sprintf(str, "%s"," ");
2399  for(i=0;i<5;i++)
2400  MObjectSetText(DAS.DGeo.edit[i], str);
2401 
2402 
2403  MSelectObject(DAS.DGeo.edit[0]);
2404 
2405  DAS.DGeo.flagnewstation = 1;
2406  DAS.DGeo.nitem++;
2407  DAS.DGeo.selitem = DAS.DGeo.nitem-1;
2408  return 0;
2409 
2410 
2411 }
2412 
2413 
2414 
2415 int DeleteGeoCB(MOBJECT shell, void *od, void *ad)
2416 {
2417 
2418  int c,i;
2419  char buf[80];
2420 
2421  c=DAS.DGeo.selitem;
2422 
2423  for (i=0;i<c-1;i++)
2424  {
2425 
2426  DAS.DGeo.news_name[i];
2427 
2428  }
2429 
2430  for (i=c+1;i<DAS.DGeo.nitem;i++)
2431  {
2432  sprintf(buf,"%s", DAS.DGeo.news_name[i]);
2433  sprintf(DAS.DGeo.news_name[i-1], "%s",buf);
2434 
2435  DAS.DGeo.newlatitude[i-1] = DAS.DGeo.newlatitude[i];
2436  DAS.DGeo.newlongitude[i-1] = DAS.DGeo.newlongitude[i];
2437  DAS.DGeo.newalititude[i-1] = DAS.DGeo.newalititude[i];
2438  DAS.DGeo.newtimezone[i-1] = DAS.DGeo.newtimezone[i];
2439 
2440 
2441 
2442  }
2443 
2444  sprintf(buf,"%s", DAS.DGeo.news_name[DAS.DGeo.nitem]);
2445  sprintf(DAS.DGeo.news_name[DAS.DGeo.nitem-1], "%s",buf);
2446 
2447  DAS.DGeo.newlatitude[DAS.DGeo.nitem-1] = DAS.DGeo.newlatitude[DAS.DGeo.nitem];
2448  DAS.DGeo.newlongitude[DAS.DGeo.nitem-1] = DAS.DGeo.newlongitude[DAS.DGeo.nitem];
2449  DAS.DGeo.newalititude[DAS.DGeo.nitem-1] = DAS.DGeo.newalititude[DAS.DGeo.nitem];
2450  DAS.DGeo.newtimezone[DAS.DGeo.nitem-1] = DAS.DGeo.newtimezone[DAS.DGeo.nitem];
2451 
2452 
2453 
2454 
2455 
2456  DAS.DGeo.nitem--;
2457 
2458  DAS.DGeo.selitem = c;
2459 
2460  WriteGeo(0);
2461 
2462  Rebuildrb(1);
2463 
2464 /*
2465  sprintf(str, "%.3f %.3f %.3f %d\n", DAS.DGeo.newlatitude[i],
2466  DAS.DGeo.newlongitude[i],DAS.DGeo.newalititude[i],DAS.DGeo.newtimezone[i]);
2467  fprintf(fs,str);
2468 */
2469 
2470  return 0;
2471 
2472 }
2473 
2474 
2475 
2476 void DGeoeditCB(MOBJECT edit, EDIT_VAL *ev, void *ii)
2477 {
2478  int c = (int) ii;
2479 
2480  switch (c)
2481  {
2482  case 0:
2483  sprintf(DAS.DGeo.news_name[DAS.DGeo.selitem ], "%s", ev->text);
2484  break;
2485  case 1:
2486  DAS.DGeo.newlatitude[DAS.DGeo.selitem ] = (float)strtod( ev->text, &ev->text );
2487  break;
2488  case 2:
2489  DAS.DGeo.newlongitude[DAS.DGeo.selitem] = (float)strtod( ev->text, &ev->text );
2490 
2491  break;
2492  case 3:
2493  DAS.DGeo.newtimezone[DAS.DGeo.selitem ] = atoi( ev->text);
2494 
2495  break;
2496  case 4:
2497  DAS.DGeo.newalititude[DAS.DGeo.selitem] = (float)strtod( ev->text, &ev->text );
2498  break;
2499 
2500  }
2501 
2502 }
2503 
2504 
2505 
2506 
2507 
2508 
2509 void DB_StorePB(MOBJECT obj, MAnyWindowEvent *pe, void *a_data)
2510 {
2511 
2512  if(DAS.DGeo.flagnewstation)
2513  MObjectSetSensitive(obj);
2514  else
2515  MObjectSetUnsensitive(obj);
2516 
2517 
2518 }
2519 
2520 
2521 /******************************************************/
2522 void DSZArb_CB(MOBJECT o, void *a, void *v)
2523 {
2524 
2525  int er = 0;
2526  int c = (int) v;
2527 // char str[16];
2528 
2529 
2530  switch (c)
2531  {
2532  case 0:
2533  DAS.Flag.DeltaSZA = 0;
2537  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtDSZA, 192, 192, 192);
2538  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[0], 192, 192, 192);
2539  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[1], 192, 192, 192);
2543 
2544  break;
2545 
2546  case 1:
2547  DAS.Flag.DeltaSZA = 1;
2552  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[0], 40, 96, 72);
2553  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[1], 40, 96, 72);
2557 
2558  break;
2559  }
2560 }
2561 
2562 
2563 void edtDSZA_CB(MOBJECT p, LIST_ACT *la, void *ad)
2564 {
2565 
2566  int c = (int) ad;
2567  int er = 0;
2568 
2569 
2570  SZADelta.DeltaSZA = atof(la->item);
2571 
2572 
2573 }
2574 
2575 
2576 void edtSZA_CB(MOBJECT p, LIST_ACT *la, void *ad)
2577 {
2578 
2579  int c = (int) ad;
2580  int er = 0;
2581 
2582 
2583  switch (c)
2584  {
2585  case 0:
2586  SZADelta.MinSZA=atof(la->item);
2587  break;
2588 
2589  case 1:
2590  SZADelta.MaxSZA=atof(la->item);
2591 
2592  break;
2593  }
2594 
2595 
2596 }
2597 
2598 void CONFP_param_page5(int mod, MOBJECT obj)
2599 {
2600 
2601  MOBJECT rowform1; // generic row form
2602 // MOBJECT wledt; // generic edit object
2603 // MOBJECT stedt; // generic edit object
2604 // MOBJECT colform;
2605  MOBJECT pb;
2606 // MOBJECT list;
2607 // MOBJECT _tbutton000;
2608 // MOBJECT _tbutton001;
2609 // MOBJECT form2;
2610  MOBJECT lbl;
2611  MOBJECT tb; // generic table object
2612 // char buf[64];
2613  int k=0;
2614  float f=0;
2615 // FILE *fd;
2616 // char str[80];
2617 // char buff[_MAX_PATH];
2618 
2619 // LIST_ACT * pla;
2620 
2621  MObjectSetText(obj, "Page 5");
2622 
2623 
2624  lbl = MCreateLabel(obj, "INSTALLED FILTERS", FIXED_SMALL);
2625  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2626  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
2627  MObjectSetTransparency(lbl, 0);
2628 
2629 
2630 /* tb = MCreateTableForm(obj, 3);
2631  MObjectSetBackgroundRGB(tb, 112, 128, 112);
2632  MObjectSetBackgroundRGB(tb, 56, 112, 112);
2633  MObjectSetResize(tb, True,False);
2634 
2635  DAS.Gui.ConfigPanel.rbDSZA[0] = MCreateRButton(tb, "Continuous", FIXED_SMALL);
2636  MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDSZA[0], DSZArb_CB, (void *) 0);
2637  MObjectAlign(DAS.Gui.ConfigPanel.rbDSZA[0], LEFT_ALIGN, UNDEF_ALIGN);
2638  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDSZA[0], 255, 255, 255);
2639  MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbDSZA[0], 100);
2640 
2641 
2642  DAS.Gui.ConfigPanel.rbDSZA[1] = MCreateRButton(tb, "DeltaSZA", FIXED_SMALL);
2643  MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDSZA[1], DSZArb_CB, (void *) 1);
2644  MObjectAlign(DAS.Gui.ConfigPanel.rbDSZA[1], LEFT_ALIGN, UNDEF_ALIGN);
2645  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDSZA[1], 255, 255, 255);
2646  MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbDSZA[1], 100);
2647 
2648 
2649 
2650  tb = MCreateTableForm(obj, 2);
2651  MObjectSetBackgroundRGB(tb, 112, 128, 112);
2652  MObjectSetBackgroundRGB(tb, 56, 112, 112);
2653  MObjectSetResize(tb, True,False);
2654 
2655 
2656  DAS.Gui.ConfigPanel.lblSZA[0] = MCreateLabel(tb, "DeltaSZA (deg):", FIXED_SMALL);
2657  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 255, 255, 255);
2658  //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255);
2659  MObjectSetTransparency(DAS.Gui.ConfigPanel.lblSZA[0], 0);
2660 
2661  sprintf(buff, "%.3f", SZADelta.DeltaSZA);
2662  DAS.Gui.ConfigPanel.edtDSZA = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL);
2663  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtDSZA, 255, 255, 255);
2664  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtDSZA, 40, 96, 72);
2665  MObjectAlign(DAS.Gui.ConfigPanel.edtDSZA, CENTER_ALIGN, TOP_ALIGN);
2666  MEditDisableEditing(DAS.Gui.ConfigPanel.edtDSZA);
2667 
2668 
2669  list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtDSZA);
2670  for(i=0; i<20; i++)
2671  {
2672  f = f+0.10;
2673  sprintf(str, "%.3f",f);
2674  MSListAddItem(list, str, 0L);
2675  if( strcmp(str,buff) ==0 )
2676  k=i;
2677 
2678  }
2679 
2680  MSListSelectElement(list, k);
2681  pla = MSListGetSelected(list);
2682  sprintf(str, "%s", pla->item );
2683  MObjectSetText(DAS.Gui.ConfigPanel.edtDSZA, str);
2684  MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDSZA, edtDSZA_CB, (void *) 0);
2685  SZADelta.DeltaSZA = atof(pla->item);
2686 
2687 
2688 
2689 
2690 
2691  DAS.Gui.ConfigPanel.lblSZA[1] = MCreateLabel(tb, "SZA Min. (deg):", FIXED_SMALL);
2692  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[1], 255, 255, 255);
2693  //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255);
2694  MObjectSetTransparency(DAS.Gui.ConfigPanel.lblSZA[1], 0);
2695 
2696 
2697  sprintf(buff, "%d", (int)SZADelta.MinSZA);
2698  DAS.Gui.ConfigPanel.edtSZA[0] = MCreateOptionEdit(tb, buff, 3, 3, 8, FIXED_SMALL);
2699  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtSZA[0], 255, 255, 255);
2700  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[0], 40, 96, 72);
2701  MObjectAlign(DAS.Gui.ConfigPanel.edtSZA[0], CENTER_ALIGN, TOP_ALIGN);
2702  MEditDisableEditing(DAS.Gui.ConfigPanel.edtSZA[0]);
2703  list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtSZA[0]);
2704  for(i=0; i<21; i++)
2705  {
2706 
2707  sprintf(str, "%d",i);
2708  MSListAddItem(list, str, 0L);
2709  if( strcmp(str,buff) ==0 )
2710  k=i;
2711  }
2712  MSListSelectElement(list, k);
2713  pla = MSListGetSelected(list);
2714  sprintf(str, "%s", pla->item );
2715  MObjectSetText(DAS.Gui.ConfigPanel.edtSZA[0], str);
2716  MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtSZA[0], edtSZA_CB, (void *) 0);
2717  SZADelta.MinSZA = atof(pla->item);
2718 
2719 
2720 
2721  DAS.Gui.ConfigPanel.lblSZA[2] = MCreateLabel(tb, "SZA Max. (deg):", FIXED_SMALL);
2722  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[2], 255, 255, 255);
2723  //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255);
2724  MObjectSetTransparency(DAS.Gui.ConfigPanel.lblSZA[2], 0);
2725 
2726  sprintf(buff, "%d", (int)SZADelta.MaxSZA);
2727  DAS.Gui.ConfigPanel.edtSZA[1] = MCreateOptionEdit(tb, buff, 3, 3, 8, FIXED_SMALL);
2728  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtSZA[1], 255, 255, 255);
2729  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[1], 40, 96, 72);
2730  MObjectAlign(DAS.Gui.ConfigPanel.edtSZA[1], CENTER_ALIGN, TOP_ALIGN);
2731  MEditDisableEditing(DAS.Gui.ConfigPanel.edtSZA[1]);
2732  list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtSZA[1]);
2733  starti = 20;
2734  for(i=starti; i<161; i++)
2735  {
2736 
2737  sprintf(str, "%d",i);
2738  MSListAddItem(list, str, 0L);
2739  if( strcmp(str,buff) ==0 )
2740  k=i - starti;
2741 
2742  }
2743  MSListSelectElement(list, k);
2744  pla = MSListGetSelected(list);
2745  sprintf(str, "%s", pla->item );
2746  MObjectSetText(DAS.Gui.ConfigPanel.edtSZA[1], str);
2747  MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtSZA[1], edtSZA_CB, (void *) 1);
2748  SZADelta.MaxSZA = atof(pla->item);
2749 
2750 
2751 
2752  if(DAS.Flag.DeltaSZA)
2753  MRButtonActivate(DAS.Gui.ConfigPanel.rbDSZA[1]);
2754  else
2755  MRButtonActivate(DAS.Gui.ConfigPanel.rbDSZA[0]);
2756 
2757 */
2758 
2759 
2760  tb = MCreateTableForm(obj, 2);
2761  MObjectSetBackgroundRGB(tb, 112, 128, 112);
2762  MObjectSetBackgroundRGB(tb, 56, 112, 112);
2763  MObjectSetResize(tb, True, True);
2764 
2765 
2766 
2767  // Command Button Section
2768  /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/
2769  rowform1 = MCreateTableForm(obj, 3);
2770  MObjectSetBackgroundRGB(rowform1, 56, 112, 112);
2771 // MObjectSetResize(rowform1, False, False);
2772  MObjectSetCompositeWidth(rowform1, 347);
2773 /*
2774  pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL);
2775  MPButtonSetCallback(pb, ApplyGeoCB, (void *) 0);
2776  if((DAS.Flag.exemode == DOASMODE))
2777  MObjectSetUnsensitive(pb); // Set the button as Unensitive
2778  MObjectSetBackgroundRGB(pb, 224, 224, 176);
2779  MObjectSetCompositeWidth(pb, 70);
2780  MObjectSetPopupHelp(pb,"Apply the selected setting to DAS (and write to file ..GeoCoord.ini)" , 200, 5000);
2781 
2782 */
2783 
2784 
2785  pb = MCreatePButton(rowform1, "Save", FIXED_SMALL);
2786  MPButtonSetCallback(pb, WriteOptioniniCB, (void *) 0);
2787  MObjectSetBackgroundRGB(pb, 224, 224, 176);
2788  MObjectSetCompositeWidth(pb, 74);
2789 
2790  pb = MCreatePButton(rowform1, "Close", FIXED_SMALL);
2792  MObjectSetBackgroundRGB(pb, 224, 224, 176);
2793  MObjectSetCompositeWidth(pb, 74);
2794  MObjectSetPopupHelp(pb,"Close Config Panel" , 200, 5000);
2795  /* End Command Button Section æææææææææææææææææææææææææææææææææææ/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ } void CONFP_param_page4(int mod, MOBJECT obj) { MOBJECT rowform1; // generic row form // MOBJECT wledt; // generic edit object // MOBJECT stedt; // generic edit object // MOBJECT colform; MOBJECT pb; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; MOBJECT lbl, list; MOBJECT tb; // generic table object // char buf[64]; int i, k=0, starti; float f=0; // FILE *fd; char str[80]; char buff[_MAX_PATH]; LIST_ACT * pla; MObjectSetText(obj, "Page 4"); lbl = MCreateLabel(obj, "Measurement Scheduling", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True,False); DAS.Gui.ConfigPanel.rbDSZA[0] = MCreateRButton(tb, "Continuous", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDSZA[0], DSZArb_CB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbDSZA[0], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDSZA[0], 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbDSZA[0], 100); DAS.Gui.ConfigPanel.rbDSZA[1] = MCreateRButton(tb, "DeltaSZA", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDSZA[1], DSZArb_CB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbDSZA[1], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDSZA[1], 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbDSZA[1], 100); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True,False); DAS.Gui.ConfigPanel.lblSZA[0] = MCreateLabel(tb, "DeltaSZA (deg):", FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 255, 255, 255); //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblSZA[0], 0); sprintf(buff, "%.3f", SZADelta.DeltaSZA); DAS.Gui.ConfigPanel.edtDSZA = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtDSZA, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtDSZA, 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edtDSZA, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.edtDSZA); list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtDSZA); for(i=0; i<20; i++) { f = f+(float)0.10; sprintf(str, "%.3f",f); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDSZA, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDSZA, edtDSZA_CB, (void *) 0); SZADelta.DeltaSZA = atof(pla->item); DAS.Gui.ConfigPanel.lblSZA[1] = MCreateLabel(tb, "SZA Min. (deg):", FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[1], 255, 255, 255); //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblSZA[1], 0); sprintf(buff, "%d", (int)SZADelta.MinSZA); DAS.Gui.ConfigPanel.edtSZA[0] = MCreateOptionEdit(tb, buff, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtSZA[0], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[0], 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edtSZA[0], CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.edtSZA[0]); list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtSZA[0]); for(i=0; i<21; i++) { sprintf(str, "%d",i); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtSZA[0], str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtSZA[0], edtSZA_CB, (void *) 0); SZADelta.MinSZA = atof(pla->item); DAS.Gui.ConfigPanel.lblSZA[2] = MCreateLabel(tb, "SZA Max. (deg):", FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[2], 255, 255, 255); //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblSZA[2], 0); sprintf(buff, "%d", (int)SZADelta.MaxSZA); DAS.Gui.ConfigPanel.edtSZA[1] = MCreateOptionEdit(tb, buff, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtSZA[1], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[1], 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edtSZA[1], CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.edtSZA[1]); list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtSZA[1]); starti = 20; for(i=starti; i<161; i++) { sprintf(str, "%d",i); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i - starti; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtSZA[1], str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtSZA[1], edtSZA_CB, (void *) 1); SZADelta.MaxSZA = atof(pla->item); if(DAS.Flag.DeltaSZA) MRButtonActivate(DAS.Gui.ConfigPanel.rbDSZA[1]); else MRButtonActivate(DAS.Gui.ConfigPanel.rbDSZA[0]); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, True); // Command Button Section /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/ rowform1 = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); // MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); /* pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL); MPButtonSetCallback(pb, ApplyGeoCB, (void *) 0); if((DAS.Flag.exemode == DOASMODE)) MObjectSetUnsensitive(pb); // Set the button as Unensitive MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); MObjectSetPopupHelp(pb,"Apply the selected setting to DAS (and write to file ..GeoCoord.ini)" , 200, 5000); */ pb = MCreatePButton(rowform1, "Save", FIXED_SMALL); MPButtonSetCallback(pb, WriteOptioniniCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(rowform1, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); MObjectSetPopupHelp(pb,"Close Config Panel" , 200, 5000); /* End Command Button Section æææææææææææææææææææææææææææææææææææ*/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ } void CONFP_param_page3(int mod, MOBJECT obj) { MOBJECT rowform1; // generic row form // MOBJECT wledt; // generic edit object // MOBJECT stedt; // generic edit object MOBJECT pb; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; MOBJECT lbl; MOBJECT tb; // generic table object char buf[64]; int i, k=0; // FILE *fd; // char str[80]; // char buff[_MAX_PATH]; MObjectSetText(obj, "Page 3"); lbl = MCreateLabel(obj, "Station Geo. Coordinates", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Actual Setting" ); lbl = MCreateLabel(obj, buf, FIXED_SMALL); MLabelSetAlignment(lbl, CENTER_ALIGN); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 5); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, False); sprintf(buf, "Stat." ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Lat." ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Long." ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "TZ" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Alt." ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%s", DAS.DGeo.s_name ); DAS.DGeo.edit[0] = MCreateEdit(tb, buf, 3, FIXED_SMALL); MObjectAlign(DAS.DGeo.edit[0] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.edit[0] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.DGeo.edit[0] , 40, 96, 72); MEditSetValCallback(DAS.DGeo.edit[0] , DGeoeditCB, (void *) 0); sprintf(buf, "%.2f", DAS.DGeo.latitude ); DAS.DGeo.edit[1] = MCreateEdit(tb, buf, 7, FIXED_SMALL); MObjectAlign(DAS.DGeo.edit[1] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.edit[1] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.DGeo.edit[1] , 40, 96, 72); MEditSetValCallback(DAS.DGeo.edit[1] , DGeoeditCB, (void *) 1); sprintf(buf, "%.2f", DAS.DGeo.longitude ); DAS.DGeo.edit[2] = MCreateEdit(tb, buf, 7, FIXED_SMALL); MObjectAlign(DAS.DGeo.edit[2] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.edit[2] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.DGeo.edit[2] , 40, 96, 72); MEditSetValCallback(DAS.DGeo.edit[2] , DGeoeditCB, (void *) 2); sprintf(buf, "%d", DAS.DGeo.timezone ); DAS.DGeo.edit[3] = MCreateEdit(tb, buf, 4, FIXED_SMALL); MObjectAlign(DAS.DGeo.edit[3] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.edit[3] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.DGeo.edit[3] , 40, 96, 72); MEditSetValCallback(DAS.DGeo.edit[3] , DGeoeditCB, (void *) 3); sprintf(buf, "%.1f", DAS.DGeo.alititude); DAS.DGeo.edit[4] = MCreateEdit(tb, buf, 7, FIXED_SMALL); MObjectAlign(DAS.DGeo.edit[4] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.edit[4] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.DGeo.edit[4] , 40, 96, 72); MEditSetValCallback(DAS.DGeo.edit[4] , DGeoeditCB, (void *) 4); DAS.DGeo.tbrb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(DAS.DGeo.tbrb, 112, 128, 112); MObjectSetBackgroundRGB(DAS.DGeo.tbrb, 56, 112, 112); MObjectSetResize(DAS.DGeo.tbrb, True,False); // sprintf(buff, "%s\\GeoDB.ini", BIL.DFILEM.CONFIGDIREQUIPMENT); // fd = fopen(buff, "r"); // if(fd == NULL) return 1; // fgets(str, 80, fd); // Read Header // fscanf(fd, "%d", &DAS.DGeo.nitem); // fgets(str, 80, fd); for (i=0; i<DAS.DGeo.nitem; i++) { // fscanf(fd, "%hs",&DAS.DGeo.news_name[i]); DAS.DGeo.rb[i] = MCreateRButton(DAS.DGeo.tbrb, DAS.DGeo.news_name[i], FIXED_SMALL); MPButtonSetCallback(DAS.DGeo.rb[i], DB_GeocoordCB, (void *) i); MObjectAlign(DAS.DGeo.rb[i], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.rb[i], 255, 255, 255); MObjectSetCompositeWidth(DAS.DGeo.rb[i], 85); // fscanf(fd, "%lf %lf %lf %d", &DAS.DGeo.newlatitude[i], // &DAS.DGeo.newlongitude[i],&DAS.DGeo.newalititude[i],&DAS.DGeo.newtimezone[i]); if( strcmp(DAS.DGeo.s_name,DAS.DGeo.news_name[i]) ==0 ) { MRButtonActivate(DAS.DGeo.rb[i]); DAS.DGeo.selitem = i; } } // fclose(fd); /* sprintf(buf, "%s", "New St."); DAS.DGeo.rb[DAS.DGeo.nitem] = MCreateRButton(DAS.DGeo.tbrb, buf, FIXED_SMALL); MPButtonSetCallback(DAS.DGeo.rb[DAS.DGeo.nitem], DB_GeocoordCB, (void *) 100); MObjectAlign(DAS.DGeo.rb[DAS.DGeo.nitem], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.rb[DAS.DGeo.nitem], 255, 255, 255); MObjectSetCompositeWidth(DAS.DGeo.rb[DAS.DGeo.nitem], 85); */ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, True); pb = MCreatePButton(tb, "Add St.", FIXED_SMALL); //MObjectSetUnsensitive(pb); MPButtonSetCallback(pb, AddStCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); //MObjectAddEventNotifyCallback(pb, (OBJ_EVENT_CB) DB_StorePB, EM_MOTION, NULL); MObjectSetPopupHelp(pb,"Add a new station " , 200, 5000); MObjectAlign(pb, UNDEF_ALIGN, BOTTOM_ALIGN); pb = MCreatePButton(tb, "Delete", FIXED_SMALL); //MObjectSetUnsensitive(pb); MPButtonSetCallback(pb, DeleteGeoCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); //MObjectAddEventNotifyCallback(pb, (OBJ_EVENT_CB) DB_StorePB, EM_MOTION, NULL); MObjectSetPopupHelp(pb,"Delete the selected station" , 200, 5000); MObjectAlign(pb, UNDEF_ALIGN, BOTTOM_ALIGN); // Command Button Section /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/ rowform1 = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); // MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL); MPButtonSetCallback(pb, ApplyGeoCB, (void *) 0); if((DAS.Flag.exemode == DOASMODE)) MObjectSetUnsensitive(pb); // Set the button as Unensitive MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); MObjectSetPopupHelp(pb,"Apply the selected setting to DAS (and write to file ..GeoCoord.ini)" , 200, 5000); pb = MCreatePButton(rowform1, "Store", FIXED_SMALL); MObjectSetUnsensitive(pb); MPButtonSetCallback(pb, StoreGeoCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); MObjectAddEventNotifyCallback(pb, (OBJ_EVENT_CB) DB_StorePB, EM_MOTION, NULL); MObjectSetPopupHelp(pb,"If a new station has been created store it in ..GeoDB.ini" , 200, 5000); pb = MCreatePButton(rowform1, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); MObjectSetPopupHelp(pb,"Close Config Panel" , 200, 5000); /* End Command Button Section æææææææææææææææææææææææææææææææææææ*/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ } void CONFP_param_page2(int mod, MOBJECT obj) { MOBJECT rowform, rowform1; // generic row form MOBJECT wledt; // generic edit object MOBJECT stedt; // generic edit object MOBJECT pb ; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; MOBJECT lbl; MOBJECT tb; // generic table object char buf[64]; int i; MObjectSetText(obj, "Page 2"); lbl = MCreateLabel(obj, "Ref. Wavelength and Grating positioning", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); rowform = MCreateColForm(obj); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetBackgroundRGB(rowform, 56, 112, 112); MObjectAlign(rowform, LEFT_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); MTableFormSetColAlign(tb, 0, TOP_ALIGN); MObjectSetResize(tb, False, True); //for(i=0;i<2;i++) //{ sprintf(buf, "Win" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Cent.Wl" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Steps" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); // } for(i=0;i<9;i++) { sprintf(buf, "%d", i); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%d", wl[i]); wledt = MCreateEdit(tb, buf, 5, FIXED_SMALL); MObjectAlign(wledt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(wledt, 255, 255, 255); MObjectSetBackgroundRGB(wledt, 40, 96, 72); MEditSetValCallback(wledt, valwledt, (void *) i); //MEditSetActCallback(wledt, wledtCB, (void *) i); sprintf(buf, "%d", wav[i]); stedt = MCreateEdit(tb, buf, 8, FIXED_SMALL); MObjectAlign(stedt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(stedt, 255, 255, 255); MObjectSetBackgroundRGB(stedt, 40, 96, 72); MEditSetValCallback(stedt, valstedt, (void *) i); //MEditSetActCallback(stedt, stedtCB, (void *) i); } tb = MCreateTableForm(rowform, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); MTableFormSetColAlign(tb, 0, TOP_ALIGN); MObjectSetResize(tb, False, True); sprintf(buf, "Win" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Cent.Wl" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Steps" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); for(i=9;i<18;i++) { sprintf(buf, "%d", i); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%d", wl[i]); wledt = MCreateEdit(tb, buf, 5, FIXED_SMALL); MObjectAlign(wledt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(wledt, 255, 255, 255); MObjectSetBackgroundRGB(wledt, 40, 96, 72); MEditSetValCallback(wledt, valwledt, (void *) i); //MEditSetActCallback(wledt, wledtCB, (void *) i); sprintf(buf, "%d", wav[i]); stedt = MCreateEdit(tb, buf, 8, FIXED_SMALL); MObjectAlign(stedt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(stedt, 255, 255, 255); MObjectSetBackgroundRGB(stedt, 40, 96, 72); MEditSetValCallback(stedt, valstedt, (void *) i); //MEditSetActCallback(stedt, stedtCB, (void *) i); } // Command Button Section /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/ rowform1 = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); // MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL); //MPButtonSetCallback(pb, ApplyChCB, (void *) 0); //if((DAS.Flag.exemode == DOASMODE) | (DAS.Flag.exemode == DBDEMO)) MObjectSetUnsensitive(pb); // Set the button as Unensitive MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(rowform1, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WritewlstepiniCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(rowform1, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); /* End Command Button Section æææææææææææææææææææææææææææææææææææ*/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ } void edtCCDOffSet_CB(MOBJECT p, LIST_ACT *la, void *ad) { int c = (int) ad; int er = 0; DAS.Marconi.Offset = atoi(la->item); if(DAS.Flag.exemode != DBDEMO) DC_SetUsrGain(0, 0 , DAS.Marconi.Offset , 0); } void CONFP_param_page1(int mod, MOBJECT obj) { MOBJECT rowform1; // generic row form MOBJECT edit; // generic edit object MOBJECT pb, rb ; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; MOBJECT lbl; MOBJECT tb; // generic table object char buf[64]; int i, k, *p; MOBJECT list; int t=0; char str[80]; char buff[_MAX_PATH]; LIST_ACT * pla; MObjectSetText(obj, "Page 1"); /******************************************************************************************************************/ //Equipment Type section /*--------- Start ----------------*/ lbl = MCreateLabel(obj, "Equipment Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(obj, 3); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); // Instrument Type(0 = SPATRAM, // 1 = TROPOGAS, 2 = LIS, // 3 = SPATRAMPLUS, 4 = GASCODNG, ) rb = MCreateRButton(tb, "SPATRAMPLUS", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 3); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 3) MRButtonActivate(rb); rb = MCreateRButton(tb, "SPATRAM2", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 9); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 9) MRButtonActivate(rb); rb = MCreateRButton(tb, "SPATRAM3", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 10); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 10) MRButtonActivate(rb); /* rb = MCreateRButton(tb, "SPATRAM", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if( DAS.Paramini.EqType == 0) MRButtonActivate(rb); */ rb = MCreateRButton(tb, "TROPOGAS", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Paramini.EqType == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "LIS", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Paramini.EqType == 2) MRButtonActivate(rb); rb = MCreateRButton(tb, "GASCODNG1", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 4); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Paramini.EqType == 4) MRButtonActivate(rb); /* rb = MCreateRButton(tb, "GASCODOffAxis", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 5); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 5) MRButtonActivate(rb); */ rb = MCreateRButton(tb, "GASCODNG2", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 6); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 6) MRButtonActivate(rb); rb = MCreateRButton(tb, "GASCODNG3", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 7); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 7) MRButtonActivate(rb); rb = MCreateRButton(tb, "GASCODNG4", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 8); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 8) MRButtonActivate(rb); /* pb = MCreatePButton(tb, "Save", FIXED_SMALL); MPButtonSetCallback(pb, WriteEquipiniCB, 0); MObjectAlign(pb, LEFT_ALIGN, UNDEF_ALIGN); //MObjectSetForegroundRGB(pb, 255, 255, 255); MObjectSetCompositeWidth(pb, 105); */ //CCD & OMU Temperature section /*--------- Start ----------------*/ lbl = MCreateLabel(obj, "CCD & OMU Temp", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(obj, 2); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, False); MObjectSetCompositeWidth(tb, 347); lbl = MCreateLabel(tb, "CCD Target Temperature:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%.1lf", DAS.Paramini.ITemp); edit = MCreateEdit(tb, buf, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MEditSetValCallback(edit, ValidateCB, (void *) 1); MEditSetActCallback(edit, ActEditCB, (void *) 1); lbl = MCreateLabel(tb, "CCD Peltier Init Power:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%.1lf%%",(double)DAS.Paramini.CoolPw / 10); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MEditSetValCallback(edit, ValidateCB, (void *) 2); MEditSetActCallback(edit, ActEditCB, (void *) 2); lbl = MCreateLabel(tb, "Optical Unit Target Temp:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); sprintf(buf, "%.1lf", DAS.Paramini.TPelt); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MEditSetValCallback(edit, ValidateCB, (void *) 3); MEditSetActCallback(edit, ActEditCB, (void *) 3); lbl = MCreateLabel(tb, "OMU Peltier Init Power:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%.1lf%%",(double)OMUTHR.PCPower / 10); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MEditSetValCallback(edit, ValidateCB, (void *) 2000); MEditSetActCallback(edit, ActEditCB, (void *) 2000); /*------------------- End CCD & OMU Temperature section -------------*/ //CCD Window and vertical binning section /*##################### Start ##################################################*/ lbl = MCreateLabel(obj, "CCD WINDOW - SETUP", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectSetCompositeWidth(lbl, 347); rowform1 = MCreateRowForm(obj); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); //357 MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform1, 4); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetResize(tb, True, True); // MObjectSetCompositeWidth(tb, 347); MObjectSetShadow(tb, WS_NONE, 0, 0); lbl = MCreateLabel(tb, "X Start:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",DAS.Paramini.ccdXoff); //sprintf(buf, "%d",(DC_CCD.dx - DC_CCD.dx)); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MEditSetValCallback(edit, ValidateCB, (void *) 4); MEditSetActCallback(edit, ActEditCB, (void *) 4); //MEditDisableEditing(edit); lbl = MCreateLabel(tb, "X End:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",DAS.Paramini.ccdWx); //sprintf(buf, "%d",DC_CCD.dx); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MEditSetValCallback(edit, ValidateCB, (void *) 5); MEditSetActCallback(edit, ActEditCB, (void *) 5); // MEditDisableEditing(edit); lbl = MCreateLabel(tb, "Y Start:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",DAS.Paramini.ccdYoff); //sprintf(buf, "%d", (DC_CCD.dy-DC_CCD.dy)); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MEditSetValCallback(edit, ValidateCB, (void *) 6); MEditSetActCallback(edit, ActEditCB, (void *) 6); // MEditDisableEditing(edit); lbl = MCreateLabel(tb, "Y End:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",DAS.Paramini.ccdWy); //sprintf(buf, "%d",DC_CCD.dy); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MEditSetValCallback(edit, ValidateCB, (void *) 7); MEditSetActCallback(edit, ActEditCB, (void *) 7); // MEditDisableEditing(edit); tb = MCreateTableForm(rowform1, 3); MTableFormSetColAlign(tb, 0, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); MObjectSetShadow(tb, WS_NONE, 0, 0); lbl = MCreateLabel(tb, "Vertical Binning:", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); sprintf(buf, "%d",DAS.Paramini.VBin); edit = MCreateClippedEdit(tb, buf, 3, 3, FIXED_SMALL); MObjectAlign(edit, RIGHT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MEditSetValCallback(edit, ValidateCB, (void *) 8); MEditSetActCallback(edit, ActEditCB, (void *) 8); pb = MCreatePButton(tb, "CCD Setup (DCS)", FIXED_SMALL); MPButtonSetCallback(pb, CCDSetupCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); /* tb = MCreateTableForm(rowform1, 3); MTableFormSetColAlign(tb, 0, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); */ lbl = MCreateLabel(tb, "Max. Exp. Time (s) :", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MLabelSetAlignment(lbl, LEFT_ALIGN); sprintf(buf, "%.1lf", DAS.Paramini.maxtexp); edit = MCreateClippedEdit(tb, buf, 5, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); //MObjectSetCompositeWidth(edit, 35); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); k = 123; p = (void *) k; MEditSetValCallback(edit, ValidateCB, p); MEditSetActCallback(edit, ActEditCB, p); pb = MCreateImagePButtonExt(tb, "sys\\qmarkyellow.bmp", "sys\\qmarkblue.bmp", "", "sys\\qmarkred.bmp", "", ""); MButtonSetImageMaskByPixel(pb, 0, 0); MObjectSetTransparency(pb, 255); MObjectSetShadow(pb, WS_NONE, 0, 0); MObjectSetBackgroundRGB(pb, 56, 112, 112); MPButtonSetCallback(pb, PB_H_CB, (void *) 0); /* End CCD Window and vertical binning section ###############*/ /* lbl = MCreateLabel(obj, "Devices Offsets", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); */ rowform1 = MCreateRowForm(obj); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); MObjectSetResize(rowform1, True, True); MObjectSetCompositeWidth(rowform1, 347); /**************************************************************************/ //OFFSET HIRES 5 SECTION if (Cfg.Platform == 28) { lbl = MCreateLabel(rowform1, "HiresV OFFSET", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True,False); lbl = MCreateLabel(tb, "Offset", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255); MObjectSetTransparency(lbl, 0); if(DAS.Paramini.EqType == 9) //SPATRAM2 DAS.Marconi.Offset = 250; if(DAS.Paramini.EqType == 8) //GASCODNG4 DAS.Marconi.Offset = 270; sprintf(buff, "%d", DAS.Marconi.Offset); edit = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectAlign(edit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(edit); list = MOptionEditGetList(edit); for(i=0; i<512; i++) { t = i; sprintf(str, "%d", t); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(edit, str); MOptionEditSetListCallback(edit, edtCCDOffSet_CB, (void *) 0); DAS.Marconi.Offset = atoi(pla->item); } /**************************************************************************/ /*************************************************************************/ /* lbl = MCreateLabel(rowform1, "Input Mirror", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetCompositeWidth(lbl, 347); tb = MCreateTableForm(rowform1, 5); MTableFormSetColAlign(tb, 0, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); lbl = MCreateLabel(tb, "Home", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); for(i=0;i<4;i++) { if (DAS.Paramini.EqType != TROPOGAS) sprintf(buf, "%s",Mir_Code[i]); else sprintf(buf, "%s",Mir_CodeTropo[i]); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); } for(i=0;i<5;i++) { sprintf(buf, "%d",DAS.Paramini.Offset[i]); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 65); k= i + 300; MEditSetValCallback(edit, ValidateCB, (void *) k); MEditSetActCallback(edit, ActEditCB, (void *) k); } /* // Command Button Section /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/ rowform1 = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); // MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL); MPButtonSetCallback(pb, ApplyChCB, (void *) 0); if((DAS.Flag.exemode == DOASMODE) ) MObjectSetUnsensitive(pb); // Set the button as Unensitive MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(rowform1, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteParaminiCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(rowform1, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); /* End Command Button Section æææææææææææææææææææææææææææææææææææ*/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ /**************************************************************************************************************/ } // Create the Parameters page void CONFP_Param(int mod, MOBJECT mo) { MOBJECT rowform; // generic row form // MOBJECT rowform1; // generic row form // MOBJECT edit; // generic edit object // MOBJECT pb; // generic pushbutton and radiobutton // MOBJECT lbl; //generic label // MOBJECT tb; // generic table object MOBJECT PPARAM; // char buf[64]; // int k; MObjectSetText(mo, "Parametrs"); rowform = MCreateRowForm(mo); MObjectSetBackgroundRGB(rowform, 56, 112, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); //357 MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); PPARAM = MCreateTabbedRowForm(rowform, 5, FIXED_SMALL); MObjectSetForegroundRGB(PPARAM, 255, 255, 255); MObjectSetBackgroundRGB(PPARAM, 56, 112, 112); MObjectAlign(PPARAM, CENTER_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(PPARAM, 357); MObjectSetResize(PPARAM, False, False); CONFP_param_page1(0, PPARAM); MPagedFormSetActivePage(PPARAM, 1); //Creation page 2 CONFP_param_page2(0, PPARAM); MPagedFormSetActivePage(PPARAM, 2); //Creation page 3 CONFP_param_page3(0, PPARAM); MPagedFormSetActivePage(PPARAM, 3); //Creation page 4 CONFP_param_page4(0, PPARAM); MPagedFormSetActivePage(PPARAM, 4); //Creation page 5 CONFP_param_page5(0, PPARAM); MPagedFormSetActivePage(PPARAM, 0); } void DB_MeasMode_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case 0: DAS.DOption.measmode = 0; //Single Meas MObjectSetUnsensitive(DAS.Gui.ConfigPanel.tbavg); //if (DAS.Marconi.AVGmat != 0) // free(DAS.Marconi.AVGmat); break; case 1: DAS.DOption.measmode = 1; //Average MObjectSetSensitive(DAS.Gui.ConfigPanel.tbavg); //if (DAS.Marconi.AVGmat != 0) //DAS.Marconi.AVGmat = AllocFloatMat(IDX, IDY); //np = (long) IDX * IDY * 2; //AVGmat = malloc(np * 4); //memset(AVGmat, 0, np * 4); break; } } } void DB_AVGAutoR_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case 0: DAS.DOption.avgautor = 1; //Autorange before average break; case 1: DAS.DOption.avgautor = 0; //NO Autorange before average break; } } } void SelDefPixFileCB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; char buf[_MAX_PATH]; char fname[_MAX_PATH], dirname[_MAX_PATH]; char str[_MAX_PATH]; // unsigned long ns; FB_PREFS fbp; strcpy (dirname, MGetCurrentDirectory ()); fname[0] = '\0'; memset (&fbp, 0, sizeof (fbp)); fbp.change_cwd = True; fbp.allow_dir_create = True; fbp.allow_dir_rename = True; fbp.allow_dir_delete = True; fbp.transparent_tree = False; fbp.font = HELV_SMALL; fbp.button_font = HELV_SMALL; //Set Img file sprintf(buf, "%s\\%s", BIL.DFILEM.HOMEDIRECTORY, "sys\\Tile2.bmp" ); fbp.bg_image_file =buf; er = MFileBrowseExt ("Select CCD Mask File", "*.cor", fname, dirname, &fbp); sprintf(DAS.DOption.DEFPIXFILENAME, "%s", fname); sprintf(buf, "%s%s", dirname, DAS.DOption.DEFPIXFILENAME); //if(DI_FileExist(buff)) // DI_FileExist --> Return: 1 if PATH exist, else return 0 // return 37; MObjectSetText(DAS.Gui.ConfigPanel.lblCorrPixF, DAS.DOption.DEFPIXFILENAME); //Load File er = LoadDB_DefectPixel(buf); if (er) { sprintf (str, "File: %s, Not FOUND", buf); MMessageDialog("DAS Inf.", str, "OK", NULL); } } // create the 1st page of the option page void CONFP_opt_page1(int mod, MOBJECT obj) { MOBJECT rowform; // generic row form MOBJECT pb, rb ; MOBJECT colform; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT tbavg; MOBJECT lbl; MOBJECT tb; // generic table object char buf[64]; int k, *p; MObjectSetText(obj, "Page 1"); /***************************************************************************/ /*********** Saving Mode Section - Start ****************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "SAVING OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Saving Mode:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 150); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "ASCII", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioModeSelCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(!DAS.DOption.savingmode) MRButtonActivate(rb); rb = MCreateRButton(tb, "Binary", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioModeSelCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.savingmode) MRButtonActivate(rb); /***************************************************************************/ /*********** Saving Mode Section - End ******************************/ /***************************************************************************/ /***************************************************************************/ /*********** File Name Type Section - Start *************************/ /***************************************************************************/ tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Saving File Names:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 150); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Free ", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFNSelCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(!DAS.DOption.filename) MRButtonActivate(rb); rb = MCreateRButton(tb, "Automatic", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFNSelCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); //MObjectSetResize(rb, False, False); if(DAS.DOption.filename) MRButtonActivate(rb); /***************************************************************************/ /*********** File Name Type Section - End ***************************/ /***************************************************************************/ /***************************************************************************/ /*********** START IMAGE TYPE SECTION *******************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "Type of Images:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); rowform = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, True, False); rb = MCreateRButton(rowform, "MONO ", FIXED_SMALL); MPButtonSetCallback(rb, DB_ImgTypeCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(!DAS.DOption.imgtype) MRButtonActivate(rb); rb = MCreateRButton(rowform, "RGB", FIXED_SMALL); MPButtonSetCallback(rb, DB_ImgTypeCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, False, False); if(DAS.DOption.imgtype) MRButtonActivate(rb); pb = MCreatePButton(rowform, "Apply img", FIXED_SMALL); MPButtonSetCallback(pb, ApplyImgCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); /***************************************************************************/ /*********** END IMAGE TYPE SECTION *******************************/ /***************************************************************************/ /***************************************************************************/ /*********** START AVERAGING SECTION *******************************/ /***************************************************************************/ DAS.Gui.ConfigPanel.tbavg = MCreateTableForm(obj, 1); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.tbavg, 112, 128, 112); MObjectSetResize(DAS.Gui.ConfigPanel.tbavg, True, False); // lbl = MCreateLabel(obj, "AVERAGE", FIXED_SMALL); lbl = MCreateLabel(DAS.Gui.ConfigPanel.tbavg, "AVERAGE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetBackgroundRGB(lbl, 96, 132, 152); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); /////////////////////////////////////////////////////// //tb = MCreateTableForm(obj, 3); tb = MCreateTableForm(DAS.Gui.ConfigPanel.tbavg, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Automatic ARange for AVG ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); //MObjectSetCompositeWidth(lbl, 200); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_AVGAutoR_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.avgautor == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_AVGAutoR_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.avgautor == 0) MRButtonActivate(rb); //tb = MCreateTableForm(obj, 2); tb = MCreateTableForm(DAS.Gui.ConfigPanel.tbavg, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.FixTExp = MCreateRButton(tb, "Fix TExp. ", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.FixTExp, DB_RadioAvgModeCB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.FixTExp, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.FixTExp, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.FixTExp, 85); DAS.Gui.ConfigPanel.FixMeasNum = MCreateRButton(tb, "Fix Meas. Number", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.FixMeasNum, DB_RadioAvgModeCB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.FixMeasNum, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.FixMeasNum, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.FixMeasNum, 123); if(DAS.DOption.avgmode) { DAS.Gui.ConfigPanel.lblAvg = MCreateLabel(tb, "TOT Exposure Time :", FIXED_SMALL); MLabelSetAlignment(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblAvg, 255, 255, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblAvg, 0); MObjectSetResize(DAS.Gui.ConfigPanel.lblAvg, False, False); MObjectAlign(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d", TOTTEXP); DAS.Gui.ConfigPanel.n_avg = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.n_avg, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.n_avg, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.n_avg, 35); MObjectAlign(DAS.Gui.ConfigPanel.n_avg, LEFT_ALIGN, TOP_ALIGN); k = 111; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.n_avg, ActEditCB, p); MRButtonActivate(DAS.Gui.ConfigPanel.FixTExp); } else { DAS.Gui.ConfigPanel.lblAvg = MCreateLabel(tb, "Repeat measure for: ", FIXED_SMALL); MLabelSetAlignment(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblAvg, 255, 255, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblAvg, 0); MObjectSetResize(DAS.Gui.ConfigPanel.lblAvg, False, False); MObjectAlign(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",N_AVG); DAS.Gui.ConfigPanel.n_avg = MCreateClippedEdit(tb, " ", 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.n_avg, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.n_avg, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.n_avg, 35); MObjectAlign(DAS.Gui.ConfigPanel.n_avg, LEFT_ALIGN, TOP_ALIGN); k = 111; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.n_avg, ActEditCB, p); MRButtonActivate(DAS.Gui.ConfigPanel.FixMeasNum); } /***************************************************************************/ /*********** END AVERAGING SECTION *******************************/ /***************************************************************************/ /***************************************************************************/ /*********** START MEASURING mode SECTION *******************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "MEASURING MODE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetBackgroundRGB(lbl, 96, 132, 152); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); //table for selecting Single or Averaged measurements tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "SINGLE", FIXED_SMALL); MPButtonSetCallback(rb, DB_MeasMode_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.measmode == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "AVERAGE", FIXED_SMALL); MPButtonSetCallback(rb, DB_MeasMode_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.measmode == 1) MRButtonActivate(rb); /***************************************************************************/ /*********** END MEASURING mode SECTION *******************************/ /***************************************************************************/ /*******************************************************************************/ /************* START Defective Pixel Correction SECTION ***********************/ /*******************************************************************************/ lbl = MCreateLabel(obj, "DEFECTIVE PIXELS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); pb = MCreatePButton(tb, "Map UNDER Exp", FIXED_SMALL); MPButtonSetCallback(pb, UnderOverPixCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); //MObjectSetCompositeWidth(pb, 250); pb = MCreatePButton(tb, "Map OVER Exp (T=0)", FIXED_SMALL); MPButtonSetCallback(pb, UnderOverPixCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); //MObjectSetCompositeWidth(pb, 220); pb = MCreatePButton(tb, "Map OVER Exp (T=5)", FIXED_SMALL); MPButtonSetCallback(pb, UnderOverPixCB, (void *) 2); MObjectSetBackgroundRGB(pb, 224, 224, 176); //MObjectSetCompositeWidth(pb, 220); lbl = MCreateLabel(obj, "Defective Pixel Correction:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 220); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbCorrPix[0] = MCreateRButton(tb, "DISABLE", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbCorrPix[0], DB_RadioPixCorrCB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbCorrPix[0], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbCorrPix[0], 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbCorrPix[0], 85); DAS.Gui.ConfigPanel.rbCorrPix[1] = MCreateRButton(tb, "ENABLE", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbCorrPix[1], DB_RadioPixCorrCB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbCorrPix[1], RIGHT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbCorrPix[1], 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbCorrPix[1], 123); colform = MCreateColForm(obj); MObjectSetBackgroundRGB(colform, 112, 128, 112); MObjectSetResize(colform, True, False); DAS.Gui.ConfigPanel.lblCorrPixF = MCreateLabel(colform, DAS.DOption.DEFPIXFILENAME, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblCorrPixF, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblCorrPixF, 96, 132, 152); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblCorrPixF, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); //MObjectSetCompositeWidth(lbl, 220); DAS.Gui.ConfigPanel.pbBrowseCorrPixF = MCreatePButton(colform, "...", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, SelDefPixFileCB, (void *) 0); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, 224, 224, 176); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, 30); MObjectAlign(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, RIGHT_ALIGN, TOP_ALIGN); if(!DAS.DOption.pixcorr) MRButtonActivate(DAS.Gui.ConfigPanel.rbCorrPix[0]); if(DAS.DOption.pixcorr) MRButtonActivate(DAS.Gui.ConfigPanel.rbCorrPix[1]); /*******************************************************************************/ /************* END Defective Pixel Correction SECTION ***********************/ /*******************************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 2nd page of the option page void CONFP_opt_page2(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT pb, rb ; MOBJECT lbl; MOBJECT tb ; // generic table object char buf[64]; int i,k, *p; MObjectSetText(obj, "Page 2"); /***************************************************************************/ /***************************************************************************/ /*********** START DARK MEASUREMENT SECTION *******************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "DARK IMAGE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Remove Dark from Measurements ? ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.DOption.darkremove) MRButtonActivate(rb); MPButtonSetCallback(rb, DB_RadioDarkCB, (void *) 1); rb = MCreateRButton(tb, "No", FIXED_SMALL); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if(!DAS.DOption.darkremove) MRButtonActivate(rb); MPButtonSetCallback(rb, DB_RadioDarkCB, (void *) 0); lbl = MCreateLabel(obj, "Dark Source", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.FFDark = MCreateRButton(tb, "Full Frame", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.FFDark, DB_RadDrkSourceCB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.FFDark, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.FFDark, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.FFDark, 85); // if(DAS.DOption.darkremove) if(DAS.DOption.darksource) MRButtonActivate(DAS.Gui.ConfigPanel.FFDark); DAS.Gui.ConfigPanel.BPDark = MCreateRButton(tb, "Blind Pixels", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.BPDark, DB_RadDrkSourceCB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.BPDark, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.BPDark, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.BPDark, 123); // if(DAS.DOption.darkremove) if(!DAS.DOption.darksource) MRButtonActivate(DAS.Gui.ConfigPanel.BPDark); if (DAS.DOption.darkremove==0) { MObjectSetUnsensitive(DAS.Gui.ConfigPanel.FFDark); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.BPDark); } else { MObjectSetSensitive(DAS.Gui.ConfigPanel.FFDark); MObjectSetSensitive(DAS.Gui.ConfigPanel.BPDark); } /***************************************************************************/ /*********** END DARK MEASUREMENT SECTION ****************************/ /***************************************************************************/ /*---------------------------------------------------------------*/ /***************************************************************************/ /*********** START CCD TARGET TEMPERATURE SECTION *********************/ /***************************************************************************/ lbl = MCreateLabel(obj, "CCD TARGET TEMPERATURE", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "FIXED", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetCCDTargetTempCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(!FLAG.settempvar) MRButtonActivate(rb); rb = MCreateRButton(tb, "SZA DRIVED", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetCCDTargetTempCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if(FLAG.settempvar) MRButtonActivate(rb); /***************************************************************************/ /*********** END CCD TARGET TEMPERATURE SECTION *********************/ /***************************************************************************/ /*-----------------------------------------------------------------------*/ /***************************************************************************/ /***************************************************************************/ /************** START AUTORANGING SECTION ************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "AUTORANGING", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); //MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Max Autoranging value (<= 63000) ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); //MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%d",DAS.DOption.maxlvlar); DAS.Gui.ConfigPanel.edmaxlvlar = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edmaxlvlar, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edmaxlvlar, 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edmaxlvlar, LEFT_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.edmaxlvlar, 50); k = 600; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.edmaxlvlar, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.edmaxlvlar, ActEditCB, p); /***************************************************************************/ /************** STOP AUTORANGING SECTION ************************/ /***************************************************************************/ /***************************************************************************/ /***************************************************************************/ /************** START CONFIGURATION FILES SECTION ************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "CONFIG FILES", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "View/Modify", FIXED_SMALL); MPButtonSetCallback(rb, DB_VMRsfCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if(!FLAG.VMRsf) MRButtonActivate(rb); rb= MCreateRButton(tb, "ReLoad", FIXED_SMALL); MPButtonSetCallback(rb, DB_VMRsfCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); MObjectSetUnsensitive(rb); if(FLAG.VMRsf) MRButtonActivate(rb); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); pb = MCreatePButton(tb, "Param.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "DASSysColor.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "Options.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 2); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "ccd_defect_Danbo.cor", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 3); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "GeoCoord.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 4); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "AMS.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 6); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "Equipment.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 7); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "WlStep.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 8); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "Free Editor", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 5); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); /***************************************************************************/ /************** END CONFIGURATION FILES SECTION ************************/ /***************************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 3rd page of the option page void CONFP_opt_page3(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT rb ; MOBJECT lbl; MOBJECT tb ; // generic table object int k, *p; char buf[64]; MObjectSetText(obj, "Page 3"); /***************************************************************************/ /***************************************************************************/ /******************* START PLOT OPTIONS SECTION **********************/ /***************************************************************************/ lbl = MCreateLabel(obj, "PLOT OPTIONS", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "X Axis Units", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "PIXEL", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(FLAG.Wl == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "WAVEL [A]", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(FLAG.Wl == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "WAVEL [nm]", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(FLAG.Wl == 2) MRButtonActivate(rb); /* if(FLAG.Wl == 0) MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[0]); else if(FLAG.Wl == 1) MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[1]); else if(FLAG.Wl == 2) MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[2]); */ /*----------------- DISPLAY or NOT Plot after measurement -----------------*/ lbl = MCreateLabel(obj, "Display PLOT after measurement ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 300); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "No ", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotDisplayCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Flag.plotW == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotDisplayCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(DAS.Flag.plotW == 1) MRButtonActivate(rb); /* if(FLAG.plotW == 0) MRButtonActivate(DAS.Gui.ConfigPanel.PlotDisp[0]); else if(FLAG.plotW == 1) MRButtonActivate(DAS.Gui.ConfigPanel.PlotDisp[1]); */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " Y Axis", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Full Range", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotYAxisCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); MObjectSetResize(rb, True, False); if(FLAG.plotYRange == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Min/Max", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotYAxisCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); MObjectSetResize(rb, True, False); if(FLAG.plotYRange == 1) MRButtonActivate(rb); /* if(FLAG.plotYRange == 0) MRButtonActivate(DAS.Gui.ConfigPanel.PlotYAxis[0]); else if(FLAG.plotYRange == 1) MRButtonActivate(DAS.Gui.ConfigPanel.PlotYAxis[1]); /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*-------------------------------------------------------------------------*/ /* Hidden Lines section */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " Hidden lines ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Before Central Line ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%d",DAS.DOption.hlinebefore); DAS.Gui.ConfigPanel.HiddenL = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.HiddenL, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.HiddenL, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.HiddenL, 35); MObjectAlign(DAS.Gui.ConfigPanel.HiddenL, LEFT_ALIGN, TOP_ALIGN); k = 130; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.HiddenL, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.HiddenL, ActEditCB, p); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "After Central Line ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%d",DAS.DOption.hlineafter); DAS.Gui.ConfigPanel.HiddenL = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.HiddenL, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.HiddenL, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.HiddenL, 35); MObjectAlign(DAS.Gui.ConfigPanel.HiddenL, LEFT_ALIGN, TOP_ALIGN); k = 135; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.HiddenL, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.HiddenL, ActEditCB, p); /*-------------------------------------------------------------------------*/ /* Blind Pixel section */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " Display Blind Pixel? ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_DispBlindPixCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); MObjectSetResize(rb, True, False); if(FLAG.DispBlindPix == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_DispBlindPixCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); MObjectSetResize(rb, True, False); if(FLAG.DispBlindPix == 1) MRButtonActivate(rb); /*-------------------------------------------------------------------------*/ /***************************************************************************/ /******************* END PLOT OPTIONS SECTION **********************/ /***************************************************************************/ /*-------------------------------------------------------------------------*/ /* SZA Limit section */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " SZA Limit ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Perform Measurements for SZA <= ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%d",SZAMax); DAS.Gui.ConfigPanel.SZAMax = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SZAMax, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SZAMax, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.SZAMax, 35); MObjectAlign(DAS.Gui.ConfigPanel.SZAMax, LEFT_ALIGN, TOP_ALIGN); k = 120; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.SZAMax, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.SZAMax, ActEditCB, p); lbl = MCreateLabel(tb, " ° ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); /**************************************************************/ /***************************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 4th page of the option page void CONFP_opt_page4(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT pb, rb ; MOBJECT lbl; MOBJECT tb ; // generic table object int k, *p; char buf[64]; MObjectSetText(obj, "Page 4"); /***************************************************************************/ /******************* BACK-UP SECTION *************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "BACK-UP OPTIONS", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Perform FTP Back-Up", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFTPCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if (DAS.DOption.ftpbackup) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFTPCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if (!DAS.DOption.ftpbackup) MRButtonActivate(rb); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Server FTP Address:", FIXED_SMALL); MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%s",DFTP.ftpserver); DFTP.edServerFTP = MCreateClippedEdit(tb, buf, 15, 15, FIXED_SMALL); MObjectSetForegroundRGB(DFTP.edServerFTP, 255, 255, 255); MObjectSetBackgroundRGB(DFTP.edServerFTP, 40, 96, 72); // MObjectSetCompositeWidth(DFTP.edServerFTP, 35); MObjectAlign(DFTP.edServerFTP, RIGHT_ALIGN, TOP_ALIGN); k = 200; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DFTP.edServerFTP, ActEditCB, p); if (!DAS.DOption.ftpbackup) MEditEnableEditing(DFTP.edServerFTP); lbl = MCreateLabel(tb, "UserName:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%s",DFTP.ftpuser); DFTP.edid = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DFTP.edid, 255, 255, 255); MObjectSetBackgroundRGB(DFTP.edid, 40, 96, 72); // MObjectSetCompositeWidth(DFTP.edid, 35); MObjectAlign(DFTP.edid, RIGHT_ALIGN, TOP_ALIGN); k = 210; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DFTP.edid, ActEditCB, p); lbl = MCreateLabel(tb, "PWD:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%s",DFTP.ftppwd); DFTP.edpwd= MCreateHiddenEdit(tb, buf, 10, FIXED_SMALL, '*'); MObjectSetForegroundRGB(DFTP.edpwd, 255, 255, 255); MObjectSetBackgroundRGB(DFTP.edpwd, 40, 96, 72); // MObjectSetCompositeWidth(DFTP.edpwd, 35); MObjectAlign(DFTP.edpwd, RIGHT_ALIGN, TOP_ALIGN); k = 220; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DFTP.edpwd, ActEditCB, p); /* if (DAS.DOption.ftpbackup) MRButtonActivate(DFTP.rb[0]); else MRButtonActivate(DFTP.rb[1]); */ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); pb = MCreatePButton(tb, "Save FTP.INI", FIXED_SMALL); MPButtonSetCallback(pb, PbftpCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 94); pb = MCreatePButton(tb, "Test FTP", FIXED_SMALL); MPButtonSetCallback(pb, PbftpCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 94); /***************************************************************************/ /**************** OMU Thermo-regulation SECTION ***********************/ /***************************************************************************/ lbl = MCreateLabel(obj, "OMU THERMO-REGULATION", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Choose the Reference temp", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Pelt. Int.", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.refertemp == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Optic", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.refertemp == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "Grating", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.refertemp == 2) MRButtonActivate(rb); lbl = MCreateLabel(obj, "Choose the Thermo-regulation mode", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Cold only", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 3); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(OMUTHR.TRType == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Heat only", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 4); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(OMUTHR.TRType == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "Cold/Heat", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 5); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(OMUTHR.TRType == 2) MRButtonActivate(rb); /***************/ lbl = MCreateLabel(obj, "Choose the Thermo-reg. Algorithm", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Progressive", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 6); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(OMUTHR.PID_On == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "PID", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 7); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(OMUTHR.PID_On == 1) MRButtonActivate(rb); if(OMUTHR.PID_On == 1) //Create the field for PID Parameters { tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Prop.", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 90); lbl = MCreateLabel(tb, "Integral", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 90); lbl = MCreateLabel(tb, "Deriv.", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 90); sprintf(buf, "%.1lf",OMUTHR.PID_kp); DAS.Gui.ConfigPanel.PID_edt[0] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[0], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.PID_edt[0], 40, 96, 72); k = 500; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.PID_edt[0], ActEditCB, p); sprintf(buf, "%.3lf",OMUTHR.PID_ki); DAS.Gui.ConfigPanel.PID_edt[1] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[1], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.PID_edt[1], 40, 96, 72); k = 501; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.PID_edt[1], ActEditCB, p); sprintf(buf, "%.4lf",OMUTHR.PID_kd); DAS.Gui.ConfigPanel.PID_edt[2] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[2], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.PID_edt[2], 40, 96, 72); k = 502; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.PID_edt[2], ActEditCB, p); } pb = MCreatePButton(obj, "Temp History", FIXED_SMALL); MPButtonSetCallback(pb, PBTempHistoCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 123); /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 5th page of the option page void CONFP_opt_page5(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT rb ; MOBJECT lbl; MOBJECT tb,tb1 ; // generic table object // int i,k, *p; // char buf[64]; MObjectSetText(obj, "Page 5"); lbl = MCreateLabel(obj, "MIRROR IMAGE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb1 = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb1, 112, 128, 112); MObjectSetResize(tb1, True, False); lbl = MCreateLabel(tb1, "Along the X Axis ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); lbl = MCreateLabel(tb1, "Along the Y Axis ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(tb1, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.mirrorimg[XAX] == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.mirrorimg[XAX] == 0) MRButtonActivate(rb); tb = MCreateTableForm(tb1, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.mirrorimg[YAX] == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 3); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.mirrorimg[YAX] == 0) MRButtonActivate(rb); lbl = MCreateLabel(obj, "AMS OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Positioning Mode", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Simultaneous", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSposmode_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.smposmode == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "Sequential", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSposmode_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.smposmode == 0) MRButtonActivate(rb); lbl = MCreateLabel(obj, "Display progression bars?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSProgBar_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.amsprogbar == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSProgBar_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.amsprogbar == 0) MRButtonActivate(rb); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ lbl = MCreateLabel(obj, "MIGE Platform OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "MIGE Status", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbMIGEStatus[0]=MCreateRButton(tb, "NOT Connected", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEStatus[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEStatus[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEStatus[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.linked == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[0]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEStatus[0], DB_MIGE_CB, (void *) 0); DAS.Gui.ConfigPanel.rbMIGEStatus[1] = MCreateRButton(tb, "Connected", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEStatus[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEStatus[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEStatus[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.linked == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[1]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEStatus[1], DB_MIGE_CB, (void *) 1); lbl = MCreateLabel(obj, "MIGE Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbMIGEtype[0] = MCreateRButton(tb, "Ver. 0.5", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEtype[0], DB_MIGEType_CB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEtype[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEtype[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEtype[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.type == 0 ) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEtype[0]); DAS.Gui.ConfigPanel.rbMIGEtype[1] = MCreateRButton(tb, "Ver. 1.5", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEtype[1], DB_MIGEType_CB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEtype[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEtype[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEtype[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.type == 1 ) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEtype[1]); DAS.Gui.ConfigPanel.rbMIGEtype[2] = MCreateRButton(tb, "Ver. 2.0", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEtype[2], DB_MIGEType_CB, (void *) 2); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEtype[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEtype[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEtype[2], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.type == 2 ) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEtype[2]); lbl = MCreateLabel(obj, "Operating mode", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbMIGEopmode[0] = MCreateRButton(tb, "Solar Tracker", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEopmode[0], DB_MIGEopmode_CB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEopmode[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEopmode[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEopmode[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.aaopmode == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEopmode[0]); DAS.Gui.ConfigPanel.rbMIGEopmode[1] = MCreateRButton(tb, "Anti Solar Tracker", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEopmode[1], DB_MIGEopmode_CB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEopmode[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEopmode[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEopmode[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.aaopmode == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEopmode[1]); DAS.Gui.ConfigPanel.rbMIGEopmode[2] = MCreateRButton(tb, "Free positions", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEopmode[2], DB_MIGEopmode_CB, (void *) 2); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEopmode[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEopmode[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEopmode[2], True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.aaopmode == 2) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEopmode[2]); if(DAS.MIGE.linked == 0) { MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[1]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[2]); } else MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[2]); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } void edtDASReset_CB(MOBJECT p, LIST_ACT *la, void *ad) { int c = (int) ad; int er = 0; DAS.DOption.resetFreq = atoi(la->item); } void DB_ResetEnable_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; // char buff[64], str[32]; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case 0: DAS.DOption.resetEnabled = 0; MObjectSetUnsensitive(DAS.Gui.ConfigPanel.listReset); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.edtDASReset); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.lblReset); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbDASResPer[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbDASResPer[1]); break; case 1: DAS.DOption.resetEnabled = 1; MObjectSetSensitive(DAS.Gui.ConfigPanel.listReset); MObjectSetSensitive(DAS.Gui.ConfigPanel.edtDASReset); MObjectSetSensitive(DAS.Gui.ConfigPanel.lblReset); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbDASResPer[0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbDASResPer[1]); break; } } } void DB_ResetType_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v,i,k; char buff[64], str[32]; LIST_ACT * pla; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case RHOUR: DAS.DOption.resetType = RHOUR; if (DAS.Gui.ConfigPanel.lblReset != 0) { sprintf(buff, "%d", (int)DAS.DOption.resetFreq); MSListClear(DAS.Gui.ConfigPanel.listReset); for(i=1; i<24; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(DAS.Gui.ConfigPanel.listReset, k-1); pla = MSListGetSelected(DAS.Gui.ConfigPanel.listReset); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDASReset, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDASReset, edtDASReset_CB, (void *) 0); DAS.DOption.resetFreq = atoi(pla->item); sprintf(buff, "Hour(s)"); MObjectSetText(DAS.Gui.ConfigPanel.lblReset, buff); } break; case RDAY: DAS.DOption.resetType = RDAY; if (DAS.Gui.ConfigPanel.lblReset != 0) { sprintf(buff, "%d", (int)DAS.DOption.resetFreq); MSListClear(DAS.Gui.ConfigPanel.listReset); for(i=1; i<365; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(DAS.Gui.ConfigPanel.listReset, k-1); pla = MSListGetSelected(DAS.Gui.ConfigPanel.listReset); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDASReset, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDASReset, edtDASReset_CB, (void *) 0); DAS.DOption.resetFreq = atoi(pla->item); sprintf(buff, "Day(s)"); MObjectSetText(DAS.Gui.ConfigPanel.lblReset, buff); } break; } } } // create the 7th page of the option page void CONFP_opt_page7(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form // MOBJECT pb, rb ; MOBJECT lbl; MOBJECT tb; // generic table object int i,k; // char buf[64]; // MOBJECT list; // int starti; float f=0; char str[80]; char buff[_MAX_PATH]; LIST_ACT * pla; MObjectSetText(obj, "Page 7"); /******************************************************************/ /*************** SHUTTER ******************************************/ /******************************************************************/ lbl = MCreateLabel(obj, "SHUTTER OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Is the EMShutter Installed?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbSHUTStatus[0] = MCreateRButton(tb, "Yes", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTStatus[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTStatus[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTStatus[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.emshutter == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTStatus[0]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTStatus[0], DB_Shutter_CB, (void *) 1); DAS.Gui.ConfigPanel.rbSHUTStatus[1] = MCreateRButton(tb, "No", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.emshutter == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTStatus[1] ); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , DB_Shutter_CB, (void *) 0); lbl = MCreateLabel(obj, "Choose Shutter Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbSHUTType [0] = MCreateRButton(tb, "UniBlitz VS25", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTType [0], DB_ShutterType_CB, (void *) VS25); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTType [0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTType [0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTType [0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.shuttertype == VS25) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTType [0]); DAS.Gui.ConfigPanel.rbSHUTType [1] = MCreateRButton(tb, "Rotating Sh.", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTType [1], DB_ShutterType_CB, (void *) ROTSHUT); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTType [1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTType [1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTType [1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.shuttertype == ROTSHUT) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTType [1]); DAS.Gui.ConfigPanel.rbSHUTType[2] = MCreateRButton(tb, "Torque Motor", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTType[2], DB_ShutterType_CB, (void *) TORQUEM); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTType[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTType[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTType[2], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.shuttertype == TORQUEM) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTType[2]); if(DAS.DOption.emshutter == 0) { MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } else { MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } /******************************************************************/ /*************** END SHUTTER **************************************/ /******************************************************************/ /******************************************************************/ /*************** FILTER WHEEL *************************************/ /******************************************************************/ lbl = MCreateLabel(obj, "FILTER WHEEL OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Choose Installed Module", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbFilterType [0] = MCreateRButton(tb, "Simple-SM3", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbFilterType [0], DB_FilterType_CB, (void *) FSIMPLE); MObjectAlign(DAS.Gui.ConfigPanel.rbFilterType [0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbFilterType [0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbFilterType [0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.filtertype == FSIMPLE) MRButtonActivate(DAS.Gui.ConfigPanel.rbFilterType [0]); DAS.Gui.ConfigPanel.rbFilterType [1] = MCreateRButton(tb, "Double-SM3+SM4", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbFilterType [1], DB_FilterType_CB, (void *) FDOUBLE); MObjectAlign(DAS.Gui.ConfigPanel.rbFilterType [1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbFilterType [1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbFilterType [1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.filtertype == FDOUBLE) MRButtonActivate(DAS.Gui.ConfigPanel.rbFilterType [1]); DAS.Gui.ConfigPanel.rbFilterType[2] = MCreateRButton(tb, "Plus-SM3+TM", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbFilterType[2], DB_FilterType_CB, (void *) FPLUS); MObjectAlign(DAS.Gui.ConfigPanel.rbFilterType[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbFilterType[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbFilterType[2], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.filtertype == FPLUS) MRButtonActivate(DAS.Gui.ConfigPanel.rbFilterType[2]); /* if(DAS.DOption.emshutter == 0) { MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } else { MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } */ /******************************************************************/ /*************** END FILTER WHEEL ********************************/ /******************************************************************/ /******************************************************************/ /*************** RESET DAS Windows Restart ***********************/ /******************************************************************/ lbl = MCreateLabel(obj, "RESET WINDOWS OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); /*----------------------------------------------------------------*/ lbl = MCreateLabel(obj, "DAS/SYSTEM Reset ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbResetEnab[0] = MCreateRButton(tb, "Disabled", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbResetEnab[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbResetEnab[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbResetEnab[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.resetEnabled == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbResetEnab[0]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbResetEnab[0], DB_ResetEnable_CB, (void *) 0); DAS.Gui.ConfigPanel.rbResetEnab[1] = MCreateRButton(tb, "Enabled", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbResetEnab[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbResetEnab[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbResetEnab[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.resetEnabled == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbResetEnab[1]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbResetEnab[1], DB_ResetEnable_CB, (void *) 1); /*----------------------------------------------------------------*/ lbl = MCreateLabel(obj, "Reset Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbDASResPer[0] = MCreateRButton(tb, "HOUR(s)", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDASResPer[0], DB_ResetType_CB, (void *) RHOUR); MObjectAlign(DAS.Gui.ConfigPanel.rbDASResPer[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDASResPer[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbDASResPer[0], True, False); //MObjectSetCompositeWidth(rb, 100); DAS.Gui.ConfigPanel.rbDASResPer[1] = MCreateRButton(tb, "DAY(s)", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDASResPer[1], DB_ResetType_CB, (void *) RDAY); MObjectAlign(DAS.Gui.ConfigPanel.rbDASResPer[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDASResPer[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbDASResPer[1], True, False); //MObjectSetCompositeWidth(rb, 100); lbl = MCreateLabel(obj, "Reset Frequency", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Re-start every ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); //MObjectSetCompositeWidth(lbl, 250); sprintf(buff, "%d", (int)DAS.DOption.resetFreq); DAS.Gui.ConfigPanel.edtDASReset = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtDASReset, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtDASReset, 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edtDASReset, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.edtDASReset); DAS.Gui.ConfigPanel.listReset = MOptionEditGetList(DAS.Gui.ConfigPanel.edtDASReset); if (DAS.DOption.resetType) // Days { for(i=1; i<365; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } } else //hours { for(i=1; i<24; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } } /* list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtDSZA); for(i=0; i<20; i++) { f = f+0.10; sprintf(str, "%.3f",f); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDSZA, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDSZA, edtDSZA_CB, (void *) 0); SZADelta.DeltaSZA = atof(pla->item); */ MSListSelectElement(DAS.Gui.ConfigPanel.listReset, k-1); pla = MSListGetSelected(DAS.Gui.ConfigPanel.listReset); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDASReset, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDASReset, edtDASReset_CB, (void *) 0); DAS.DOption.resetFreq = atoi(pla->item); if (DAS.DOption.resetType) // Days sprintf(buff, "Day(s)", DAS.DOption.resetFreq); else sprintf(buff, "Hour(s)", DAS.DOption.resetFreq); DAS.Gui.ConfigPanel.lblReset = MCreateLabel(tb, buff, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblReset, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblReset, 96, 132, 152); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblReset, 0); MObjectSetShadow(DAS.Gui.ConfigPanel.lblReset, WS_ETCHED_IN, 1, 1); if(DAS.DOption.resetType == RHOUR) MRButtonActivate(DAS.Gui.ConfigPanel.rbDASResPer[0]); if(DAS.DOption.resetType == RDAY) MRButtonActivate(DAS.Gui.ConfigPanel.rbDASResPer[1]); /******************************************************************/ /*************** END RESET DAS ********************************/ /******************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } void CONFP_opt_ScheMeas(int mod, MOBJECT p) { // MOBJECT rowform; // generic row form MOBJECT rowform1; MOBJECT colform, colform2,colform3,colform4; MOBJECT rb ; MOBJECT lbl, list, optedit; // MOBJECT tb ; // generic table object int i; int lenedit = 12; char buf[64]; int maxangle; if (mod == 1) maxangle = 181; else maxangle = 96; colform = MCreateColForm(p); MFormSetSpacing(colform, 0); MObjectSetResize(colform, False, False); MObjectAlign(colform, CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform, 255); MObjectSetShadow(colform, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, True); MObjectAlign(rowform1, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(rowform1, 255); MObjectSetShadow(rowform1, WS_NONE, 0, 0); rb = MCreateRButton(rowform1, "", FIXED_SMALL); // MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetTransparency(rb, 255); MObjectSetResize(rb, True, False); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 1) // MRButtonActivate(rb); rb = MCreateRButton(rowform1, "", FIXED_SMALL); // MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); MObjectSetTransparency(rb, 255); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 0) // MRButtonActivate(rb); colform2 = MCreateColForm(colform); MFormSetSpacing(colform2, 0); MObjectSetResize(colform2, False, False); MObjectSetTransparency(colform2, 255); MObjectSetShadow(colform2, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform2); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, False); MObjectSetShadow(rowform1, WS_NONE, 0, 0); MObjectSetTransparency(rowform1, 255); colform3 = MCreateColForm(rowform1); MFormSetSpacing(colform3, 0); MObjectSetResize(colform3, False, False); MObjectAlign(colform3, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform3, 255); MObjectSetShadow(colform3, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); lbl = MCreateLabel(colform3, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, False, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } if (mod == 1) MSListSelectElement(list, 180); else MSListSelectElement(list, 95); colform4 = MCreateColForm(rowform1); MFormSetSpacing(colform4, 0); MObjectSetTransparency(colform4, 255); MObjectSetShadow(colform4, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); sprintf(buf, "<SZA<"); lbl = MCreateLabel(colform4, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "50"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 50); lbl = MCreateLabel(colform4, "OR", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "75"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 75); lbl = MCreateLabel(colform4, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } if (mod == 1) MSListSelectElement(list, 180); else MSListSelectElement(list, 95); } // create the 6th page of the option page void CONFP_opt_page6(int mod, MOBJECT obj) { MOBJECT rowform; // generic row form // MOBJECT colform, colform1,colform2,colform3,colform4; // MOBJECT pb, rb ; MOBJECT lbl, list, optedit; MOBJECT tb ; // generic table object int i; int lenedit = 12; char buf[64], str[16]; unsigned char lesseq = 242, greateq=241; MObjectSetText(obj, "Page 6"); lbl = MCreateLabel(obj, "INPUTS <--> DEVICES", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); /* lbl = MCreateLabel(obj, "Input <--> Device", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ tb = MCreateTableForm(obj, 4); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, False, False); if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) sprintf(str, "%s",Mir_CodeTropo[0]); else sprintf(str, "%s",Mir_Code[0]); sprintf(buf, "%s",str); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%s",DeviceTypeInput[0]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) MSListSelectElement(list, 2); else MSListSelectElement(list, 0); sprintf(buf, "%s",Mir_Code[1]); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%s",DeviceTypeInput[6]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 1); if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) sprintf(str, "%s",Mir_CodeTropo[2]); else sprintf(str, "%s",Mir_Code[2]); sprintf(buf, "%s",str); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) sprintf(buf, "%s",DeviceTypeInput[7]); else sprintf(buf, "%s",DeviceTypeInput[2]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) MSListSelectElement(list, 7); else MSListSelectElement(list, 2); sprintf(buf, "%s",Mir_Code[3]); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%s",DeviceTypeInput[3]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 3); lbl = MCreateLabel(obj, "MEASUREMENTS SCHEDULING", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); /***************************************************************/ // 1 start rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "ZenithSky", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(0, rowform); /* colform = MCreateColForm(rowform); MFormSetSpacing(colform, 0); MObjectSetResize(colform, False, False); MObjectAlign(colform, CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform, 255); MObjectSetShadow(colform, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, True); MObjectAlign(rowform1, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(rowform1, 255); MObjectSetShadow(rowform1, WS_NONE, 0, 0); rb = MCreateRButton(rowform1, "", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetTransparency(rb, 255); MObjectSetResize(rb, True, False); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 1) // MRButtonActivate(rb); rb = MCreateRButton(rowform1, "", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); MObjectSetTransparency(rb, 255); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 0) // MRButtonActivate(rb); colform2 = MCreateColForm(colform); MFormSetSpacing(colform2, 0); MObjectSetResize(colform2, False, False); MObjectSetTransparency(colform2, 255); MObjectSetShadow(colform2, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform2); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, False); MObjectSetShadow(rowform1, WS_NONE, 0, 0); MObjectSetTransparency(rowform1, 255); colform3 = MCreateColForm(rowform1); MFormSetSpacing(colform3, 0); MObjectSetResize(colform3, False, False); MObjectAlign(colform3, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform3, 255); MObjectSetShadow(colform3, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); lbl = MCreateLabel(colform3, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, False, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 95); colform4 = MCreateColForm(rowform1); MFormSetSpacing(colform4, 0); MObjectSetTransparency(colform4, 255); MObjectSetShadow(colform4, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); sprintf(buf, "<SZA<"); lbl = MCreateLabel(colform4, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "50"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 50); lbl = MCreateLabel(colform4, "OR", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "75"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 75); lbl = MCreateLabel(colform4, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 95); // 1 End /***************************************************************/ /***************************************************************/ // 2 start rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "Horizontal", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(1, rowform); /* lbl = MCreateLabel(obj, "Horizontal", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "Radiometric", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(0, rowform); /* lbl = MCreateLabel(obj, "Radiometric", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "Off-Axis", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(0, rowform); /* lbl = MCreateLabel(obj, "Off-Axis", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } //Create the Option page (with 6 sub-pages) void CONFP_Options(int mod, MOBJECT mo) { MOBJECT rowform; // generic row form MOBJECT rowform1; // generic row form // MOBJECT PFAMS; // paged form for AMS MOBJECT POPT; // paged form for AMS // MOBJECT edit; // generic edit object // MOBJECT radiobutt[2]; // generic radio button // MOBJECT RColButt; MOBJECT pb; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; // MOBJECT lbl; MOBJECT tb; // generic table object // char buf[64]; // int *p; MObjectSetText(mo, "Options"); rowform = MCreateRowForm(mo); MObjectSetBackgroundRGB(rowform, 112, 128, 112); // MObjectSetResize(rowform, True, True); MObjectSetCompositeWidth(rowform, 400); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); POPT = MCreateTabbedRowForm(rowform, 7, FIXED_SMALL); MObjectSetForegroundRGB(POPT, 255, 255, 255); MObjectSetBackgroundRGB(POPT, 112, 128, 112); MObjectAlign(POPT, CENTER_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(POPT, 390); MObjectSetResize(POPT, False, False); //Creation page 1 CONFP_opt_page1(0, POPT); MPagedFormSetActivePage(POPT, 1); //Creation page 2 CONFP_opt_page2(0, POPT); MPagedFormSetActivePage(POPT, 2); //Creation page 3 CONFP_opt_page3(0, POPT); MPagedFormSetActivePage(POPT, 3); //Creation page 4 CONFP_opt_page4(0, POPT); MPagedFormSetActivePage(POPT, 4); //Creation page 5 CONFP_opt_page5(0, POPT); MPagedFormSetActivePage(POPT, 5); //Creation page 6 CONFP_opt_page6(0, POPT); MPagedFormSetActivePage(POPT, 6); //Creation page 7 CONFP_opt_page7(0, POPT); MPagedFormSetActivePage(POPT, 0); // Command Button Section rowform1 = MCreateRowForm(mo); MObjectSetBackgroundRGB(rowform1, 112, 128, 112); //MObjectSetResize(rowform, False, True); MObjectSetCompositeWidth(rowform1, 357); MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform1, 2); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); pb = MCreatePButton(tb, "Save", FIXED_SMALL); MPButtonSetCallback(pb, WriteOptioniniCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); } void AMS_AdvancedCB(MOBJECT o, void *od, void *ad) { char buff[_MAX_PATH]; int f; STARTUPINFO si; PROCESS_INFORMATION pi; // chdir(buff); sprintf(buff,"%s\\%s",BIL.DFILEM.HOMEDIRECTORY, "\\AMSTester50\\AMS50.exe"); // WinExec(buff, 1); // // perform the equivalent of WinExec in NT, but we use a Unicode string // memset(&si, 0, sizeof(si)); si.cb = sizeof(si); si.dwFlags= STARTF_USESHOWWINDOW; si.wShowWindow = SW_SHOW; f = CreateProcess(NULL, buff, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); // sprintf(buff,"%ss",BIL.DFILEM.HOMEDIRECTORY, "SolPosCalc"); chdir(BIL.DFILEM.HOMEDIRECTORY); } MOBJECT MDCreateDASConfig(void) { // MOBJECT _shell000; MOBJECT POCF; //Paged form for configuration panel // MOBJECT POPT; //Paged form for options MOBJECT rowform; // generic row form MOBJECT rowform1; // generic row form // MOBJECT PFAMS; // paged form for AMS // MOBJECT edit; // generic edit object // MOBJECT radiobutt[2]; // generic radio button MOBJECT RColButt; MOBJECT pb; // generic push button // MOBJECT rb; // generic radio button MOBJECT list; MOBJECT _tbutton000; MOBJECT _tbutton001; MOBJECT form2; MOBJECT label, lbl; MOBJECT tb; // generic table object // MOBJECT frm2_tb4; int r, g, b; int i; char buf[64]; // double percentuale,speedhz; const char *fontfamily; // struct confp *pconfp; LoadGeoDB(); MGetDefaultBackgroundRGB(&r, &g, &b); drawarea_bgc = MAllocColor(r, g, b); /********************************************************/ /************* MAIN SHELL *************************/ /********************************************************/ DAS.Gui.ConfigPanel.ShellConfig = MCreateShell("DAS Config", 0); MObjectSetResize(DAS.Gui.ConfigPanel.ShellConfig, True, True); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.ShellConfig, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.ShellConfig, 96, 132, 152); MObjectSetResize(DAS.Gui.ConfigPanel.ShellConfig, True, True); MObjectAlign(DAS.Gui.ConfigPanel.ShellConfig, CENTER_ALIGN, TOP_ALIGN); // MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.ShellConfig, 670); // MObjectSetCompositeHeight(DAS.Gui.ConfigPanel.ShellConfig, 483); /********************************************************/ /************* CONFIG PAGED FORM **********************/ /********************************************************/ POCF = MCreateTabbedRowForm(DAS.Gui.ConfigPanel.ShellConfig, 6, FIXED_SMALL); MObjectSetForegroundRGB(POCF, 255, 255, 255); MObjectSetBackgroundRGB(POCF, 96, 132, 152); MObjectSetResize(POCF, True, True); MObjectAlign(POCF, CENTER_ALIGN, TOP_ALIGN); // MObjectSetCompositeWidth(POCF, 457); //457 /* Activation of POCF page 0 - Parameters*/ /* 00000000000000000000000000000000000000000000000000000000 */ MPagedFormSetActivePage(POCF, 0); // Creation page 0 - Parameters CONFP_Param(0, POCF); /* End Activation and creation of page 0 */ /* 0000000000000000000000000000000000000000000000000000000 */ /* Activation of POCF page 1 - Option */ /* 11111111111111111111111111111111111111111111111111111111 */ /* Start Creation of page 1 111111111111111111111*/ /* 11111111111111111111111111111111111111111111111111111111111111111*/ MPagedFormSetActivePage(POCF, 1); // Creation Page 1 - Options CONFP_Options(0, POCF); /* End Activation and creation of page 1 11111111111111111111*/ /* 11111111111111111111111111111111111111111111111111111111111111*/ /****************************************************************************/ /* Start Activation and creation of page 2 - Colors 2222222222*/ /* 22222222222222222222222222222222222222222222222222222222222222*/ MPagedFormSetActivePage(POCF, 2); MObjectSetText(POCF, "Colors"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(rowform, "SELECT OBJECT", FIXED_SMALL); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform, 2); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 112, 68, 72); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.RBColObj[0] = MCreateRButton(tb, "Unsel. Push Button", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[0], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[0], ColObjCB, (void *) 0); DAS.Gui.ConfigPanel.RBColObj[1] = MCreateRButton(tb, "Sel. Push Button", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[1], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[1], ColObjCB, (void *) 1); DAS.Gui.ConfigPanel.RBColObj[2] = MCreateRButton(tb, "Active Labels", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[2], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[2], ColObjCB, (void *) 2); DAS.Gui.ConfigPanel.RBColObj[3] = MCreateRButton(tb, "Passive LAbels", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[3], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[3], ColObjCB, (void *) 3); DAS.Gui.ConfigPanel.RBColObj[4] = MCreateRButton(tb, "Forms", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[4], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[4], ColObjCB, (void *) 4); DAS.Gui.ConfigPanel.RBColObj[5] = MCreateRButton(tb, "Capital Labels", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[5], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[5], ColObjCB, (void *) 5); if (DAS.Flag.exemode == DOASMODE ) { DAS.Gui.ConfigPanel.RBColObj[6] = MCreateRButton(tb, "Radio Button", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[6], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[6], ColObjCB, (void *) 6); } /* RColButt = MCreateRButton(tb, "UnSel. Comm.", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 0); RColButt = MCreateRButton(tb, "Sel. Comm.", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 1); RColButt = MCreateRButton(tb, "Active labels", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 2); RColButt = MCreateRButton(tb, "Passive labels", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 3); RColButt = MCreateRButton(tb, "Forms", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 4); RColButt = MCreateRButton(tb, "K_labelsUP", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 5); if (DAS.Flag.exemode == DOASMODE ) { RColButt = MCreateRButton(tb, "Radio Buttons", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 6); } */ tb = MCreateTableForm(rowform, 2); MTableFormSetColAlign(tb, 1, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 160, 112, 112); MObjectSetResize(tb, True, False); RColButt = MCreateRButton(tb, "Background", FIXED_SMALL); MRButtonSetCallback(RColButt, (OBJ_VALUE_CB) ColPickBackForeGCB, (void *) 0); MObjectAlign(RColButt, CENTER_ALIGN, TOP_ALIGN); MRButtonActivate(RColButt); MObjectSetForegroundRGB(RColButt, 255, 255, 0); RColButt = MCreateRButton(tb, "Foreground", FIXED_SMALL); MRButtonSetCallback(RColButt, (OBJ_VALUE_CB) ColPickBackForeGCB, (void *) 1); MObjectAlign(RColButt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(RColButt, 255, 255, 0); rowform1 = MCreateRowForm(rowform); MObjectSetBackgroundRGB(rowform1 , 80, 56, 56); MObjectSetResize(rowform1 , True, True); lbl = MCreateLabel(rowform1 , "COLORS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1 , 1); MObjectSetBackgroundRGB(tb, 112, 68, 72); MObjectSetResize(tb, True, False); /******************************************/ form2 = MCreateRowForm(tb); MFormSetPrefAtt(form2, F_PREF_ATT_COL); label = MCreateLabel(form2, "Red: ", FIXED_SMALL); MObjectSetForegroundRGB(label, 255, 0, 0); r_label = MCreateLabel(form2, "000", FIXED_SMALL); MObjectSetForegroundRGB(r_label, 255, 0, 0); MObjectSetResize(label, False, False); MObjectSetResize(r_label, False, False); r_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32); MScrollBarSetPosCallback(r_sbar, DB_ChangeColorCellCB, 0L); form2 = MCreateRowForm(tb); MFormSetPrefAtt(form2, F_PREF_ATT_COL); label = MCreateLabel(form2, "Green: ", FIXED_SMALL); MObjectSetForegroundRGB(label, 0, 105, 0); g_label = MCreateLabel(form2, "000", FIXED_SMALL); MObjectSetForegroundRGB(g_label, 0, 105, 0); MObjectSetResize(label, False, False); MObjectSetResize(g_label, False, False); g_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32); MScrollBarSetPosCallback(g_sbar, DB_ChangeColorCellCB, (void *) 1); form2 = MCreateRowForm(tb); MFormSetPrefAtt(form2, F_PREF_ATT_COL); label = MCreateLabel(form2, "Blue: ", FIXED_SMALL); MObjectSetForegroundRGB(label, 0, 0, 255); b_label = MCreateLabel(form2, "000", FIXED_SMALL); MObjectSetForegroundRGB(b_label, 0, 0, 255); MObjectSetResize(label, False, False); MObjectSetResize(b_label, False, False); b_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32); MScrollBarSetPosCallback(b_sbar, DB_ChangeColorCellCB, (void *) 2); /************************************/ frm3_dr1 = MCreateDrawArea(rowform, 347, 30); MObjectSetResize(frm3_dr1, True, False); MDrawAreaSetExposeCallback(frm3_dr1, DB_CellExposeCB, 0L); MDrawAreaSetResizeCallback(frm3_dr1, DB_CellResizeCB, 0L); MObjectSetResize(frm3_dr1, True, False); r_c = g_c = b_c = 0; cell_color = MAllocCell(0, 0, 0); rowform1 = MCreateRowForm(rowform); MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rowform1, 56, 84, 128); MObjectSetBackgroundRGB(rowform1, 112, 68, 72); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); lbl = MCreateLabel(rowform1, "COMMANDS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); pb = MCreatePButton(rowform1, "Load Palette", FIXED_SMALL); MPButtonSetCallback(pb, LoadPaletteCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); tb = MCreateTableForm(rowform1, 4); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 112, 68, 72); MObjectSetResize(tb, True, False); pb = MCreatePButton(tb, "Preview", FIXED_SMALL); MPButtonSetCallback(pb, ColorAssignCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); pb = MCreatePButton(tb, "Undo", FIXED_SMALL); MPButtonSetCallback(pb, D_UndoCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteColorsCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); /* End Activation and creation of page 2 Colors 22222222222222222222*/ /* 22222222222222222222222222222222222222222222222222222222222222*/ /*********************** FONTS ***********************/ MPagedFormSetActivePage(POCF, 3); MObjectSetText(POCF, "Fonts"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(rowform, "SELECT OBJECT", FIXED_SMALL); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectSetCompositeWidth(lbl, 347); tb = MCreateTableForm(rowform, 2); MTableFormSetColAlign(tb, 1, LEFT_ALIGN); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 84, 128); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); RColButt = MCreateRButton(tb, "UnSel. Comm.", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 0); MObjectAlign(RColButt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); MRButtonActivate(RColButt); RColButt = MCreateRButton(tb, "Sel. Comm.", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 1); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "Active labels", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 2); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "Passive labels", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 3); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "K_labelsUP", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 4); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "K_labelsDW", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 5); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); DAS.Gui.ConfigPanel.frm4_dr1 = MCreateDrawArea(rowform, 347, 62); MObjectAlign(DAS.Gui.ConfigPanel.frm4_dr1, CENTER_ALIGN, TOP_ALIGN); MObjectSetResize(DAS.Gui.ConfigPanel.frm4_dr1, True, False); MObjectSetCompositeHeight(DAS.Gui.ConfigPanel.frm4_dr1, 62); MDrawAreaSetExposeCallback(DAS.Gui.ConfigPanel.frm4_dr1, DrawAreaExpFontCB, 0L); rowform1 = MCreateRowForm(rowform); MObjectSetBackgroundRGB(rowform1, 56, 84, 128); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); lbl = MCreateLabel(rowform1, "FONTS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1, 2); MTableFormSetColAlign(tb, 1, RIGHT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 84, 128); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Type:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); fontfamily = MGetFirstFontFamily (); e_fname = MCreateOptionEdit (tb, fontfamily, 22, 10, 6, FIXED_SMALL); MObjectSetForegroundRGB(e_fname, 255, 255, 255); MObjectSetBackgroundRGB(e_fname, 0, 24, 96); MEditDisableEditing (e_fname); list = MOptionEditGetList (e_fname); MSListSetSortCallback (list, stricmp); while (fontfamily) { MSListAddItem (list, fontfamily, 0L); fontfamily = MGetNextFontFamily (); } lbl = MCreateLabel(tb, "Dim.:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); e_fsize = MCreateOptionEdit(tb, "22", 22, 10, 6, FIXED_SMALL); MObjectSetForegroundRGB(e_fsize, 255, 255, 255); MObjectSetBackgroundRGB(e_fsize, 0, 24, 96); list = MOptionEditGetList(e_fsize); MSListAddItem(list, "12", 0L); MSListAddItem(list, "14", 0L); MSListAddItem(list, "16", 0L); MSListAddItem(list, "18", 0L); MSListAddItem(list, "20", 0L); MSListAddItem(list, "22", 0L); MSListAddItem(list, "24", 0L); MSListAddItem(list, "26", 0L); MSListAddItem(list, "28", 0L); MSListAddItem(list, "30", 0L); MSListAddItem(list, "32", 0L); MSListAddItem(list, "34", 0L); MSListAddItem(list, "36", 0L); MSListAddItem(list, "38", 0L); MSListAddItem(list, "40", 0L); MSListAddItem(list, "42", 0L); _tbutton000 = MCreateTButton(tb, "Bold", FIXED_SMALL); MTButtonSetCallback(_tbutton000, SetBoldCB, 0L); MObjectSetForegroundRGB(_tbutton000, 255, 255, 0); _tbutton001 = MCreateTButton(tb, "Italic", FIXED_SMALL); MTButtonSetCallback(_tbutton001, SetItalicCB, 0L); MObjectSetForegroundRGB(_tbutton001, 255, 255, 0); /*******************/ rowform1 = MCreateRowForm(rowform); MObjectSetForegroundRGB(rowform1, 56, 84, 128); MObjectSetBackgroundRGB(rowform1, 56, 84, 128); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); lbl = MCreateLabel(rowform1, "COMMANDS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1, 5); MObjectSetBackgroundRGB(tb, 56, 84, 128); MObjectSetResize(tb, True, False); pb = MCreatePButton(tb, "Test", FIXED_SMALL); MPButtonSetCallback(pb, TestFontCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Preview", FIXED_SMALL); MPButtonSetCallback(pb, LoadFontCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Undo", FIXED_SMALL); MPButtonSetCallback(pb, UndoFCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteFontCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); /******************* STEPPER MOTORS ***************************/ MPagedFormSetActivePage(POCF, 4); MObjectSetText(POCF, "Motors"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 457); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); /***************************************************************************/ /**************** STEPPER MOTORS SECTION ***********************************/ lbl = MCreateLabel(rowform, "STEPPER MOTORS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetCompositeWidth(lbl, 447); PFAMS = MCreateTabbedRowForm(rowform, (DAS.StepM.NAMS + 2), FIXED_SMALL); MObjectSetForegroundRGB(PFAMS, 255, 255, 255); MObjectSetBackgroundRGB(PFAMS, 80, 60, 0); MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2); MObjectSetCompositeWidth(PFAMS, 420); // MObjectSetResize(PFAMS, True, True); for (i=0;i<DAS.StepM.NAMS; i++) { MPagedFormSetActivePage(PFAMS, i); CONFP_AMS(PFAMS, i); //FrmStepperConfP(PFAMS, i); } MPagedFormSetActivePage(PFAMS, i); CONFP_AMS_Utility(PFAMS); MPagedFormSetActivePage(PFAMS, i+1); CONFP_AMS_NOVA(PFAMS); MPagedFormSetActivePage(PFAMS, 0); /* if (DAS.Paramini.EqType == TROPOGAS) { PFAMS = MCreateTabbedRowForm(rowform, 4, FIXED_SMALL); MObjectSetForegroundRGB(PFAMS, 255, 255, 255); MObjectSetBackgroundRGB(PFAMS, 80, 60, 0); MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2); } else { PFAMS = MCreateTabbedRowForm(rowform, 3, FIXED_SMALL); MObjectSetForegroundRGB(PFAMS, 255, 255, 255); MObjectSetBackgroundRGB(PFAMS, 80, 60, 0); MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2); } MPagedFormSetActivePage(PFAMS, 0); FrmStepperConfP(PFAMS, AMS1, &STEPM, &CONFP, &CPL); MPagedFormSetActivePage(PFAMS, 1); FrmStepperConfP(PFAMS, AMS2, &STEPM, &CONFP, &CPL); if (DAS.Paramini.EqType == TROPOGAS) { MPagedFormSetActivePage(PFAMS, 2); FrmStepperConfP(PFAMS, AMS3, &STEPM, &CONFP, &CPL); MPagedFormSetActivePage(PFAMS, 3); FrmAMS_Utility(PFAMS, &STEPM, &CONFP, &CPL); } else { MPagedFormSetActivePage(PFAMS, 2); FrmAMS_Utility(PFAMS, &STEPM, &CONFP, &CPL); } */ MPagedFormSetActivePage(PFAMS, 0); /*++++++++++++++++++++++++++++++++++++++++++++++++++++*/ tb = MCreateTableForm(rowform, 4); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); pb = MCreatePButton(tb, "Apply", FIXED_SMALL); MPButtonSetCallback(pb, ApplyChCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(tb, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteAMSCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(tb, "ADVANCED", FIXED_SMALL); MPButtonSetCallback(pb, AMS_AdvancedCB, (void *) 0); MObjectSetBackgroundRGB(pb, 24, 24, 255); MObjectSetForegroundRGB(pb, 255, 245, 255); MObjectSetCompositeWidth(pb, 74); /*********************************************************/ /*********************************************************/ /*************** TEST AD Converter **************/ /*********************************************************/ MPagedFormSetActivePage(POCF, 5); MObjectSetText(POCF, "TEST AD Converter"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); /*+++++++++++++++++ START CURRENT SETUP ++++++++++*/ lbl = MCreateLabel(rowform , "AD Converter Current Setup", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform, 4); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); lbl = MCreateLabel(tb , "Board Type:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); // sprintf(buf, "%s", DSCCB2STR()); ADTESTER.lblADsetup[0] = MCreateLabel(tb , "DMM", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[0], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[0], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[0], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[0], 0); lbl = MCreateLabel(tb , "Base Addr:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[1] = MCreateLabel(tb , "0x300", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[1], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[1], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[1], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[1], 0); lbl = MCreateLabel(tb , "Int.Lvl:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[2] = MCreateLabel(tb , "3", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[2], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[2], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[2], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[2], 0); lbl = MCreateLabel(tb , "DMA Lvl:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[3] = MCreateLabel(tb , "3", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[3], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[3], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[3], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[3], 0); lbl = MCreateLabel(tb , "ClockFreq:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[4] = MCreateLabel(tb , "10MHz", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[4], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[4], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[4], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[4], 0); lbl = MCreateLabel(tb , "Range:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[5] = MCreateLabel(tb , "5V", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[5], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[5], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[5], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[5], 0); lbl = MCreateLabel(tb , "Pol.:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[6] = MCreateLabel(tb , "UNIPOL", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[6], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[6], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[6], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[6], 0); lbl = MCreateLabel(tb , "Gain:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[7] = MCreateLabel(tb , "2", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[7], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[7], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[7], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[7], 0); lbl = MCreateLabel(tb , "LowCh:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[8] = MCreateLabel(tb , "0", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[8], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[8], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[8], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[8], 0); lbl = MCreateLabel(tb , "HighCh:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[9] = MCreateLabel(tb , "15", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[9], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[9], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[9], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[9], 0); // LoadDMMSetup(); /*+++++++++++++++++ END CURRENT SETUP ++++++++++*/ tb = MCreateTableForm(rowform, 2); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); ADTESTER.ADrb[0]= MCreateRButton(tb, "Volts", FIXED_SMALL); MPButtonSetCallback(ADTESTER.ADrb[0], DB_SelOutModeCB, (void *) 0); MObjectAlign(ADTESTER.ADrb[0], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(ADTESTER.ADrb[0], 255, 255, 255); MObjectSetCompositeWidth(ADTESTER.ADrb[0], 85); ADTESTER.ADrb[1] = MCreateRButton(tb, "Celsius", FIXED_SMALL); MPButtonSetCallback(ADTESTER.ADrb[1], DB_SelOutModeCB, (void *) 1); MObjectAlign(ADTESTER.ADrb[1], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(ADTESTER.ADrb[1], 255, 255, 255); MObjectSetCompositeWidth(ADTESTER.ADrb[1], 85); if(ADTESTER.OutputMode == 0) MRButtonActivate(ADTESTER.ADrb[0]); else MRButtonActivate(ADTESTER.ADrb[0]); lbl = MCreateLabel(rowform , "Output", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform, 4); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); for(i=0;i<16;i++) { sprintf(buf, "Ch.%d:", i); ADTESTER.lblADch[i] = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(ADTESTER.lblADch[i], LEFT_ALIGN); MObjectSetForegroundRGB(ADTESTER.lblADch[i], 255, 255, 255); MObjectSetTransparency(ADTESTER.lblADch[i], 0); MObjectSetResize(ADTESTER.lblADch[i], False, False); MObjectAlign(ADTESTER.lblADch[i], LEFT_ALIGN, TOP_ALIGN); // MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblADch[i], 40, 96, 72); ADTESTER.lblADvalue[i] = MCreateLabel(tb, " 0.0", FIXED_SMALL); MLabelSetAlignment(ADTESTER.lblADvalue[i], RIGHT_ALIGN); MObjectSetForegroundRGB(ADTESTER.lblADvalue[i], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADvalue[i], 40, 96, 72); MObjectSetTransparency(ADTESTER.lblADvalue[i], 0); MObjectSetResize(ADTESTER.lblADvalue[i], False, False); MObjectAlign(ADTESTER.lblADvalue[i], LEFT_ALIGN, TOP_ALIGN); } tb = MCreateTableForm(rowform, 3); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); ADTESTER.ADpb = MCreatePButton(tb, "Start", FIXED_SMALL); MPButtonSetCallback(ADTESTER.ADpb, ADTesterCB, (void *) 0); MObjectSetBackgroundRGB(ADTESTER.ADpb, 224, 224, 176); // MObjectSetBackgroundRGB(ADTESTER.ADpb, 192, 192, 192); MObjectSetCompositeWidth(ADTESTER.ADpb, 84); ADTESTER.ADInflbl = MCreateLabel(tb, "Click Start to test ", FIXED_SMALL); // MPButtonSetCallback(ADTESTER.ADpb, ADTesterCB, (void *) 0); MObjectSetForegroundRGB(ADTESTER.ADInflbl, 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.ADInflbl, 48, 20, 255); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); /*********************************************************/ MPagedFormSetActivePage(POCF, 0); MShellRealize(DAS.Gui.ConfigPanel.ShellConfig); // MShellRealizeXYWH(DAS.Gui.ConfigPanel.ShellConfig, 0,0,600,800); return 0; } */
2796  /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */
2797 
2798 
2799 }
2800 
2801 
2802 
2803 void CONFP_param_page4(int mod, MOBJECT obj)
2804 {
2805 
2806  MOBJECT rowform1; // generic row form
2807 // MOBJECT wledt; // generic edit object
2808 // MOBJECT stedt; // generic edit object
2809 // MOBJECT colform;
2810  MOBJECT pb;
2811 // MOBJECT list;
2812 // MOBJECT _tbutton000;
2813 // MOBJECT _tbutton001;
2814 // MOBJECT form2;
2815  MOBJECT lbl, list;
2816  MOBJECT tb; // generic table object
2817 // char buf[64];
2818  int i, k=0, starti;
2819  float f=0;
2820 // FILE *fd;
2821  char str[80];
2822  char buff[_MAX_PATH];
2823 
2824  LIST_ACT * pla;
2825 
2826  MObjectSetText(obj, "Page 4");
2827 
2828 
2829  lbl = MCreateLabel(obj, "Measurement Scheduling", FIXED_SMALL);
2830  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2831  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
2832  MObjectSetTransparency(lbl, 0);
2833 
2834 
2835  tb = MCreateTableForm(obj, 3);
2836  MObjectSetBackgroundRGB(tb, 112, 128, 112);
2837  MObjectSetBackgroundRGB(tb, 56, 112, 112);
2839 
2840  DAS.Gui.ConfigPanel.rbDSZA[0] = MCreateRButton(tb, "Continuous", FIXED_SMALL);
2841  MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDSZA[0], DSZArb_CB, (void *) 0);
2843  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDSZA[0], 255, 255, 255);
2845 
2846 
2847  DAS.Gui.ConfigPanel.rbDSZA[1] = MCreateRButton(tb, "DeltaSZA", FIXED_SMALL);
2848  MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDSZA[1], DSZArb_CB, (void *) 1);
2850  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDSZA[1], 255, 255, 255);
2852 
2853 
2854 
2855  tb = MCreateTableForm(obj, 2);
2856  MObjectSetBackgroundRGB(tb, 112, 128, 112);
2857  MObjectSetBackgroundRGB(tb, 56, 112, 112);
2859 
2860 
2861  DAS.Gui.ConfigPanel.lblSZA[0] = MCreateLabel(tb, "DeltaSZA (deg):", FIXED_SMALL);
2862  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 255, 255, 255);
2863  //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255);
2865 
2866  sprintf(buff, "%.3f", SZADelta.DeltaSZA);
2867  DAS.Gui.ConfigPanel.edtDSZA = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL);
2868  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtDSZA, 255, 255, 255);
2872 
2873 
2875  for(i=0; i<20; i++)
2876  {
2877  f = f+(float)0.10;
2878  sprintf(str, "%.3f",f);
2879  MSListAddItem(list, str, 0L);
2880  if( strcmp(str,buff) ==0 )
2881  k=i;
2882 
2883  }
2884 
2885  MSListSelectElement(list, k);
2886  pla = MSListGetSelected(list);
2887  sprintf(str, "%s", pla->item );
2890  SZADelta.DeltaSZA = atof(pla->item);
2891 
2892 
2893 
2894 
2895 
2896  DAS.Gui.ConfigPanel.lblSZA[1] = MCreateLabel(tb, "SZA Min. (deg):", FIXED_SMALL);
2897  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[1], 255, 255, 255);
2898  //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255);
2900 
2901 
2902  sprintf(buff, "%d", (int)SZADelta.MinSZA);
2903  DAS.Gui.ConfigPanel.edtSZA[0] = MCreateOptionEdit(tb, buff, 3, 3, 8, FIXED_SMALL);
2904  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtSZA[0], 255, 255, 255);
2905  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[0], 40, 96, 72);
2908  list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtSZA[0]);
2909  for(i=0; i<21; i++)
2910  {
2911 
2912  sprintf(str, "%d",i);
2913  MSListAddItem(list, str, 0L);
2914  if( strcmp(str,buff) ==0 )
2915  k=i;
2916  }
2917  MSListSelectElement(list, k);
2918  pla = MSListGetSelected(list);
2919  sprintf(str, "%s", pla->item );
2920  MObjectSetText(DAS.Gui.ConfigPanel.edtSZA[0], str);
2922  SZADelta.MinSZA = atof(pla->item);
2923 
2924 
2925 
2926  DAS.Gui.ConfigPanel.lblSZA[2] = MCreateLabel(tb, "SZA Max. (deg):", FIXED_SMALL);
2927  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[2], 255, 255, 255);
2928  //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255);
2930 
2931  sprintf(buff, "%d", (int)SZADelta.MaxSZA);
2932  DAS.Gui.ConfigPanel.edtSZA[1] = MCreateOptionEdit(tb, buff, 3, 3, 8, FIXED_SMALL);
2933  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtSZA[1], 255, 255, 255);
2934  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[1], 40, 96, 72);
2937  list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtSZA[1]);
2938  starti = 20;
2939  for(i=starti; i<161; i++)
2940  {
2941 
2942  sprintf(str, "%d",i);
2943  MSListAddItem(list, str, 0L);
2944  if( strcmp(str,buff) ==0 )
2945  k=i - starti;
2946 
2947  }
2948  MSListSelectElement(list, k);
2949  pla = MSListGetSelected(list);
2950  sprintf(str, "%s", pla->item );
2951  MObjectSetText(DAS.Gui.ConfigPanel.edtSZA[1], str);
2953  SZADelta.MaxSZA = atof(pla->item);
2954 
2955 
2956 
2957  if(DAS.Flag.DeltaSZA)
2959  else
2961 
2962 
2963 
2964 
2965  tb = MCreateTableForm(obj, 2);
2966  MObjectSetBackgroundRGB(tb, 112, 128, 112);
2967  MObjectSetBackgroundRGB(tb, 56, 112, 112);
2968  MObjectSetResize(tb, True, True);
2969 
2970 
2971 
2972  // Command Button Section
2973  /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/
2974  rowform1 = MCreateTableForm(obj, 3);
2975  MObjectSetBackgroundRGB(rowform1, 56, 112, 112);
2976 // MObjectSetResize(rowform1, False, False);
2977  MObjectSetCompositeWidth(rowform1, 347);
2978 /*
2979  pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL);
2980  MPButtonSetCallback(pb, ApplyGeoCB, (void *) 0);
2981  if((DAS.Flag.exemode == DOASMODE))
2982  MObjectSetUnsensitive(pb); // Set the button as Unensitive
2983  MObjectSetBackgroundRGB(pb, 224, 224, 176);
2984  MObjectSetCompositeWidth(pb, 70);
2985  MObjectSetPopupHelp(pb,"Apply the selected setting to DAS (and write to file ..GeoCoord.ini)" , 200, 5000);
2986 
2987 */
2988 
2989 
2990  pb = MCreatePButton(rowform1, "Save", FIXED_SMALL);
2991  MPButtonSetCallback(pb, WriteOptioniniCB, (void *) 0);
2992  MObjectSetBackgroundRGB(pb, 224, 224, 176);
2993  MObjectSetCompositeWidth(pb, 74);
2994 
2995  pb = MCreatePButton(rowform1, "Close", FIXED_SMALL);
2997  MObjectSetBackgroundRGB(pb, 224, 224, 176);
2998  MObjectSetCompositeWidth(pb, 74);
2999  MObjectSetPopupHelp(pb,"Close Config Panel" , 200, 5000);
3000  /* End Command Button Section æææææææææææææææææææææææææææææææææææ/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ } void CONFP_param_page3(int mod, MOBJECT obj) { MOBJECT rowform1; // generic row form // MOBJECT wledt; // generic edit object // MOBJECT stedt; // generic edit object MOBJECT pb; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; MOBJECT lbl; MOBJECT tb; // generic table object char buf[64]; int i, k=0; // FILE *fd; // char str[80]; // char buff[_MAX_PATH]; MObjectSetText(obj, "Page 3"); lbl = MCreateLabel(obj, "Station Geo. Coordinates", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Actual Setting" ); lbl = MCreateLabel(obj, buf, FIXED_SMALL); MLabelSetAlignment(lbl, CENTER_ALIGN); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 5); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, False); sprintf(buf, "Stat." ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Lat." ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Long." ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "TZ" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Alt." ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%s", DAS.DGeo.s_name ); DAS.DGeo.edit[0] = MCreateEdit(tb, buf, 3, FIXED_SMALL); MObjectAlign(DAS.DGeo.edit[0] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.edit[0] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.DGeo.edit[0] , 40, 96, 72); MEditSetValCallback(DAS.DGeo.edit[0] , DGeoeditCB, (void *) 0); sprintf(buf, "%.2f", DAS.DGeo.latitude ); DAS.DGeo.edit[1] = MCreateEdit(tb, buf, 7, FIXED_SMALL); MObjectAlign(DAS.DGeo.edit[1] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.edit[1] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.DGeo.edit[1] , 40, 96, 72); MEditSetValCallback(DAS.DGeo.edit[1] , DGeoeditCB, (void *) 1); sprintf(buf, "%.2f", DAS.DGeo.longitude ); DAS.DGeo.edit[2] = MCreateEdit(tb, buf, 7, FIXED_SMALL); MObjectAlign(DAS.DGeo.edit[2] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.edit[2] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.DGeo.edit[2] , 40, 96, 72); MEditSetValCallback(DAS.DGeo.edit[2] , DGeoeditCB, (void *) 2); sprintf(buf, "%d", DAS.DGeo.timezone ); DAS.DGeo.edit[3] = MCreateEdit(tb, buf, 4, FIXED_SMALL); MObjectAlign(DAS.DGeo.edit[3] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.edit[3] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.DGeo.edit[3] , 40, 96, 72); MEditSetValCallback(DAS.DGeo.edit[3] , DGeoeditCB, (void *) 3); sprintf(buf, "%.1f", DAS.DGeo.alititude); DAS.DGeo.edit[4] = MCreateEdit(tb, buf, 7, FIXED_SMALL); MObjectAlign(DAS.DGeo.edit[4] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.edit[4] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.DGeo.edit[4] , 40, 96, 72); MEditSetValCallback(DAS.DGeo.edit[4] , DGeoeditCB, (void *) 4); DAS.DGeo.tbrb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(DAS.DGeo.tbrb, 112, 128, 112); MObjectSetBackgroundRGB(DAS.DGeo.tbrb, 56, 112, 112); MObjectSetResize(DAS.DGeo.tbrb, True,False); // sprintf(buff, "%s\\GeoDB.ini", BIL.DFILEM.CONFIGDIREQUIPMENT); // fd = fopen(buff, "r"); // if(fd == NULL) return 1; // fgets(str, 80, fd); // Read Header // fscanf(fd, "%d", &DAS.DGeo.nitem); // fgets(str, 80, fd); for (i=0; i<DAS.DGeo.nitem; i++) { // fscanf(fd, "%hs",&DAS.DGeo.news_name[i]); DAS.DGeo.rb[i] = MCreateRButton(DAS.DGeo.tbrb, DAS.DGeo.news_name[i], FIXED_SMALL); MPButtonSetCallback(DAS.DGeo.rb[i], DB_GeocoordCB, (void *) i); MObjectAlign(DAS.DGeo.rb[i], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.rb[i], 255, 255, 255); MObjectSetCompositeWidth(DAS.DGeo.rb[i], 85); // fscanf(fd, "%lf %lf %lf %d", &DAS.DGeo.newlatitude[i], // &DAS.DGeo.newlongitude[i],&DAS.DGeo.newalititude[i],&DAS.DGeo.newtimezone[i]); if( strcmp(DAS.DGeo.s_name,DAS.DGeo.news_name[i]) ==0 ) { MRButtonActivate(DAS.DGeo.rb[i]); DAS.DGeo.selitem = i; } } // fclose(fd); /* sprintf(buf, "%s", "New St."); DAS.DGeo.rb[DAS.DGeo.nitem] = MCreateRButton(DAS.DGeo.tbrb, buf, FIXED_SMALL); MPButtonSetCallback(DAS.DGeo.rb[DAS.DGeo.nitem], DB_GeocoordCB, (void *) 100); MObjectAlign(DAS.DGeo.rb[DAS.DGeo.nitem], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.DGeo.rb[DAS.DGeo.nitem], 255, 255, 255); MObjectSetCompositeWidth(DAS.DGeo.rb[DAS.DGeo.nitem], 85); */ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, True); pb = MCreatePButton(tb, "Add St.", FIXED_SMALL); //MObjectSetUnsensitive(pb); MPButtonSetCallback(pb, AddStCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); //MObjectAddEventNotifyCallback(pb, (OBJ_EVENT_CB) DB_StorePB, EM_MOTION, NULL); MObjectSetPopupHelp(pb,"Add a new station " , 200, 5000); MObjectAlign(pb, UNDEF_ALIGN, BOTTOM_ALIGN); pb = MCreatePButton(tb, "Delete", FIXED_SMALL); //MObjectSetUnsensitive(pb); MPButtonSetCallback(pb, DeleteGeoCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); //MObjectAddEventNotifyCallback(pb, (OBJ_EVENT_CB) DB_StorePB, EM_MOTION, NULL); MObjectSetPopupHelp(pb,"Delete the selected station" , 200, 5000); MObjectAlign(pb, UNDEF_ALIGN, BOTTOM_ALIGN); // Command Button Section /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/ rowform1 = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); // MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL); MPButtonSetCallback(pb, ApplyGeoCB, (void *) 0); if((DAS.Flag.exemode == DOASMODE)) MObjectSetUnsensitive(pb); // Set the button as Unensitive MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); MObjectSetPopupHelp(pb,"Apply the selected setting to DAS (and write to file ..GeoCoord.ini)" , 200, 5000); pb = MCreatePButton(rowform1, "Store", FIXED_SMALL); MObjectSetUnsensitive(pb); MPButtonSetCallback(pb, StoreGeoCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); MObjectAddEventNotifyCallback(pb, (OBJ_EVENT_CB) DB_StorePB, EM_MOTION, NULL); MObjectSetPopupHelp(pb,"If a new station has been created store it in ..GeoDB.ini" , 200, 5000); pb = MCreatePButton(rowform1, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 70); MObjectSetPopupHelp(pb,"Close Config Panel" , 200, 5000); /* End Command Button Section æææææææææææææææææææææææææææææææææææ*/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ } void CONFP_param_page2(int mod, MOBJECT obj) { MOBJECT rowform, rowform1; // generic row form MOBJECT wledt; // generic edit object MOBJECT stedt; // generic edit object MOBJECT pb ; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; MOBJECT lbl; MOBJECT tb; // generic table object char buf[64]; int i; MObjectSetText(obj, "Page 2"); lbl = MCreateLabel(obj, "Ref. Wavelength and Grating positioning", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); rowform = MCreateColForm(obj); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetBackgroundRGB(rowform, 56, 112, 112); MObjectAlign(rowform, LEFT_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); MTableFormSetColAlign(tb, 0, TOP_ALIGN); MObjectSetResize(tb, False, True); //for(i=0;i<2;i++) //{ sprintf(buf, "Win" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Cent.Wl" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Steps" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); // } for(i=0;i<9;i++) { sprintf(buf, "%d", i); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%d", wl[i]); wledt = MCreateEdit(tb, buf, 5, FIXED_SMALL); MObjectAlign(wledt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(wledt, 255, 255, 255); MObjectSetBackgroundRGB(wledt, 40, 96, 72); MEditSetValCallback(wledt, valwledt, (void *) i); //MEditSetActCallback(wledt, wledtCB, (void *) i); sprintf(buf, "%d", wav[i]); stedt = MCreateEdit(tb, buf, 8, FIXED_SMALL); MObjectAlign(stedt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(stedt, 255, 255, 255); MObjectSetBackgroundRGB(stedt, 40, 96, 72); MEditSetValCallback(stedt, valstedt, (void *) i); //MEditSetActCallback(stedt, stedtCB, (void *) i); } tb = MCreateTableForm(rowform, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); MTableFormSetColAlign(tb, 0, TOP_ALIGN); MObjectSetResize(tb, False, True); sprintf(buf, "Win" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Cent.Wl" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Steps" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); for(i=9;i<18;i++) { sprintf(buf, "%d", i); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%d", wl[i]); wledt = MCreateEdit(tb, buf, 5, FIXED_SMALL); MObjectAlign(wledt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(wledt, 255, 255, 255); MObjectSetBackgroundRGB(wledt, 40, 96, 72); MEditSetValCallback(wledt, valwledt, (void *) i); //MEditSetActCallback(wledt, wledtCB, (void *) i); sprintf(buf, "%d", wav[i]); stedt = MCreateEdit(tb, buf, 8, FIXED_SMALL); MObjectAlign(stedt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(stedt, 255, 255, 255); MObjectSetBackgroundRGB(stedt, 40, 96, 72); MEditSetValCallback(stedt, valstedt, (void *) i); //MEditSetActCallback(stedt, stedtCB, (void *) i); } // Command Button Section /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/ rowform1 = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); // MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL); //MPButtonSetCallback(pb, ApplyChCB, (void *) 0); //if((DAS.Flag.exemode == DOASMODE) | (DAS.Flag.exemode == DBDEMO)) MObjectSetUnsensitive(pb); // Set the button as Unensitive MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(rowform1, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WritewlstepiniCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(rowform1, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); /* End Command Button Section æææææææææææææææææææææææææææææææææææ*/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ } void edtCCDOffSet_CB(MOBJECT p, LIST_ACT *la, void *ad) { int c = (int) ad; int er = 0; DAS.Marconi.Offset = atoi(la->item); if(DAS.Flag.exemode != DBDEMO) DC_SetUsrGain(0, 0 , DAS.Marconi.Offset , 0); } void CONFP_param_page1(int mod, MOBJECT obj) { MOBJECT rowform1; // generic row form MOBJECT edit; // generic edit object MOBJECT pb, rb ; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; MOBJECT lbl; MOBJECT tb; // generic table object char buf[64]; int i, k, *p; MOBJECT list; int t=0; char str[80]; char buff[_MAX_PATH]; LIST_ACT * pla; MObjectSetText(obj, "Page 1"); /******************************************************************************************************************/ //Equipment Type section /*--------- Start ----------------*/ lbl = MCreateLabel(obj, "Equipment Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(obj, 3); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); // Instrument Type(0 = SPATRAM, // 1 = TROPOGAS, 2 = LIS, // 3 = SPATRAMPLUS, 4 = GASCODNG, ) rb = MCreateRButton(tb, "SPATRAMPLUS", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 3); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 3) MRButtonActivate(rb); rb = MCreateRButton(tb, "SPATRAM2", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 9); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 9) MRButtonActivate(rb); rb = MCreateRButton(tb, "SPATRAM3", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 10); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 10) MRButtonActivate(rb); /* rb = MCreateRButton(tb, "SPATRAM", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if( DAS.Paramini.EqType == 0) MRButtonActivate(rb); */ rb = MCreateRButton(tb, "TROPOGAS", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Paramini.EqType == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "LIS", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Paramini.EqType == 2) MRButtonActivate(rb); rb = MCreateRButton(tb, "GASCODNG1", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 4); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Paramini.EqType == 4) MRButtonActivate(rb); /* rb = MCreateRButton(tb, "GASCODOffAxis", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 5); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 5) MRButtonActivate(rb); */ rb = MCreateRButton(tb, "GASCODNG2", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 6); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 6) MRButtonActivate(rb); rb = MCreateRButton(tb, "GASCODNG3", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 7); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 7) MRButtonActivate(rb); rb = MCreateRButton(tb, "GASCODNG4", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 8); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 8) MRButtonActivate(rb); /* pb = MCreatePButton(tb, "Save", FIXED_SMALL); MPButtonSetCallback(pb, WriteEquipiniCB, 0); MObjectAlign(pb, LEFT_ALIGN, UNDEF_ALIGN); //MObjectSetForegroundRGB(pb, 255, 255, 255); MObjectSetCompositeWidth(pb, 105); */ //CCD & OMU Temperature section /*--------- Start ----------------*/ lbl = MCreateLabel(obj, "CCD & OMU Temp", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(obj, 2); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, False); MObjectSetCompositeWidth(tb, 347); lbl = MCreateLabel(tb, "CCD Target Temperature:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%.1lf", DAS.Paramini.ITemp); edit = MCreateEdit(tb, buf, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MEditSetValCallback(edit, ValidateCB, (void *) 1); MEditSetActCallback(edit, ActEditCB, (void *) 1); lbl = MCreateLabel(tb, "CCD Peltier Init Power:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%.1lf%%",(double)DAS.Paramini.CoolPw / 10); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MEditSetValCallback(edit, ValidateCB, (void *) 2); MEditSetActCallback(edit, ActEditCB, (void *) 2); lbl = MCreateLabel(tb, "Optical Unit Target Temp:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); sprintf(buf, "%.1lf", DAS.Paramini.TPelt); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MEditSetValCallback(edit, ValidateCB, (void *) 3); MEditSetActCallback(edit, ActEditCB, (void *) 3); lbl = MCreateLabel(tb, "OMU Peltier Init Power:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%.1lf%%",(double)OMUTHR.PCPower / 10); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MEditSetValCallback(edit, ValidateCB, (void *) 2000); MEditSetActCallback(edit, ActEditCB, (void *) 2000); /*------------------- End CCD & OMU Temperature section -------------*/ //CCD Window and vertical binning section /*##################### Start ##################################################*/ lbl = MCreateLabel(obj, "CCD WINDOW - SETUP", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectSetCompositeWidth(lbl, 347); rowform1 = MCreateRowForm(obj); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); //357 MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform1, 4); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetResize(tb, True, True); // MObjectSetCompositeWidth(tb, 347); MObjectSetShadow(tb, WS_NONE, 0, 0); lbl = MCreateLabel(tb, "X Start:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",DAS.Paramini.ccdXoff); //sprintf(buf, "%d",(DC_CCD.dx - DC_CCD.dx)); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MEditSetValCallback(edit, ValidateCB, (void *) 4); MEditSetActCallback(edit, ActEditCB, (void *) 4); //MEditDisableEditing(edit); lbl = MCreateLabel(tb, "X End:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",DAS.Paramini.ccdWx); //sprintf(buf, "%d",DC_CCD.dx); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MEditSetValCallback(edit, ValidateCB, (void *) 5); MEditSetActCallback(edit, ActEditCB, (void *) 5); // MEditDisableEditing(edit); lbl = MCreateLabel(tb, "Y Start:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",DAS.Paramini.ccdYoff); //sprintf(buf, "%d", (DC_CCD.dy-DC_CCD.dy)); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MEditSetValCallback(edit, ValidateCB, (void *) 6); MEditSetActCallback(edit, ActEditCB, (void *) 6); // MEditDisableEditing(edit); lbl = MCreateLabel(tb, "Y End:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",DAS.Paramini.ccdWy); //sprintf(buf, "%d",DC_CCD.dy); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MEditSetValCallback(edit, ValidateCB, (void *) 7); MEditSetActCallback(edit, ActEditCB, (void *) 7); // MEditDisableEditing(edit); tb = MCreateTableForm(rowform1, 3); MTableFormSetColAlign(tb, 0, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); MObjectSetShadow(tb, WS_NONE, 0, 0); lbl = MCreateLabel(tb, "Vertical Binning:", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); sprintf(buf, "%d",DAS.Paramini.VBin); edit = MCreateClippedEdit(tb, buf, 3, 3, FIXED_SMALL); MObjectAlign(edit, RIGHT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MEditSetValCallback(edit, ValidateCB, (void *) 8); MEditSetActCallback(edit, ActEditCB, (void *) 8); pb = MCreatePButton(tb, "CCD Setup (DCS)", FIXED_SMALL); MPButtonSetCallback(pb, CCDSetupCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); /* tb = MCreateTableForm(rowform1, 3); MTableFormSetColAlign(tb, 0, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); */ lbl = MCreateLabel(tb, "Max. Exp. Time (s) :", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MLabelSetAlignment(lbl, LEFT_ALIGN); sprintf(buf, "%.1lf", DAS.Paramini.maxtexp); edit = MCreateClippedEdit(tb, buf, 5, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); //MObjectSetCompositeWidth(edit, 35); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); k = 123; p = (void *) k; MEditSetValCallback(edit, ValidateCB, p); MEditSetActCallback(edit, ActEditCB, p); pb = MCreateImagePButtonExt(tb, "sys\\qmarkyellow.bmp", "sys\\qmarkblue.bmp", "", "sys\\qmarkred.bmp", "", ""); MButtonSetImageMaskByPixel(pb, 0, 0); MObjectSetTransparency(pb, 255); MObjectSetShadow(pb, WS_NONE, 0, 0); MObjectSetBackgroundRGB(pb, 56, 112, 112); MPButtonSetCallback(pb, PB_H_CB, (void *) 0); /* End CCD Window and vertical binning section ###############*/ /* lbl = MCreateLabel(obj, "Devices Offsets", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); */ rowform1 = MCreateRowForm(obj); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); MObjectSetResize(rowform1, True, True); MObjectSetCompositeWidth(rowform1, 347); /**************************************************************************/ //OFFSET HIRES 5 SECTION if (Cfg.Platform == 28) { lbl = MCreateLabel(rowform1, "HiresV OFFSET", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True,False); lbl = MCreateLabel(tb, "Offset", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255); MObjectSetTransparency(lbl, 0); if(DAS.Paramini.EqType == 9) //SPATRAM2 DAS.Marconi.Offset = 250; if(DAS.Paramini.EqType == 8) //GASCODNG4 DAS.Marconi.Offset = 270; sprintf(buff, "%d", DAS.Marconi.Offset); edit = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectAlign(edit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(edit); list = MOptionEditGetList(edit); for(i=0; i<512; i++) { t = i; sprintf(str, "%d", t); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(edit, str); MOptionEditSetListCallback(edit, edtCCDOffSet_CB, (void *) 0); DAS.Marconi.Offset = atoi(pla->item); } /**************************************************************************/ /*************************************************************************/ /* lbl = MCreateLabel(rowform1, "Input Mirror", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetCompositeWidth(lbl, 347); tb = MCreateTableForm(rowform1, 5); MTableFormSetColAlign(tb, 0, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); lbl = MCreateLabel(tb, "Home", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); for(i=0;i<4;i++) { if (DAS.Paramini.EqType != TROPOGAS) sprintf(buf, "%s",Mir_Code[i]); else sprintf(buf, "%s",Mir_CodeTropo[i]); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); } for(i=0;i<5;i++) { sprintf(buf, "%d",DAS.Paramini.Offset[i]); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 65); k= i + 300; MEditSetValCallback(edit, ValidateCB, (void *) k); MEditSetActCallback(edit, ActEditCB, (void *) k); } /* // Command Button Section /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/ rowform1 = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); // MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL); MPButtonSetCallback(pb, ApplyChCB, (void *) 0); if((DAS.Flag.exemode == DOASMODE) ) MObjectSetUnsensitive(pb); // Set the button as Unensitive MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(rowform1, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteParaminiCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(rowform1, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); /* End Command Button Section æææææææææææææææææææææææææææææææææææ*/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ /**************************************************************************************************************/ } // Create the Parameters page void CONFP_Param(int mod, MOBJECT mo) { MOBJECT rowform; // generic row form // MOBJECT rowform1; // generic row form // MOBJECT edit; // generic edit object // MOBJECT pb; // generic pushbutton and radiobutton // MOBJECT lbl; //generic label // MOBJECT tb; // generic table object MOBJECT PPARAM; // char buf[64]; // int k; MObjectSetText(mo, "Parametrs"); rowform = MCreateRowForm(mo); MObjectSetBackgroundRGB(rowform, 56, 112, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); //357 MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); PPARAM = MCreateTabbedRowForm(rowform, 5, FIXED_SMALL); MObjectSetForegroundRGB(PPARAM, 255, 255, 255); MObjectSetBackgroundRGB(PPARAM, 56, 112, 112); MObjectAlign(PPARAM, CENTER_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(PPARAM, 357); MObjectSetResize(PPARAM, False, False); CONFP_param_page1(0, PPARAM); MPagedFormSetActivePage(PPARAM, 1); //Creation page 2 CONFP_param_page2(0, PPARAM); MPagedFormSetActivePage(PPARAM, 2); //Creation page 3 CONFP_param_page3(0, PPARAM); MPagedFormSetActivePage(PPARAM, 3); //Creation page 4 CONFP_param_page4(0, PPARAM); MPagedFormSetActivePage(PPARAM, 4); //Creation page 5 CONFP_param_page5(0, PPARAM); MPagedFormSetActivePage(PPARAM, 0); } void DB_MeasMode_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case 0: DAS.DOption.measmode = 0; //Single Meas MObjectSetUnsensitive(DAS.Gui.ConfigPanel.tbavg); //if (DAS.Marconi.AVGmat != 0) // free(DAS.Marconi.AVGmat); break; case 1: DAS.DOption.measmode = 1; //Average MObjectSetSensitive(DAS.Gui.ConfigPanel.tbavg); //if (DAS.Marconi.AVGmat != 0) //DAS.Marconi.AVGmat = AllocFloatMat(IDX, IDY); //np = (long) IDX * IDY * 2; //AVGmat = malloc(np * 4); //memset(AVGmat, 0, np * 4); break; } } } void DB_AVGAutoR_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case 0: DAS.DOption.avgautor = 1; //Autorange before average break; case 1: DAS.DOption.avgautor = 0; //NO Autorange before average break; } } } void SelDefPixFileCB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; char buf[_MAX_PATH]; char fname[_MAX_PATH], dirname[_MAX_PATH]; char str[_MAX_PATH]; // unsigned long ns; FB_PREFS fbp; strcpy (dirname, MGetCurrentDirectory ()); fname[0] = '\0'; memset (&fbp, 0, sizeof (fbp)); fbp.change_cwd = True; fbp.allow_dir_create = True; fbp.allow_dir_rename = True; fbp.allow_dir_delete = True; fbp.transparent_tree = False; fbp.font = HELV_SMALL; fbp.button_font = HELV_SMALL; //Set Img file sprintf(buf, "%s\\%s", BIL.DFILEM.HOMEDIRECTORY, "sys\\Tile2.bmp" ); fbp.bg_image_file =buf; er = MFileBrowseExt ("Select CCD Mask File", "*.cor", fname, dirname, &fbp); sprintf(DAS.DOption.DEFPIXFILENAME, "%s", fname); sprintf(buf, "%s%s", dirname, DAS.DOption.DEFPIXFILENAME); //if(DI_FileExist(buff)) // DI_FileExist --> Return: 1 if PATH exist, else return 0 // return 37; MObjectSetText(DAS.Gui.ConfigPanel.lblCorrPixF, DAS.DOption.DEFPIXFILENAME); //Load File er = LoadDB_DefectPixel(buf); if (er) { sprintf (str, "File: %s, Not FOUND", buf); MMessageDialog("DAS Inf.", str, "OK", NULL); } } // create the 1st page of the option page void CONFP_opt_page1(int mod, MOBJECT obj) { MOBJECT rowform; // generic row form MOBJECT pb, rb ; MOBJECT colform; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT tbavg; MOBJECT lbl; MOBJECT tb; // generic table object char buf[64]; int k, *p; MObjectSetText(obj, "Page 1"); /***************************************************************************/ /*********** Saving Mode Section - Start ****************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "SAVING OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Saving Mode:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 150); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "ASCII", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioModeSelCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(!DAS.DOption.savingmode) MRButtonActivate(rb); rb = MCreateRButton(tb, "Binary", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioModeSelCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.savingmode) MRButtonActivate(rb); /***************************************************************************/ /*********** Saving Mode Section - End ******************************/ /***************************************************************************/ /***************************************************************************/ /*********** File Name Type Section - Start *************************/ /***************************************************************************/ tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Saving File Names:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 150); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Free ", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFNSelCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(!DAS.DOption.filename) MRButtonActivate(rb); rb = MCreateRButton(tb, "Automatic", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFNSelCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); //MObjectSetResize(rb, False, False); if(DAS.DOption.filename) MRButtonActivate(rb); /***************************************************************************/ /*********** File Name Type Section - End ***************************/ /***************************************************************************/ /***************************************************************************/ /*********** START IMAGE TYPE SECTION *******************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "Type of Images:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); rowform = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, True, False); rb = MCreateRButton(rowform, "MONO ", FIXED_SMALL); MPButtonSetCallback(rb, DB_ImgTypeCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(!DAS.DOption.imgtype) MRButtonActivate(rb); rb = MCreateRButton(rowform, "RGB", FIXED_SMALL); MPButtonSetCallback(rb, DB_ImgTypeCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, False, False); if(DAS.DOption.imgtype) MRButtonActivate(rb); pb = MCreatePButton(rowform, "Apply img", FIXED_SMALL); MPButtonSetCallback(pb, ApplyImgCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); /***************************************************************************/ /*********** END IMAGE TYPE SECTION *******************************/ /***************************************************************************/ /***************************************************************************/ /*********** START AVERAGING SECTION *******************************/ /***************************************************************************/ DAS.Gui.ConfigPanel.tbavg = MCreateTableForm(obj, 1); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.tbavg, 112, 128, 112); MObjectSetResize(DAS.Gui.ConfigPanel.tbavg, True, False); // lbl = MCreateLabel(obj, "AVERAGE", FIXED_SMALL); lbl = MCreateLabel(DAS.Gui.ConfigPanel.tbavg, "AVERAGE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetBackgroundRGB(lbl, 96, 132, 152); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); /////////////////////////////////////////////////////// //tb = MCreateTableForm(obj, 3); tb = MCreateTableForm(DAS.Gui.ConfigPanel.tbavg, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Automatic ARange for AVG ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); //MObjectSetCompositeWidth(lbl, 200); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_AVGAutoR_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.avgautor == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_AVGAutoR_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.avgautor == 0) MRButtonActivate(rb); //tb = MCreateTableForm(obj, 2); tb = MCreateTableForm(DAS.Gui.ConfigPanel.tbavg, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.FixTExp = MCreateRButton(tb, "Fix TExp. ", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.FixTExp, DB_RadioAvgModeCB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.FixTExp, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.FixTExp, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.FixTExp, 85); DAS.Gui.ConfigPanel.FixMeasNum = MCreateRButton(tb, "Fix Meas. Number", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.FixMeasNum, DB_RadioAvgModeCB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.FixMeasNum, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.FixMeasNum, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.FixMeasNum, 123); if(DAS.DOption.avgmode) { DAS.Gui.ConfigPanel.lblAvg = MCreateLabel(tb, "TOT Exposure Time :", FIXED_SMALL); MLabelSetAlignment(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblAvg, 255, 255, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblAvg, 0); MObjectSetResize(DAS.Gui.ConfigPanel.lblAvg, False, False); MObjectAlign(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d", TOTTEXP); DAS.Gui.ConfigPanel.n_avg = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.n_avg, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.n_avg, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.n_avg, 35); MObjectAlign(DAS.Gui.ConfigPanel.n_avg, LEFT_ALIGN, TOP_ALIGN); k = 111; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.n_avg, ActEditCB, p); MRButtonActivate(DAS.Gui.ConfigPanel.FixTExp); } else { DAS.Gui.ConfigPanel.lblAvg = MCreateLabel(tb, "Repeat measure for: ", FIXED_SMALL); MLabelSetAlignment(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblAvg, 255, 255, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblAvg, 0); MObjectSetResize(DAS.Gui.ConfigPanel.lblAvg, False, False); MObjectAlign(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",N_AVG); DAS.Gui.ConfigPanel.n_avg = MCreateClippedEdit(tb, " ", 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.n_avg, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.n_avg, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.n_avg, 35); MObjectAlign(DAS.Gui.ConfigPanel.n_avg, LEFT_ALIGN, TOP_ALIGN); k = 111; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.n_avg, ActEditCB, p); MRButtonActivate(DAS.Gui.ConfigPanel.FixMeasNum); } /***************************************************************************/ /*********** END AVERAGING SECTION *******************************/ /***************************************************************************/ /***************************************************************************/ /*********** START MEASURING mode SECTION *******************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "MEASURING MODE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetBackgroundRGB(lbl, 96, 132, 152); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); //table for selecting Single or Averaged measurements tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "SINGLE", FIXED_SMALL); MPButtonSetCallback(rb, DB_MeasMode_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.measmode == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "AVERAGE", FIXED_SMALL); MPButtonSetCallback(rb, DB_MeasMode_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.measmode == 1) MRButtonActivate(rb); /***************************************************************************/ /*********** END MEASURING mode SECTION *******************************/ /***************************************************************************/ /*******************************************************************************/ /************* START Defective Pixel Correction SECTION ***********************/ /*******************************************************************************/ lbl = MCreateLabel(obj, "DEFECTIVE PIXELS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); pb = MCreatePButton(tb, "Map UNDER Exp", FIXED_SMALL); MPButtonSetCallback(pb, UnderOverPixCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); //MObjectSetCompositeWidth(pb, 250); pb = MCreatePButton(tb, "Map OVER Exp (T=0)", FIXED_SMALL); MPButtonSetCallback(pb, UnderOverPixCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); //MObjectSetCompositeWidth(pb, 220); pb = MCreatePButton(tb, "Map OVER Exp (T=5)", FIXED_SMALL); MPButtonSetCallback(pb, UnderOverPixCB, (void *) 2); MObjectSetBackgroundRGB(pb, 224, 224, 176); //MObjectSetCompositeWidth(pb, 220); lbl = MCreateLabel(obj, "Defective Pixel Correction:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 220); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbCorrPix[0] = MCreateRButton(tb, "DISABLE", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbCorrPix[0], DB_RadioPixCorrCB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbCorrPix[0], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbCorrPix[0], 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbCorrPix[0], 85); DAS.Gui.ConfigPanel.rbCorrPix[1] = MCreateRButton(tb, "ENABLE", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbCorrPix[1], DB_RadioPixCorrCB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbCorrPix[1], RIGHT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbCorrPix[1], 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbCorrPix[1], 123); colform = MCreateColForm(obj); MObjectSetBackgroundRGB(colform, 112, 128, 112); MObjectSetResize(colform, True, False); DAS.Gui.ConfigPanel.lblCorrPixF = MCreateLabel(colform, DAS.DOption.DEFPIXFILENAME, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblCorrPixF, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblCorrPixF, 96, 132, 152); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblCorrPixF, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); //MObjectSetCompositeWidth(lbl, 220); DAS.Gui.ConfigPanel.pbBrowseCorrPixF = MCreatePButton(colform, "...", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, SelDefPixFileCB, (void *) 0); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, 224, 224, 176); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, 30); MObjectAlign(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, RIGHT_ALIGN, TOP_ALIGN); if(!DAS.DOption.pixcorr) MRButtonActivate(DAS.Gui.ConfigPanel.rbCorrPix[0]); if(DAS.DOption.pixcorr) MRButtonActivate(DAS.Gui.ConfigPanel.rbCorrPix[1]); /*******************************************************************************/ /************* END Defective Pixel Correction SECTION ***********************/ /*******************************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 2nd page of the option page void CONFP_opt_page2(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT pb, rb ; MOBJECT lbl; MOBJECT tb ; // generic table object char buf[64]; int i,k, *p; MObjectSetText(obj, "Page 2"); /***************************************************************************/ /***************************************************************************/ /*********** START DARK MEASUREMENT SECTION *******************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "DARK IMAGE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Remove Dark from Measurements ? ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.DOption.darkremove) MRButtonActivate(rb); MPButtonSetCallback(rb, DB_RadioDarkCB, (void *) 1); rb = MCreateRButton(tb, "No", FIXED_SMALL); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if(!DAS.DOption.darkremove) MRButtonActivate(rb); MPButtonSetCallback(rb, DB_RadioDarkCB, (void *) 0); lbl = MCreateLabel(obj, "Dark Source", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.FFDark = MCreateRButton(tb, "Full Frame", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.FFDark, DB_RadDrkSourceCB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.FFDark, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.FFDark, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.FFDark, 85); // if(DAS.DOption.darkremove) if(DAS.DOption.darksource) MRButtonActivate(DAS.Gui.ConfigPanel.FFDark); DAS.Gui.ConfigPanel.BPDark = MCreateRButton(tb, "Blind Pixels", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.BPDark, DB_RadDrkSourceCB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.BPDark, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.BPDark, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.BPDark, 123); // if(DAS.DOption.darkremove) if(!DAS.DOption.darksource) MRButtonActivate(DAS.Gui.ConfigPanel.BPDark); if (DAS.DOption.darkremove==0) { MObjectSetUnsensitive(DAS.Gui.ConfigPanel.FFDark); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.BPDark); } else { MObjectSetSensitive(DAS.Gui.ConfigPanel.FFDark); MObjectSetSensitive(DAS.Gui.ConfigPanel.BPDark); } /***************************************************************************/ /*********** END DARK MEASUREMENT SECTION ****************************/ /***************************************************************************/ /*---------------------------------------------------------------*/ /***************************************************************************/ /*********** START CCD TARGET TEMPERATURE SECTION *********************/ /***************************************************************************/ lbl = MCreateLabel(obj, "CCD TARGET TEMPERATURE", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "FIXED", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetCCDTargetTempCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(!FLAG.settempvar) MRButtonActivate(rb); rb = MCreateRButton(tb, "SZA DRIVED", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetCCDTargetTempCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if(FLAG.settempvar) MRButtonActivate(rb); /***************************************************************************/ /*********** END CCD TARGET TEMPERATURE SECTION *********************/ /***************************************************************************/ /*-----------------------------------------------------------------------*/ /***************************************************************************/ /***************************************************************************/ /************** START AUTORANGING SECTION ************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "AUTORANGING", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); //MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Max Autoranging value (<= 63000) ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); //MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%d",DAS.DOption.maxlvlar); DAS.Gui.ConfigPanel.edmaxlvlar = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edmaxlvlar, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edmaxlvlar, 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edmaxlvlar, LEFT_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.edmaxlvlar, 50); k = 600; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.edmaxlvlar, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.edmaxlvlar, ActEditCB, p); /***************************************************************************/ /************** STOP AUTORANGING SECTION ************************/ /***************************************************************************/ /***************************************************************************/ /***************************************************************************/ /************** START CONFIGURATION FILES SECTION ************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "CONFIG FILES", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "View/Modify", FIXED_SMALL); MPButtonSetCallback(rb, DB_VMRsfCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if(!FLAG.VMRsf) MRButtonActivate(rb); rb= MCreateRButton(tb, "ReLoad", FIXED_SMALL); MPButtonSetCallback(rb, DB_VMRsfCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); MObjectSetUnsensitive(rb); if(FLAG.VMRsf) MRButtonActivate(rb); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); pb = MCreatePButton(tb, "Param.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "DASSysColor.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "Options.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 2); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "ccd_defect_Danbo.cor", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 3); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "GeoCoord.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 4); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "AMS.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 6); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "Equipment.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 7); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "WlStep.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 8); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "Free Editor", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 5); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); /***************************************************************************/ /************** END CONFIGURATION FILES SECTION ************************/ /***************************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 3rd page of the option page void CONFP_opt_page3(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT rb ; MOBJECT lbl; MOBJECT tb ; // generic table object int k, *p; char buf[64]; MObjectSetText(obj, "Page 3"); /***************************************************************************/ /***************************************************************************/ /******************* START PLOT OPTIONS SECTION **********************/ /***************************************************************************/ lbl = MCreateLabel(obj, "PLOT OPTIONS", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "X Axis Units", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "PIXEL", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(FLAG.Wl == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "WAVEL [A]", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(FLAG.Wl == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "WAVEL [nm]", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(FLAG.Wl == 2) MRButtonActivate(rb); /* if(FLAG.Wl == 0) MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[0]); else if(FLAG.Wl == 1) MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[1]); else if(FLAG.Wl == 2) MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[2]); */ /*----------------- DISPLAY or NOT Plot after measurement -----------------*/ lbl = MCreateLabel(obj, "Display PLOT after measurement ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 300); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "No ", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotDisplayCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Flag.plotW == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotDisplayCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(DAS.Flag.plotW == 1) MRButtonActivate(rb); /* if(FLAG.plotW == 0) MRButtonActivate(DAS.Gui.ConfigPanel.PlotDisp[0]); else if(FLAG.plotW == 1) MRButtonActivate(DAS.Gui.ConfigPanel.PlotDisp[1]); */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " Y Axis", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Full Range", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotYAxisCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); MObjectSetResize(rb, True, False); if(FLAG.plotYRange == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Min/Max", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotYAxisCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); MObjectSetResize(rb, True, False); if(FLAG.plotYRange == 1) MRButtonActivate(rb); /* if(FLAG.plotYRange == 0) MRButtonActivate(DAS.Gui.ConfigPanel.PlotYAxis[0]); else if(FLAG.plotYRange == 1) MRButtonActivate(DAS.Gui.ConfigPanel.PlotYAxis[1]); /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*-------------------------------------------------------------------------*/ /* Hidden Lines section */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " Hidden lines ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Before Central Line ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%d",DAS.DOption.hlinebefore); DAS.Gui.ConfigPanel.HiddenL = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.HiddenL, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.HiddenL, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.HiddenL, 35); MObjectAlign(DAS.Gui.ConfigPanel.HiddenL, LEFT_ALIGN, TOP_ALIGN); k = 130; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.HiddenL, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.HiddenL, ActEditCB, p); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "After Central Line ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%d",DAS.DOption.hlineafter); DAS.Gui.ConfigPanel.HiddenL = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.HiddenL, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.HiddenL, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.HiddenL, 35); MObjectAlign(DAS.Gui.ConfigPanel.HiddenL, LEFT_ALIGN, TOP_ALIGN); k = 135; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.HiddenL, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.HiddenL, ActEditCB, p); /*-------------------------------------------------------------------------*/ /* Blind Pixel section */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " Display Blind Pixel? ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_DispBlindPixCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); MObjectSetResize(rb, True, False); if(FLAG.DispBlindPix == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_DispBlindPixCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); MObjectSetResize(rb, True, False); if(FLAG.DispBlindPix == 1) MRButtonActivate(rb); /*-------------------------------------------------------------------------*/ /***************************************************************************/ /******************* END PLOT OPTIONS SECTION **********************/ /***************************************************************************/ /*-------------------------------------------------------------------------*/ /* SZA Limit section */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " SZA Limit ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Perform Measurements for SZA <= ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%d",SZAMax); DAS.Gui.ConfigPanel.SZAMax = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SZAMax, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SZAMax, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.SZAMax, 35); MObjectAlign(DAS.Gui.ConfigPanel.SZAMax, LEFT_ALIGN, TOP_ALIGN); k = 120; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.SZAMax, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.SZAMax, ActEditCB, p); lbl = MCreateLabel(tb, " ° ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); /**************************************************************/ /***************************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 4th page of the option page void CONFP_opt_page4(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT pb, rb ; MOBJECT lbl; MOBJECT tb ; // generic table object int k, *p; char buf[64]; MObjectSetText(obj, "Page 4"); /***************************************************************************/ /******************* BACK-UP SECTION *************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "BACK-UP OPTIONS", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Perform FTP Back-Up", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFTPCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if (DAS.DOption.ftpbackup) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFTPCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if (!DAS.DOption.ftpbackup) MRButtonActivate(rb); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Server FTP Address:", FIXED_SMALL); MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%s",DFTP.ftpserver); DFTP.edServerFTP = MCreateClippedEdit(tb, buf, 15, 15, FIXED_SMALL); MObjectSetForegroundRGB(DFTP.edServerFTP, 255, 255, 255); MObjectSetBackgroundRGB(DFTP.edServerFTP, 40, 96, 72); // MObjectSetCompositeWidth(DFTP.edServerFTP, 35); MObjectAlign(DFTP.edServerFTP, RIGHT_ALIGN, TOP_ALIGN); k = 200; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DFTP.edServerFTP, ActEditCB, p); if (!DAS.DOption.ftpbackup) MEditEnableEditing(DFTP.edServerFTP); lbl = MCreateLabel(tb, "UserName:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%s",DFTP.ftpuser); DFTP.edid = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DFTP.edid, 255, 255, 255); MObjectSetBackgroundRGB(DFTP.edid, 40, 96, 72); // MObjectSetCompositeWidth(DFTP.edid, 35); MObjectAlign(DFTP.edid, RIGHT_ALIGN, TOP_ALIGN); k = 210; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DFTP.edid, ActEditCB, p); lbl = MCreateLabel(tb, "PWD:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%s",DFTP.ftppwd); DFTP.edpwd= MCreateHiddenEdit(tb, buf, 10, FIXED_SMALL, '*'); MObjectSetForegroundRGB(DFTP.edpwd, 255, 255, 255); MObjectSetBackgroundRGB(DFTP.edpwd, 40, 96, 72); // MObjectSetCompositeWidth(DFTP.edpwd, 35); MObjectAlign(DFTP.edpwd, RIGHT_ALIGN, TOP_ALIGN); k = 220; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DFTP.edpwd, ActEditCB, p); /* if (DAS.DOption.ftpbackup) MRButtonActivate(DFTP.rb[0]); else MRButtonActivate(DFTP.rb[1]); */ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); pb = MCreatePButton(tb, "Save FTP.INI", FIXED_SMALL); MPButtonSetCallback(pb, PbftpCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 94); pb = MCreatePButton(tb, "Test FTP", FIXED_SMALL); MPButtonSetCallback(pb, PbftpCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 94); /***************************************************************************/ /**************** OMU Thermo-regulation SECTION ***********************/ /***************************************************************************/ lbl = MCreateLabel(obj, "OMU THERMO-REGULATION", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Choose the Reference temp", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Pelt. Int.", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.refertemp == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Optic", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.refertemp == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "Grating", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.refertemp == 2) MRButtonActivate(rb); lbl = MCreateLabel(obj, "Choose the Thermo-regulation mode", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Cold only", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 3); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(OMUTHR.TRType == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Heat only", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 4); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(OMUTHR.TRType == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "Cold/Heat", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 5); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(OMUTHR.TRType == 2) MRButtonActivate(rb); /***************/ lbl = MCreateLabel(obj, "Choose the Thermo-reg. Algorithm", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Progressive", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 6); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(OMUTHR.PID_On == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "PID", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 7); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(OMUTHR.PID_On == 1) MRButtonActivate(rb); if(OMUTHR.PID_On == 1) //Create the field for PID Parameters { tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Prop.", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 90); lbl = MCreateLabel(tb, "Integral", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 90); lbl = MCreateLabel(tb, "Deriv.", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 90); sprintf(buf, "%.1lf",OMUTHR.PID_kp); DAS.Gui.ConfigPanel.PID_edt[0] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[0], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.PID_edt[0], 40, 96, 72); k = 500; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.PID_edt[0], ActEditCB, p); sprintf(buf, "%.3lf",OMUTHR.PID_ki); DAS.Gui.ConfigPanel.PID_edt[1] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[1], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.PID_edt[1], 40, 96, 72); k = 501; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.PID_edt[1], ActEditCB, p); sprintf(buf, "%.4lf",OMUTHR.PID_kd); DAS.Gui.ConfigPanel.PID_edt[2] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[2], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.PID_edt[2], 40, 96, 72); k = 502; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.PID_edt[2], ActEditCB, p); } pb = MCreatePButton(obj, "Temp History", FIXED_SMALL); MPButtonSetCallback(pb, PBTempHistoCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 123); /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 5th page of the option page void CONFP_opt_page5(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT rb ; MOBJECT lbl; MOBJECT tb,tb1 ; // generic table object // int i,k, *p; // char buf[64]; MObjectSetText(obj, "Page 5"); lbl = MCreateLabel(obj, "MIRROR IMAGE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb1 = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb1, 112, 128, 112); MObjectSetResize(tb1, True, False); lbl = MCreateLabel(tb1, "Along the X Axis ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); lbl = MCreateLabel(tb1, "Along the Y Axis ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(tb1, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.mirrorimg[XAX] == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.mirrorimg[XAX] == 0) MRButtonActivate(rb); tb = MCreateTableForm(tb1, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.mirrorimg[YAX] == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 3); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.mirrorimg[YAX] == 0) MRButtonActivate(rb); lbl = MCreateLabel(obj, "AMS OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Positioning Mode", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Simultaneous", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSposmode_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.smposmode == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "Sequential", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSposmode_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.smposmode == 0) MRButtonActivate(rb); lbl = MCreateLabel(obj, "Display progression bars?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSProgBar_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.amsprogbar == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSProgBar_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.amsprogbar == 0) MRButtonActivate(rb); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ lbl = MCreateLabel(obj, "MIGE Platform OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "MIGE Status", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbMIGEStatus[0]=MCreateRButton(tb, "NOT Connected", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEStatus[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEStatus[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEStatus[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.linked == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[0]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEStatus[0], DB_MIGE_CB, (void *) 0); DAS.Gui.ConfigPanel.rbMIGEStatus[1] = MCreateRButton(tb, "Connected", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEStatus[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEStatus[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEStatus[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.linked == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[1]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEStatus[1], DB_MIGE_CB, (void *) 1); lbl = MCreateLabel(obj, "MIGE Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbMIGEtype[0] = MCreateRButton(tb, "Ver. 0.5", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEtype[0], DB_MIGEType_CB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEtype[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEtype[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEtype[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.type == 0 ) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEtype[0]); DAS.Gui.ConfigPanel.rbMIGEtype[1] = MCreateRButton(tb, "Ver. 1.5", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEtype[1], DB_MIGEType_CB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEtype[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEtype[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEtype[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.type == 1 ) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEtype[1]); DAS.Gui.ConfigPanel.rbMIGEtype[2] = MCreateRButton(tb, "Ver. 2.0", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEtype[2], DB_MIGEType_CB, (void *) 2); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEtype[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEtype[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEtype[2], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.type == 2 ) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEtype[2]); lbl = MCreateLabel(obj, "Operating mode", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbMIGEopmode[0] = MCreateRButton(tb, "Solar Tracker", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEopmode[0], DB_MIGEopmode_CB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEopmode[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEopmode[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEopmode[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.aaopmode == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEopmode[0]); DAS.Gui.ConfigPanel.rbMIGEopmode[1] = MCreateRButton(tb, "Anti Solar Tracker", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEopmode[1], DB_MIGEopmode_CB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEopmode[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEopmode[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEopmode[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.aaopmode == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEopmode[1]); DAS.Gui.ConfigPanel.rbMIGEopmode[2] = MCreateRButton(tb, "Free positions", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEopmode[2], DB_MIGEopmode_CB, (void *) 2); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEopmode[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEopmode[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEopmode[2], True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.aaopmode == 2) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEopmode[2]); if(DAS.MIGE.linked == 0) { MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[1]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[2]); } else MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[2]); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } void edtDASReset_CB(MOBJECT p, LIST_ACT *la, void *ad) { int c = (int) ad; int er = 0; DAS.DOption.resetFreq = atoi(la->item); } void DB_ResetEnable_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; // char buff[64], str[32]; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case 0: DAS.DOption.resetEnabled = 0; MObjectSetUnsensitive(DAS.Gui.ConfigPanel.listReset); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.edtDASReset); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.lblReset); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbDASResPer[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbDASResPer[1]); break; case 1: DAS.DOption.resetEnabled = 1; MObjectSetSensitive(DAS.Gui.ConfigPanel.listReset); MObjectSetSensitive(DAS.Gui.ConfigPanel.edtDASReset); MObjectSetSensitive(DAS.Gui.ConfigPanel.lblReset); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbDASResPer[0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbDASResPer[1]); break; } } } void DB_ResetType_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v,i,k; char buff[64], str[32]; LIST_ACT * pla; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case RHOUR: DAS.DOption.resetType = RHOUR; if (DAS.Gui.ConfigPanel.lblReset != 0) { sprintf(buff, "%d", (int)DAS.DOption.resetFreq); MSListClear(DAS.Gui.ConfigPanel.listReset); for(i=1; i<24; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(DAS.Gui.ConfigPanel.listReset, k-1); pla = MSListGetSelected(DAS.Gui.ConfigPanel.listReset); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDASReset, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDASReset, edtDASReset_CB, (void *) 0); DAS.DOption.resetFreq = atoi(pla->item); sprintf(buff, "Hour(s)"); MObjectSetText(DAS.Gui.ConfigPanel.lblReset, buff); } break; case RDAY: DAS.DOption.resetType = RDAY; if (DAS.Gui.ConfigPanel.lblReset != 0) { sprintf(buff, "%d", (int)DAS.DOption.resetFreq); MSListClear(DAS.Gui.ConfigPanel.listReset); for(i=1; i<365; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(DAS.Gui.ConfigPanel.listReset, k-1); pla = MSListGetSelected(DAS.Gui.ConfigPanel.listReset); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDASReset, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDASReset, edtDASReset_CB, (void *) 0); DAS.DOption.resetFreq = atoi(pla->item); sprintf(buff, "Day(s)"); MObjectSetText(DAS.Gui.ConfigPanel.lblReset, buff); } break; } } } // create the 7th page of the option page void CONFP_opt_page7(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form // MOBJECT pb, rb ; MOBJECT lbl; MOBJECT tb; // generic table object int i,k; // char buf[64]; // MOBJECT list; // int starti; float f=0; char str[80]; char buff[_MAX_PATH]; LIST_ACT * pla; MObjectSetText(obj, "Page 7"); /******************************************************************/ /*************** SHUTTER ******************************************/ /******************************************************************/ lbl = MCreateLabel(obj, "SHUTTER OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Is the EMShutter Installed?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbSHUTStatus[0] = MCreateRButton(tb, "Yes", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTStatus[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTStatus[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTStatus[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.emshutter == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTStatus[0]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTStatus[0], DB_Shutter_CB, (void *) 1); DAS.Gui.ConfigPanel.rbSHUTStatus[1] = MCreateRButton(tb, "No", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.emshutter == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTStatus[1] ); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , DB_Shutter_CB, (void *) 0); lbl = MCreateLabel(obj, "Choose Shutter Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbSHUTType [0] = MCreateRButton(tb, "UniBlitz VS25", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTType [0], DB_ShutterType_CB, (void *) VS25); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTType [0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTType [0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTType [0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.shuttertype == VS25) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTType [0]); DAS.Gui.ConfigPanel.rbSHUTType [1] = MCreateRButton(tb, "Rotating Sh.", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTType [1], DB_ShutterType_CB, (void *) ROTSHUT); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTType [1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTType [1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTType [1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.shuttertype == ROTSHUT) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTType [1]); DAS.Gui.ConfigPanel.rbSHUTType[2] = MCreateRButton(tb, "Torque Motor", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTType[2], DB_ShutterType_CB, (void *) TORQUEM); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTType[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTType[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTType[2], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.shuttertype == TORQUEM) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTType[2]); if(DAS.DOption.emshutter == 0) { MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } else { MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } /******************************************************************/ /*************** END SHUTTER **************************************/ /******************************************************************/ /******************************************************************/ /*************** FILTER WHEEL *************************************/ /******************************************************************/ lbl = MCreateLabel(obj, "FILTER WHEEL OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Choose Installed Module", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbFilterType [0] = MCreateRButton(tb, "Simple-SM3", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbFilterType [0], DB_FilterType_CB, (void *) FSIMPLE); MObjectAlign(DAS.Gui.ConfigPanel.rbFilterType [0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbFilterType [0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbFilterType [0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.filtertype == FSIMPLE) MRButtonActivate(DAS.Gui.ConfigPanel.rbFilterType [0]); DAS.Gui.ConfigPanel.rbFilterType [1] = MCreateRButton(tb, "Double-SM3+SM4", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbFilterType [1], DB_FilterType_CB, (void *) FDOUBLE); MObjectAlign(DAS.Gui.ConfigPanel.rbFilterType [1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbFilterType [1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbFilterType [1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.filtertype == FDOUBLE) MRButtonActivate(DAS.Gui.ConfigPanel.rbFilterType [1]); DAS.Gui.ConfigPanel.rbFilterType[2] = MCreateRButton(tb, "Plus-SM3+TM", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbFilterType[2], DB_FilterType_CB, (void *) FPLUS); MObjectAlign(DAS.Gui.ConfigPanel.rbFilterType[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbFilterType[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbFilterType[2], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.filtertype == FPLUS) MRButtonActivate(DAS.Gui.ConfigPanel.rbFilterType[2]); /* if(DAS.DOption.emshutter == 0) { MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } else { MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } */ /******************************************************************/ /*************** END FILTER WHEEL ********************************/ /******************************************************************/ /******************************************************************/ /*************** RESET DAS Windows Restart ***********************/ /******************************************************************/ lbl = MCreateLabel(obj, "RESET WINDOWS OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); /*----------------------------------------------------------------*/ lbl = MCreateLabel(obj, "DAS/SYSTEM Reset ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbResetEnab[0] = MCreateRButton(tb, "Disabled", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbResetEnab[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbResetEnab[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbResetEnab[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.resetEnabled == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbResetEnab[0]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbResetEnab[0], DB_ResetEnable_CB, (void *) 0); DAS.Gui.ConfigPanel.rbResetEnab[1] = MCreateRButton(tb, "Enabled", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbResetEnab[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbResetEnab[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbResetEnab[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.resetEnabled == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbResetEnab[1]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbResetEnab[1], DB_ResetEnable_CB, (void *) 1); /*----------------------------------------------------------------*/ lbl = MCreateLabel(obj, "Reset Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbDASResPer[0] = MCreateRButton(tb, "HOUR(s)", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDASResPer[0], DB_ResetType_CB, (void *) RHOUR); MObjectAlign(DAS.Gui.ConfigPanel.rbDASResPer[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDASResPer[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbDASResPer[0], True, False); //MObjectSetCompositeWidth(rb, 100); DAS.Gui.ConfigPanel.rbDASResPer[1] = MCreateRButton(tb, "DAY(s)", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDASResPer[1], DB_ResetType_CB, (void *) RDAY); MObjectAlign(DAS.Gui.ConfigPanel.rbDASResPer[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDASResPer[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbDASResPer[1], True, False); //MObjectSetCompositeWidth(rb, 100); lbl = MCreateLabel(obj, "Reset Frequency", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Re-start every ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); //MObjectSetCompositeWidth(lbl, 250); sprintf(buff, "%d", (int)DAS.DOption.resetFreq); DAS.Gui.ConfigPanel.edtDASReset = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtDASReset, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtDASReset, 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edtDASReset, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.edtDASReset); DAS.Gui.ConfigPanel.listReset = MOptionEditGetList(DAS.Gui.ConfigPanel.edtDASReset); if (DAS.DOption.resetType) // Days { for(i=1; i<365; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } } else //hours { for(i=1; i<24; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } } /* list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtDSZA); for(i=0; i<20; i++) { f = f+0.10; sprintf(str, "%.3f",f); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDSZA, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDSZA, edtDSZA_CB, (void *) 0); SZADelta.DeltaSZA = atof(pla->item); */ MSListSelectElement(DAS.Gui.ConfigPanel.listReset, k-1); pla = MSListGetSelected(DAS.Gui.ConfigPanel.listReset); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDASReset, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDASReset, edtDASReset_CB, (void *) 0); DAS.DOption.resetFreq = atoi(pla->item); if (DAS.DOption.resetType) // Days sprintf(buff, "Day(s)", DAS.DOption.resetFreq); else sprintf(buff, "Hour(s)", DAS.DOption.resetFreq); DAS.Gui.ConfigPanel.lblReset = MCreateLabel(tb, buff, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblReset, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblReset, 96, 132, 152); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblReset, 0); MObjectSetShadow(DAS.Gui.ConfigPanel.lblReset, WS_ETCHED_IN, 1, 1); if(DAS.DOption.resetType == RHOUR) MRButtonActivate(DAS.Gui.ConfigPanel.rbDASResPer[0]); if(DAS.DOption.resetType == RDAY) MRButtonActivate(DAS.Gui.ConfigPanel.rbDASResPer[1]); /******************************************************************/ /*************** END RESET DAS ********************************/ /******************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } void CONFP_opt_ScheMeas(int mod, MOBJECT p) { // MOBJECT rowform; // generic row form MOBJECT rowform1; MOBJECT colform, colform2,colform3,colform4; MOBJECT rb ; MOBJECT lbl, list, optedit; // MOBJECT tb ; // generic table object int i; int lenedit = 12; char buf[64]; int maxangle; if (mod == 1) maxangle = 181; else maxangle = 96; colform = MCreateColForm(p); MFormSetSpacing(colform, 0); MObjectSetResize(colform, False, False); MObjectAlign(colform, CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform, 255); MObjectSetShadow(colform, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, True); MObjectAlign(rowform1, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(rowform1, 255); MObjectSetShadow(rowform1, WS_NONE, 0, 0); rb = MCreateRButton(rowform1, "", FIXED_SMALL); // MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetTransparency(rb, 255); MObjectSetResize(rb, True, False); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 1) // MRButtonActivate(rb); rb = MCreateRButton(rowform1, "", FIXED_SMALL); // MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); MObjectSetTransparency(rb, 255); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 0) // MRButtonActivate(rb); colform2 = MCreateColForm(colform); MFormSetSpacing(colform2, 0); MObjectSetResize(colform2, False, False); MObjectSetTransparency(colform2, 255); MObjectSetShadow(colform2, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform2); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, False); MObjectSetShadow(rowform1, WS_NONE, 0, 0); MObjectSetTransparency(rowform1, 255); colform3 = MCreateColForm(rowform1); MFormSetSpacing(colform3, 0); MObjectSetResize(colform3, False, False); MObjectAlign(colform3, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform3, 255); MObjectSetShadow(colform3, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); lbl = MCreateLabel(colform3, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, False, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } if (mod == 1) MSListSelectElement(list, 180); else MSListSelectElement(list, 95); colform4 = MCreateColForm(rowform1); MFormSetSpacing(colform4, 0); MObjectSetTransparency(colform4, 255); MObjectSetShadow(colform4, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); sprintf(buf, "<SZA<"); lbl = MCreateLabel(colform4, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "50"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 50); lbl = MCreateLabel(colform4, "OR", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "75"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 75); lbl = MCreateLabel(colform4, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } if (mod == 1) MSListSelectElement(list, 180); else MSListSelectElement(list, 95); } // create the 6th page of the option page void CONFP_opt_page6(int mod, MOBJECT obj) { MOBJECT rowform; // generic row form // MOBJECT colform, colform1,colform2,colform3,colform4; // MOBJECT pb, rb ; MOBJECT lbl, list, optedit; MOBJECT tb ; // generic table object int i; int lenedit = 12; char buf[64], str[16]; unsigned char lesseq = 242, greateq=241; MObjectSetText(obj, "Page 6"); lbl = MCreateLabel(obj, "INPUTS <--> DEVICES", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); /* lbl = MCreateLabel(obj, "Input <--> Device", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ tb = MCreateTableForm(obj, 4); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, False, False); if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) sprintf(str, "%s",Mir_CodeTropo[0]); else sprintf(str, "%s",Mir_Code[0]); sprintf(buf, "%s",str); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%s",DeviceTypeInput[0]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) MSListSelectElement(list, 2); else MSListSelectElement(list, 0); sprintf(buf, "%s",Mir_Code[1]); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%s",DeviceTypeInput[6]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 1); if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) sprintf(str, "%s",Mir_CodeTropo[2]); else sprintf(str, "%s",Mir_Code[2]); sprintf(buf, "%s",str); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) sprintf(buf, "%s",DeviceTypeInput[7]); else sprintf(buf, "%s",DeviceTypeInput[2]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) MSListSelectElement(list, 7); else MSListSelectElement(list, 2); sprintf(buf, "%s",Mir_Code[3]); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%s",DeviceTypeInput[3]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 3); lbl = MCreateLabel(obj, "MEASUREMENTS SCHEDULING", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); /***************************************************************/ // 1 start rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "ZenithSky", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(0, rowform); /* colform = MCreateColForm(rowform); MFormSetSpacing(colform, 0); MObjectSetResize(colform, False, False); MObjectAlign(colform, CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform, 255); MObjectSetShadow(colform, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, True); MObjectAlign(rowform1, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(rowform1, 255); MObjectSetShadow(rowform1, WS_NONE, 0, 0); rb = MCreateRButton(rowform1, "", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetTransparency(rb, 255); MObjectSetResize(rb, True, False); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 1) // MRButtonActivate(rb); rb = MCreateRButton(rowform1, "", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); MObjectSetTransparency(rb, 255); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 0) // MRButtonActivate(rb); colform2 = MCreateColForm(colform); MFormSetSpacing(colform2, 0); MObjectSetResize(colform2, False, False); MObjectSetTransparency(colform2, 255); MObjectSetShadow(colform2, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform2); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, False); MObjectSetShadow(rowform1, WS_NONE, 0, 0); MObjectSetTransparency(rowform1, 255); colform3 = MCreateColForm(rowform1); MFormSetSpacing(colform3, 0); MObjectSetResize(colform3, False, False); MObjectAlign(colform3, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform3, 255); MObjectSetShadow(colform3, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); lbl = MCreateLabel(colform3, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, False, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 95); colform4 = MCreateColForm(rowform1); MFormSetSpacing(colform4, 0); MObjectSetTransparency(colform4, 255); MObjectSetShadow(colform4, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); sprintf(buf, "<SZA<"); lbl = MCreateLabel(colform4, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "50"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 50); lbl = MCreateLabel(colform4, "OR", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "75"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 75); lbl = MCreateLabel(colform4, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 95); // 1 End /***************************************************************/ /***************************************************************/ // 2 start rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "Horizontal", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(1, rowform); /* lbl = MCreateLabel(obj, "Horizontal", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "Radiometric", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(0, rowform); /* lbl = MCreateLabel(obj, "Radiometric", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "Off-Axis", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(0, rowform); /* lbl = MCreateLabel(obj, "Off-Axis", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } //Create the Option page (with 6 sub-pages) void CONFP_Options(int mod, MOBJECT mo) { MOBJECT rowform; // generic row form MOBJECT rowform1; // generic row form // MOBJECT PFAMS; // paged form for AMS MOBJECT POPT; // paged form for AMS // MOBJECT edit; // generic edit object // MOBJECT radiobutt[2]; // generic radio button // MOBJECT RColButt; MOBJECT pb; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; // MOBJECT lbl; MOBJECT tb; // generic table object // char buf[64]; // int *p; MObjectSetText(mo, "Options"); rowform = MCreateRowForm(mo); MObjectSetBackgroundRGB(rowform, 112, 128, 112); // MObjectSetResize(rowform, True, True); MObjectSetCompositeWidth(rowform, 400); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); POPT = MCreateTabbedRowForm(rowform, 7, FIXED_SMALL); MObjectSetForegroundRGB(POPT, 255, 255, 255); MObjectSetBackgroundRGB(POPT, 112, 128, 112); MObjectAlign(POPT, CENTER_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(POPT, 390); MObjectSetResize(POPT, False, False); //Creation page 1 CONFP_opt_page1(0, POPT); MPagedFormSetActivePage(POPT, 1); //Creation page 2 CONFP_opt_page2(0, POPT); MPagedFormSetActivePage(POPT, 2); //Creation page 3 CONFP_opt_page3(0, POPT); MPagedFormSetActivePage(POPT, 3); //Creation page 4 CONFP_opt_page4(0, POPT); MPagedFormSetActivePage(POPT, 4); //Creation page 5 CONFP_opt_page5(0, POPT); MPagedFormSetActivePage(POPT, 5); //Creation page 6 CONFP_opt_page6(0, POPT); MPagedFormSetActivePage(POPT, 6); //Creation page 7 CONFP_opt_page7(0, POPT); MPagedFormSetActivePage(POPT, 0); // Command Button Section rowform1 = MCreateRowForm(mo); MObjectSetBackgroundRGB(rowform1, 112, 128, 112); //MObjectSetResize(rowform, False, True); MObjectSetCompositeWidth(rowform1, 357); MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform1, 2); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); pb = MCreatePButton(tb, "Save", FIXED_SMALL); MPButtonSetCallback(pb, WriteOptioniniCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); } void AMS_AdvancedCB(MOBJECT o, void *od, void *ad) { char buff[_MAX_PATH]; int f; STARTUPINFO si; PROCESS_INFORMATION pi; // chdir(buff); sprintf(buff,"%s\\%s",BIL.DFILEM.HOMEDIRECTORY, "\\AMSTester50\\AMS50.exe"); // WinExec(buff, 1); // // perform the equivalent of WinExec in NT, but we use a Unicode string // memset(&si, 0, sizeof(si)); si.cb = sizeof(si); si.dwFlags= STARTF_USESHOWWINDOW; si.wShowWindow = SW_SHOW; f = CreateProcess(NULL, buff, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); // sprintf(buff,"%ss",BIL.DFILEM.HOMEDIRECTORY, "SolPosCalc"); chdir(BIL.DFILEM.HOMEDIRECTORY); } MOBJECT MDCreateDASConfig(void) { // MOBJECT _shell000; MOBJECT POCF; //Paged form for configuration panel // MOBJECT POPT; //Paged form for options MOBJECT rowform; // generic row form MOBJECT rowform1; // generic row form // MOBJECT PFAMS; // paged form for AMS // MOBJECT edit; // generic edit object // MOBJECT radiobutt[2]; // generic radio button MOBJECT RColButt; MOBJECT pb; // generic push button // MOBJECT rb; // generic radio button MOBJECT list; MOBJECT _tbutton000; MOBJECT _tbutton001; MOBJECT form2; MOBJECT label, lbl; MOBJECT tb; // generic table object // MOBJECT frm2_tb4; int r, g, b; int i; char buf[64]; // double percentuale,speedhz; const char *fontfamily; // struct confp *pconfp; LoadGeoDB(); MGetDefaultBackgroundRGB(&r, &g, &b); drawarea_bgc = MAllocColor(r, g, b); /********************************************************/ /************* MAIN SHELL *************************/ /********************************************************/ DAS.Gui.ConfigPanel.ShellConfig = MCreateShell("DAS Config", 0); MObjectSetResize(DAS.Gui.ConfigPanel.ShellConfig, True, True); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.ShellConfig, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.ShellConfig, 96, 132, 152); MObjectSetResize(DAS.Gui.ConfigPanel.ShellConfig, True, True); MObjectAlign(DAS.Gui.ConfigPanel.ShellConfig, CENTER_ALIGN, TOP_ALIGN); // MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.ShellConfig, 670); // MObjectSetCompositeHeight(DAS.Gui.ConfigPanel.ShellConfig, 483); /********************************************************/ /************* CONFIG PAGED FORM **********************/ /********************************************************/ POCF = MCreateTabbedRowForm(DAS.Gui.ConfigPanel.ShellConfig, 6, FIXED_SMALL); MObjectSetForegroundRGB(POCF, 255, 255, 255); MObjectSetBackgroundRGB(POCF, 96, 132, 152); MObjectSetResize(POCF, True, True); MObjectAlign(POCF, CENTER_ALIGN, TOP_ALIGN); // MObjectSetCompositeWidth(POCF, 457); //457 /* Activation of POCF page 0 - Parameters*/ /* 00000000000000000000000000000000000000000000000000000000 */ MPagedFormSetActivePage(POCF, 0); // Creation page 0 - Parameters CONFP_Param(0, POCF); /* End Activation and creation of page 0 */ /* 0000000000000000000000000000000000000000000000000000000 */ /* Activation of POCF page 1 - Option */ /* 11111111111111111111111111111111111111111111111111111111 */ /* Start Creation of page 1 111111111111111111111*/ /* 11111111111111111111111111111111111111111111111111111111111111111*/ MPagedFormSetActivePage(POCF, 1); // Creation Page 1 - Options CONFP_Options(0, POCF); /* End Activation and creation of page 1 11111111111111111111*/ /* 11111111111111111111111111111111111111111111111111111111111111*/ /****************************************************************************/ /* Start Activation and creation of page 2 - Colors 2222222222*/ /* 22222222222222222222222222222222222222222222222222222222222222*/ MPagedFormSetActivePage(POCF, 2); MObjectSetText(POCF, "Colors"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(rowform, "SELECT OBJECT", FIXED_SMALL); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform, 2); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 112, 68, 72); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.RBColObj[0] = MCreateRButton(tb, "Unsel. Push Button", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[0], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[0], ColObjCB, (void *) 0); DAS.Gui.ConfigPanel.RBColObj[1] = MCreateRButton(tb, "Sel. Push Button", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[1], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[1], ColObjCB, (void *) 1); DAS.Gui.ConfigPanel.RBColObj[2] = MCreateRButton(tb, "Active Labels", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[2], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[2], ColObjCB, (void *) 2); DAS.Gui.ConfigPanel.RBColObj[3] = MCreateRButton(tb, "Passive LAbels", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[3], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[3], ColObjCB, (void *) 3); DAS.Gui.ConfigPanel.RBColObj[4] = MCreateRButton(tb, "Forms", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[4], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[4], ColObjCB, (void *) 4); DAS.Gui.ConfigPanel.RBColObj[5] = MCreateRButton(tb, "Capital Labels", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[5], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[5], ColObjCB, (void *) 5); if (DAS.Flag.exemode == DOASMODE ) { DAS.Gui.ConfigPanel.RBColObj[6] = MCreateRButton(tb, "Radio Button", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[6], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[6], ColObjCB, (void *) 6); } /* RColButt = MCreateRButton(tb, "UnSel. Comm.", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 0); RColButt = MCreateRButton(tb, "Sel. Comm.", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 1); RColButt = MCreateRButton(tb, "Active labels", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 2); RColButt = MCreateRButton(tb, "Passive labels", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 3); RColButt = MCreateRButton(tb, "Forms", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 4); RColButt = MCreateRButton(tb, "K_labelsUP", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 5); if (DAS.Flag.exemode == DOASMODE ) { RColButt = MCreateRButton(tb, "Radio Buttons", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 6); } */ tb = MCreateTableForm(rowform, 2); MTableFormSetColAlign(tb, 1, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 160, 112, 112); MObjectSetResize(tb, True, False); RColButt = MCreateRButton(tb, "Background", FIXED_SMALL); MRButtonSetCallback(RColButt, (OBJ_VALUE_CB) ColPickBackForeGCB, (void *) 0); MObjectAlign(RColButt, CENTER_ALIGN, TOP_ALIGN); MRButtonActivate(RColButt); MObjectSetForegroundRGB(RColButt, 255, 255, 0); RColButt = MCreateRButton(tb, "Foreground", FIXED_SMALL); MRButtonSetCallback(RColButt, (OBJ_VALUE_CB) ColPickBackForeGCB, (void *) 1); MObjectAlign(RColButt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(RColButt, 255, 255, 0); rowform1 = MCreateRowForm(rowform); MObjectSetBackgroundRGB(rowform1 , 80, 56, 56); MObjectSetResize(rowform1 , True, True); lbl = MCreateLabel(rowform1 , "COLORS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1 , 1); MObjectSetBackgroundRGB(tb, 112, 68, 72); MObjectSetResize(tb, True, False); /******************************************/ form2 = MCreateRowForm(tb); MFormSetPrefAtt(form2, F_PREF_ATT_COL); label = MCreateLabel(form2, "Red: ", FIXED_SMALL); MObjectSetForegroundRGB(label, 255, 0, 0); r_label = MCreateLabel(form2, "000", FIXED_SMALL); MObjectSetForegroundRGB(r_label, 255, 0, 0); MObjectSetResize(label, False, False); MObjectSetResize(r_label, False, False); r_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32); MScrollBarSetPosCallback(r_sbar, DB_ChangeColorCellCB, 0L); form2 = MCreateRowForm(tb); MFormSetPrefAtt(form2, F_PREF_ATT_COL); label = MCreateLabel(form2, "Green: ", FIXED_SMALL); MObjectSetForegroundRGB(label, 0, 105, 0); g_label = MCreateLabel(form2, "000", FIXED_SMALL); MObjectSetForegroundRGB(g_label, 0, 105, 0); MObjectSetResize(label, False, False); MObjectSetResize(g_label, False, False); g_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32); MScrollBarSetPosCallback(g_sbar, DB_ChangeColorCellCB, (void *) 1); form2 = MCreateRowForm(tb); MFormSetPrefAtt(form2, F_PREF_ATT_COL); label = MCreateLabel(form2, "Blue: ", FIXED_SMALL); MObjectSetForegroundRGB(label, 0, 0, 255); b_label = MCreateLabel(form2, "000", FIXED_SMALL); MObjectSetForegroundRGB(b_label, 0, 0, 255); MObjectSetResize(label, False, False); MObjectSetResize(b_label, False, False); b_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32); MScrollBarSetPosCallback(b_sbar, DB_ChangeColorCellCB, (void *) 2); /************************************/ frm3_dr1 = MCreateDrawArea(rowform, 347, 30); MObjectSetResize(frm3_dr1, True, False); MDrawAreaSetExposeCallback(frm3_dr1, DB_CellExposeCB, 0L); MDrawAreaSetResizeCallback(frm3_dr1, DB_CellResizeCB, 0L); MObjectSetResize(frm3_dr1, True, False); r_c = g_c = b_c = 0; cell_color = MAllocCell(0, 0, 0); rowform1 = MCreateRowForm(rowform); MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rowform1, 56, 84, 128); MObjectSetBackgroundRGB(rowform1, 112, 68, 72); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); lbl = MCreateLabel(rowform1, "COMMANDS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); pb = MCreatePButton(rowform1, "Load Palette", FIXED_SMALL); MPButtonSetCallback(pb, LoadPaletteCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); tb = MCreateTableForm(rowform1, 4); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 112, 68, 72); MObjectSetResize(tb, True, False); pb = MCreatePButton(tb, "Preview", FIXED_SMALL); MPButtonSetCallback(pb, ColorAssignCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); pb = MCreatePButton(tb, "Undo", FIXED_SMALL); MPButtonSetCallback(pb, D_UndoCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteColorsCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); /* End Activation and creation of page 2 Colors 22222222222222222222*/ /* 22222222222222222222222222222222222222222222222222222222222222*/ /*********************** FONTS ***********************/ MPagedFormSetActivePage(POCF, 3); MObjectSetText(POCF, "Fonts"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(rowform, "SELECT OBJECT", FIXED_SMALL); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectSetCompositeWidth(lbl, 347); tb = MCreateTableForm(rowform, 2); MTableFormSetColAlign(tb, 1, LEFT_ALIGN); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 84, 128); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); RColButt = MCreateRButton(tb, "UnSel. Comm.", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 0); MObjectAlign(RColButt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); MRButtonActivate(RColButt); RColButt = MCreateRButton(tb, "Sel. Comm.", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 1); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "Active labels", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 2); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "Passive labels", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 3); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "K_labelsUP", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 4); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "K_labelsDW", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 5); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); DAS.Gui.ConfigPanel.frm4_dr1 = MCreateDrawArea(rowform, 347, 62); MObjectAlign(DAS.Gui.ConfigPanel.frm4_dr1, CENTER_ALIGN, TOP_ALIGN); MObjectSetResize(DAS.Gui.ConfigPanel.frm4_dr1, True, False); MObjectSetCompositeHeight(DAS.Gui.ConfigPanel.frm4_dr1, 62); MDrawAreaSetExposeCallback(DAS.Gui.ConfigPanel.frm4_dr1, DrawAreaExpFontCB, 0L); rowform1 = MCreateRowForm(rowform); MObjectSetBackgroundRGB(rowform1, 56, 84, 128); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); lbl = MCreateLabel(rowform1, "FONTS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1, 2); MTableFormSetColAlign(tb, 1, RIGHT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 84, 128); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Type:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); fontfamily = MGetFirstFontFamily (); e_fname = MCreateOptionEdit (tb, fontfamily, 22, 10, 6, FIXED_SMALL); MObjectSetForegroundRGB(e_fname, 255, 255, 255); MObjectSetBackgroundRGB(e_fname, 0, 24, 96); MEditDisableEditing (e_fname); list = MOptionEditGetList (e_fname); MSListSetSortCallback (list, stricmp); while (fontfamily) { MSListAddItem (list, fontfamily, 0L); fontfamily = MGetNextFontFamily (); } lbl = MCreateLabel(tb, "Dim.:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); e_fsize = MCreateOptionEdit(tb, "22", 22, 10, 6, FIXED_SMALL); MObjectSetForegroundRGB(e_fsize, 255, 255, 255); MObjectSetBackgroundRGB(e_fsize, 0, 24, 96); list = MOptionEditGetList(e_fsize); MSListAddItem(list, "12", 0L); MSListAddItem(list, "14", 0L); MSListAddItem(list, "16", 0L); MSListAddItem(list, "18", 0L); MSListAddItem(list, "20", 0L); MSListAddItem(list, "22", 0L); MSListAddItem(list, "24", 0L); MSListAddItem(list, "26", 0L); MSListAddItem(list, "28", 0L); MSListAddItem(list, "30", 0L); MSListAddItem(list, "32", 0L); MSListAddItem(list, "34", 0L); MSListAddItem(list, "36", 0L); MSListAddItem(list, "38", 0L); MSListAddItem(list, "40", 0L); MSListAddItem(list, "42", 0L); _tbutton000 = MCreateTButton(tb, "Bold", FIXED_SMALL); MTButtonSetCallback(_tbutton000, SetBoldCB, 0L); MObjectSetForegroundRGB(_tbutton000, 255, 255, 0); _tbutton001 = MCreateTButton(tb, "Italic", FIXED_SMALL); MTButtonSetCallback(_tbutton001, SetItalicCB, 0L); MObjectSetForegroundRGB(_tbutton001, 255, 255, 0); /*******************/ rowform1 = MCreateRowForm(rowform); MObjectSetForegroundRGB(rowform1, 56, 84, 128); MObjectSetBackgroundRGB(rowform1, 56, 84, 128); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); lbl = MCreateLabel(rowform1, "COMMANDS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1, 5); MObjectSetBackgroundRGB(tb, 56, 84, 128); MObjectSetResize(tb, True, False); pb = MCreatePButton(tb, "Test", FIXED_SMALL); MPButtonSetCallback(pb, TestFontCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Preview", FIXED_SMALL); MPButtonSetCallback(pb, LoadFontCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Undo", FIXED_SMALL); MPButtonSetCallback(pb, UndoFCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteFontCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); /******************* STEPPER MOTORS ***************************/ MPagedFormSetActivePage(POCF, 4); MObjectSetText(POCF, "Motors"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 457); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); /***************************************************************************/ /**************** STEPPER MOTORS SECTION ***********************************/ lbl = MCreateLabel(rowform, "STEPPER MOTORS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetCompositeWidth(lbl, 447); PFAMS = MCreateTabbedRowForm(rowform, (DAS.StepM.NAMS + 2), FIXED_SMALL); MObjectSetForegroundRGB(PFAMS, 255, 255, 255); MObjectSetBackgroundRGB(PFAMS, 80, 60, 0); MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2); MObjectSetCompositeWidth(PFAMS, 420); // MObjectSetResize(PFAMS, True, True); for (i=0;i<DAS.StepM.NAMS; i++) { MPagedFormSetActivePage(PFAMS, i); CONFP_AMS(PFAMS, i); //FrmStepperConfP(PFAMS, i); } MPagedFormSetActivePage(PFAMS, i); CONFP_AMS_Utility(PFAMS); MPagedFormSetActivePage(PFAMS, i+1); CONFP_AMS_NOVA(PFAMS); MPagedFormSetActivePage(PFAMS, 0); /* if (DAS.Paramini.EqType == TROPOGAS) { PFAMS = MCreateTabbedRowForm(rowform, 4, FIXED_SMALL); MObjectSetForegroundRGB(PFAMS, 255, 255, 255); MObjectSetBackgroundRGB(PFAMS, 80, 60, 0); MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2); } else { PFAMS = MCreateTabbedRowForm(rowform, 3, FIXED_SMALL); MObjectSetForegroundRGB(PFAMS, 255, 255, 255); MObjectSetBackgroundRGB(PFAMS, 80, 60, 0); MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2); } MPagedFormSetActivePage(PFAMS, 0); FrmStepperConfP(PFAMS, AMS1, &STEPM, &CONFP, &CPL); MPagedFormSetActivePage(PFAMS, 1); FrmStepperConfP(PFAMS, AMS2, &STEPM, &CONFP, &CPL); if (DAS.Paramini.EqType == TROPOGAS) { MPagedFormSetActivePage(PFAMS, 2); FrmStepperConfP(PFAMS, AMS3, &STEPM, &CONFP, &CPL); MPagedFormSetActivePage(PFAMS, 3); FrmAMS_Utility(PFAMS, &STEPM, &CONFP, &CPL); } else { MPagedFormSetActivePage(PFAMS, 2); FrmAMS_Utility(PFAMS, &STEPM, &CONFP, &CPL); } */ MPagedFormSetActivePage(PFAMS, 0); /*++++++++++++++++++++++++++++++++++++++++++++++++++++*/ tb = MCreateTableForm(rowform, 4); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); pb = MCreatePButton(tb, "Apply", FIXED_SMALL); MPButtonSetCallback(pb, ApplyChCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(tb, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteAMSCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(tb, "ADVANCED", FIXED_SMALL); MPButtonSetCallback(pb, AMS_AdvancedCB, (void *) 0); MObjectSetBackgroundRGB(pb, 24, 24, 255); MObjectSetForegroundRGB(pb, 255, 245, 255); MObjectSetCompositeWidth(pb, 74); /*********************************************************/ /*********************************************************/ /*************** TEST AD Converter **************/ /*********************************************************/ MPagedFormSetActivePage(POCF, 5); MObjectSetText(POCF, "TEST AD Converter"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); /*+++++++++++++++++ START CURRENT SETUP ++++++++++*/ lbl = MCreateLabel(rowform , "AD Converter Current Setup", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform, 4); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); lbl = MCreateLabel(tb , "Board Type:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); // sprintf(buf, "%s", DSCCB2STR()); ADTESTER.lblADsetup[0] = MCreateLabel(tb , "DMM", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[0], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[0], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[0], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[0], 0); lbl = MCreateLabel(tb , "Base Addr:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[1] = MCreateLabel(tb , "0x300", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[1], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[1], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[1], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[1], 0); lbl = MCreateLabel(tb , "Int.Lvl:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[2] = MCreateLabel(tb , "3", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[2], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[2], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[2], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[2], 0); lbl = MCreateLabel(tb , "DMA Lvl:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[3] = MCreateLabel(tb , "3", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[3], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[3], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[3], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[3], 0); lbl = MCreateLabel(tb , "ClockFreq:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[4] = MCreateLabel(tb , "10MHz", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[4], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[4], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[4], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[4], 0); lbl = MCreateLabel(tb , "Range:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[5] = MCreateLabel(tb , "5V", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[5], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[5], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[5], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[5], 0); lbl = MCreateLabel(tb , "Pol.:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[6] = MCreateLabel(tb , "UNIPOL", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[6], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[6], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[6], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[6], 0); lbl = MCreateLabel(tb , "Gain:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[7] = MCreateLabel(tb , "2", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[7], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[7], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[7], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[7], 0); lbl = MCreateLabel(tb , "LowCh:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[8] = MCreateLabel(tb , "0", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[8], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[8], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[8], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[8], 0); lbl = MCreateLabel(tb , "HighCh:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[9] = MCreateLabel(tb , "15", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[9], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[9], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[9], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[9], 0); // LoadDMMSetup(); /*+++++++++++++++++ END CURRENT SETUP ++++++++++*/ tb = MCreateTableForm(rowform, 2); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); ADTESTER.ADrb[0]= MCreateRButton(tb, "Volts", FIXED_SMALL); MPButtonSetCallback(ADTESTER.ADrb[0], DB_SelOutModeCB, (void *) 0); MObjectAlign(ADTESTER.ADrb[0], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(ADTESTER.ADrb[0], 255, 255, 255); MObjectSetCompositeWidth(ADTESTER.ADrb[0], 85); ADTESTER.ADrb[1] = MCreateRButton(tb, "Celsius", FIXED_SMALL); MPButtonSetCallback(ADTESTER.ADrb[1], DB_SelOutModeCB, (void *) 1); MObjectAlign(ADTESTER.ADrb[1], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(ADTESTER.ADrb[1], 255, 255, 255); MObjectSetCompositeWidth(ADTESTER.ADrb[1], 85); if(ADTESTER.OutputMode == 0) MRButtonActivate(ADTESTER.ADrb[0]); else MRButtonActivate(ADTESTER.ADrb[0]); lbl = MCreateLabel(rowform , "Output", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform, 4); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); for(i=0;i<16;i++) { sprintf(buf, "Ch.%d:", i); ADTESTER.lblADch[i] = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(ADTESTER.lblADch[i], LEFT_ALIGN); MObjectSetForegroundRGB(ADTESTER.lblADch[i], 255, 255, 255); MObjectSetTransparency(ADTESTER.lblADch[i], 0); MObjectSetResize(ADTESTER.lblADch[i], False, False); MObjectAlign(ADTESTER.lblADch[i], LEFT_ALIGN, TOP_ALIGN); // MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblADch[i], 40, 96, 72); ADTESTER.lblADvalue[i] = MCreateLabel(tb, " 0.0", FIXED_SMALL); MLabelSetAlignment(ADTESTER.lblADvalue[i], RIGHT_ALIGN); MObjectSetForegroundRGB(ADTESTER.lblADvalue[i], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADvalue[i], 40, 96, 72); MObjectSetTransparency(ADTESTER.lblADvalue[i], 0); MObjectSetResize(ADTESTER.lblADvalue[i], False, False); MObjectAlign(ADTESTER.lblADvalue[i], LEFT_ALIGN, TOP_ALIGN); } tb = MCreateTableForm(rowform, 3); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); ADTESTER.ADpb = MCreatePButton(tb, "Start", FIXED_SMALL); MPButtonSetCallback(ADTESTER.ADpb, ADTesterCB, (void *) 0); MObjectSetBackgroundRGB(ADTESTER.ADpb, 224, 224, 176); // MObjectSetBackgroundRGB(ADTESTER.ADpb, 192, 192, 192); MObjectSetCompositeWidth(ADTESTER.ADpb, 84); ADTESTER.ADInflbl = MCreateLabel(tb, "Click Start to test ", FIXED_SMALL); // MPButtonSetCallback(ADTESTER.ADpb, ADTesterCB, (void *) 0); MObjectSetForegroundRGB(ADTESTER.ADInflbl, 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.ADInflbl, 48, 20, 255); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); /*********************************************************/ MPagedFormSetActivePage(POCF, 0); MShellRealize(DAS.Gui.ConfigPanel.ShellConfig); // MShellRealizeXYWH(DAS.Gui.ConfigPanel.ShellConfig, 0,0,600,800); return 0; } */
3001  /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */
3002 
3003 
3004 }
3005 
3006 
3007 
3008 
3009 void CONFP_param_page3(int mod, MOBJECT obj)
3010 {
3011 
3012  MOBJECT rowform1; // generic row form
3013 // MOBJECT wledt; // generic edit object
3014 // MOBJECT stedt; // generic edit object
3015  MOBJECT pb;
3016 // MOBJECT list;
3017 // MOBJECT _tbutton000;
3018 // MOBJECT _tbutton001;
3019 // MOBJECT form2;
3020  MOBJECT lbl;
3021  MOBJECT tb; // generic table object
3022  char buf[64];
3023  int i, k=0;
3024 // FILE *fd;
3025 // char str[80];
3026 // char buff[_MAX_PATH];
3027 
3028  MObjectSetText(obj, "Page 3");
3029 
3030 
3031  lbl = MCreateLabel(obj, "Station Geo. Coordinates", FIXED_SMALL);
3032  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3033  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
3034  MObjectSetTransparency(lbl, 0);
3035 
3036  sprintf(buf, "Actual Setting" );
3037  lbl = MCreateLabel(obj, buf, FIXED_SMALL);
3040  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3041  MObjectSetTransparency(lbl, 0);
3042 
3043 
3044 
3045  tb = MCreateTableForm(obj, 5);
3046  MObjectSetBackgroundRGB(tb, 112, 128, 112);
3047  MObjectSetBackgroundRGB(tb, 56, 112, 112);
3048  MObjectSetResize(tb, True, False);
3049 
3050  sprintf(buf, "Stat." );
3051  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3054  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3055  MObjectSetTransparency(lbl, 0);
3056 
3057  sprintf(buf, "Lat." );
3058  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3061  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3062  MObjectSetTransparency(lbl, 0);
3063 
3064  sprintf(buf, "Long." );
3065  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3068  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3069  MObjectSetTransparency(lbl, 0);
3070 
3071  sprintf(buf, "TZ" );
3072  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3075  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3076  MObjectSetTransparency(lbl, 0);
3077 
3078  sprintf(buf, "Alt." );
3079  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3082  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3083  MObjectSetTransparency(lbl, 0);
3084 
3085  sprintf(buf, "%s", DAS.DGeo.s_name );
3086  DAS.DGeo.edit[0] = MCreateEdit(tb, buf, 3, FIXED_SMALL);
3088  MObjectSetForegroundRGB(DAS.DGeo.edit[0] , 255, 255, 255);
3089  MObjectSetBackgroundRGB(DAS.DGeo.edit[0] , 40, 96, 72);
3090  MEditSetValCallback(DAS.DGeo.edit[0] , DGeoeditCB, (void *) 0);
3091 
3092  sprintf(buf, "%.2f", DAS.DGeo.latitude );
3093  DAS.DGeo.edit[1] = MCreateEdit(tb, buf, 7, FIXED_SMALL);
3095  MObjectSetForegroundRGB(DAS.DGeo.edit[1] , 255, 255, 255);
3096  MObjectSetBackgroundRGB(DAS.DGeo.edit[1] , 40, 96, 72);
3097  MEditSetValCallback(DAS.DGeo.edit[1] , DGeoeditCB, (void *) 1);
3098 
3099  sprintf(buf, "%.2f", DAS.DGeo.longitude );
3100  DAS.DGeo.edit[2] = MCreateEdit(tb, buf, 7, FIXED_SMALL);
3102  MObjectSetForegroundRGB(DAS.DGeo.edit[2] , 255, 255, 255);
3103  MObjectSetBackgroundRGB(DAS.DGeo.edit[2] , 40, 96, 72);
3104  MEditSetValCallback(DAS.DGeo.edit[2] , DGeoeditCB, (void *) 2);
3105 
3106  sprintf(buf, "%d", DAS.DGeo.timezone );
3107  DAS.DGeo.edit[3] = MCreateEdit(tb, buf, 4, FIXED_SMALL);
3109  MObjectSetForegroundRGB(DAS.DGeo.edit[3] , 255, 255, 255);
3110  MObjectSetBackgroundRGB(DAS.DGeo.edit[3] , 40, 96, 72);
3111  MEditSetValCallback(DAS.DGeo.edit[3] , DGeoeditCB, (void *) 3);
3112 
3113  sprintf(buf, "%.1f", DAS.DGeo.alititude);
3114  DAS.DGeo.edit[4] = MCreateEdit(tb, buf, 7, FIXED_SMALL);
3116  MObjectSetForegroundRGB(DAS.DGeo.edit[4] , 255, 255, 255);
3117  MObjectSetBackgroundRGB(DAS.DGeo.edit[4] , 40, 96, 72);
3118  MEditSetValCallback(DAS.DGeo.edit[4] , DGeoeditCB, (void *) 4);
3119 
3120 
3121 
3122 
3123 
3124  DAS.DGeo.tbrb = MCreateTableForm(obj, 3);
3125  MObjectSetBackgroundRGB(DAS.DGeo.tbrb, 112, 128, 112);
3126  MObjectSetBackgroundRGB(DAS.DGeo.tbrb, 56, 112, 112);
3128 
3129 // sprintf(buff, "%s\\GeoDB.ini", BIL.DFILEM.CONFIGDIREQUIPMENT);
3130 // fd = fopen(buff, "r");
3131 // if(fd == NULL) return 1;
3132 
3133 // fgets(str, 80, fd); // Read Header
3134 
3135 // fscanf(fd, "%d", &DAS.DGeo.nitem);
3136 // fgets(str, 80, fd);
3137 
3138  for (i=0; i<DAS.DGeo.nitem; i++)
3139  {
3140 
3141 // fscanf(fd, "%hs",&DAS.DGeo.news_name[i]);
3142  DAS.DGeo.rb[i] = MCreateRButton(DAS.DGeo.tbrb, DAS.DGeo.news_name[i], FIXED_SMALL);
3143  MPButtonSetCallback(DAS.DGeo.rb[i], DB_GeocoordCB, (void *) i);
3145  MObjectSetForegroundRGB(DAS.DGeo.rb[i], 255, 255, 255);
3146  MObjectSetCompositeWidth(DAS.DGeo.rb[i], 85);
3147 
3148 
3149 
3150 // fscanf(fd, "%lf %lf %lf %d", &DAS.DGeo.newlatitude[i],
3151 // &DAS.DGeo.newlongitude[i],&DAS.DGeo.newalititude[i],&DAS.DGeo.newtimezone[i]);
3152  if( strcmp(DAS.DGeo.s_name,DAS.DGeo.news_name[i]) ==0 )
3153  {
3154  MRButtonActivate(DAS.DGeo.rb[i]);
3155  DAS.DGeo.selitem = i;
3156  }
3157  }
3158 
3159 // fclose(fd);
3160 
3161 /*
3162  sprintf(buf, "%s", "New St.");
3163  DAS.DGeo.rb[DAS.DGeo.nitem] = MCreateRButton(DAS.DGeo.tbrb, buf, FIXED_SMALL);
3164  MPButtonSetCallback(DAS.DGeo.rb[DAS.DGeo.nitem], DB_GeocoordCB, (void *) 100);
3165  MObjectAlign(DAS.DGeo.rb[DAS.DGeo.nitem], LEFT_ALIGN, UNDEF_ALIGN);
3166  MObjectSetForegroundRGB(DAS.DGeo.rb[DAS.DGeo.nitem], 255, 255, 255);
3167  MObjectSetCompositeWidth(DAS.DGeo.rb[DAS.DGeo.nitem], 85);
3168 */
3169 
3170 
3171  tb = MCreateTableForm(obj, 2);
3172  MObjectSetBackgroundRGB(tb, 112, 128, 112);
3173  MObjectSetBackgroundRGB(tb, 56, 112, 112);
3174  MObjectSetResize(tb, True, True);
3175 
3176 
3177  pb = MCreatePButton(tb, "Add St.", FIXED_SMALL);
3178  //MObjectSetUnsensitive(pb);
3179  MPButtonSetCallback(pb, AddStCB, (void *) 0);
3180  MObjectSetBackgroundRGB(pb, 224, 224, 176);
3181  MObjectSetCompositeWidth(pb, 70);
3182  //MObjectAddEventNotifyCallback(pb, (OBJ_EVENT_CB) DB_StorePB, EM_MOTION, NULL);
3183  MObjectSetPopupHelp(pb,"Add a new station " , 200, 5000);
3185 
3186  pb = MCreatePButton(tb, "Delete", FIXED_SMALL);
3187  //MObjectSetUnsensitive(pb);
3188  MPButtonSetCallback(pb, DeleteGeoCB, (void *) 0);
3189  MObjectSetBackgroundRGB(pb, 224, 224, 176);
3190  MObjectSetCompositeWidth(pb, 70);
3191  //MObjectAddEventNotifyCallback(pb, (OBJ_EVENT_CB) DB_StorePB, EM_MOTION, NULL);
3192  MObjectSetPopupHelp(pb,"Delete the selected station" , 200, 5000);
3194 
3195 
3196  // Command Button Section
3197  /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/
3198  rowform1 = MCreateTableForm(obj, 3);
3199  MObjectSetBackgroundRGB(rowform1, 56, 112, 112);
3200 // MObjectSetResize(rowform1, False, False);
3201  MObjectSetCompositeWidth(rowform1, 347);
3202 
3203  pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL);
3204  MPButtonSetCallback(pb, ApplyGeoCB, (void *) 0);
3205  if((DAS.Flag.exemode == DOASMODE))
3206  MObjectSetUnsensitive(pb); // Set the button as Unensitive
3207  MObjectSetBackgroundRGB(pb, 224, 224, 176);
3208  MObjectSetCompositeWidth(pb, 70);
3209  MObjectSetPopupHelp(pb,"Apply the selected setting to DAS (and write to file ..GeoCoord.ini)" , 200, 5000);
3210 
3211 
3212 
3213 
3214  pb = MCreatePButton(rowform1, "Store", FIXED_SMALL);
3216  MPButtonSetCallback(pb, StoreGeoCB, (void *) 0);
3217  MObjectSetBackgroundRGB(pb, 224, 224, 176);
3218  MObjectSetCompositeWidth(pb, 70);
3220  MObjectSetPopupHelp(pb,"If a new station has been created store it in ..GeoDB.ini" , 200, 5000);
3221 
3222 
3223  pb = MCreatePButton(rowform1, "Close", FIXED_SMALL);
3225  MObjectSetBackgroundRGB(pb, 224, 224, 176);
3226  MObjectSetCompositeWidth(pb, 70);
3227  MObjectSetPopupHelp(pb,"Close Config Panel" , 200, 5000);
3228  /* End Command Button Section æææææææææææææææææææææææææææææææææææ/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ } void CONFP_param_page2(int mod, MOBJECT obj) { MOBJECT rowform, rowform1; // generic row form MOBJECT wledt; // generic edit object MOBJECT stedt; // generic edit object MOBJECT pb ; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; MOBJECT lbl; MOBJECT tb; // generic table object char buf[64]; int i; MObjectSetText(obj, "Page 2"); lbl = MCreateLabel(obj, "Ref. Wavelength and Grating positioning", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); rowform = MCreateColForm(obj); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetBackgroundRGB(rowform, 56, 112, 112); MObjectAlign(rowform, LEFT_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); MTableFormSetColAlign(tb, 0, TOP_ALIGN); MObjectSetResize(tb, False, True); //for(i=0;i<2;i++) //{ sprintf(buf, "Win" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Cent.Wl" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Steps" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); // } for(i=0;i<9;i++) { sprintf(buf, "%d", i); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%d", wl[i]); wledt = MCreateEdit(tb, buf, 5, FIXED_SMALL); MObjectAlign(wledt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(wledt, 255, 255, 255); MObjectSetBackgroundRGB(wledt, 40, 96, 72); MEditSetValCallback(wledt, valwledt, (void *) i); //MEditSetActCallback(wledt, wledtCB, (void *) i); sprintf(buf, "%d", wav[i]); stedt = MCreateEdit(tb, buf, 8, FIXED_SMALL); MObjectAlign(stedt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(stedt, 255, 255, 255); MObjectSetBackgroundRGB(stedt, 40, 96, 72); MEditSetValCallback(stedt, valstedt, (void *) i); //MEditSetActCallback(stedt, stedtCB, (void *) i); } tb = MCreateTableForm(rowform, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); MTableFormSetColAlign(tb, 0, TOP_ALIGN); MObjectSetResize(tb, False, True); sprintf(buf, "Win" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Cent.Wl" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "Steps" ); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); for(i=9;i<18;i++) { sprintf(buf, "%d", i); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%d", wl[i]); wledt = MCreateEdit(tb, buf, 5, FIXED_SMALL); MObjectAlign(wledt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(wledt, 255, 255, 255); MObjectSetBackgroundRGB(wledt, 40, 96, 72); MEditSetValCallback(wledt, valwledt, (void *) i); //MEditSetActCallback(wledt, wledtCB, (void *) i); sprintf(buf, "%d", wav[i]); stedt = MCreateEdit(tb, buf, 8, FIXED_SMALL); MObjectAlign(stedt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(stedt, 255, 255, 255); MObjectSetBackgroundRGB(stedt, 40, 96, 72); MEditSetValCallback(stedt, valstedt, (void *) i); //MEditSetActCallback(stedt, stedtCB, (void *) i); } // Command Button Section /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/ rowform1 = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); // MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL); //MPButtonSetCallback(pb, ApplyChCB, (void *) 0); //if((DAS.Flag.exemode == DOASMODE) | (DAS.Flag.exemode == DBDEMO)) MObjectSetUnsensitive(pb); // Set the button as Unensitive MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(rowform1, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WritewlstepiniCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(rowform1, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); /* End Command Button Section æææææææææææææææææææææææææææææææææææ*/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ } void edtCCDOffSet_CB(MOBJECT p, LIST_ACT *la, void *ad) { int c = (int) ad; int er = 0; DAS.Marconi.Offset = atoi(la->item); if(DAS.Flag.exemode != DBDEMO) DC_SetUsrGain(0, 0 , DAS.Marconi.Offset , 0); } void CONFP_param_page1(int mod, MOBJECT obj) { MOBJECT rowform1; // generic row form MOBJECT edit; // generic edit object MOBJECT pb, rb ; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; MOBJECT lbl; MOBJECT tb; // generic table object char buf[64]; int i, k, *p; MOBJECT list; int t=0; char str[80]; char buff[_MAX_PATH]; LIST_ACT * pla; MObjectSetText(obj, "Page 1"); /******************************************************************************************************************/ //Equipment Type section /*--------- Start ----------------*/ lbl = MCreateLabel(obj, "Equipment Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(obj, 3); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); // Instrument Type(0 = SPATRAM, // 1 = TROPOGAS, 2 = LIS, // 3 = SPATRAMPLUS, 4 = GASCODNG, ) rb = MCreateRButton(tb, "SPATRAMPLUS", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 3); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 3) MRButtonActivate(rb); rb = MCreateRButton(tb, "SPATRAM2", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 9); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 9) MRButtonActivate(rb); rb = MCreateRButton(tb, "SPATRAM3", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 10); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 10) MRButtonActivate(rb); /* rb = MCreateRButton(tb, "SPATRAM", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if( DAS.Paramini.EqType == 0) MRButtonActivate(rb); */ rb = MCreateRButton(tb, "TROPOGAS", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Paramini.EqType == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "LIS", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Paramini.EqType == 2) MRButtonActivate(rb); rb = MCreateRButton(tb, "GASCODNG1", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 4); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Paramini.EqType == 4) MRButtonActivate(rb); /* rb = MCreateRButton(tb, "GASCODOffAxis", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 5); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 5) MRButtonActivate(rb); */ rb = MCreateRButton(tb, "GASCODNG2", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 6); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 6) MRButtonActivate(rb); rb = MCreateRButton(tb, "GASCODNG3", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 7); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 7) MRButtonActivate(rb); rb = MCreateRButton(tb, "GASCODNG4", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 8); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 8) MRButtonActivate(rb); /* pb = MCreatePButton(tb, "Save", FIXED_SMALL); MPButtonSetCallback(pb, WriteEquipiniCB, 0); MObjectAlign(pb, LEFT_ALIGN, UNDEF_ALIGN); //MObjectSetForegroundRGB(pb, 255, 255, 255); MObjectSetCompositeWidth(pb, 105); */ //CCD & OMU Temperature section /*--------- Start ----------------*/ lbl = MCreateLabel(obj, "CCD & OMU Temp", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(obj, 2); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, False); MObjectSetCompositeWidth(tb, 347); lbl = MCreateLabel(tb, "CCD Target Temperature:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%.1lf", DAS.Paramini.ITemp); edit = MCreateEdit(tb, buf, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MEditSetValCallback(edit, ValidateCB, (void *) 1); MEditSetActCallback(edit, ActEditCB, (void *) 1); lbl = MCreateLabel(tb, "CCD Peltier Init Power:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%.1lf%%",(double)DAS.Paramini.CoolPw / 10); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MEditSetValCallback(edit, ValidateCB, (void *) 2); MEditSetActCallback(edit, ActEditCB, (void *) 2); lbl = MCreateLabel(tb, "Optical Unit Target Temp:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); sprintf(buf, "%.1lf", DAS.Paramini.TPelt); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MEditSetValCallback(edit, ValidateCB, (void *) 3); MEditSetActCallback(edit, ActEditCB, (void *) 3); lbl = MCreateLabel(tb, "OMU Peltier Init Power:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%.1lf%%",(double)OMUTHR.PCPower / 10); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MEditSetValCallback(edit, ValidateCB, (void *) 2000); MEditSetActCallback(edit, ActEditCB, (void *) 2000); /*------------------- End CCD & OMU Temperature section -------------*/ //CCD Window and vertical binning section /*##################### Start ##################################################*/ lbl = MCreateLabel(obj, "CCD WINDOW - SETUP", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectSetCompositeWidth(lbl, 347); rowform1 = MCreateRowForm(obj); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); //357 MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform1, 4); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetResize(tb, True, True); // MObjectSetCompositeWidth(tb, 347); MObjectSetShadow(tb, WS_NONE, 0, 0); lbl = MCreateLabel(tb, "X Start:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",DAS.Paramini.ccdXoff); //sprintf(buf, "%d",(DC_CCD.dx - DC_CCD.dx)); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MEditSetValCallback(edit, ValidateCB, (void *) 4); MEditSetActCallback(edit, ActEditCB, (void *) 4); //MEditDisableEditing(edit); lbl = MCreateLabel(tb, "X End:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",DAS.Paramini.ccdWx); //sprintf(buf, "%d",DC_CCD.dx); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MEditSetValCallback(edit, ValidateCB, (void *) 5); MEditSetActCallback(edit, ActEditCB, (void *) 5); // MEditDisableEditing(edit); lbl = MCreateLabel(tb, "Y Start:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",DAS.Paramini.ccdYoff); //sprintf(buf, "%d", (DC_CCD.dy-DC_CCD.dy)); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MEditSetValCallback(edit, ValidateCB, (void *) 6); MEditSetActCallback(edit, ActEditCB, (void *) 6); // MEditDisableEditing(edit); lbl = MCreateLabel(tb, "Y End:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",DAS.Paramini.ccdWy); //sprintf(buf, "%d",DC_CCD.dy); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MEditSetValCallback(edit, ValidateCB, (void *) 7); MEditSetActCallback(edit, ActEditCB, (void *) 7); // MEditDisableEditing(edit); tb = MCreateTableForm(rowform1, 3); MTableFormSetColAlign(tb, 0, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); MObjectSetShadow(tb, WS_NONE, 0, 0); lbl = MCreateLabel(tb, "Vertical Binning:", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); sprintf(buf, "%d",DAS.Paramini.VBin); edit = MCreateClippedEdit(tb, buf, 3, 3, FIXED_SMALL); MObjectAlign(edit, RIGHT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MEditSetValCallback(edit, ValidateCB, (void *) 8); MEditSetActCallback(edit, ActEditCB, (void *) 8); pb = MCreatePButton(tb, "CCD Setup (DCS)", FIXED_SMALL); MPButtonSetCallback(pb, CCDSetupCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); /* tb = MCreateTableForm(rowform1, 3); MTableFormSetColAlign(tb, 0, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); */ lbl = MCreateLabel(tb, "Max. Exp. Time (s) :", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MLabelSetAlignment(lbl, LEFT_ALIGN); sprintf(buf, "%.1lf", DAS.Paramini.maxtexp); edit = MCreateClippedEdit(tb, buf, 5, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); //MObjectSetCompositeWidth(edit, 35); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); k = 123; p = (void *) k; MEditSetValCallback(edit, ValidateCB, p); MEditSetActCallback(edit, ActEditCB, p); pb = MCreateImagePButtonExt(tb, "sys\\qmarkyellow.bmp", "sys\\qmarkblue.bmp", "", "sys\\qmarkred.bmp", "", ""); MButtonSetImageMaskByPixel(pb, 0, 0); MObjectSetTransparency(pb, 255); MObjectSetShadow(pb, WS_NONE, 0, 0); MObjectSetBackgroundRGB(pb, 56, 112, 112); MPButtonSetCallback(pb, PB_H_CB, (void *) 0); /* End CCD Window and vertical binning section ###############*/ /* lbl = MCreateLabel(obj, "Devices Offsets", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); */ rowform1 = MCreateRowForm(obj); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); MObjectSetResize(rowform1, True, True); MObjectSetCompositeWidth(rowform1, 347); /**************************************************************************/ //OFFSET HIRES 5 SECTION if (Cfg.Platform == 28) { lbl = MCreateLabel(rowform1, "HiresV OFFSET", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True,False); lbl = MCreateLabel(tb, "Offset", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255); MObjectSetTransparency(lbl, 0); if(DAS.Paramini.EqType == 9) //SPATRAM2 DAS.Marconi.Offset = 250; if(DAS.Paramini.EqType == 8) //GASCODNG4 DAS.Marconi.Offset = 270; sprintf(buff, "%d", DAS.Marconi.Offset); edit = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectAlign(edit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(edit); list = MOptionEditGetList(edit); for(i=0; i<512; i++) { t = i; sprintf(str, "%d", t); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(edit, str); MOptionEditSetListCallback(edit, edtCCDOffSet_CB, (void *) 0); DAS.Marconi.Offset = atoi(pla->item); } /**************************************************************************/ /*************************************************************************/ /* lbl = MCreateLabel(rowform1, "Input Mirror", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetCompositeWidth(lbl, 347); tb = MCreateTableForm(rowform1, 5); MTableFormSetColAlign(tb, 0, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); lbl = MCreateLabel(tb, "Home", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); for(i=0;i<4;i++) { if (DAS.Paramini.EqType != TROPOGAS) sprintf(buf, "%s",Mir_Code[i]); else sprintf(buf, "%s",Mir_CodeTropo[i]); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); } for(i=0;i<5;i++) { sprintf(buf, "%d",DAS.Paramini.Offset[i]); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 65); k= i + 300; MEditSetValCallback(edit, ValidateCB, (void *) k); MEditSetActCallback(edit, ActEditCB, (void *) k); } /* // Command Button Section /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/ rowform1 = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); // MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL); MPButtonSetCallback(pb, ApplyChCB, (void *) 0); if((DAS.Flag.exemode == DOASMODE) ) MObjectSetUnsensitive(pb); // Set the button as Unensitive MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(rowform1, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteParaminiCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(rowform1, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); /* End Command Button Section æææææææææææææææææææææææææææææææææææ*/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ /**************************************************************************************************************/ } // Create the Parameters page void CONFP_Param(int mod, MOBJECT mo) { MOBJECT rowform; // generic row form // MOBJECT rowform1; // generic row form // MOBJECT edit; // generic edit object // MOBJECT pb; // generic pushbutton and radiobutton // MOBJECT lbl; //generic label // MOBJECT tb; // generic table object MOBJECT PPARAM; // char buf[64]; // int k; MObjectSetText(mo, "Parametrs"); rowform = MCreateRowForm(mo); MObjectSetBackgroundRGB(rowform, 56, 112, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); //357 MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); PPARAM = MCreateTabbedRowForm(rowform, 5, FIXED_SMALL); MObjectSetForegroundRGB(PPARAM, 255, 255, 255); MObjectSetBackgroundRGB(PPARAM, 56, 112, 112); MObjectAlign(PPARAM, CENTER_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(PPARAM, 357); MObjectSetResize(PPARAM, False, False); CONFP_param_page1(0, PPARAM); MPagedFormSetActivePage(PPARAM, 1); //Creation page 2 CONFP_param_page2(0, PPARAM); MPagedFormSetActivePage(PPARAM, 2); //Creation page 3 CONFP_param_page3(0, PPARAM); MPagedFormSetActivePage(PPARAM, 3); //Creation page 4 CONFP_param_page4(0, PPARAM); MPagedFormSetActivePage(PPARAM, 4); //Creation page 5 CONFP_param_page5(0, PPARAM); MPagedFormSetActivePage(PPARAM, 0); } void DB_MeasMode_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case 0: DAS.DOption.measmode = 0; //Single Meas MObjectSetUnsensitive(DAS.Gui.ConfigPanel.tbavg); //if (DAS.Marconi.AVGmat != 0) // free(DAS.Marconi.AVGmat); break; case 1: DAS.DOption.measmode = 1; //Average MObjectSetSensitive(DAS.Gui.ConfigPanel.tbavg); //if (DAS.Marconi.AVGmat != 0) //DAS.Marconi.AVGmat = AllocFloatMat(IDX, IDY); //np = (long) IDX * IDY * 2; //AVGmat = malloc(np * 4); //memset(AVGmat, 0, np * 4); break; } } } void DB_AVGAutoR_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case 0: DAS.DOption.avgautor = 1; //Autorange before average break; case 1: DAS.DOption.avgautor = 0; //NO Autorange before average break; } } } void SelDefPixFileCB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; char buf[_MAX_PATH]; char fname[_MAX_PATH], dirname[_MAX_PATH]; char str[_MAX_PATH]; // unsigned long ns; FB_PREFS fbp; strcpy (dirname, MGetCurrentDirectory ()); fname[0] = '\0'; memset (&fbp, 0, sizeof (fbp)); fbp.change_cwd = True; fbp.allow_dir_create = True; fbp.allow_dir_rename = True; fbp.allow_dir_delete = True; fbp.transparent_tree = False; fbp.font = HELV_SMALL; fbp.button_font = HELV_SMALL; //Set Img file sprintf(buf, "%s\\%s", BIL.DFILEM.HOMEDIRECTORY, "sys\\Tile2.bmp" ); fbp.bg_image_file =buf; er = MFileBrowseExt ("Select CCD Mask File", "*.cor", fname, dirname, &fbp); sprintf(DAS.DOption.DEFPIXFILENAME, "%s", fname); sprintf(buf, "%s%s", dirname, DAS.DOption.DEFPIXFILENAME); //if(DI_FileExist(buff)) // DI_FileExist --> Return: 1 if PATH exist, else return 0 // return 37; MObjectSetText(DAS.Gui.ConfigPanel.lblCorrPixF, DAS.DOption.DEFPIXFILENAME); //Load File er = LoadDB_DefectPixel(buf); if (er) { sprintf (str, "File: %s, Not FOUND", buf); MMessageDialog("DAS Inf.", str, "OK", NULL); } } // create the 1st page of the option page void CONFP_opt_page1(int mod, MOBJECT obj) { MOBJECT rowform; // generic row form MOBJECT pb, rb ; MOBJECT colform; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT tbavg; MOBJECT lbl; MOBJECT tb; // generic table object char buf[64]; int k, *p; MObjectSetText(obj, "Page 1"); /***************************************************************************/ /*********** Saving Mode Section - Start ****************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "SAVING OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Saving Mode:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 150); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "ASCII", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioModeSelCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(!DAS.DOption.savingmode) MRButtonActivate(rb); rb = MCreateRButton(tb, "Binary", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioModeSelCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.savingmode) MRButtonActivate(rb); /***************************************************************************/ /*********** Saving Mode Section - End ******************************/ /***************************************************************************/ /***************************************************************************/ /*********** File Name Type Section - Start *************************/ /***************************************************************************/ tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Saving File Names:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 150); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Free ", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFNSelCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(!DAS.DOption.filename) MRButtonActivate(rb); rb = MCreateRButton(tb, "Automatic", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFNSelCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); //MObjectSetResize(rb, False, False); if(DAS.DOption.filename) MRButtonActivate(rb); /***************************************************************************/ /*********** File Name Type Section - End ***************************/ /***************************************************************************/ /***************************************************************************/ /*********** START IMAGE TYPE SECTION *******************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "Type of Images:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); rowform = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, True, False); rb = MCreateRButton(rowform, "MONO ", FIXED_SMALL); MPButtonSetCallback(rb, DB_ImgTypeCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(!DAS.DOption.imgtype) MRButtonActivate(rb); rb = MCreateRButton(rowform, "RGB", FIXED_SMALL); MPButtonSetCallback(rb, DB_ImgTypeCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, False, False); if(DAS.DOption.imgtype) MRButtonActivate(rb); pb = MCreatePButton(rowform, "Apply img", FIXED_SMALL); MPButtonSetCallback(pb, ApplyImgCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); /***************************************************************************/ /*********** END IMAGE TYPE SECTION *******************************/ /***************************************************************************/ /***************************************************************************/ /*********** START AVERAGING SECTION *******************************/ /***************************************************************************/ DAS.Gui.ConfigPanel.tbavg = MCreateTableForm(obj, 1); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.tbavg, 112, 128, 112); MObjectSetResize(DAS.Gui.ConfigPanel.tbavg, True, False); // lbl = MCreateLabel(obj, "AVERAGE", FIXED_SMALL); lbl = MCreateLabel(DAS.Gui.ConfigPanel.tbavg, "AVERAGE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetBackgroundRGB(lbl, 96, 132, 152); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); /////////////////////////////////////////////////////// //tb = MCreateTableForm(obj, 3); tb = MCreateTableForm(DAS.Gui.ConfigPanel.tbavg, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Automatic ARange for AVG ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); //MObjectSetCompositeWidth(lbl, 200); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_AVGAutoR_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.avgautor == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_AVGAutoR_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.avgautor == 0) MRButtonActivate(rb); //tb = MCreateTableForm(obj, 2); tb = MCreateTableForm(DAS.Gui.ConfigPanel.tbavg, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.FixTExp = MCreateRButton(tb, "Fix TExp. ", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.FixTExp, DB_RadioAvgModeCB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.FixTExp, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.FixTExp, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.FixTExp, 85); DAS.Gui.ConfigPanel.FixMeasNum = MCreateRButton(tb, "Fix Meas. Number", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.FixMeasNum, DB_RadioAvgModeCB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.FixMeasNum, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.FixMeasNum, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.FixMeasNum, 123); if(DAS.DOption.avgmode) { DAS.Gui.ConfigPanel.lblAvg = MCreateLabel(tb, "TOT Exposure Time :", FIXED_SMALL); MLabelSetAlignment(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblAvg, 255, 255, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblAvg, 0); MObjectSetResize(DAS.Gui.ConfigPanel.lblAvg, False, False); MObjectAlign(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d", TOTTEXP); DAS.Gui.ConfigPanel.n_avg = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.n_avg, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.n_avg, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.n_avg, 35); MObjectAlign(DAS.Gui.ConfigPanel.n_avg, LEFT_ALIGN, TOP_ALIGN); k = 111; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.n_avg, ActEditCB, p); MRButtonActivate(DAS.Gui.ConfigPanel.FixTExp); } else { DAS.Gui.ConfigPanel.lblAvg = MCreateLabel(tb, "Repeat measure for: ", FIXED_SMALL); MLabelSetAlignment(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblAvg, 255, 255, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblAvg, 0); MObjectSetResize(DAS.Gui.ConfigPanel.lblAvg, False, False); MObjectAlign(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",N_AVG); DAS.Gui.ConfigPanel.n_avg = MCreateClippedEdit(tb, " ", 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.n_avg, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.n_avg, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.n_avg, 35); MObjectAlign(DAS.Gui.ConfigPanel.n_avg, LEFT_ALIGN, TOP_ALIGN); k = 111; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.n_avg, ActEditCB, p); MRButtonActivate(DAS.Gui.ConfigPanel.FixMeasNum); } /***************************************************************************/ /*********** END AVERAGING SECTION *******************************/ /***************************************************************************/ /***************************************************************************/ /*********** START MEASURING mode SECTION *******************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "MEASURING MODE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetBackgroundRGB(lbl, 96, 132, 152); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); //table for selecting Single or Averaged measurements tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "SINGLE", FIXED_SMALL); MPButtonSetCallback(rb, DB_MeasMode_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.measmode == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "AVERAGE", FIXED_SMALL); MPButtonSetCallback(rb, DB_MeasMode_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.measmode == 1) MRButtonActivate(rb); /***************************************************************************/ /*********** END MEASURING mode SECTION *******************************/ /***************************************************************************/ /*******************************************************************************/ /************* START Defective Pixel Correction SECTION ***********************/ /*******************************************************************************/ lbl = MCreateLabel(obj, "DEFECTIVE PIXELS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); pb = MCreatePButton(tb, "Map UNDER Exp", FIXED_SMALL); MPButtonSetCallback(pb, UnderOverPixCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); //MObjectSetCompositeWidth(pb, 250); pb = MCreatePButton(tb, "Map OVER Exp (T=0)", FIXED_SMALL); MPButtonSetCallback(pb, UnderOverPixCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); //MObjectSetCompositeWidth(pb, 220); pb = MCreatePButton(tb, "Map OVER Exp (T=5)", FIXED_SMALL); MPButtonSetCallback(pb, UnderOverPixCB, (void *) 2); MObjectSetBackgroundRGB(pb, 224, 224, 176); //MObjectSetCompositeWidth(pb, 220); lbl = MCreateLabel(obj, "Defective Pixel Correction:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 220); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbCorrPix[0] = MCreateRButton(tb, "DISABLE", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbCorrPix[0], DB_RadioPixCorrCB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbCorrPix[0], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbCorrPix[0], 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbCorrPix[0], 85); DAS.Gui.ConfigPanel.rbCorrPix[1] = MCreateRButton(tb, "ENABLE", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbCorrPix[1], DB_RadioPixCorrCB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbCorrPix[1], RIGHT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbCorrPix[1], 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbCorrPix[1], 123); colform = MCreateColForm(obj); MObjectSetBackgroundRGB(colform, 112, 128, 112); MObjectSetResize(colform, True, False); DAS.Gui.ConfigPanel.lblCorrPixF = MCreateLabel(colform, DAS.DOption.DEFPIXFILENAME, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblCorrPixF, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblCorrPixF, 96, 132, 152); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblCorrPixF, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); //MObjectSetCompositeWidth(lbl, 220); DAS.Gui.ConfigPanel.pbBrowseCorrPixF = MCreatePButton(colform, "...", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, SelDefPixFileCB, (void *) 0); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, 224, 224, 176); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, 30); MObjectAlign(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, RIGHT_ALIGN, TOP_ALIGN); if(!DAS.DOption.pixcorr) MRButtonActivate(DAS.Gui.ConfigPanel.rbCorrPix[0]); if(DAS.DOption.pixcorr) MRButtonActivate(DAS.Gui.ConfigPanel.rbCorrPix[1]); /*******************************************************************************/ /************* END Defective Pixel Correction SECTION ***********************/ /*******************************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 2nd page of the option page void CONFP_opt_page2(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT pb, rb ; MOBJECT lbl; MOBJECT tb ; // generic table object char buf[64]; int i,k, *p; MObjectSetText(obj, "Page 2"); /***************************************************************************/ /***************************************************************************/ /*********** START DARK MEASUREMENT SECTION *******************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "DARK IMAGE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Remove Dark from Measurements ? ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.DOption.darkremove) MRButtonActivate(rb); MPButtonSetCallback(rb, DB_RadioDarkCB, (void *) 1); rb = MCreateRButton(tb, "No", FIXED_SMALL); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if(!DAS.DOption.darkremove) MRButtonActivate(rb); MPButtonSetCallback(rb, DB_RadioDarkCB, (void *) 0); lbl = MCreateLabel(obj, "Dark Source", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.FFDark = MCreateRButton(tb, "Full Frame", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.FFDark, DB_RadDrkSourceCB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.FFDark, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.FFDark, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.FFDark, 85); // if(DAS.DOption.darkremove) if(DAS.DOption.darksource) MRButtonActivate(DAS.Gui.ConfigPanel.FFDark); DAS.Gui.ConfigPanel.BPDark = MCreateRButton(tb, "Blind Pixels", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.BPDark, DB_RadDrkSourceCB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.BPDark, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.BPDark, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.BPDark, 123); // if(DAS.DOption.darkremove) if(!DAS.DOption.darksource) MRButtonActivate(DAS.Gui.ConfigPanel.BPDark); if (DAS.DOption.darkremove==0) { MObjectSetUnsensitive(DAS.Gui.ConfigPanel.FFDark); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.BPDark); } else { MObjectSetSensitive(DAS.Gui.ConfigPanel.FFDark); MObjectSetSensitive(DAS.Gui.ConfigPanel.BPDark); } /***************************************************************************/ /*********** END DARK MEASUREMENT SECTION ****************************/ /***************************************************************************/ /*---------------------------------------------------------------*/ /***************************************************************************/ /*********** START CCD TARGET TEMPERATURE SECTION *********************/ /***************************************************************************/ lbl = MCreateLabel(obj, "CCD TARGET TEMPERATURE", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "FIXED", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetCCDTargetTempCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(!FLAG.settempvar) MRButtonActivate(rb); rb = MCreateRButton(tb, "SZA DRIVED", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetCCDTargetTempCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if(FLAG.settempvar) MRButtonActivate(rb); /***************************************************************************/ /*********** END CCD TARGET TEMPERATURE SECTION *********************/ /***************************************************************************/ /*-----------------------------------------------------------------------*/ /***************************************************************************/ /***************************************************************************/ /************** START AUTORANGING SECTION ************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "AUTORANGING", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); //MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Max Autoranging value (<= 63000) ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); //MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%d",DAS.DOption.maxlvlar); DAS.Gui.ConfigPanel.edmaxlvlar = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edmaxlvlar, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edmaxlvlar, 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edmaxlvlar, LEFT_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.edmaxlvlar, 50); k = 600; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.edmaxlvlar, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.edmaxlvlar, ActEditCB, p); /***************************************************************************/ /************** STOP AUTORANGING SECTION ************************/ /***************************************************************************/ /***************************************************************************/ /***************************************************************************/ /************** START CONFIGURATION FILES SECTION ************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "CONFIG FILES", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "View/Modify", FIXED_SMALL); MPButtonSetCallback(rb, DB_VMRsfCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if(!FLAG.VMRsf) MRButtonActivate(rb); rb= MCreateRButton(tb, "ReLoad", FIXED_SMALL); MPButtonSetCallback(rb, DB_VMRsfCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); MObjectSetUnsensitive(rb); if(FLAG.VMRsf) MRButtonActivate(rb); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); pb = MCreatePButton(tb, "Param.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "DASSysColor.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "Options.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 2); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "ccd_defect_Danbo.cor", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 3); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "GeoCoord.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 4); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "AMS.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 6); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "Equipment.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 7); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "WlStep.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 8); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "Free Editor", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 5); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); /***************************************************************************/ /************** END CONFIGURATION FILES SECTION ************************/ /***************************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 3rd page of the option page void CONFP_opt_page3(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT rb ; MOBJECT lbl; MOBJECT tb ; // generic table object int k, *p; char buf[64]; MObjectSetText(obj, "Page 3"); /***************************************************************************/ /***************************************************************************/ /******************* START PLOT OPTIONS SECTION **********************/ /***************************************************************************/ lbl = MCreateLabel(obj, "PLOT OPTIONS", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "X Axis Units", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "PIXEL", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(FLAG.Wl == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "WAVEL [A]", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(FLAG.Wl == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "WAVEL [nm]", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(FLAG.Wl == 2) MRButtonActivate(rb); /* if(FLAG.Wl == 0) MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[0]); else if(FLAG.Wl == 1) MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[1]); else if(FLAG.Wl == 2) MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[2]); */ /*----------------- DISPLAY or NOT Plot after measurement -----------------*/ lbl = MCreateLabel(obj, "Display PLOT after measurement ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 300); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "No ", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotDisplayCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Flag.plotW == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotDisplayCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(DAS.Flag.plotW == 1) MRButtonActivate(rb); /* if(FLAG.plotW == 0) MRButtonActivate(DAS.Gui.ConfigPanel.PlotDisp[0]); else if(FLAG.plotW == 1) MRButtonActivate(DAS.Gui.ConfigPanel.PlotDisp[1]); */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " Y Axis", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Full Range", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotYAxisCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); MObjectSetResize(rb, True, False); if(FLAG.plotYRange == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Min/Max", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotYAxisCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); MObjectSetResize(rb, True, False); if(FLAG.plotYRange == 1) MRButtonActivate(rb); /* if(FLAG.plotYRange == 0) MRButtonActivate(DAS.Gui.ConfigPanel.PlotYAxis[0]); else if(FLAG.plotYRange == 1) MRButtonActivate(DAS.Gui.ConfigPanel.PlotYAxis[1]); /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*-------------------------------------------------------------------------*/ /* Hidden Lines section */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " Hidden lines ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Before Central Line ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%d",DAS.DOption.hlinebefore); DAS.Gui.ConfigPanel.HiddenL = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.HiddenL, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.HiddenL, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.HiddenL, 35); MObjectAlign(DAS.Gui.ConfigPanel.HiddenL, LEFT_ALIGN, TOP_ALIGN); k = 130; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.HiddenL, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.HiddenL, ActEditCB, p); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "After Central Line ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%d",DAS.DOption.hlineafter); DAS.Gui.ConfigPanel.HiddenL = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.HiddenL, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.HiddenL, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.HiddenL, 35); MObjectAlign(DAS.Gui.ConfigPanel.HiddenL, LEFT_ALIGN, TOP_ALIGN); k = 135; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.HiddenL, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.HiddenL, ActEditCB, p); /*-------------------------------------------------------------------------*/ /* Blind Pixel section */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " Display Blind Pixel? ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_DispBlindPixCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); MObjectSetResize(rb, True, False); if(FLAG.DispBlindPix == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_DispBlindPixCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); MObjectSetResize(rb, True, False); if(FLAG.DispBlindPix == 1) MRButtonActivate(rb); /*-------------------------------------------------------------------------*/ /***************************************************************************/ /******************* END PLOT OPTIONS SECTION **********************/ /***************************************************************************/ /*-------------------------------------------------------------------------*/ /* SZA Limit section */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " SZA Limit ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Perform Measurements for SZA <= ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%d",SZAMax); DAS.Gui.ConfigPanel.SZAMax = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SZAMax, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SZAMax, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.SZAMax, 35); MObjectAlign(DAS.Gui.ConfigPanel.SZAMax, LEFT_ALIGN, TOP_ALIGN); k = 120; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.SZAMax, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.SZAMax, ActEditCB, p); lbl = MCreateLabel(tb, " ° ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); /**************************************************************/ /***************************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 4th page of the option page void CONFP_opt_page4(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT pb, rb ; MOBJECT lbl; MOBJECT tb ; // generic table object int k, *p; char buf[64]; MObjectSetText(obj, "Page 4"); /***************************************************************************/ /******************* BACK-UP SECTION *************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "BACK-UP OPTIONS", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Perform FTP Back-Up", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFTPCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if (DAS.DOption.ftpbackup) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFTPCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if (!DAS.DOption.ftpbackup) MRButtonActivate(rb); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Server FTP Address:", FIXED_SMALL); MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%s",DFTP.ftpserver); DFTP.edServerFTP = MCreateClippedEdit(tb, buf, 15, 15, FIXED_SMALL); MObjectSetForegroundRGB(DFTP.edServerFTP, 255, 255, 255); MObjectSetBackgroundRGB(DFTP.edServerFTP, 40, 96, 72); // MObjectSetCompositeWidth(DFTP.edServerFTP, 35); MObjectAlign(DFTP.edServerFTP, RIGHT_ALIGN, TOP_ALIGN); k = 200; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DFTP.edServerFTP, ActEditCB, p); if (!DAS.DOption.ftpbackup) MEditEnableEditing(DFTP.edServerFTP); lbl = MCreateLabel(tb, "UserName:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%s",DFTP.ftpuser); DFTP.edid = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DFTP.edid, 255, 255, 255); MObjectSetBackgroundRGB(DFTP.edid, 40, 96, 72); // MObjectSetCompositeWidth(DFTP.edid, 35); MObjectAlign(DFTP.edid, RIGHT_ALIGN, TOP_ALIGN); k = 210; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DFTP.edid, ActEditCB, p); lbl = MCreateLabel(tb, "PWD:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%s",DFTP.ftppwd); DFTP.edpwd= MCreateHiddenEdit(tb, buf, 10, FIXED_SMALL, '*'); MObjectSetForegroundRGB(DFTP.edpwd, 255, 255, 255); MObjectSetBackgroundRGB(DFTP.edpwd, 40, 96, 72); // MObjectSetCompositeWidth(DFTP.edpwd, 35); MObjectAlign(DFTP.edpwd, RIGHT_ALIGN, TOP_ALIGN); k = 220; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DFTP.edpwd, ActEditCB, p); /* if (DAS.DOption.ftpbackup) MRButtonActivate(DFTP.rb[0]); else MRButtonActivate(DFTP.rb[1]); */ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); pb = MCreatePButton(tb, "Save FTP.INI", FIXED_SMALL); MPButtonSetCallback(pb, PbftpCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 94); pb = MCreatePButton(tb, "Test FTP", FIXED_SMALL); MPButtonSetCallback(pb, PbftpCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 94); /***************************************************************************/ /**************** OMU Thermo-regulation SECTION ***********************/ /***************************************************************************/ lbl = MCreateLabel(obj, "OMU THERMO-REGULATION", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Choose the Reference temp", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Pelt. Int.", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.refertemp == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Optic", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.refertemp == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "Grating", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.refertemp == 2) MRButtonActivate(rb); lbl = MCreateLabel(obj, "Choose the Thermo-regulation mode", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Cold only", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 3); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(OMUTHR.TRType == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Heat only", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 4); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(OMUTHR.TRType == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "Cold/Heat", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 5); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(OMUTHR.TRType == 2) MRButtonActivate(rb); /***************/ lbl = MCreateLabel(obj, "Choose the Thermo-reg. Algorithm", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Progressive", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 6); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(OMUTHR.PID_On == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "PID", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 7); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(OMUTHR.PID_On == 1) MRButtonActivate(rb); if(OMUTHR.PID_On == 1) //Create the field for PID Parameters { tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Prop.", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 90); lbl = MCreateLabel(tb, "Integral", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 90); lbl = MCreateLabel(tb, "Deriv.", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 90); sprintf(buf, "%.1lf",OMUTHR.PID_kp); DAS.Gui.ConfigPanel.PID_edt[0] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[0], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.PID_edt[0], 40, 96, 72); k = 500; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.PID_edt[0], ActEditCB, p); sprintf(buf, "%.3lf",OMUTHR.PID_ki); DAS.Gui.ConfigPanel.PID_edt[1] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[1], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.PID_edt[1], 40, 96, 72); k = 501; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.PID_edt[1], ActEditCB, p); sprintf(buf, "%.4lf",OMUTHR.PID_kd); DAS.Gui.ConfigPanel.PID_edt[2] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[2], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.PID_edt[2], 40, 96, 72); k = 502; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.PID_edt[2], ActEditCB, p); } pb = MCreatePButton(obj, "Temp History", FIXED_SMALL); MPButtonSetCallback(pb, PBTempHistoCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 123); /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 5th page of the option page void CONFP_opt_page5(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT rb ; MOBJECT lbl; MOBJECT tb,tb1 ; // generic table object // int i,k, *p; // char buf[64]; MObjectSetText(obj, "Page 5"); lbl = MCreateLabel(obj, "MIRROR IMAGE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb1 = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb1, 112, 128, 112); MObjectSetResize(tb1, True, False); lbl = MCreateLabel(tb1, "Along the X Axis ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); lbl = MCreateLabel(tb1, "Along the Y Axis ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(tb1, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.mirrorimg[XAX] == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.mirrorimg[XAX] == 0) MRButtonActivate(rb); tb = MCreateTableForm(tb1, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.mirrorimg[YAX] == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 3); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.mirrorimg[YAX] == 0) MRButtonActivate(rb); lbl = MCreateLabel(obj, "AMS OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Positioning Mode", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Simultaneous", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSposmode_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.smposmode == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "Sequential", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSposmode_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.smposmode == 0) MRButtonActivate(rb); lbl = MCreateLabel(obj, "Display progression bars?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSProgBar_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.amsprogbar == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSProgBar_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.amsprogbar == 0) MRButtonActivate(rb); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ lbl = MCreateLabel(obj, "MIGE Platform OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "MIGE Status", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbMIGEStatus[0]=MCreateRButton(tb, "NOT Connected", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEStatus[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEStatus[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEStatus[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.linked == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[0]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEStatus[0], DB_MIGE_CB, (void *) 0); DAS.Gui.ConfigPanel.rbMIGEStatus[1] = MCreateRButton(tb, "Connected", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEStatus[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEStatus[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEStatus[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.linked == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[1]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEStatus[1], DB_MIGE_CB, (void *) 1); lbl = MCreateLabel(obj, "MIGE Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbMIGEtype[0] = MCreateRButton(tb, "Ver. 0.5", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEtype[0], DB_MIGEType_CB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEtype[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEtype[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEtype[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.type == 0 ) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEtype[0]); DAS.Gui.ConfigPanel.rbMIGEtype[1] = MCreateRButton(tb, "Ver. 1.5", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEtype[1], DB_MIGEType_CB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEtype[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEtype[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEtype[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.type == 1 ) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEtype[1]); DAS.Gui.ConfigPanel.rbMIGEtype[2] = MCreateRButton(tb, "Ver. 2.0", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEtype[2], DB_MIGEType_CB, (void *) 2); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEtype[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEtype[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEtype[2], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.type == 2 ) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEtype[2]); lbl = MCreateLabel(obj, "Operating mode", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbMIGEopmode[0] = MCreateRButton(tb, "Solar Tracker", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEopmode[0], DB_MIGEopmode_CB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEopmode[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEopmode[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEopmode[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.aaopmode == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEopmode[0]); DAS.Gui.ConfigPanel.rbMIGEopmode[1] = MCreateRButton(tb, "Anti Solar Tracker", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEopmode[1], DB_MIGEopmode_CB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEopmode[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEopmode[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEopmode[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.aaopmode == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEopmode[1]); DAS.Gui.ConfigPanel.rbMIGEopmode[2] = MCreateRButton(tb, "Free positions", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEopmode[2], DB_MIGEopmode_CB, (void *) 2); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEopmode[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEopmode[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEopmode[2], True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.aaopmode == 2) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEopmode[2]); if(DAS.MIGE.linked == 0) { MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[1]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[2]); } else MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[2]); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } void edtDASReset_CB(MOBJECT p, LIST_ACT *la, void *ad) { int c = (int) ad; int er = 0; DAS.DOption.resetFreq = atoi(la->item); } void DB_ResetEnable_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; // char buff[64], str[32]; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case 0: DAS.DOption.resetEnabled = 0; MObjectSetUnsensitive(DAS.Gui.ConfigPanel.listReset); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.edtDASReset); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.lblReset); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbDASResPer[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbDASResPer[1]); break; case 1: DAS.DOption.resetEnabled = 1; MObjectSetSensitive(DAS.Gui.ConfigPanel.listReset); MObjectSetSensitive(DAS.Gui.ConfigPanel.edtDASReset); MObjectSetSensitive(DAS.Gui.ConfigPanel.lblReset); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbDASResPer[0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbDASResPer[1]); break; } } } void DB_ResetType_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v,i,k; char buff[64], str[32]; LIST_ACT * pla; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case RHOUR: DAS.DOption.resetType = RHOUR; if (DAS.Gui.ConfigPanel.lblReset != 0) { sprintf(buff, "%d", (int)DAS.DOption.resetFreq); MSListClear(DAS.Gui.ConfigPanel.listReset); for(i=1; i<24; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(DAS.Gui.ConfigPanel.listReset, k-1); pla = MSListGetSelected(DAS.Gui.ConfigPanel.listReset); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDASReset, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDASReset, edtDASReset_CB, (void *) 0); DAS.DOption.resetFreq = atoi(pla->item); sprintf(buff, "Hour(s)"); MObjectSetText(DAS.Gui.ConfigPanel.lblReset, buff); } break; case RDAY: DAS.DOption.resetType = RDAY; if (DAS.Gui.ConfigPanel.lblReset != 0) { sprintf(buff, "%d", (int)DAS.DOption.resetFreq); MSListClear(DAS.Gui.ConfigPanel.listReset); for(i=1; i<365; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(DAS.Gui.ConfigPanel.listReset, k-1); pla = MSListGetSelected(DAS.Gui.ConfigPanel.listReset); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDASReset, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDASReset, edtDASReset_CB, (void *) 0); DAS.DOption.resetFreq = atoi(pla->item); sprintf(buff, "Day(s)"); MObjectSetText(DAS.Gui.ConfigPanel.lblReset, buff); } break; } } } // create the 7th page of the option page void CONFP_opt_page7(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form // MOBJECT pb, rb ; MOBJECT lbl; MOBJECT tb; // generic table object int i,k; // char buf[64]; // MOBJECT list; // int starti; float f=0; char str[80]; char buff[_MAX_PATH]; LIST_ACT * pla; MObjectSetText(obj, "Page 7"); /******************************************************************/ /*************** SHUTTER ******************************************/ /******************************************************************/ lbl = MCreateLabel(obj, "SHUTTER OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Is the EMShutter Installed?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbSHUTStatus[0] = MCreateRButton(tb, "Yes", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTStatus[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTStatus[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTStatus[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.emshutter == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTStatus[0]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTStatus[0], DB_Shutter_CB, (void *) 1); DAS.Gui.ConfigPanel.rbSHUTStatus[1] = MCreateRButton(tb, "No", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.emshutter == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTStatus[1] ); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , DB_Shutter_CB, (void *) 0); lbl = MCreateLabel(obj, "Choose Shutter Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbSHUTType [0] = MCreateRButton(tb, "UniBlitz VS25", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTType [0], DB_ShutterType_CB, (void *) VS25); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTType [0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTType [0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTType [0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.shuttertype == VS25) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTType [0]); DAS.Gui.ConfigPanel.rbSHUTType [1] = MCreateRButton(tb, "Rotating Sh.", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTType [1], DB_ShutterType_CB, (void *) ROTSHUT); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTType [1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTType [1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTType [1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.shuttertype == ROTSHUT) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTType [1]); DAS.Gui.ConfigPanel.rbSHUTType[2] = MCreateRButton(tb, "Torque Motor", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTType[2], DB_ShutterType_CB, (void *) TORQUEM); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTType[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTType[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTType[2], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.shuttertype == TORQUEM) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTType[2]); if(DAS.DOption.emshutter == 0) { MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } else { MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } /******************************************************************/ /*************** END SHUTTER **************************************/ /******************************************************************/ /******************************************************************/ /*************** FILTER WHEEL *************************************/ /******************************************************************/ lbl = MCreateLabel(obj, "FILTER WHEEL OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Choose Installed Module", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbFilterType [0] = MCreateRButton(tb, "Simple-SM3", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbFilterType [0], DB_FilterType_CB, (void *) FSIMPLE); MObjectAlign(DAS.Gui.ConfigPanel.rbFilterType [0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbFilterType [0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbFilterType [0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.filtertype == FSIMPLE) MRButtonActivate(DAS.Gui.ConfigPanel.rbFilterType [0]); DAS.Gui.ConfigPanel.rbFilterType [1] = MCreateRButton(tb, "Double-SM3+SM4", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbFilterType [1], DB_FilterType_CB, (void *) FDOUBLE); MObjectAlign(DAS.Gui.ConfigPanel.rbFilterType [1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbFilterType [1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbFilterType [1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.filtertype == FDOUBLE) MRButtonActivate(DAS.Gui.ConfigPanel.rbFilterType [1]); DAS.Gui.ConfigPanel.rbFilterType[2] = MCreateRButton(tb, "Plus-SM3+TM", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbFilterType[2], DB_FilterType_CB, (void *) FPLUS); MObjectAlign(DAS.Gui.ConfigPanel.rbFilterType[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbFilterType[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbFilterType[2], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.filtertype == FPLUS) MRButtonActivate(DAS.Gui.ConfigPanel.rbFilterType[2]); /* if(DAS.DOption.emshutter == 0) { MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } else { MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } */ /******************************************************************/ /*************** END FILTER WHEEL ********************************/ /******************************************************************/ /******************************************************************/ /*************** RESET DAS Windows Restart ***********************/ /******************************************************************/ lbl = MCreateLabel(obj, "RESET WINDOWS OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); /*----------------------------------------------------------------*/ lbl = MCreateLabel(obj, "DAS/SYSTEM Reset ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbResetEnab[0] = MCreateRButton(tb, "Disabled", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbResetEnab[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbResetEnab[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbResetEnab[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.resetEnabled == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbResetEnab[0]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbResetEnab[0], DB_ResetEnable_CB, (void *) 0); DAS.Gui.ConfigPanel.rbResetEnab[1] = MCreateRButton(tb, "Enabled", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbResetEnab[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbResetEnab[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbResetEnab[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.resetEnabled == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbResetEnab[1]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbResetEnab[1], DB_ResetEnable_CB, (void *) 1); /*----------------------------------------------------------------*/ lbl = MCreateLabel(obj, "Reset Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbDASResPer[0] = MCreateRButton(tb, "HOUR(s)", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDASResPer[0], DB_ResetType_CB, (void *) RHOUR); MObjectAlign(DAS.Gui.ConfigPanel.rbDASResPer[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDASResPer[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbDASResPer[0], True, False); //MObjectSetCompositeWidth(rb, 100); DAS.Gui.ConfigPanel.rbDASResPer[1] = MCreateRButton(tb, "DAY(s)", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDASResPer[1], DB_ResetType_CB, (void *) RDAY); MObjectAlign(DAS.Gui.ConfigPanel.rbDASResPer[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDASResPer[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbDASResPer[1], True, False); //MObjectSetCompositeWidth(rb, 100); lbl = MCreateLabel(obj, "Reset Frequency", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Re-start every ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); //MObjectSetCompositeWidth(lbl, 250); sprintf(buff, "%d", (int)DAS.DOption.resetFreq); DAS.Gui.ConfigPanel.edtDASReset = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtDASReset, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtDASReset, 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edtDASReset, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.edtDASReset); DAS.Gui.ConfigPanel.listReset = MOptionEditGetList(DAS.Gui.ConfigPanel.edtDASReset); if (DAS.DOption.resetType) // Days { for(i=1; i<365; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } } else //hours { for(i=1; i<24; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } } /* list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtDSZA); for(i=0; i<20; i++) { f = f+0.10; sprintf(str, "%.3f",f); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDSZA, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDSZA, edtDSZA_CB, (void *) 0); SZADelta.DeltaSZA = atof(pla->item); */ MSListSelectElement(DAS.Gui.ConfigPanel.listReset, k-1); pla = MSListGetSelected(DAS.Gui.ConfigPanel.listReset); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDASReset, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDASReset, edtDASReset_CB, (void *) 0); DAS.DOption.resetFreq = atoi(pla->item); if (DAS.DOption.resetType) // Days sprintf(buff, "Day(s)", DAS.DOption.resetFreq); else sprintf(buff, "Hour(s)", DAS.DOption.resetFreq); DAS.Gui.ConfigPanel.lblReset = MCreateLabel(tb, buff, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblReset, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblReset, 96, 132, 152); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblReset, 0); MObjectSetShadow(DAS.Gui.ConfigPanel.lblReset, WS_ETCHED_IN, 1, 1); if(DAS.DOption.resetType == RHOUR) MRButtonActivate(DAS.Gui.ConfigPanel.rbDASResPer[0]); if(DAS.DOption.resetType == RDAY) MRButtonActivate(DAS.Gui.ConfigPanel.rbDASResPer[1]); /******************************************************************/ /*************** END RESET DAS ********************************/ /******************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } void CONFP_opt_ScheMeas(int mod, MOBJECT p) { // MOBJECT rowform; // generic row form MOBJECT rowform1; MOBJECT colform, colform2,colform3,colform4; MOBJECT rb ; MOBJECT lbl, list, optedit; // MOBJECT tb ; // generic table object int i; int lenedit = 12; char buf[64]; int maxangle; if (mod == 1) maxangle = 181; else maxangle = 96; colform = MCreateColForm(p); MFormSetSpacing(colform, 0); MObjectSetResize(colform, False, False); MObjectAlign(colform, CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform, 255); MObjectSetShadow(colform, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, True); MObjectAlign(rowform1, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(rowform1, 255); MObjectSetShadow(rowform1, WS_NONE, 0, 0); rb = MCreateRButton(rowform1, "", FIXED_SMALL); // MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetTransparency(rb, 255); MObjectSetResize(rb, True, False); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 1) // MRButtonActivate(rb); rb = MCreateRButton(rowform1, "", FIXED_SMALL); // MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); MObjectSetTransparency(rb, 255); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 0) // MRButtonActivate(rb); colform2 = MCreateColForm(colform); MFormSetSpacing(colform2, 0); MObjectSetResize(colform2, False, False); MObjectSetTransparency(colform2, 255); MObjectSetShadow(colform2, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform2); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, False); MObjectSetShadow(rowform1, WS_NONE, 0, 0); MObjectSetTransparency(rowform1, 255); colform3 = MCreateColForm(rowform1); MFormSetSpacing(colform3, 0); MObjectSetResize(colform3, False, False); MObjectAlign(colform3, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform3, 255); MObjectSetShadow(colform3, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); lbl = MCreateLabel(colform3, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, False, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } if (mod == 1) MSListSelectElement(list, 180); else MSListSelectElement(list, 95); colform4 = MCreateColForm(rowform1); MFormSetSpacing(colform4, 0); MObjectSetTransparency(colform4, 255); MObjectSetShadow(colform4, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); sprintf(buf, "<SZA<"); lbl = MCreateLabel(colform4, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "50"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 50); lbl = MCreateLabel(colform4, "OR", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "75"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 75); lbl = MCreateLabel(colform4, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } if (mod == 1) MSListSelectElement(list, 180); else MSListSelectElement(list, 95); } // create the 6th page of the option page void CONFP_opt_page6(int mod, MOBJECT obj) { MOBJECT rowform; // generic row form // MOBJECT colform, colform1,colform2,colform3,colform4; // MOBJECT pb, rb ; MOBJECT lbl, list, optedit; MOBJECT tb ; // generic table object int i; int lenedit = 12; char buf[64], str[16]; unsigned char lesseq = 242, greateq=241; MObjectSetText(obj, "Page 6"); lbl = MCreateLabel(obj, "INPUTS <--> DEVICES", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); /* lbl = MCreateLabel(obj, "Input <--> Device", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ tb = MCreateTableForm(obj, 4); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, False, False); if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) sprintf(str, "%s",Mir_CodeTropo[0]); else sprintf(str, "%s",Mir_Code[0]); sprintf(buf, "%s",str); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%s",DeviceTypeInput[0]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) MSListSelectElement(list, 2); else MSListSelectElement(list, 0); sprintf(buf, "%s",Mir_Code[1]); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%s",DeviceTypeInput[6]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 1); if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) sprintf(str, "%s",Mir_CodeTropo[2]); else sprintf(str, "%s",Mir_Code[2]); sprintf(buf, "%s",str); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) sprintf(buf, "%s",DeviceTypeInput[7]); else sprintf(buf, "%s",DeviceTypeInput[2]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) MSListSelectElement(list, 7); else MSListSelectElement(list, 2); sprintf(buf, "%s",Mir_Code[3]); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%s",DeviceTypeInput[3]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 3); lbl = MCreateLabel(obj, "MEASUREMENTS SCHEDULING", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); /***************************************************************/ // 1 start rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "ZenithSky", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(0, rowform); /* colform = MCreateColForm(rowform); MFormSetSpacing(colform, 0); MObjectSetResize(colform, False, False); MObjectAlign(colform, CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform, 255); MObjectSetShadow(colform, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, True); MObjectAlign(rowform1, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(rowform1, 255); MObjectSetShadow(rowform1, WS_NONE, 0, 0); rb = MCreateRButton(rowform1, "", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetTransparency(rb, 255); MObjectSetResize(rb, True, False); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 1) // MRButtonActivate(rb); rb = MCreateRButton(rowform1, "", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); MObjectSetTransparency(rb, 255); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 0) // MRButtonActivate(rb); colform2 = MCreateColForm(colform); MFormSetSpacing(colform2, 0); MObjectSetResize(colform2, False, False); MObjectSetTransparency(colform2, 255); MObjectSetShadow(colform2, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform2); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, False); MObjectSetShadow(rowform1, WS_NONE, 0, 0); MObjectSetTransparency(rowform1, 255); colform3 = MCreateColForm(rowform1); MFormSetSpacing(colform3, 0); MObjectSetResize(colform3, False, False); MObjectAlign(colform3, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform3, 255); MObjectSetShadow(colform3, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); lbl = MCreateLabel(colform3, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, False, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 95); colform4 = MCreateColForm(rowform1); MFormSetSpacing(colform4, 0); MObjectSetTransparency(colform4, 255); MObjectSetShadow(colform4, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); sprintf(buf, "<SZA<"); lbl = MCreateLabel(colform4, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "50"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 50); lbl = MCreateLabel(colform4, "OR", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "75"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 75); lbl = MCreateLabel(colform4, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 95); // 1 End /***************************************************************/ /***************************************************************/ // 2 start rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "Horizontal", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(1, rowform); /* lbl = MCreateLabel(obj, "Horizontal", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "Radiometric", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(0, rowform); /* lbl = MCreateLabel(obj, "Radiometric", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "Off-Axis", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(0, rowform); /* lbl = MCreateLabel(obj, "Off-Axis", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } //Create the Option page (with 6 sub-pages) void CONFP_Options(int mod, MOBJECT mo) { MOBJECT rowform; // generic row form MOBJECT rowform1; // generic row form // MOBJECT PFAMS; // paged form for AMS MOBJECT POPT; // paged form for AMS // MOBJECT edit; // generic edit object // MOBJECT radiobutt[2]; // generic radio button // MOBJECT RColButt; MOBJECT pb; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; // MOBJECT lbl; MOBJECT tb; // generic table object // char buf[64]; // int *p; MObjectSetText(mo, "Options"); rowform = MCreateRowForm(mo); MObjectSetBackgroundRGB(rowform, 112, 128, 112); // MObjectSetResize(rowform, True, True); MObjectSetCompositeWidth(rowform, 400); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); POPT = MCreateTabbedRowForm(rowform, 7, FIXED_SMALL); MObjectSetForegroundRGB(POPT, 255, 255, 255); MObjectSetBackgroundRGB(POPT, 112, 128, 112); MObjectAlign(POPT, CENTER_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(POPT, 390); MObjectSetResize(POPT, False, False); //Creation page 1 CONFP_opt_page1(0, POPT); MPagedFormSetActivePage(POPT, 1); //Creation page 2 CONFP_opt_page2(0, POPT); MPagedFormSetActivePage(POPT, 2); //Creation page 3 CONFP_opt_page3(0, POPT); MPagedFormSetActivePage(POPT, 3); //Creation page 4 CONFP_opt_page4(0, POPT); MPagedFormSetActivePage(POPT, 4); //Creation page 5 CONFP_opt_page5(0, POPT); MPagedFormSetActivePage(POPT, 5); //Creation page 6 CONFP_opt_page6(0, POPT); MPagedFormSetActivePage(POPT, 6); //Creation page 7 CONFP_opt_page7(0, POPT); MPagedFormSetActivePage(POPT, 0); // Command Button Section rowform1 = MCreateRowForm(mo); MObjectSetBackgroundRGB(rowform1, 112, 128, 112); //MObjectSetResize(rowform, False, True); MObjectSetCompositeWidth(rowform1, 357); MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform1, 2); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); pb = MCreatePButton(tb, "Save", FIXED_SMALL); MPButtonSetCallback(pb, WriteOptioniniCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); } void AMS_AdvancedCB(MOBJECT o, void *od, void *ad) { char buff[_MAX_PATH]; int f; STARTUPINFO si; PROCESS_INFORMATION pi; // chdir(buff); sprintf(buff,"%s\\%s",BIL.DFILEM.HOMEDIRECTORY, "\\AMSTester50\\AMS50.exe"); // WinExec(buff, 1); // // perform the equivalent of WinExec in NT, but we use a Unicode string // memset(&si, 0, sizeof(si)); si.cb = sizeof(si); si.dwFlags= STARTF_USESHOWWINDOW; si.wShowWindow = SW_SHOW; f = CreateProcess(NULL, buff, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); // sprintf(buff,"%ss",BIL.DFILEM.HOMEDIRECTORY, "SolPosCalc"); chdir(BIL.DFILEM.HOMEDIRECTORY); } MOBJECT MDCreateDASConfig(void) { // MOBJECT _shell000; MOBJECT POCF; //Paged form for configuration panel // MOBJECT POPT; //Paged form for options MOBJECT rowform; // generic row form MOBJECT rowform1; // generic row form // MOBJECT PFAMS; // paged form for AMS // MOBJECT edit; // generic edit object // MOBJECT radiobutt[2]; // generic radio button MOBJECT RColButt; MOBJECT pb; // generic push button // MOBJECT rb; // generic radio button MOBJECT list; MOBJECT _tbutton000; MOBJECT _tbutton001; MOBJECT form2; MOBJECT label, lbl; MOBJECT tb; // generic table object // MOBJECT frm2_tb4; int r, g, b; int i; char buf[64]; // double percentuale,speedhz; const char *fontfamily; // struct confp *pconfp; LoadGeoDB(); MGetDefaultBackgroundRGB(&r, &g, &b); drawarea_bgc = MAllocColor(r, g, b); /********************************************************/ /************* MAIN SHELL *************************/ /********************************************************/ DAS.Gui.ConfigPanel.ShellConfig = MCreateShell("DAS Config", 0); MObjectSetResize(DAS.Gui.ConfigPanel.ShellConfig, True, True); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.ShellConfig, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.ShellConfig, 96, 132, 152); MObjectSetResize(DAS.Gui.ConfigPanel.ShellConfig, True, True); MObjectAlign(DAS.Gui.ConfigPanel.ShellConfig, CENTER_ALIGN, TOP_ALIGN); // MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.ShellConfig, 670); // MObjectSetCompositeHeight(DAS.Gui.ConfigPanel.ShellConfig, 483); /********************************************************/ /************* CONFIG PAGED FORM **********************/ /********************************************************/ POCF = MCreateTabbedRowForm(DAS.Gui.ConfigPanel.ShellConfig, 6, FIXED_SMALL); MObjectSetForegroundRGB(POCF, 255, 255, 255); MObjectSetBackgroundRGB(POCF, 96, 132, 152); MObjectSetResize(POCF, True, True); MObjectAlign(POCF, CENTER_ALIGN, TOP_ALIGN); // MObjectSetCompositeWidth(POCF, 457); //457 /* Activation of POCF page 0 - Parameters*/ /* 00000000000000000000000000000000000000000000000000000000 */ MPagedFormSetActivePage(POCF, 0); // Creation page 0 - Parameters CONFP_Param(0, POCF); /* End Activation and creation of page 0 */ /* 0000000000000000000000000000000000000000000000000000000 */ /* Activation of POCF page 1 - Option */ /* 11111111111111111111111111111111111111111111111111111111 */ /* Start Creation of page 1 111111111111111111111*/ /* 11111111111111111111111111111111111111111111111111111111111111111*/ MPagedFormSetActivePage(POCF, 1); // Creation Page 1 - Options CONFP_Options(0, POCF); /* End Activation and creation of page 1 11111111111111111111*/ /* 11111111111111111111111111111111111111111111111111111111111111*/ /****************************************************************************/ /* Start Activation and creation of page 2 - Colors 2222222222*/ /* 22222222222222222222222222222222222222222222222222222222222222*/ MPagedFormSetActivePage(POCF, 2); MObjectSetText(POCF, "Colors"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(rowform, "SELECT OBJECT", FIXED_SMALL); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform, 2); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 112, 68, 72); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.RBColObj[0] = MCreateRButton(tb, "Unsel. Push Button", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[0], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[0], ColObjCB, (void *) 0); DAS.Gui.ConfigPanel.RBColObj[1] = MCreateRButton(tb, "Sel. Push Button", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[1], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[1], ColObjCB, (void *) 1); DAS.Gui.ConfigPanel.RBColObj[2] = MCreateRButton(tb, "Active Labels", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[2], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[2], ColObjCB, (void *) 2); DAS.Gui.ConfigPanel.RBColObj[3] = MCreateRButton(tb, "Passive LAbels", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[3], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[3], ColObjCB, (void *) 3); DAS.Gui.ConfigPanel.RBColObj[4] = MCreateRButton(tb, "Forms", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[4], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[4], ColObjCB, (void *) 4); DAS.Gui.ConfigPanel.RBColObj[5] = MCreateRButton(tb, "Capital Labels", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[5], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[5], ColObjCB, (void *) 5); if (DAS.Flag.exemode == DOASMODE ) { DAS.Gui.ConfigPanel.RBColObj[6] = MCreateRButton(tb, "Radio Button", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[6], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[6], ColObjCB, (void *) 6); } /* RColButt = MCreateRButton(tb, "UnSel. Comm.", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 0); RColButt = MCreateRButton(tb, "Sel. Comm.", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 1); RColButt = MCreateRButton(tb, "Active labels", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 2); RColButt = MCreateRButton(tb, "Passive labels", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 3); RColButt = MCreateRButton(tb, "Forms", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 4); RColButt = MCreateRButton(tb, "K_labelsUP", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 5); if (DAS.Flag.exemode == DOASMODE ) { RColButt = MCreateRButton(tb, "Radio Buttons", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 6); } */ tb = MCreateTableForm(rowform, 2); MTableFormSetColAlign(tb, 1, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 160, 112, 112); MObjectSetResize(tb, True, False); RColButt = MCreateRButton(tb, "Background", FIXED_SMALL); MRButtonSetCallback(RColButt, (OBJ_VALUE_CB) ColPickBackForeGCB, (void *) 0); MObjectAlign(RColButt, CENTER_ALIGN, TOP_ALIGN); MRButtonActivate(RColButt); MObjectSetForegroundRGB(RColButt, 255, 255, 0); RColButt = MCreateRButton(tb, "Foreground", FIXED_SMALL); MRButtonSetCallback(RColButt, (OBJ_VALUE_CB) ColPickBackForeGCB, (void *) 1); MObjectAlign(RColButt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(RColButt, 255, 255, 0); rowform1 = MCreateRowForm(rowform); MObjectSetBackgroundRGB(rowform1 , 80, 56, 56); MObjectSetResize(rowform1 , True, True); lbl = MCreateLabel(rowform1 , "COLORS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1 , 1); MObjectSetBackgroundRGB(tb, 112, 68, 72); MObjectSetResize(tb, True, False); /******************************************/ form2 = MCreateRowForm(tb); MFormSetPrefAtt(form2, F_PREF_ATT_COL); label = MCreateLabel(form2, "Red: ", FIXED_SMALL); MObjectSetForegroundRGB(label, 255, 0, 0); r_label = MCreateLabel(form2, "000", FIXED_SMALL); MObjectSetForegroundRGB(r_label, 255, 0, 0); MObjectSetResize(label, False, False); MObjectSetResize(r_label, False, False); r_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32); MScrollBarSetPosCallback(r_sbar, DB_ChangeColorCellCB, 0L); form2 = MCreateRowForm(tb); MFormSetPrefAtt(form2, F_PREF_ATT_COL); label = MCreateLabel(form2, "Green: ", FIXED_SMALL); MObjectSetForegroundRGB(label, 0, 105, 0); g_label = MCreateLabel(form2, "000", FIXED_SMALL); MObjectSetForegroundRGB(g_label, 0, 105, 0); MObjectSetResize(label, False, False); MObjectSetResize(g_label, False, False); g_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32); MScrollBarSetPosCallback(g_sbar, DB_ChangeColorCellCB, (void *) 1); form2 = MCreateRowForm(tb); MFormSetPrefAtt(form2, F_PREF_ATT_COL); label = MCreateLabel(form2, "Blue: ", FIXED_SMALL); MObjectSetForegroundRGB(label, 0, 0, 255); b_label = MCreateLabel(form2, "000", FIXED_SMALL); MObjectSetForegroundRGB(b_label, 0, 0, 255); MObjectSetResize(label, False, False); MObjectSetResize(b_label, False, False); b_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32); MScrollBarSetPosCallback(b_sbar, DB_ChangeColorCellCB, (void *) 2); /************************************/ frm3_dr1 = MCreateDrawArea(rowform, 347, 30); MObjectSetResize(frm3_dr1, True, False); MDrawAreaSetExposeCallback(frm3_dr1, DB_CellExposeCB, 0L); MDrawAreaSetResizeCallback(frm3_dr1, DB_CellResizeCB, 0L); MObjectSetResize(frm3_dr1, True, False); r_c = g_c = b_c = 0; cell_color = MAllocCell(0, 0, 0); rowform1 = MCreateRowForm(rowform); MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rowform1, 56, 84, 128); MObjectSetBackgroundRGB(rowform1, 112, 68, 72); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); lbl = MCreateLabel(rowform1, "COMMANDS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); pb = MCreatePButton(rowform1, "Load Palette", FIXED_SMALL); MPButtonSetCallback(pb, LoadPaletteCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); tb = MCreateTableForm(rowform1, 4); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 112, 68, 72); MObjectSetResize(tb, True, False); pb = MCreatePButton(tb, "Preview", FIXED_SMALL); MPButtonSetCallback(pb, ColorAssignCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); pb = MCreatePButton(tb, "Undo", FIXED_SMALL); MPButtonSetCallback(pb, D_UndoCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteColorsCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); /* End Activation and creation of page 2 Colors 22222222222222222222*/ /* 22222222222222222222222222222222222222222222222222222222222222*/ /*********************** FONTS ***********************/ MPagedFormSetActivePage(POCF, 3); MObjectSetText(POCF, "Fonts"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(rowform, "SELECT OBJECT", FIXED_SMALL); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectSetCompositeWidth(lbl, 347); tb = MCreateTableForm(rowform, 2); MTableFormSetColAlign(tb, 1, LEFT_ALIGN); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 84, 128); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); RColButt = MCreateRButton(tb, "UnSel. Comm.", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 0); MObjectAlign(RColButt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); MRButtonActivate(RColButt); RColButt = MCreateRButton(tb, "Sel. Comm.", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 1); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "Active labels", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 2); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "Passive labels", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 3); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "K_labelsUP", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 4); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "K_labelsDW", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 5); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); DAS.Gui.ConfigPanel.frm4_dr1 = MCreateDrawArea(rowform, 347, 62); MObjectAlign(DAS.Gui.ConfigPanel.frm4_dr1, CENTER_ALIGN, TOP_ALIGN); MObjectSetResize(DAS.Gui.ConfigPanel.frm4_dr1, True, False); MObjectSetCompositeHeight(DAS.Gui.ConfigPanel.frm4_dr1, 62); MDrawAreaSetExposeCallback(DAS.Gui.ConfigPanel.frm4_dr1, DrawAreaExpFontCB, 0L); rowform1 = MCreateRowForm(rowform); MObjectSetBackgroundRGB(rowform1, 56, 84, 128); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); lbl = MCreateLabel(rowform1, "FONTS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1, 2); MTableFormSetColAlign(tb, 1, RIGHT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 84, 128); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Type:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); fontfamily = MGetFirstFontFamily (); e_fname = MCreateOptionEdit (tb, fontfamily, 22, 10, 6, FIXED_SMALL); MObjectSetForegroundRGB(e_fname, 255, 255, 255); MObjectSetBackgroundRGB(e_fname, 0, 24, 96); MEditDisableEditing (e_fname); list = MOptionEditGetList (e_fname); MSListSetSortCallback (list, stricmp); while (fontfamily) { MSListAddItem (list, fontfamily, 0L); fontfamily = MGetNextFontFamily (); } lbl = MCreateLabel(tb, "Dim.:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); e_fsize = MCreateOptionEdit(tb, "22", 22, 10, 6, FIXED_SMALL); MObjectSetForegroundRGB(e_fsize, 255, 255, 255); MObjectSetBackgroundRGB(e_fsize, 0, 24, 96); list = MOptionEditGetList(e_fsize); MSListAddItem(list, "12", 0L); MSListAddItem(list, "14", 0L); MSListAddItem(list, "16", 0L); MSListAddItem(list, "18", 0L); MSListAddItem(list, "20", 0L); MSListAddItem(list, "22", 0L); MSListAddItem(list, "24", 0L); MSListAddItem(list, "26", 0L); MSListAddItem(list, "28", 0L); MSListAddItem(list, "30", 0L); MSListAddItem(list, "32", 0L); MSListAddItem(list, "34", 0L); MSListAddItem(list, "36", 0L); MSListAddItem(list, "38", 0L); MSListAddItem(list, "40", 0L); MSListAddItem(list, "42", 0L); _tbutton000 = MCreateTButton(tb, "Bold", FIXED_SMALL); MTButtonSetCallback(_tbutton000, SetBoldCB, 0L); MObjectSetForegroundRGB(_tbutton000, 255, 255, 0); _tbutton001 = MCreateTButton(tb, "Italic", FIXED_SMALL); MTButtonSetCallback(_tbutton001, SetItalicCB, 0L); MObjectSetForegroundRGB(_tbutton001, 255, 255, 0); /*******************/ rowform1 = MCreateRowForm(rowform); MObjectSetForegroundRGB(rowform1, 56, 84, 128); MObjectSetBackgroundRGB(rowform1, 56, 84, 128); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); lbl = MCreateLabel(rowform1, "COMMANDS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1, 5); MObjectSetBackgroundRGB(tb, 56, 84, 128); MObjectSetResize(tb, True, False); pb = MCreatePButton(tb, "Test", FIXED_SMALL); MPButtonSetCallback(pb, TestFontCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Preview", FIXED_SMALL); MPButtonSetCallback(pb, LoadFontCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Undo", FIXED_SMALL); MPButtonSetCallback(pb, UndoFCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteFontCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); /******************* STEPPER MOTORS ***************************/ MPagedFormSetActivePage(POCF, 4); MObjectSetText(POCF, "Motors"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 457); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); /***************************************************************************/ /**************** STEPPER MOTORS SECTION ***********************************/ lbl = MCreateLabel(rowform, "STEPPER MOTORS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetCompositeWidth(lbl, 447); PFAMS = MCreateTabbedRowForm(rowform, (DAS.StepM.NAMS + 2), FIXED_SMALL); MObjectSetForegroundRGB(PFAMS, 255, 255, 255); MObjectSetBackgroundRGB(PFAMS, 80, 60, 0); MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2); MObjectSetCompositeWidth(PFAMS, 420); // MObjectSetResize(PFAMS, True, True); for (i=0;i<DAS.StepM.NAMS; i++) { MPagedFormSetActivePage(PFAMS, i); CONFP_AMS(PFAMS, i); //FrmStepperConfP(PFAMS, i); } MPagedFormSetActivePage(PFAMS, i); CONFP_AMS_Utility(PFAMS); MPagedFormSetActivePage(PFAMS, i+1); CONFP_AMS_NOVA(PFAMS); MPagedFormSetActivePage(PFAMS, 0); /* if (DAS.Paramini.EqType == TROPOGAS) { PFAMS = MCreateTabbedRowForm(rowform, 4, FIXED_SMALL); MObjectSetForegroundRGB(PFAMS, 255, 255, 255); MObjectSetBackgroundRGB(PFAMS, 80, 60, 0); MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2); } else { PFAMS = MCreateTabbedRowForm(rowform, 3, FIXED_SMALL); MObjectSetForegroundRGB(PFAMS, 255, 255, 255); MObjectSetBackgroundRGB(PFAMS, 80, 60, 0); MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2); } MPagedFormSetActivePage(PFAMS, 0); FrmStepperConfP(PFAMS, AMS1, &STEPM, &CONFP, &CPL); MPagedFormSetActivePage(PFAMS, 1); FrmStepperConfP(PFAMS, AMS2, &STEPM, &CONFP, &CPL); if (DAS.Paramini.EqType == TROPOGAS) { MPagedFormSetActivePage(PFAMS, 2); FrmStepperConfP(PFAMS, AMS3, &STEPM, &CONFP, &CPL); MPagedFormSetActivePage(PFAMS, 3); FrmAMS_Utility(PFAMS, &STEPM, &CONFP, &CPL); } else { MPagedFormSetActivePage(PFAMS, 2); FrmAMS_Utility(PFAMS, &STEPM, &CONFP, &CPL); } */ MPagedFormSetActivePage(PFAMS, 0); /*++++++++++++++++++++++++++++++++++++++++++++++++++++*/ tb = MCreateTableForm(rowform, 4); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); pb = MCreatePButton(tb, "Apply", FIXED_SMALL); MPButtonSetCallback(pb, ApplyChCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(tb, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteAMSCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(tb, "ADVANCED", FIXED_SMALL); MPButtonSetCallback(pb, AMS_AdvancedCB, (void *) 0); MObjectSetBackgroundRGB(pb, 24, 24, 255); MObjectSetForegroundRGB(pb, 255, 245, 255); MObjectSetCompositeWidth(pb, 74); /*********************************************************/ /*********************************************************/ /*************** TEST AD Converter **************/ /*********************************************************/ MPagedFormSetActivePage(POCF, 5); MObjectSetText(POCF, "TEST AD Converter"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); /*+++++++++++++++++ START CURRENT SETUP ++++++++++*/ lbl = MCreateLabel(rowform , "AD Converter Current Setup", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform, 4); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); lbl = MCreateLabel(tb , "Board Type:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); // sprintf(buf, "%s", DSCCB2STR()); ADTESTER.lblADsetup[0] = MCreateLabel(tb , "DMM", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[0], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[0], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[0], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[0], 0); lbl = MCreateLabel(tb , "Base Addr:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[1] = MCreateLabel(tb , "0x300", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[1], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[1], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[1], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[1], 0); lbl = MCreateLabel(tb , "Int.Lvl:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[2] = MCreateLabel(tb , "3", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[2], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[2], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[2], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[2], 0); lbl = MCreateLabel(tb , "DMA Lvl:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[3] = MCreateLabel(tb , "3", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[3], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[3], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[3], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[3], 0); lbl = MCreateLabel(tb , "ClockFreq:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[4] = MCreateLabel(tb , "10MHz", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[4], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[4], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[4], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[4], 0); lbl = MCreateLabel(tb , "Range:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[5] = MCreateLabel(tb , "5V", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[5], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[5], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[5], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[5], 0); lbl = MCreateLabel(tb , "Pol.:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[6] = MCreateLabel(tb , "UNIPOL", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[6], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[6], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[6], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[6], 0); lbl = MCreateLabel(tb , "Gain:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[7] = MCreateLabel(tb , "2", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[7], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[7], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[7], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[7], 0); lbl = MCreateLabel(tb , "LowCh:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[8] = MCreateLabel(tb , "0", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[8], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[8], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[8], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[8], 0); lbl = MCreateLabel(tb , "HighCh:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[9] = MCreateLabel(tb , "15", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[9], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[9], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[9], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[9], 0); // LoadDMMSetup(); /*+++++++++++++++++ END CURRENT SETUP ++++++++++*/ tb = MCreateTableForm(rowform, 2); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); ADTESTER.ADrb[0]= MCreateRButton(tb, "Volts", FIXED_SMALL); MPButtonSetCallback(ADTESTER.ADrb[0], DB_SelOutModeCB, (void *) 0); MObjectAlign(ADTESTER.ADrb[0], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(ADTESTER.ADrb[0], 255, 255, 255); MObjectSetCompositeWidth(ADTESTER.ADrb[0], 85); ADTESTER.ADrb[1] = MCreateRButton(tb, "Celsius", FIXED_SMALL); MPButtonSetCallback(ADTESTER.ADrb[1], DB_SelOutModeCB, (void *) 1); MObjectAlign(ADTESTER.ADrb[1], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(ADTESTER.ADrb[1], 255, 255, 255); MObjectSetCompositeWidth(ADTESTER.ADrb[1], 85); if(ADTESTER.OutputMode == 0) MRButtonActivate(ADTESTER.ADrb[0]); else MRButtonActivate(ADTESTER.ADrb[0]); lbl = MCreateLabel(rowform , "Output", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform, 4); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); for(i=0;i<16;i++) { sprintf(buf, "Ch.%d:", i); ADTESTER.lblADch[i] = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(ADTESTER.lblADch[i], LEFT_ALIGN); MObjectSetForegroundRGB(ADTESTER.lblADch[i], 255, 255, 255); MObjectSetTransparency(ADTESTER.lblADch[i], 0); MObjectSetResize(ADTESTER.lblADch[i], False, False); MObjectAlign(ADTESTER.lblADch[i], LEFT_ALIGN, TOP_ALIGN); // MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblADch[i], 40, 96, 72); ADTESTER.lblADvalue[i] = MCreateLabel(tb, " 0.0", FIXED_SMALL); MLabelSetAlignment(ADTESTER.lblADvalue[i], RIGHT_ALIGN); MObjectSetForegroundRGB(ADTESTER.lblADvalue[i], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADvalue[i], 40, 96, 72); MObjectSetTransparency(ADTESTER.lblADvalue[i], 0); MObjectSetResize(ADTESTER.lblADvalue[i], False, False); MObjectAlign(ADTESTER.lblADvalue[i], LEFT_ALIGN, TOP_ALIGN); } tb = MCreateTableForm(rowform, 3); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); ADTESTER.ADpb = MCreatePButton(tb, "Start", FIXED_SMALL); MPButtonSetCallback(ADTESTER.ADpb, ADTesterCB, (void *) 0); MObjectSetBackgroundRGB(ADTESTER.ADpb, 224, 224, 176); // MObjectSetBackgroundRGB(ADTESTER.ADpb, 192, 192, 192); MObjectSetCompositeWidth(ADTESTER.ADpb, 84); ADTESTER.ADInflbl = MCreateLabel(tb, "Click Start to test ", FIXED_SMALL); // MPButtonSetCallback(ADTESTER.ADpb, ADTesterCB, (void *) 0); MObjectSetForegroundRGB(ADTESTER.ADInflbl, 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.ADInflbl, 48, 20, 255); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); /*********************************************************/ MPagedFormSetActivePage(POCF, 0); MShellRealize(DAS.Gui.ConfigPanel.ShellConfig); // MShellRealizeXYWH(DAS.Gui.ConfigPanel.ShellConfig, 0,0,600,800); return 0; } */
3229  /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */
3230 
3231 }
3232 
3233 void CONFP_param_page2(int mod, MOBJECT obj)
3234 {
3235 
3236  MOBJECT rowform, rowform1; // generic row form
3237  MOBJECT wledt; // generic edit object
3238  MOBJECT stedt; // generic edit object
3239  MOBJECT pb ;
3240 // MOBJECT list;
3241 // MOBJECT _tbutton000;
3242 // MOBJECT _tbutton001;
3243 // MOBJECT form2;
3244  MOBJECT lbl;
3245  MOBJECT tb; // generic table object
3246  char buf[64];
3247  int i;
3248 
3249  MObjectSetText(obj, "Page 2");
3250 
3251 
3252 
3253  lbl = MCreateLabel(obj, "Ref. Wavelength and Grating positioning", FIXED_SMALL);
3254  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3255  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
3256  MObjectSetTransparency(lbl, 0);
3257 
3258  rowform = MCreateColForm(obj);
3259  MObjectSetBackgroundRGB(rowform, 112, 128, 112);
3260  MObjectSetBackgroundRGB(rowform, 56, 112, 112);
3261  MObjectAlign(rowform, LEFT_ALIGN, TOP_ALIGN);
3262 
3263 
3264  tb = MCreateTableForm(rowform, 3);
3265  MObjectSetBackgroundRGB(tb, 112, 128, 112);
3266  MObjectSetBackgroundRGB(tb, 56, 112, 112);
3269  MObjectSetResize(tb, False, True);
3270 
3271  //for(i=0;i<2;i++)
3272  //{
3273  sprintf(buf, "Win" );
3274  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3277  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3278  MObjectSetTransparency(lbl, 0);
3279 
3280  sprintf(buf, "Cent.Wl" );
3281  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3284  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3285  MObjectSetTransparency(lbl, 0);
3286 
3287  sprintf(buf, "Steps" );
3288  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3291  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3292  MObjectSetTransparency(lbl, 0);
3293 // }
3294  for(i=0;i<9;i++)
3295  {
3296 
3297  sprintf(buf, "%d", i);
3298  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3301  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3302  MObjectSetTransparency(lbl, 0);
3303 
3304  sprintf(buf, "%d", wl[i]);
3305  wledt = MCreateEdit(tb, buf, 5, FIXED_SMALL);
3307  MObjectSetForegroundRGB(wledt, 255, 255, 255);
3308  MObjectSetBackgroundRGB(wledt, 40, 96, 72);
3309  MEditSetValCallback(wledt, valwledt, (void *) i);
3310  //MEditSetActCallback(wledt, wledtCB, (void *) i);
3311 
3312  sprintf(buf, "%d", wav[i]);
3313  stedt = MCreateEdit(tb, buf, 8, FIXED_SMALL);
3315  MObjectSetForegroundRGB(stedt, 255, 255, 255);
3316  MObjectSetBackgroundRGB(stedt, 40, 96, 72);
3317  MEditSetValCallback(stedt, valstedt, (void *) i);
3318  //MEditSetActCallback(stedt, stedtCB, (void *) i);
3319 
3320  }
3321 
3322  tb = MCreateTableForm(rowform, 3);
3323  MObjectSetBackgroundRGB(tb, 112, 128, 112);
3324  MObjectSetBackgroundRGB(tb, 56, 112, 112);
3327  MObjectSetResize(tb, False, True);
3328 
3329  sprintf(buf, "Win" );
3330  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3333  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3334  MObjectSetTransparency(lbl, 0);
3335 
3336  sprintf(buf, "Cent.Wl" );
3337  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3340  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3341  MObjectSetTransparency(lbl, 0);
3342 
3343  sprintf(buf, "Steps" );
3344  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3347  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3348  MObjectSetTransparency(lbl, 0);
3349 
3350  for(i=9;i<18;i++)
3351  {
3352 
3353  sprintf(buf, "%d", i);
3354  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3357  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3358  MObjectSetTransparency(lbl, 0);
3359 
3360  sprintf(buf, "%d", wl[i]);
3361  wledt = MCreateEdit(tb, buf, 5, FIXED_SMALL);
3363  MObjectSetForegroundRGB(wledt, 255, 255, 255);
3364  MObjectSetBackgroundRGB(wledt, 40, 96, 72);
3365  MEditSetValCallback(wledt, valwledt, (void *) i);
3366  //MEditSetActCallback(wledt, wledtCB, (void *) i);
3367 
3368  sprintf(buf, "%d", wav[i]);
3369  stedt = MCreateEdit(tb, buf, 8, FIXED_SMALL);
3371  MObjectSetForegroundRGB(stedt, 255, 255, 255);
3372  MObjectSetBackgroundRGB(stedt, 40, 96, 72);
3373  MEditSetValCallback(stedt, valstedt, (void *) i);
3374  //MEditSetActCallback(stedt, stedtCB, (void *) i);
3375 
3376  }
3377  // Command Button Section
3378  /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/
3379  rowform1 = MCreateTableForm(obj, 3);
3380  MObjectSetBackgroundRGB(rowform1, 56, 112, 112);
3381 // MObjectSetResize(rowform1, False, False);
3382  MObjectSetCompositeWidth(rowform1, 347);
3383 
3384  pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL);
3385  //MPButtonSetCallback(pb, ApplyChCB, (void *) 0);
3386  //if((DAS.Flag.exemode == DOASMODE) | (DAS.Flag.exemode == DBDEMO))
3387  MObjectSetUnsensitive(pb); // Set the button as Unensitive
3388  MObjectSetBackgroundRGB(pb, 224, 224, 176);
3389  MObjectSetCompositeWidth(pb, 74);
3390 
3391  pb = MCreatePButton(rowform1, "Store", FIXED_SMALL);
3392  MPButtonSetCallback(pb, WritewlstepiniCB, (void *) 0);
3393  MObjectSetBackgroundRGB(pb, 224, 224, 176);
3394  MObjectSetCompositeWidth(pb, 84);
3395 
3396  pb = MCreatePButton(rowform1, "Close", FIXED_SMALL);
3398  MObjectSetBackgroundRGB(pb, 224, 224, 176);
3399  MObjectSetCompositeWidth(pb, 74);
3400  /* End Command Button Section æææææææææææææææææææææææææææææææææææ/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ } void edtCCDOffSet_CB(MOBJECT p, LIST_ACT *la, void *ad) { int c = (int) ad; int er = 0; DAS.Marconi.Offset = atoi(la->item); if(DAS.Flag.exemode != DBDEMO) DC_SetUsrGain(0, 0 , DAS.Marconi.Offset , 0); } void CONFP_param_page1(int mod, MOBJECT obj) { MOBJECT rowform1; // generic row form MOBJECT edit; // generic edit object MOBJECT pb, rb ; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; MOBJECT lbl; MOBJECT tb; // generic table object char buf[64]; int i, k, *p; MOBJECT list; int t=0; char str[80]; char buff[_MAX_PATH]; LIST_ACT * pla; MObjectSetText(obj, "Page 1"); /******************************************************************************************************************/ //Equipment Type section /*--------- Start ----------------*/ lbl = MCreateLabel(obj, "Equipment Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(obj, 3); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); // Instrument Type(0 = SPATRAM, // 1 = TROPOGAS, 2 = LIS, // 3 = SPATRAMPLUS, 4 = GASCODNG, ) rb = MCreateRButton(tb, "SPATRAMPLUS", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 3); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 3) MRButtonActivate(rb); rb = MCreateRButton(tb, "SPATRAM2", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 9); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 9) MRButtonActivate(rb); rb = MCreateRButton(tb, "SPATRAM3", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 10); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 10) MRButtonActivate(rb); /* rb = MCreateRButton(tb, "SPATRAM", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if( DAS.Paramini.EqType == 0) MRButtonActivate(rb); */ rb = MCreateRButton(tb, "TROPOGAS", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Paramini.EqType == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "LIS", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Paramini.EqType == 2) MRButtonActivate(rb); rb = MCreateRButton(tb, "GASCODNG1", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 4); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Paramini.EqType == 4) MRButtonActivate(rb); /* rb = MCreateRButton(tb, "GASCODOffAxis", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 5); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 5) MRButtonActivate(rb); */ rb = MCreateRButton(tb, "GASCODNG2", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 6); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 6) MRButtonActivate(rb); rb = MCreateRButton(tb, "GASCODNG3", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 7); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 7) MRButtonActivate(rb); rb = MCreateRButton(tb, "GASCODNG4", FIXED_SMALL); MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 8); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 105); if(DAS.Paramini.EqType == 8) MRButtonActivate(rb); /* pb = MCreatePButton(tb, "Save", FIXED_SMALL); MPButtonSetCallback(pb, WriteEquipiniCB, 0); MObjectAlign(pb, LEFT_ALIGN, UNDEF_ALIGN); //MObjectSetForegroundRGB(pb, 255, 255, 255); MObjectSetCompositeWidth(pb, 105); */ //CCD & OMU Temperature section /*--------- Start ----------------*/ lbl = MCreateLabel(obj, "CCD & OMU Temp", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(obj, 2); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True, False); MObjectSetCompositeWidth(tb, 347); lbl = MCreateLabel(tb, "CCD Target Temperature:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%.1lf", DAS.Paramini.ITemp); edit = MCreateEdit(tb, buf, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MEditSetValCallback(edit, ValidateCB, (void *) 1); MEditSetActCallback(edit, ActEditCB, (void *) 1); lbl = MCreateLabel(tb, "CCD Peltier Init Power:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%.1lf%%",(double)DAS.Paramini.CoolPw / 10); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MEditSetValCallback(edit, ValidateCB, (void *) 2); MEditSetActCallback(edit, ActEditCB, (void *) 2); lbl = MCreateLabel(tb, "Optical Unit Target Temp:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); sprintf(buf, "%.1lf", DAS.Paramini.TPelt); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MEditSetValCallback(edit, ValidateCB, (void *) 3); MEditSetActCallback(edit, ActEditCB, (void *) 3); lbl = MCreateLabel(tb, "OMU Peltier Init Power:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, UNDEF_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); sprintf(buf, "%.1lf%%",(double)OMUTHR.PCPower / 10); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MEditSetValCallback(edit, ValidateCB, (void *) 2000); MEditSetActCallback(edit, ActEditCB, (void *) 2000); /*------------------- End CCD & OMU Temperature section -------------*/ //CCD Window and vertical binning section /*##################### Start ##################################################*/ lbl = MCreateLabel(obj, "CCD WINDOW - SETUP", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectSetCompositeWidth(lbl, 347); rowform1 = MCreateRowForm(obj); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); //357 MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform1, 4); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetResize(tb, True, True); // MObjectSetCompositeWidth(tb, 347); MObjectSetShadow(tb, WS_NONE, 0, 0); lbl = MCreateLabel(tb, "X Start:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",DAS.Paramini.ccdXoff); //sprintf(buf, "%d",(DC_CCD.dx - DC_CCD.dx)); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MEditSetValCallback(edit, ValidateCB, (void *) 4); MEditSetActCallback(edit, ActEditCB, (void *) 4); //MEditDisableEditing(edit); lbl = MCreateLabel(tb, "X End:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",DAS.Paramini.ccdWx); //sprintf(buf, "%d",DC_CCD.dx); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MEditSetValCallback(edit, ValidateCB, (void *) 5); MEditSetActCallback(edit, ActEditCB, (void *) 5); // MEditDisableEditing(edit); lbl = MCreateLabel(tb, "Y Start:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",DAS.Paramini.ccdYoff); //sprintf(buf, "%d", (DC_CCD.dy-DC_CCD.dy)); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MEditSetValCallback(edit, ValidateCB, (void *) 6); MEditSetActCallback(edit, ActEditCB, (void *) 6); // MEditDisableEditing(edit); lbl = MCreateLabel(tb, "Y End:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",DAS.Paramini.ccdWy); //sprintf(buf, "%d",DC_CCD.dy); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 70); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MEditSetValCallback(edit, ValidateCB, (void *) 7); MEditSetActCallback(edit, ActEditCB, (void *) 7); // MEditDisableEditing(edit); tb = MCreateTableForm(rowform1, 3); MTableFormSetColAlign(tb, 0, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); MObjectSetShadow(tb, WS_NONE, 0, 0); lbl = MCreateLabel(tb, "Vertical Binning:", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); sprintf(buf, "%d",DAS.Paramini.VBin); edit = MCreateClippedEdit(tb, buf, 3, 3, FIXED_SMALL); MObjectAlign(edit, RIGHT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MEditSetValCallback(edit, ValidateCB, (void *) 8); MEditSetActCallback(edit, ActEditCB, (void *) 8); pb = MCreatePButton(tb, "CCD Setup (DCS)", FIXED_SMALL); MPButtonSetCallback(pb, CCDSetupCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); /* tb = MCreateTableForm(rowform1, 3); MTableFormSetColAlign(tb, 0, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); */ lbl = MCreateLabel(tb, "Max. Exp. Time (s) :", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MLabelSetAlignment(lbl, LEFT_ALIGN); sprintf(buf, "%.1lf", DAS.Paramini.maxtexp); edit = MCreateClippedEdit(tb, buf, 5, 5, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); //MObjectSetCompositeWidth(edit, 35); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); k = 123; p = (void *) k; MEditSetValCallback(edit, ValidateCB, p); MEditSetActCallback(edit, ActEditCB, p); pb = MCreateImagePButtonExt(tb, "sys\\qmarkyellow.bmp", "sys\\qmarkblue.bmp", "", "sys\\qmarkred.bmp", "", ""); MButtonSetImageMaskByPixel(pb, 0, 0); MObjectSetTransparency(pb, 255); MObjectSetShadow(pb, WS_NONE, 0, 0); MObjectSetBackgroundRGB(pb, 56, 112, 112); MPButtonSetCallback(pb, PB_H_CB, (void *) 0); /* End CCD Window and vertical binning section ###############*/ /* lbl = MCreateLabel(obj, "Devices Offsets", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); */ rowform1 = MCreateRowForm(obj); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); MObjectSetResize(rowform1, True, True); MObjectSetCompositeWidth(rowform1, 347); /**************************************************************************/ //OFFSET HIRES 5 SECTION if (Cfg.Platform == 28) { lbl = MCreateLabel(rowform1, "HiresV OFFSET", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, True,False); lbl = MCreateLabel(tb, "Offset", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255); MObjectSetTransparency(lbl, 0); if(DAS.Paramini.EqType == 9) //SPATRAM2 DAS.Marconi.Offset = 250; if(DAS.Paramini.EqType == 8) //GASCODNG4 DAS.Marconi.Offset = 270; sprintf(buff, "%d", DAS.Marconi.Offset); edit = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectAlign(edit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(edit); list = MOptionEditGetList(edit); for(i=0; i<512; i++) { t = i; sprintf(str, "%d", t); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(edit, str); MOptionEditSetListCallback(edit, edtCCDOffSet_CB, (void *) 0); DAS.Marconi.Offset = atoi(pla->item); } /**************************************************************************/ /*************************************************************************/ /* lbl = MCreateLabel(rowform1, "Input Mirror", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetCompositeWidth(lbl, 347); tb = MCreateTableForm(rowform1, 5); MTableFormSetColAlign(tb, 0, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); lbl = MCreateLabel(tb, "Home", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); for(i=0;i<4;i++) { if (DAS.Paramini.EqType != TROPOGAS) sprintf(buf, "%s",Mir_Code[i]); else sprintf(buf, "%s",Mir_CodeTropo[i]); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); } for(i=0;i<5;i++) { sprintf(buf, "%d",DAS.Paramini.Offset[i]); edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(edit, 255, 255, 255); MObjectSetBackgroundRGB(edit, 40, 96, 72); MObjectSetCompositeWidth(edit, 65); k= i + 300; MEditSetValCallback(edit, ValidateCB, (void *) k); MEditSetActCallback(edit, ActEditCB, (void *) k); } /* // Command Button Section /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/ rowform1 = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform1, 56, 112, 112); // MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL); MPButtonSetCallback(pb, ApplyChCB, (void *) 0); if((DAS.Flag.exemode == DOASMODE) ) MObjectSetUnsensitive(pb); // Set the button as Unensitive MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(rowform1, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteParaminiCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(rowform1, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); /* End Command Button Section æææææææææææææææææææææææææææææææææææ*/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ /**************************************************************************************************************/ } // Create the Parameters page void CONFP_Param(int mod, MOBJECT mo) { MOBJECT rowform; // generic row form // MOBJECT rowform1; // generic row form // MOBJECT edit; // generic edit object // MOBJECT pb; // generic pushbutton and radiobutton // MOBJECT lbl; //generic label // MOBJECT tb; // generic table object MOBJECT PPARAM; // char buf[64]; // int k; MObjectSetText(mo, "Parametrs"); rowform = MCreateRowForm(mo); MObjectSetBackgroundRGB(rowform, 56, 112, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); //357 MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); PPARAM = MCreateTabbedRowForm(rowform, 5, FIXED_SMALL); MObjectSetForegroundRGB(PPARAM, 255, 255, 255); MObjectSetBackgroundRGB(PPARAM, 56, 112, 112); MObjectAlign(PPARAM, CENTER_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(PPARAM, 357); MObjectSetResize(PPARAM, False, False); CONFP_param_page1(0, PPARAM); MPagedFormSetActivePage(PPARAM, 1); //Creation page 2 CONFP_param_page2(0, PPARAM); MPagedFormSetActivePage(PPARAM, 2); //Creation page 3 CONFP_param_page3(0, PPARAM); MPagedFormSetActivePage(PPARAM, 3); //Creation page 4 CONFP_param_page4(0, PPARAM); MPagedFormSetActivePage(PPARAM, 4); //Creation page 5 CONFP_param_page5(0, PPARAM); MPagedFormSetActivePage(PPARAM, 0); } void DB_MeasMode_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case 0: DAS.DOption.measmode = 0; //Single Meas MObjectSetUnsensitive(DAS.Gui.ConfigPanel.tbavg); //if (DAS.Marconi.AVGmat != 0) // free(DAS.Marconi.AVGmat); break; case 1: DAS.DOption.measmode = 1; //Average MObjectSetSensitive(DAS.Gui.ConfigPanel.tbavg); //if (DAS.Marconi.AVGmat != 0) //DAS.Marconi.AVGmat = AllocFloatMat(IDX, IDY); //np = (long) IDX * IDY * 2; //AVGmat = malloc(np * 4); //memset(AVGmat, 0, np * 4); break; } } } void DB_AVGAutoR_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case 0: DAS.DOption.avgautor = 1; //Autorange before average break; case 1: DAS.DOption.avgautor = 0; //NO Autorange before average break; } } } void SelDefPixFileCB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; char buf[_MAX_PATH]; char fname[_MAX_PATH], dirname[_MAX_PATH]; char str[_MAX_PATH]; // unsigned long ns; FB_PREFS fbp; strcpy (dirname, MGetCurrentDirectory ()); fname[0] = '\0'; memset (&fbp, 0, sizeof (fbp)); fbp.change_cwd = True; fbp.allow_dir_create = True; fbp.allow_dir_rename = True; fbp.allow_dir_delete = True; fbp.transparent_tree = False; fbp.font = HELV_SMALL; fbp.button_font = HELV_SMALL; //Set Img file sprintf(buf, "%s\\%s", BIL.DFILEM.HOMEDIRECTORY, "sys\\Tile2.bmp" ); fbp.bg_image_file =buf; er = MFileBrowseExt ("Select CCD Mask File", "*.cor", fname, dirname, &fbp); sprintf(DAS.DOption.DEFPIXFILENAME, "%s", fname); sprintf(buf, "%s%s", dirname, DAS.DOption.DEFPIXFILENAME); //if(DI_FileExist(buff)) // DI_FileExist --> Return: 1 if PATH exist, else return 0 // return 37; MObjectSetText(DAS.Gui.ConfigPanel.lblCorrPixF, DAS.DOption.DEFPIXFILENAME); //Load File er = LoadDB_DefectPixel(buf); if (er) { sprintf (str, "File: %s, Not FOUND", buf); MMessageDialog("DAS Inf.", str, "OK", NULL); } } // create the 1st page of the option page void CONFP_opt_page1(int mod, MOBJECT obj) { MOBJECT rowform; // generic row form MOBJECT pb, rb ; MOBJECT colform; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT tbavg; MOBJECT lbl; MOBJECT tb; // generic table object char buf[64]; int k, *p; MObjectSetText(obj, "Page 1"); /***************************************************************************/ /*********** Saving Mode Section - Start ****************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "SAVING OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Saving Mode:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 150); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "ASCII", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioModeSelCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(!DAS.DOption.savingmode) MRButtonActivate(rb); rb = MCreateRButton(tb, "Binary", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioModeSelCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.savingmode) MRButtonActivate(rb); /***************************************************************************/ /*********** Saving Mode Section - End ******************************/ /***************************************************************************/ /***************************************************************************/ /*********** File Name Type Section - Start *************************/ /***************************************************************************/ tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Saving File Names:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 150); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Free ", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFNSelCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(!DAS.DOption.filename) MRButtonActivate(rb); rb = MCreateRButton(tb, "Automatic", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFNSelCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); //MObjectSetResize(rb, False, False); if(DAS.DOption.filename) MRButtonActivate(rb); /***************************************************************************/ /*********** File Name Type Section - End ***************************/ /***************************************************************************/ /***************************************************************************/ /*********** START IMAGE TYPE SECTION *******************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "Type of Images:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); rowform = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, True, False); rb = MCreateRButton(rowform, "MONO ", FIXED_SMALL); MPButtonSetCallback(rb, DB_ImgTypeCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(!DAS.DOption.imgtype) MRButtonActivate(rb); rb = MCreateRButton(rowform, "RGB", FIXED_SMALL); MPButtonSetCallback(rb, DB_ImgTypeCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, False, False); if(DAS.DOption.imgtype) MRButtonActivate(rb); pb = MCreatePButton(rowform, "Apply img", FIXED_SMALL); MPButtonSetCallback(pb, ApplyImgCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); /***************************************************************************/ /*********** END IMAGE TYPE SECTION *******************************/ /***************************************************************************/ /***************************************************************************/ /*********** START AVERAGING SECTION *******************************/ /***************************************************************************/ DAS.Gui.ConfigPanel.tbavg = MCreateTableForm(obj, 1); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.tbavg, 112, 128, 112); MObjectSetResize(DAS.Gui.ConfigPanel.tbavg, True, False); // lbl = MCreateLabel(obj, "AVERAGE", FIXED_SMALL); lbl = MCreateLabel(DAS.Gui.ConfigPanel.tbavg, "AVERAGE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetBackgroundRGB(lbl, 96, 132, 152); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); /////////////////////////////////////////////////////// //tb = MCreateTableForm(obj, 3); tb = MCreateTableForm(DAS.Gui.ConfigPanel.tbavg, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Automatic ARange for AVG ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); //MObjectSetCompositeWidth(lbl, 200); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_AVGAutoR_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.avgautor == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_AVGAutoR_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.avgautor == 0) MRButtonActivate(rb); //tb = MCreateTableForm(obj, 2); tb = MCreateTableForm(DAS.Gui.ConfigPanel.tbavg, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.FixTExp = MCreateRButton(tb, "Fix TExp. ", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.FixTExp, DB_RadioAvgModeCB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.FixTExp, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.FixTExp, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.FixTExp, 85); DAS.Gui.ConfigPanel.FixMeasNum = MCreateRButton(tb, "Fix Meas. Number", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.FixMeasNum, DB_RadioAvgModeCB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.FixMeasNum, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.FixMeasNum, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.FixMeasNum, 123); if(DAS.DOption.avgmode) { DAS.Gui.ConfigPanel.lblAvg = MCreateLabel(tb, "TOT Exposure Time :", FIXED_SMALL); MLabelSetAlignment(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblAvg, 255, 255, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblAvg, 0); MObjectSetResize(DAS.Gui.ConfigPanel.lblAvg, False, False); MObjectAlign(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d", TOTTEXP); DAS.Gui.ConfigPanel.n_avg = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.n_avg, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.n_avg, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.n_avg, 35); MObjectAlign(DAS.Gui.ConfigPanel.n_avg, LEFT_ALIGN, TOP_ALIGN); k = 111; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.n_avg, ActEditCB, p); MRButtonActivate(DAS.Gui.ConfigPanel.FixTExp); } else { DAS.Gui.ConfigPanel.lblAvg = MCreateLabel(tb, "Repeat measure for: ", FIXED_SMALL); MLabelSetAlignment(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblAvg, 255, 255, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblAvg, 0); MObjectSetResize(DAS.Gui.ConfigPanel.lblAvg, False, False); MObjectAlign(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",N_AVG); DAS.Gui.ConfigPanel.n_avg = MCreateClippedEdit(tb, " ", 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.n_avg, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.n_avg, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.n_avg, 35); MObjectAlign(DAS.Gui.ConfigPanel.n_avg, LEFT_ALIGN, TOP_ALIGN); k = 111; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.n_avg, ActEditCB, p); MRButtonActivate(DAS.Gui.ConfigPanel.FixMeasNum); } /***************************************************************************/ /*********** END AVERAGING SECTION *******************************/ /***************************************************************************/ /***************************************************************************/ /*********** START MEASURING mode SECTION *******************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "MEASURING MODE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetBackgroundRGB(lbl, 96, 132, 152); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); //table for selecting Single or Averaged measurements tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "SINGLE", FIXED_SMALL); MPButtonSetCallback(rb, DB_MeasMode_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.measmode == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "AVERAGE", FIXED_SMALL); MPButtonSetCallback(rb, DB_MeasMode_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.measmode == 1) MRButtonActivate(rb); /***************************************************************************/ /*********** END MEASURING mode SECTION *******************************/ /***************************************************************************/ /*******************************************************************************/ /************* START Defective Pixel Correction SECTION ***********************/ /*******************************************************************************/ lbl = MCreateLabel(obj, "DEFECTIVE PIXELS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); pb = MCreatePButton(tb, "Map UNDER Exp", FIXED_SMALL); MPButtonSetCallback(pb, UnderOverPixCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); //MObjectSetCompositeWidth(pb, 250); pb = MCreatePButton(tb, "Map OVER Exp (T=0)", FIXED_SMALL); MPButtonSetCallback(pb, UnderOverPixCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); //MObjectSetCompositeWidth(pb, 220); pb = MCreatePButton(tb, "Map OVER Exp (T=5)", FIXED_SMALL); MPButtonSetCallback(pb, UnderOverPixCB, (void *) 2); MObjectSetBackgroundRGB(pb, 224, 224, 176); //MObjectSetCompositeWidth(pb, 220); lbl = MCreateLabel(obj, "Defective Pixel Correction:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 220); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbCorrPix[0] = MCreateRButton(tb, "DISABLE", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbCorrPix[0], DB_RadioPixCorrCB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbCorrPix[0], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbCorrPix[0], 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbCorrPix[0], 85); DAS.Gui.ConfigPanel.rbCorrPix[1] = MCreateRButton(tb, "ENABLE", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbCorrPix[1], DB_RadioPixCorrCB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbCorrPix[1], RIGHT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbCorrPix[1], 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbCorrPix[1], 123); colform = MCreateColForm(obj); MObjectSetBackgroundRGB(colform, 112, 128, 112); MObjectSetResize(colform, True, False); DAS.Gui.ConfigPanel.lblCorrPixF = MCreateLabel(colform, DAS.DOption.DEFPIXFILENAME, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblCorrPixF, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblCorrPixF, 96, 132, 152); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblCorrPixF, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); //MObjectSetCompositeWidth(lbl, 220); DAS.Gui.ConfigPanel.pbBrowseCorrPixF = MCreatePButton(colform, "...", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, SelDefPixFileCB, (void *) 0); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, 224, 224, 176); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, 30); MObjectAlign(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, RIGHT_ALIGN, TOP_ALIGN); if(!DAS.DOption.pixcorr) MRButtonActivate(DAS.Gui.ConfigPanel.rbCorrPix[0]); if(DAS.DOption.pixcorr) MRButtonActivate(DAS.Gui.ConfigPanel.rbCorrPix[1]); /*******************************************************************************/ /************* END Defective Pixel Correction SECTION ***********************/ /*******************************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 2nd page of the option page void CONFP_opt_page2(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT pb, rb ; MOBJECT lbl; MOBJECT tb ; // generic table object char buf[64]; int i,k, *p; MObjectSetText(obj, "Page 2"); /***************************************************************************/ /***************************************************************************/ /*********** START DARK MEASUREMENT SECTION *******************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "DARK IMAGE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Remove Dark from Measurements ? ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.DOption.darkremove) MRButtonActivate(rb); MPButtonSetCallback(rb, DB_RadioDarkCB, (void *) 1); rb = MCreateRButton(tb, "No", FIXED_SMALL); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if(!DAS.DOption.darkremove) MRButtonActivate(rb); MPButtonSetCallback(rb, DB_RadioDarkCB, (void *) 0); lbl = MCreateLabel(obj, "Dark Source", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.FFDark = MCreateRButton(tb, "Full Frame", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.FFDark, DB_RadDrkSourceCB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.FFDark, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.FFDark, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.FFDark, 85); // if(DAS.DOption.darkremove) if(DAS.DOption.darksource) MRButtonActivate(DAS.Gui.ConfigPanel.FFDark); DAS.Gui.ConfigPanel.BPDark = MCreateRButton(tb, "Blind Pixels", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.BPDark, DB_RadDrkSourceCB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.BPDark, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.BPDark, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.BPDark, 123); // if(DAS.DOption.darkremove) if(!DAS.DOption.darksource) MRButtonActivate(DAS.Gui.ConfigPanel.BPDark); if (DAS.DOption.darkremove==0) { MObjectSetUnsensitive(DAS.Gui.ConfigPanel.FFDark); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.BPDark); } else { MObjectSetSensitive(DAS.Gui.ConfigPanel.FFDark); MObjectSetSensitive(DAS.Gui.ConfigPanel.BPDark); } /***************************************************************************/ /*********** END DARK MEASUREMENT SECTION ****************************/ /***************************************************************************/ /*---------------------------------------------------------------*/ /***************************************************************************/ /*********** START CCD TARGET TEMPERATURE SECTION *********************/ /***************************************************************************/ lbl = MCreateLabel(obj, "CCD TARGET TEMPERATURE", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "FIXED", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetCCDTargetTempCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(!FLAG.settempvar) MRButtonActivate(rb); rb = MCreateRButton(tb, "SZA DRIVED", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetCCDTargetTempCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if(FLAG.settempvar) MRButtonActivate(rb); /***************************************************************************/ /*********** END CCD TARGET TEMPERATURE SECTION *********************/ /***************************************************************************/ /*-----------------------------------------------------------------------*/ /***************************************************************************/ /***************************************************************************/ /************** START AUTORANGING SECTION ************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "AUTORANGING", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); //MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Max Autoranging value (<= 63000) ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); //MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%d",DAS.DOption.maxlvlar); DAS.Gui.ConfigPanel.edmaxlvlar = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edmaxlvlar, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edmaxlvlar, 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edmaxlvlar, LEFT_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.edmaxlvlar, 50); k = 600; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.edmaxlvlar, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.edmaxlvlar, ActEditCB, p); /***************************************************************************/ /************** STOP AUTORANGING SECTION ************************/ /***************************************************************************/ /***************************************************************************/ /***************************************************************************/ /************** START CONFIGURATION FILES SECTION ************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "CONFIG FILES", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "View/Modify", FIXED_SMALL); MPButtonSetCallback(rb, DB_VMRsfCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if(!FLAG.VMRsf) MRButtonActivate(rb); rb= MCreateRButton(tb, "ReLoad", FIXED_SMALL); MPButtonSetCallback(rb, DB_VMRsfCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); MObjectSetUnsensitive(rb); if(FLAG.VMRsf) MRButtonActivate(rb); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); pb = MCreatePButton(tb, "Param.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "DASSysColor.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "Options.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 2); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "ccd_defect_Danbo.cor", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 3); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "GeoCoord.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 4); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "AMS.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 6); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "Equipment.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 7); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "WlStep.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 8); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "Free Editor", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 5); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); /***************************************************************************/ /************** END CONFIGURATION FILES SECTION ************************/ /***************************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 3rd page of the option page void CONFP_opt_page3(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT rb ; MOBJECT lbl; MOBJECT tb ; // generic table object int k, *p; char buf[64]; MObjectSetText(obj, "Page 3"); /***************************************************************************/ /***************************************************************************/ /******************* START PLOT OPTIONS SECTION **********************/ /***************************************************************************/ lbl = MCreateLabel(obj, "PLOT OPTIONS", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "X Axis Units", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "PIXEL", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(FLAG.Wl == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "WAVEL [A]", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(FLAG.Wl == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "WAVEL [nm]", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(FLAG.Wl == 2) MRButtonActivate(rb); /* if(FLAG.Wl == 0) MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[0]); else if(FLAG.Wl == 1) MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[1]); else if(FLAG.Wl == 2) MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[2]); */ /*----------------- DISPLAY or NOT Plot after measurement -----------------*/ lbl = MCreateLabel(obj, "Display PLOT after measurement ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 300); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "No ", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotDisplayCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Flag.plotW == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotDisplayCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(DAS.Flag.plotW == 1) MRButtonActivate(rb); /* if(FLAG.plotW == 0) MRButtonActivate(DAS.Gui.ConfigPanel.PlotDisp[0]); else if(FLAG.plotW == 1) MRButtonActivate(DAS.Gui.ConfigPanel.PlotDisp[1]); */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " Y Axis", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Full Range", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotYAxisCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); MObjectSetResize(rb, True, False); if(FLAG.plotYRange == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Min/Max", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotYAxisCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); MObjectSetResize(rb, True, False); if(FLAG.plotYRange == 1) MRButtonActivate(rb); /* if(FLAG.plotYRange == 0) MRButtonActivate(DAS.Gui.ConfigPanel.PlotYAxis[0]); else if(FLAG.plotYRange == 1) MRButtonActivate(DAS.Gui.ConfigPanel.PlotYAxis[1]); /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*-------------------------------------------------------------------------*/ /* Hidden Lines section */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " Hidden lines ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Before Central Line ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%d",DAS.DOption.hlinebefore); DAS.Gui.ConfigPanel.HiddenL = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.HiddenL, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.HiddenL, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.HiddenL, 35); MObjectAlign(DAS.Gui.ConfigPanel.HiddenL, LEFT_ALIGN, TOP_ALIGN); k = 130; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.HiddenL, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.HiddenL, ActEditCB, p); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "After Central Line ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%d",DAS.DOption.hlineafter); DAS.Gui.ConfigPanel.HiddenL = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.HiddenL, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.HiddenL, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.HiddenL, 35); MObjectAlign(DAS.Gui.ConfigPanel.HiddenL, LEFT_ALIGN, TOP_ALIGN); k = 135; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.HiddenL, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.HiddenL, ActEditCB, p); /*-------------------------------------------------------------------------*/ /* Blind Pixel section */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " Display Blind Pixel? ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_DispBlindPixCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); MObjectSetResize(rb, True, False); if(FLAG.DispBlindPix == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_DispBlindPixCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); MObjectSetResize(rb, True, False); if(FLAG.DispBlindPix == 1) MRButtonActivate(rb); /*-------------------------------------------------------------------------*/ /***************************************************************************/ /******************* END PLOT OPTIONS SECTION **********************/ /***************************************************************************/ /*-------------------------------------------------------------------------*/ /* SZA Limit section */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " SZA Limit ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Perform Measurements for SZA <= ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%d",SZAMax); DAS.Gui.ConfigPanel.SZAMax = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SZAMax, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SZAMax, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.SZAMax, 35); MObjectAlign(DAS.Gui.ConfigPanel.SZAMax, LEFT_ALIGN, TOP_ALIGN); k = 120; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.SZAMax, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.SZAMax, ActEditCB, p); lbl = MCreateLabel(tb, " ° ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); /**************************************************************/ /***************************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 4th page of the option page void CONFP_opt_page4(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT pb, rb ; MOBJECT lbl; MOBJECT tb ; // generic table object int k, *p; char buf[64]; MObjectSetText(obj, "Page 4"); /***************************************************************************/ /******************* BACK-UP SECTION *************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "BACK-UP OPTIONS", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Perform FTP Back-Up", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFTPCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if (DAS.DOption.ftpbackup) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFTPCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if (!DAS.DOption.ftpbackup) MRButtonActivate(rb); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Server FTP Address:", FIXED_SMALL); MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%s",DFTP.ftpserver); DFTP.edServerFTP = MCreateClippedEdit(tb, buf, 15, 15, FIXED_SMALL); MObjectSetForegroundRGB(DFTP.edServerFTP, 255, 255, 255); MObjectSetBackgroundRGB(DFTP.edServerFTP, 40, 96, 72); // MObjectSetCompositeWidth(DFTP.edServerFTP, 35); MObjectAlign(DFTP.edServerFTP, RIGHT_ALIGN, TOP_ALIGN); k = 200; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DFTP.edServerFTP, ActEditCB, p); if (!DAS.DOption.ftpbackup) MEditEnableEditing(DFTP.edServerFTP); lbl = MCreateLabel(tb, "UserName:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%s",DFTP.ftpuser); DFTP.edid = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DFTP.edid, 255, 255, 255); MObjectSetBackgroundRGB(DFTP.edid, 40, 96, 72); // MObjectSetCompositeWidth(DFTP.edid, 35); MObjectAlign(DFTP.edid, RIGHT_ALIGN, TOP_ALIGN); k = 210; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DFTP.edid, ActEditCB, p); lbl = MCreateLabel(tb, "PWD:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%s",DFTP.ftppwd); DFTP.edpwd= MCreateHiddenEdit(tb, buf, 10, FIXED_SMALL, '*'); MObjectSetForegroundRGB(DFTP.edpwd, 255, 255, 255); MObjectSetBackgroundRGB(DFTP.edpwd, 40, 96, 72); // MObjectSetCompositeWidth(DFTP.edpwd, 35); MObjectAlign(DFTP.edpwd, RIGHT_ALIGN, TOP_ALIGN); k = 220; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DFTP.edpwd, ActEditCB, p); /* if (DAS.DOption.ftpbackup) MRButtonActivate(DFTP.rb[0]); else MRButtonActivate(DFTP.rb[1]); */ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); pb = MCreatePButton(tb, "Save FTP.INI", FIXED_SMALL); MPButtonSetCallback(pb, PbftpCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 94); pb = MCreatePButton(tb, "Test FTP", FIXED_SMALL); MPButtonSetCallback(pb, PbftpCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 94); /***************************************************************************/ /**************** OMU Thermo-regulation SECTION ***********************/ /***************************************************************************/ lbl = MCreateLabel(obj, "OMU THERMO-REGULATION", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Choose the Reference temp", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Pelt. Int.", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.refertemp == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Optic", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.refertemp == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "Grating", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.refertemp == 2) MRButtonActivate(rb); lbl = MCreateLabel(obj, "Choose the Thermo-regulation mode", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Cold only", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 3); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(OMUTHR.TRType == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Heat only", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 4); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(OMUTHR.TRType == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "Cold/Heat", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 5); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(OMUTHR.TRType == 2) MRButtonActivate(rb); /***************/ lbl = MCreateLabel(obj, "Choose the Thermo-reg. Algorithm", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Progressive", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 6); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(OMUTHR.PID_On == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "PID", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 7); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(OMUTHR.PID_On == 1) MRButtonActivate(rb); if(OMUTHR.PID_On == 1) //Create the field for PID Parameters { tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Prop.", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 90); lbl = MCreateLabel(tb, "Integral", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 90); lbl = MCreateLabel(tb, "Deriv.", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 90); sprintf(buf, "%.1lf",OMUTHR.PID_kp); DAS.Gui.ConfigPanel.PID_edt[0] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[0], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.PID_edt[0], 40, 96, 72); k = 500; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.PID_edt[0], ActEditCB, p); sprintf(buf, "%.3lf",OMUTHR.PID_ki); DAS.Gui.ConfigPanel.PID_edt[1] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[1], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.PID_edt[1], 40, 96, 72); k = 501; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.PID_edt[1], ActEditCB, p); sprintf(buf, "%.4lf",OMUTHR.PID_kd); DAS.Gui.ConfigPanel.PID_edt[2] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[2], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.PID_edt[2], 40, 96, 72); k = 502; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.PID_edt[2], ActEditCB, p); } pb = MCreatePButton(obj, "Temp History", FIXED_SMALL); MPButtonSetCallback(pb, PBTempHistoCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 123); /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 5th page of the option page void CONFP_opt_page5(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT rb ; MOBJECT lbl; MOBJECT tb,tb1 ; // generic table object // int i,k, *p; // char buf[64]; MObjectSetText(obj, "Page 5"); lbl = MCreateLabel(obj, "MIRROR IMAGE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb1 = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb1, 112, 128, 112); MObjectSetResize(tb1, True, False); lbl = MCreateLabel(tb1, "Along the X Axis ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); lbl = MCreateLabel(tb1, "Along the Y Axis ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(tb1, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.mirrorimg[XAX] == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.mirrorimg[XAX] == 0) MRButtonActivate(rb); tb = MCreateTableForm(tb1, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.mirrorimg[YAX] == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 3); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.mirrorimg[YAX] == 0) MRButtonActivate(rb); lbl = MCreateLabel(obj, "AMS OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Positioning Mode", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Simultaneous", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSposmode_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.smposmode == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "Sequential", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSposmode_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.smposmode == 0) MRButtonActivate(rb); lbl = MCreateLabel(obj, "Display progression bars?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSProgBar_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.amsprogbar == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSProgBar_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.amsprogbar == 0) MRButtonActivate(rb); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ lbl = MCreateLabel(obj, "MIGE Platform OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "MIGE Status", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbMIGEStatus[0]=MCreateRButton(tb, "NOT Connected", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEStatus[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEStatus[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEStatus[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.linked == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[0]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEStatus[0], DB_MIGE_CB, (void *) 0); DAS.Gui.ConfigPanel.rbMIGEStatus[1] = MCreateRButton(tb, "Connected", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEStatus[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEStatus[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEStatus[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.linked == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[1]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEStatus[1], DB_MIGE_CB, (void *) 1); lbl = MCreateLabel(obj, "MIGE Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbMIGEtype[0] = MCreateRButton(tb, "Ver. 0.5", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEtype[0], DB_MIGEType_CB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEtype[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEtype[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEtype[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.type == 0 ) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEtype[0]); DAS.Gui.ConfigPanel.rbMIGEtype[1] = MCreateRButton(tb, "Ver. 1.5", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEtype[1], DB_MIGEType_CB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEtype[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEtype[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEtype[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.type == 1 ) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEtype[1]); DAS.Gui.ConfigPanel.rbMIGEtype[2] = MCreateRButton(tb, "Ver. 2.0", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEtype[2], DB_MIGEType_CB, (void *) 2); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEtype[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEtype[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEtype[2], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.type == 2 ) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEtype[2]); lbl = MCreateLabel(obj, "Operating mode", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbMIGEopmode[0] = MCreateRButton(tb, "Solar Tracker", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEopmode[0], DB_MIGEopmode_CB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEopmode[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEopmode[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEopmode[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.aaopmode == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEopmode[0]); DAS.Gui.ConfigPanel.rbMIGEopmode[1] = MCreateRButton(tb, "Anti Solar Tracker", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEopmode[1], DB_MIGEopmode_CB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEopmode[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEopmode[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEopmode[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.aaopmode == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEopmode[1]); DAS.Gui.ConfigPanel.rbMIGEopmode[2] = MCreateRButton(tb, "Free positions", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEopmode[2], DB_MIGEopmode_CB, (void *) 2); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEopmode[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEopmode[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEopmode[2], True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.aaopmode == 2) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEopmode[2]); if(DAS.MIGE.linked == 0) { MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[1]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[2]); } else MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[2]); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } void edtDASReset_CB(MOBJECT p, LIST_ACT *la, void *ad) { int c = (int) ad; int er = 0; DAS.DOption.resetFreq = atoi(la->item); } void DB_ResetEnable_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; // char buff[64], str[32]; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case 0: DAS.DOption.resetEnabled = 0; MObjectSetUnsensitive(DAS.Gui.ConfigPanel.listReset); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.edtDASReset); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.lblReset); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbDASResPer[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbDASResPer[1]); break; case 1: DAS.DOption.resetEnabled = 1; MObjectSetSensitive(DAS.Gui.ConfigPanel.listReset); MObjectSetSensitive(DAS.Gui.ConfigPanel.edtDASReset); MObjectSetSensitive(DAS.Gui.ConfigPanel.lblReset); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbDASResPer[0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbDASResPer[1]); break; } } } void DB_ResetType_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v,i,k; char buff[64], str[32]; LIST_ACT * pla; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case RHOUR: DAS.DOption.resetType = RHOUR; if (DAS.Gui.ConfigPanel.lblReset != 0) { sprintf(buff, "%d", (int)DAS.DOption.resetFreq); MSListClear(DAS.Gui.ConfigPanel.listReset); for(i=1; i<24; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(DAS.Gui.ConfigPanel.listReset, k-1); pla = MSListGetSelected(DAS.Gui.ConfigPanel.listReset); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDASReset, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDASReset, edtDASReset_CB, (void *) 0); DAS.DOption.resetFreq = atoi(pla->item); sprintf(buff, "Hour(s)"); MObjectSetText(DAS.Gui.ConfigPanel.lblReset, buff); } break; case RDAY: DAS.DOption.resetType = RDAY; if (DAS.Gui.ConfigPanel.lblReset != 0) { sprintf(buff, "%d", (int)DAS.DOption.resetFreq); MSListClear(DAS.Gui.ConfigPanel.listReset); for(i=1; i<365; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(DAS.Gui.ConfigPanel.listReset, k-1); pla = MSListGetSelected(DAS.Gui.ConfigPanel.listReset); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDASReset, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDASReset, edtDASReset_CB, (void *) 0); DAS.DOption.resetFreq = atoi(pla->item); sprintf(buff, "Day(s)"); MObjectSetText(DAS.Gui.ConfigPanel.lblReset, buff); } break; } } } // create the 7th page of the option page void CONFP_opt_page7(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form // MOBJECT pb, rb ; MOBJECT lbl; MOBJECT tb; // generic table object int i,k; // char buf[64]; // MOBJECT list; // int starti; float f=0; char str[80]; char buff[_MAX_PATH]; LIST_ACT * pla; MObjectSetText(obj, "Page 7"); /******************************************************************/ /*************** SHUTTER ******************************************/ /******************************************************************/ lbl = MCreateLabel(obj, "SHUTTER OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Is the EMShutter Installed?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbSHUTStatus[0] = MCreateRButton(tb, "Yes", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTStatus[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTStatus[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTStatus[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.emshutter == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTStatus[0]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTStatus[0], DB_Shutter_CB, (void *) 1); DAS.Gui.ConfigPanel.rbSHUTStatus[1] = MCreateRButton(tb, "No", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.emshutter == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTStatus[1] ); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , DB_Shutter_CB, (void *) 0); lbl = MCreateLabel(obj, "Choose Shutter Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbSHUTType [0] = MCreateRButton(tb, "UniBlitz VS25", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTType [0], DB_ShutterType_CB, (void *) VS25); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTType [0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTType [0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTType [0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.shuttertype == VS25) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTType [0]); DAS.Gui.ConfigPanel.rbSHUTType [1] = MCreateRButton(tb, "Rotating Sh.", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTType [1], DB_ShutterType_CB, (void *) ROTSHUT); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTType [1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTType [1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTType [1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.shuttertype == ROTSHUT) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTType [1]); DAS.Gui.ConfigPanel.rbSHUTType[2] = MCreateRButton(tb, "Torque Motor", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTType[2], DB_ShutterType_CB, (void *) TORQUEM); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTType[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTType[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTType[2], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.shuttertype == TORQUEM) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTType[2]); if(DAS.DOption.emshutter == 0) { MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } else { MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } /******************************************************************/ /*************** END SHUTTER **************************************/ /******************************************************************/ /******************************************************************/ /*************** FILTER WHEEL *************************************/ /******************************************************************/ lbl = MCreateLabel(obj, "FILTER WHEEL OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Choose Installed Module", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbFilterType [0] = MCreateRButton(tb, "Simple-SM3", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbFilterType [0], DB_FilterType_CB, (void *) FSIMPLE); MObjectAlign(DAS.Gui.ConfigPanel.rbFilterType [0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbFilterType [0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbFilterType [0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.filtertype == FSIMPLE) MRButtonActivate(DAS.Gui.ConfigPanel.rbFilterType [0]); DAS.Gui.ConfigPanel.rbFilterType [1] = MCreateRButton(tb, "Double-SM3+SM4", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbFilterType [1], DB_FilterType_CB, (void *) FDOUBLE); MObjectAlign(DAS.Gui.ConfigPanel.rbFilterType [1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbFilterType [1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbFilterType [1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.filtertype == FDOUBLE) MRButtonActivate(DAS.Gui.ConfigPanel.rbFilterType [1]); DAS.Gui.ConfigPanel.rbFilterType[2] = MCreateRButton(tb, "Plus-SM3+TM", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbFilterType[2], DB_FilterType_CB, (void *) FPLUS); MObjectAlign(DAS.Gui.ConfigPanel.rbFilterType[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbFilterType[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbFilterType[2], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.filtertype == FPLUS) MRButtonActivate(DAS.Gui.ConfigPanel.rbFilterType[2]); /* if(DAS.DOption.emshutter == 0) { MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } else { MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } */ /******************************************************************/ /*************** END FILTER WHEEL ********************************/ /******************************************************************/ /******************************************************************/ /*************** RESET DAS Windows Restart ***********************/ /******************************************************************/ lbl = MCreateLabel(obj, "RESET WINDOWS OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); /*----------------------------------------------------------------*/ lbl = MCreateLabel(obj, "DAS/SYSTEM Reset ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbResetEnab[0] = MCreateRButton(tb, "Disabled", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbResetEnab[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbResetEnab[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbResetEnab[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.resetEnabled == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbResetEnab[0]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbResetEnab[0], DB_ResetEnable_CB, (void *) 0); DAS.Gui.ConfigPanel.rbResetEnab[1] = MCreateRButton(tb, "Enabled", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbResetEnab[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbResetEnab[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbResetEnab[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.resetEnabled == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbResetEnab[1]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbResetEnab[1], DB_ResetEnable_CB, (void *) 1); /*----------------------------------------------------------------*/ lbl = MCreateLabel(obj, "Reset Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbDASResPer[0] = MCreateRButton(tb, "HOUR(s)", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDASResPer[0], DB_ResetType_CB, (void *) RHOUR); MObjectAlign(DAS.Gui.ConfigPanel.rbDASResPer[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDASResPer[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbDASResPer[0], True, False); //MObjectSetCompositeWidth(rb, 100); DAS.Gui.ConfigPanel.rbDASResPer[1] = MCreateRButton(tb, "DAY(s)", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDASResPer[1], DB_ResetType_CB, (void *) RDAY); MObjectAlign(DAS.Gui.ConfigPanel.rbDASResPer[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDASResPer[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbDASResPer[1], True, False); //MObjectSetCompositeWidth(rb, 100); lbl = MCreateLabel(obj, "Reset Frequency", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Re-start every ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); //MObjectSetCompositeWidth(lbl, 250); sprintf(buff, "%d", (int)DAS.DOption.resetFreq); DAS.Gui.ConfigPanel.edtDASReset = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtDASReset, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtDASReset, 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edtDASReset, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.edtDASReset); DAS.Gui.ConfigPanel.listReset = MOptionEditGetList(DAS.Gui.ConfigPanel.edtDASReset); if (DAS.DOption.resetType) // Days { for(i=1; i<365; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } } else //hours { for(i=1; i<24; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } } /* list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtDSZA); for(i=0; i<20; i++) { f = f+0.10; sprintf(str, "%.3f",f); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDSZA, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDSZA, edtDSZA_CB, (void *) 0); SZADelta.DeltaSZA = atof(pla->item); */ MSListSelectElement(DAS.Gui.ConfigPanel.listReset, k-1); pla = MSListGetSelected(DAS.Gui.ConfigPanel.listReset); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDASReset, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDASReset, edtDASReset_CB, (void *) 0); DAS.DOption.resetFreq = atoi(pla->item); if (DAS.DOption.resetType) // Days sprintf(buff, "Day(s)", DAS.DOption.resetFreq); else sprintf(buff, "Hour(s)", DAS.DOption.resetFreq); DAS.Gui.ConfigPanel.lblReset = MCreateLabel(tb, buff, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblReset, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblReset, 96, 132, 152); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblReset, 0); MObjectSetShadow(DAS.Gui.ConfigPanel.lblReset, WS_ETCHED_IN, 1, 1); if(DAS.DOption.resetType == RHOUR) MRButtonActivate(DAS.Gui.ConfigPanel.rbDASResPer[0]); if(DAS.DOption.resetType == RDAY) MRButtonActivate(DAS.Gui.ConfigPanel.rbDASResPer[1]); /******************************************************************/ /*************** END RESET DAS ********************************/ /******************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } void CONFP_opt_ScheMeas(int mod, MOBJECT p) { // MOBJECT rowform; // generic row form MOBJECT rowform1; MOBJECT colform, colform2,colform3,colform4; MOBJECT rb ; MOBJECT lbl, list, optedit; // MOBJECT tb ; // generic table object int i; int lenedit = 12; char buf[64]; int maxangle; if (mod == 1) maxangle = 181; else maxangle = 96; colform = MCreateColForm(p); MFormSetSpacing(colform, 0); MObjectSetResize(colform, False, False); MObjectAlign(colform, CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform, 255); MObjectSetShadow(colform, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, True); MObjectAlign(rowform1, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(rowform1, 255); MObjectSetShadow(rowform1, WS_NONE, 0, 0); rb = MCreateRButton(rowform1, "", FIXED_SMALL); // MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetTransparency(rb, 255); MObjectSetResize(rb, True, False); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 1) // MRButtonActivate(rb); rb = MCreateRButton(rowform1, "", FIXED_SMALL); // MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); MObjectSetTransparency(rb, 255); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 0) // MRButtonActivate(rb); colform2 = MCreateColForm(colform); MFormSetSpacing(colform2, 0); MObjectSetResize(colform2, False, False); MObjectSetTransparency(colform2, 255); MObjectSetShadow(colform2, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform2); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, False); MObjectSetShadow(rowform1, WS_NONE, 0, 0); MObjectSetTransparency(rowform1, 255); colform3 = MCreateColForm(rowform1); MFormSetSpacing(colform3, 0); MObjectSetResize(colform3, False, False); MObjectAlign(colform3, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform3, 255); MObjectSetShadow(colform3, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); lbl = MCreateLabel(colform3, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, False, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } if (mod == 1) MSListSelectElement(list, 180); else MSListSelectElement(list, 95); colform4 = MCreateColForm(rowform1); MFormSetSpacing(colform4, 0); MObjectSetTransparency(colform4, 255); MObjectSetShadow(colform4, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); sprintf(buf, "<SZA<"); lbl = MCreateLabel(colform4, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "50"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 50); lbl = MCreateLabel(colform4, "OR", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "75"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 75); lbl = MCreateLabel(colform4, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } if (mod == 1) MSListSelectElement(list, 180); else MSListSelectElement(list, 95); } // create the 6th page of the option page void CONFP_opt_page6(int mod, MOBJECT obj) { MOBJECT rowform; // generic row form // MOBJECT colform, colform1,colform2,colform3,colform4; // MOBJECT pb, rb ; MOBJECT lbl, list, optedit; MOBJECT tb ; // generic table object int i; int lenedit = 12; char buf[64], str[16]; unsigned char lesseq = 242, greateq=241; MObjectSetText(obj, "Page 6"); lbl = MCreateLabel(obj, "INPUTS <--> DEVICES", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); /* lbl = MCreateLabel(obj, "Input <--> Device", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ tb = MCreateTableForm(obj, 4); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, False, False); if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) sprintf(str, "%s",Mir_CodeTropo[0]); else sprintf(str, "%s",Mir_Code[0]); sprintf(buf, "%s",str); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%s",DeviceTypeInput[0]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) MSListSelectElement(list, 2); else MSListSelectElement(list, 0); sprintf(buf, "%s",Mir_Code[1]); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%s",DeviceTypeInput[6]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 1); if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) sprintf(str, "%s",Mir_CodeTropo[2]); else sprintf(str, "%s",Mir_Code[2]); sprintf(buf, "%s",str); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) sprintf(buf, "%s",DeviceTypeInput[7]); else sprintf(buf, "%s",DeviceTypeInput[2]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) MSListSelectElement(list, 7); else MSListSelectElement(list, 2); sprintf(buf, "%s",Mir_Code[3]); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%s",DeviceTypeInput[3]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 3); lbl = MCreateLabel(obj, "MEASUREMENTS SCHEDULING", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); /***************************************************************/ // 1 start rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "ZenithSky", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(0, rowform); /* colform = MCreateColForm(rowform); MFormSetSpacing(colform, 0); MObjectSetResize(colform, False, False); MObjectAlign(colform, CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform, 255); MObjectSetShadow(colform, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, True); MObjectAlign(rowform1, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(rowform1, 255); MObjectSetShadow(rowform1, WS_NONE, 0, 0); rb = MCreateRButton(rowform1, "", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetTransparency(rb, 255); MObjectSetResize(rb, True, False); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 1) // MRButtonActivate(rb); rb = MCreateRButton(rowform1, "", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); MObjectSetTransparency(rb, 255); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 0) // MRButtonActivate(rb); colform2 = MCreateColForm(colform); MFormSetSpacing(colform2, 0); MObjectSetResize(colform2, False, False); MObjectSetTransparency(colform2, 255); MObjectSetShadow(colform2, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform2); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, False); MObjectSetShadow(rowform1, WS_NONE, 0, 0); MObjectSetTransparency(rowform1, 255); colform3 = MCreateColForm(rowform1); MFormSetSpacing(colform3, 0); MObjectSetResize(colform3, False, False); MObjectAlign(colform3, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform3, 255); MObjectSetShadow(colform3, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); lbl = MCreateLabel(colform3, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, False, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 95); colform4 = MCreateColForm(rowform1); MFormSetSpacing(colform4, 0); MObjectSetTransparency(colform4, 255); MObjectSetShadow(colform4, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); sprintf(buf, "<SZA<"); lbl = MCreateLabel(colform4, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "50"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 50); lbl = MCreateLabel(colform4, "OR", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "75"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 75); lbl = MCreateLabel(colform4, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 95); // 1 End /***************************************************************/ /***************************************************************/ // 2 start rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "Horizontal", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(1, rowform); /* lbl = MCreateLabel(obj, "Horizontal", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "Radiometric", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(0, rowform); /* lbl = MCreateLabel(obj, "Radiometric", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "Off-Axis", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(0, rowform); /* lbl = MCreateLabel(obj, "Off-Axis", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } //Create the Option page (with 6 sub-pages) void CONFP_Options(int mod, MOBJECT mo) { MOBJECT rowform; // generic row form MOBJECT rowform1; // generic row form // MOBJECT PFAMS; // paged form for AMS MOBJECT POPT; // paged form for AMS // MOBJECT edit; // generic edit object // MOBJECT radiobutt[2]; // generic radio button // MOBJECT RColButt; MOBJECT pb; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; // MOBJECT lbl; MOBJECT tb; // generic table object // char buf[64]; // int *p; MObjectSetText(mo, "Options"); rowform = MCreateRowForm(mo); MObjectSetBackgroundRGB(rowform, 112, 128, 112); // MObjectSetResize(rowform, True, True); MObjectSetCompositeWidth(rowform, 400); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); POPT = MCreateTabbedRowForm(rowform, 7, FIXED_SMALL); MObjectSetForegroundRGB(POPT, 255, 255, 255); MObjectSetBackgroundRGB(POPT, 112, 128, 112); MObjectAlign(POPT, CENTER_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(POPT, 390); MObjectSetResize(POPT, False, False); //Creation page 1 CONFP_opt_page1(0, POPT); MPagedFormSetActivePage(POPT, 1); //Creation page 2 CONFP_opt_page2(0, POPT); MPagedFormSetActivePage(POPT, 2); //Creation page 3 CONFP_opt_page3(0, POPT); MPagedFormSetActivePage(POPT, 3); //Creation page 4 CONFP_opt_page4(0, POPT); MPagedFormSetActivePage(POPT, 4); //Creation page 5 CONFP_opt_page5(0, POPT); MPagedFormSetActivePage(POPT, 5); //Creation page 6 CONFP_opt_page6(0, POPT); MPagedFormSetActivePage(POPT, 6); //Creation page 7 CONFP_opt_page7(0, POPT); MPagedFormSetActivePage(POPT, 0); // Command Button Section rowform1 = MCreateRowForm(mo); MObjectSetBackgroundRGB(rowform1, 112, 128, 112); //MObjectSetResize(rowform, False, True); MObjectSetCompositeWidth(rowform1, 357); MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform1, 2); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); pb = MCreatePButton(tb, "Save", FIXED_SMALL); MPButtonSetCallback(pb, WriteOptioniniCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); } void AMS_AdvancedCB(MOBJECT o, void *od, void *ad) { char buff[_MAX_PATH]; int f; STARTUPINFO si; PROCESS_INFORMATION pi; // chdir(buff); sprintf(buff,"%s\\%s",BIL.DFILEM.HOMEDIRECTORY, "\\AMSTester50\\AMS50.exe"); // WinExec(buff, 1); // // perform the equivalent of WinExec in NT, but we use a Unicode string // memset(&si, 0, sizeof(si)); si.cb = sizeof(si); si.dwFlags= STARTF_USESHOWWINDOW; si.wShowWindow = SW_SHOW; f = CreateProcess(NULL, buff, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); // sprintf(buff,"%ss",BIL.DFILEM.HOMEDIRECTORY, "SolPosCalc"); chdir(BIL.DFILEM.HOMEDIRECTORY); } MOBJECT MDCreateDASConfig(void) { // MOBJECT _shell000; MOBJECT POCF; //Paged form for configuration panel // MOBJECT POPT; //Paged form for options MOBJECT rowform; // generic row form MOBJECT rowform1; // generic row form // MOBJECT PFAMS; // paged form for AMS // MOBJECT edit; // generic edit object // MOBJECT radiobutt[2]; // generic radio button MOBJECT RColButt; MOBJECT pb; // generic push button // MOBJECT rb; // generic radio button MOBJECT list; MOBJECT _tbutton000; MOBJECT _tbutton001; MOBJECT form2; MOBJECT label, lbl; MOBJECT tb; // generic table object // MOBJECT frm2_tb4; int r, g, b; int i; char buf[64]; // double percentuale,speedhz; const char *fontfamily; // struct confp *pconfp; LoadGeoDB(); MGetDefaultBackgroundRGB(&r, &g, &b); drawarea_bgc = MAllocColor(r, g, b); /********************************************************/ /************* MAIN SHELL *************************/ /********************************************************/ DAS.Gui.ConfigPanel.ShellConfig = MCreateShell("DAS Config", 0); MObjectSetResize(DAS.Gui.ConfigPanel.ShellConfig, True, True); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.ShellConfig, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.ShellConfig, 96, 132, 152); MObjectSetResize(DAS.Gui.ConfigPanel.ShellConfig, True, True); MObjectAlign(DAS.Gui.ConfigPanel.ShellConfig, CENTER_ALIGN, TOP_ALIGN); // MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.ShellConfig, 670); // MObjectSetCompositeHeight(DAS.Gui.ConfigPanel.ShellConfig, 483); /********************************************************/ /************* CONFIG PAGED FORM **********************/ /********************************************************/ POCF = MCreateTabbedRowForm(DAS.Gui.ConfigPanel.ShellConfig, 6, FIXED_SMALL); MObjectSetForegroundRGB(POCF, 255, 255, 255); MObjectSetBackgroundRGB(POCF, 96, 132, 152); MObjectSetResize(POCF, True, True); MObjectAlign(POCF, CENTER_ALIGN, TOP_ALIGN); // MObjectSetCompositeWidth(POCF, 457); //457 /* Activation of POCF page 0 - Parameters*/ /* 00000000000000000000000000000000000000000000000000000000 */ MPagedFormSetActivePage(POCF, 0); // Creation page 0 - Parameters CONFP_Param(0, POCF); /* End Activation and creation of page 0 */ /* 0000000000000000000000000000000000000000000000000000000 */ /* Activation of POCF page 1 - Option */ /* 11111111111111111111111111111111111111111111111111111111 */ /* Start Creation of page 1 111111111111111111111*/ /* 11111111111111111111111111111111111111111111111111111111111111111*/ MPagedFormSetActivePage(POCF, 1); // Creation Page 1 - Options CONFP_Options(0, POCF); /* End Activation and creation of page 1 11111111111111111111*/ /* 11111111111111111111111111111111111111111111111111111111111111*/ /****************************************************************************/ /* Start Activation and creation of page 2 - Colors 2222222222*/ /* 22222222222222222222222222222222222222222222222222222222222222*/ MPagedFormSetActivePage(POCF, 2); MObjectSetText(POCF, "Colors"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(rowform, "SELECT OBJECT", FIXED_SMALL); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform, 2); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 112, 68, 72); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.RBColObj[0] = MCreateRButton(tb, "Unsel. Push Button", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[0], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[0], ColObjCB, (void *) 0); DAS.Gui.ConfigPanel.RBColObj[1] = MCreateRButton(tb, "Sel. Push Button", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[1], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[1], ColObjCB, (void *) 1); DAS.Gui.ConfigPanel.RBColObj[2] = MCreateRButton(tb, "Active Labels", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[2], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[2], ColObjCB, (void *) 2); DAS.Gui.ConfigPanel.RBColObj[3] = MCreateRButton(tb, "Passive LAbels", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[3], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[3], ColObjCB, (void *) 3); DAS.Gui.ConfigPanel.RBColObj[4] = MCreateRButton(tb, "Forms", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[4], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[4], ColObjCB, (void *) 4); DAS.Gui.ConfigPanel.RBColObj[5] = MCreateRButton(tb, "Capital Labels", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[5], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[5], ColObjCB, (void *) 5); if (DAS.Flag.exemode == DOASMODE ) { DAS.Gui.ConfigPanel.RBColObj[6] = MCreateRButton(tb, "Radio Button", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[6], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[6], ColObjCB, (void *) 6); } /* RColButt = MCreateRButton(tb, "UnSel. Comm.", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 0); RColButt = MCreateRButton(tb, "Sel. Comm.", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 1); RColButt = MCreateRButton(tb, "Active labels", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 2); RColButt = MCreateRButton(tb, "Passive labels", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 3); RColButt = MCreateRButton(tb, "Forms", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 4); RColButt = MCreateRButton(tb, "K_labelsUP", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 5); if (DAS.Flag.exemode == DOASMODE ) { RColButt = MCreateRButton(tb, "Radio Buttons", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 6); } */ tb = MCreateTableForm(rowform, 2); MTableFormSetColAlign(tb, 1, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 160, 112, 112); MObjectSetResize(tb, True, False); RColButt = MCreateRButton(tb, "Background", FIXED_SMALL); MRButtonSetCallback(RColButt, (OBJ_VALUE_CB) ColPickBackForeGCB, (void *) 0); MObjectAlign(RColButt, CENTER_ALIGN, TOP_ALIGN); MRButtonActivate(RColButt); MObjectSetForegroundRGB(RColButt, 255, 255, 0); RColButt = MCreateRButton(tb, "Foreground", FIXED_SMALL); MRButtonSetCallback(RColButt, (OBJ_VALUE_CB) ColPickBackForeGCB, (void *) 1); MObjectAlign(RColButt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(RColButt, 255, 255, 0); rowform1 = MCreateRowForm(rowform); MObjectSetBackgroundRGB(rowform1 , 80, 56, 56); MObjectSetResize(rowform1 , True, True); lbl = MCreateLabel(rowform1 , "COLORS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1 , 1); MObjectSetBackgroundRGB(tb, 112, 68, 72); MObjectSetResize(tb, True, False); /******************************************/ form2 = MCreateRowForm(tb); MFormSetPrefAtt(form2, F_PREF_ATT_COL); label = MCreateLabel(form2, "Red: ", FIXED_SMALL); MObjectSetForegroundRGB(label, 255, 0, 0); r_label = MCreateLabel(form2, "000", FIXED_SMALL); MObjectSetForegroundRGB(r_label, 255, 0, 0); MObjectSetResize(label, False, False); MObjectSetResize(r_label, False, False); r_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32); MScrollBarSetPosCallback(r_sbar, DB_ChangeColorCellCB, 0L); form2 = MCreateRowForm(tb); MFormSetPrefAtt(form2, F_PREF_ATT_COL); label = MCreateLabel(form2, "Green: ", FIXED_SMALL); MObjectSetForegroundRGB(label, 0, 105, 0); g_label = MCreateLabel(form2, "000", FIXED_SMALL); MObjectSetForegroundRGB(g_label, 0, 105, 0); MObjectSetResize(label, False, False); MObjectSetResize(g_label, False, False); g_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32); MScrollBarSetPosCallback(g_sbar, DB_ChangeColorCellCB, (void *) 1); form2 = MCreateRowForm(tb); MFormSetPrefAtt(form2, F_PREF_ATT_COL); label = MCreateLabel(form2, "Blue: ", FIXED_SMALL); MObjectSetForegroundRGB(label, 0, 0, 255); b_label = MCreateLabel(form2, "000", FIXED_SMALL); MObjectSetForegroundRGB(b_label, 0, 0, 255); MObjectSetResize(label, False, False); MObjectSetResize(b_label, False, False); b_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32); MScrollBarSetPosCallback(b_sbar, DB_ChangeColorCellCB, (void *) 2); /************************************/ frm3_dr1 = MCreateDrawArea(rowform, 347, 30); MObjectSetResize(frm3_dr1, True, False); MDrawAreaSetExposeCallback(frm3_dr1, DB_CellExposeCB, 0L); MDrawAreaSetResizeCallback(frm3_dr1, DB_CellResizeCB, 0L); MObjectSetResize(frm3_dr1, True, False); r_c = g_c = b_c = 0; cell_color = MAllocCell(0, 0, 0); rowform1 = MCreateRowForm(rowform); MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rowform1, 56, 84, 128); MObjectSetBackgroundRGB(rowform1, 112, 68, 72); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); lbl = MCreateLabel(rowform1, "COMMANDS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); pb = MCreatePButton(rowform1, "Load Palette", FIXED_SMALL); MPButtonSetCallback(pb, LoadPaletteCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); tb = MCreateTableForm(rowform1, 4); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 112, 68, 72); MObjectSetResize(tb, True, False); pb = MCreatePButton(tb, "Preview", FIXED_SMALL); MPButtonSetCallback(pb, ColorAssignCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); pb = MCreatePButton(tb, "Undo", FIXED_SMALL); MPButtonSetCallback(pb, D_UndoCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteColorsCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); /* End Activation and creation of page 2 Colors 22222222222222222222*/ /* 22222222222222222222222222222222222222222222222222222222222222*/ /*********************** FONTS ***********************/ MPagedFormSetActivePage(POCF, 3); MObjectSetText(POCF, "Fonts"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(rowform, "SELECT OBJECT", FIXED_SMALL); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectSetCompositeWidth(lbl, 347); tb = MCreateTableForm(rowform, 2); MTableFormSetColAlign(tb, 1, LEFT_ALIGN); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 84, 128); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); RColButt = MCreateRButton(tb, "UnSel. Comm.", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 0); MObjectAlign(RColButt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); MRButtonActivate(RColButt); RColButt = MCreateRButton(tb, "Sel. Comm.", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 1); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "Active labels", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 2); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "Passive labels", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 3); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "K_labelsUP", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 4); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "K_labelsDW", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 5); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); DAS.Gui.ConfigPanel.frm4_dr1 = MCreateDrawArea(rowform, 347, 62); MObjectAlign(DAS.Gui.ConfigPanel.frm4_dr1, CENTER_ALIGN, TOP_ALIGN); MObjectSetResize(DAS.Gui.ConfigPanel.frm4_dr1, True, False); MObjectSetCompositeHeight(DAS.Gui.ConfigPanel.frm4_dr1, 62); MDrawAreaSetExposeCallback(DAS.Gui.ConfigPanel.frm4_dr1, DrawAreaExpFontCB, 0L); rowform1 = MCreateRowForm(rowform); MObjectSetBackgroundRGB(rowform1, 56, 84, 128); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); lbl = MCreateLabel(rowform1, "FONTS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1, 2); MTableFormSetColAlign(tb, 1, RIGHT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 84, 128); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Type:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); fontfamily = MGetFirstFontFamily (); e_fname = MCreateOptionEdit (tb, fontfamily, 22, 10, 6, FIXED_SMALL); MObjectSetForegroundRGB(e_fname, 255, 255, 255); MObjectSetBackgroundRGB(e_fname, 0, 24, 96); MEditDisableEditing (e_fname); list = MOptionEditGetList (e_fname); MSListSetSortCallback (list, stricmp); while (fontfamily) { MSListAddItem (list, fontfamily, 0L); fontfamily = MGetNextFontFamily (); } lbl = MCreateLabel(tb, "Dim.:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); e_fsize = MCreateOptionEdit(tb, "22", 22, 10, 6, FIXED_SMALL); MObjectSetForegroundRGB(e_fsize, 255, 255, 255); MObjectSetBackgroundRGB(e_fsize, 0, 24, 96); list = MOptionEditGetList(e_fsize); MSListAddItem(list, "12", 0L); MSListAddItem(list, "14", 0L); MSListAddItem(list, "16", 0L); MSListAddItem(list, "18", 0L); MSListAddItem(list, "20", 0L); MSListAddItem(list, "22", 0L); MSListAddItem(list, "24", 0L); MSListAddItem(list, "26", 0L); MSListAddItem(list, "28", 0L); MSListAddItem(list, "30", 0L); MSListAddItem(list, "32", 0L); MSListAddItem(list, "34", 0L); MSListAddItem(list, "36", 0L); MSListAddItem(list, "38", 0L); MSListAddItem(list, "40", 0L); MSListAddItem(list, "42", 0L); _tbutton000 = MCreateTButton(tb, "Bold", FIXED_SMALL); MTButtonSetCallback(_tbutton000, SetBoldCB, 0L); MObjectSetForegroundRGB(_tbutton000, 255, 255, 0); _tbutton001 = MCreateTButton(tb, "Italic", FIXED_SMALL); MTButtonSetCallback(_tbutton001, SetItalicCB, 0L); MObjectSetForegroundRGB(_tbutton001, 255, 255, 0); /*******************/ rowform1 = MCreateRowForm(rowform); MObjectSetForegroundRGB(rowform1, 56, 84, 128); MObjectSetBackgroundRGB(rowform1, 56, 84, 128); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); lbl = MCreateLabel(rowform1, "COMMANDS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1, 5); MObjectSetBackgroundRGB(tb, 56, 84, 128); MObjectSetResize(tb, True, False); pb = MCreatePButton(tb, "Test", FIXED_SMALL); MPButtonSetCallback(pb, TestFontCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Preview", FIXED_SMALL); MPButtonSetCallback(pb, LoadFontCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Undo", FIXED_SMALL); MPButtonSetCallback(pb, UndoFCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteFontCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); /******************* STEPPER MOTORS ***************************/ MPagedFormSetActivePage(POCF, 4); MObjectSetText(POCF, "Motors"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 457); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); /***************************************************************************/ /**************** STEPPER MOTORS SECTION ***********************************/ lbl = MCreateLabel(rowform, "STEPPER MOTORS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetCompositeWidth(lbl, 447); PFAMS = MCreateTabbedRowForm(rowform, (DAS.StepM.NAMS + 2), FIXED_SMALL); MObjectSetForegroundRGB(PFAMS, 255, 255, 255); MObjectSetBackgroundRGB(PFAMS, 80, 60, 0); MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2); MObjectSetCompositeWidth(PFAMS, 420); // MObjectSetResize(PFAMS, True, True); for (i=0;i<DAS.StepM.NAMS; i++) { MPagedFormSetActivePage(PFAMS, i); CONFP_AMS(PFAMS, i); //FrmStepperConfP(PFAMS, i); } MPagedFormSetActivePage(PFAMS, i); CONFP_AMS_Utility(PFAMS); MPagedFormSetActivePage(PFAMS, i+1); CONFP_AMS_NOVA(PFAMS); MPagedFormSetActivePage(PFAMS, 0); /* if (DAS.Paramini.EqType == TROPOGAS) { PFAMS = MCreateTabbedRowForm(rowform, 4, FIXED_SMALL); MObjectSetForegroundRGB(PFAMS, 255, 255, 255); MObjectSetBackgroundRGB(PFAMS, 80, 60, 0); MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2); } else { PFAMS = MCreateTabbedRowForm(rowform, 3, FIXED_SMALL); MObjectSetForegroundRGB(PFAMS, 255, 255, 255); MObjectSetBackgroundRGB(PFAMS, 80, 60, 0); MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2); } MPagedFormSetActivePage(PFAMS, 0); FrmStepperConfP(PFAMS, AMS1, &STEPM, &CONFP, &CPL); MPagedFormSetActivePage(PFAMS, 1); FrmStepperConfP(PFAMS, AMS2, &STEPM, &CONFP, &CPL); if (DAS.Paramini.EqType == TROPOGAS) { MPagedFormSetActivePage(PFAMS, 2); FrmStepperConfP(PFAMS, AMS3, &STEPM, &CONFP, &CPL); MPagedFormSetActivePage(PFAMS, 3); FrmAMS_Utility(PFAMS, &STEPM, &CONFP, &CPL); } else { MPagedFormSetActivePage(PFAMS, 2); FrmAMS_Utility(PFAMS, &STEPM, &CONFP, &CPL); } */ MPagedFormSetActivePage(PFAMS, 0); /*++++++++++++++++++++++++++++++++++++++++++++++++++++*/ tb = MCreateTableForm(rowform, 4); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); pb = MCreatePButton(tb, "Apply", FIXED_SMALL); MPButtonSetCallback(pb, ApplyChCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(tb, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteAMSCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(tb, "ADVANCED", FIXED_SMALL); MPButtonSetCallback(pb, AMS_AdvancedCB, (void *) 0); MObjectSetBackgroundRGB(pb, 24, 24, 255); MObjectSetForegroundRGB(pb, 255, 245, 255); MObjectSetCompositeWidth(pb, 74); /*********************************************************/ /*********************************************************/ /*************** TEST AD Converter **************/ /*********************************************************/ MPagedFormSetActivePage(POCF, 5); MObjectSetText(POCF, "TEST AD Converter"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); /*+++++++++++++++++ START CURRENT SETUP ++++++++++*/ lbl = MCreateLabel(rowform , "AD Converter Current Setup", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform, 4); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); lbl = MCreateLabel(tb , "Board Type:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); // sprintf(buf, "%s", DSCCB2STR()); ADTESTER.lblADsetup[0] = MCreateLabel(tb , "DMM", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[0], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[0], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[0], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[0], 0); lbl = MCreateLabel(tb , "Base Addr:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[1] = MCreateLabel(tb , "0x300", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[1], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[1], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[1], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[1], 0); lbl = MCreateLabel(tb , "Int.Lvl:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[2] = MCreateLabel(tb , "3", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[2], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[2], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[2], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[2], 0); lbl = MCreateLabel(tb , "DMA Lvl:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[3] = MCreateLabel(tb , "3", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[3], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[3], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[3], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[3], 0); lbl = MCreateLabel(tb , "ClockFreq:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[4] = MCreateLabel(tb , "10MHz", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[4], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[4], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[4], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[4], 0); lbl = MCreateLabel(tb , "Range:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[5] = MCreateLabel(tb , "5V", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[5], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[5], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[5], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[5], 0); lbl = MCreateLabel(tb , "Pol.:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[6] = MCreateLabel(tb , "UNIPOL", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[6], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[6], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[6], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[6], 0); lbl = MCreateLabel(tb , "Gain:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[7] = MCreateLabel(tb , "2", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[7], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[7], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[7], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[7], 0); lbl = MCreateLabel(tb , "LowCh:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[8] = MCreateLabel(tb , "0", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[8], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[8], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[8], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[8], 0); lbl = MCreateLabel(tb , "HighCh:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[9] = MCreateLabel(tb , "15", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[9], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[9], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[9], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[9], 0); // LoadDMMSetup(); /*+++++++++++++++++ END CURRENT SETUP ++++++++++*/ tb = MCreateTableForm(rowform, 2); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); ADTESTER.ADrb[0]= MCreateRButton(tb, "Volts", FIXED_SMALL); MPButtonSetCallback(ADTESTER.ADrb[0], DB_SelOutModeCB, (void *) 0); MObjectAlign(ADTESTER.ADrb[0], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(ADTESTER.ADrb[0], 255, 255, 255); MObjectSetCompositeWidth(ADTESTER.ADrb[0], 85); ADTESTER.ADrb[1] = MCreateRButton(tb, "Celsius", FIXED_SMALL); MPButtonSetCallback(ADTESTER.ADrb[1], DB_SelOutModeCB, (void *) 1); MObjectAlign(ADTESTER.ADrb[1], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(ADTESTER.ADrb[1], 255, 255, 255); MObjectSetCompositeWidth(ADTESTER.ADrb[1], 85); if(ADTESTER.OutputMode == 0) MRButtonActivate(ADTESTER.ADrb[0]); else MRButtonActivate(ADTESTER.ADrb[0]); lbl = MCreateLabel(rowform , "Output", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform, 4); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); for(i=0;i<16;i++) { sprintf(buf, "Ch.%d:", i); ADTESTER.lblADch[i] = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(ADTESTER.lblADch[i], LEFT_ALIGN); MObjectSetForegroundRGB(ADTESTER.lblADch[i], 255, 255, 255); MObjectSetTransparency(ADTESTER.lblADch[i], 0); MObjectSetResize(ADTESTER.lblADch[i], False, False); MObjectAlign(ADTESTER.lblADch[i], LEFT_ALIGN, TOP_ALIGN); // MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblADch[i], 40, 96, 72); ADTESTER.lblADvalue[i] = MCreateLabel(tb, " 0.0", FIXED_SMALL); MLabelSetAlignment(ADTESTER.lblADvalue[i], RIGHT_ALIGN); MObjectSetForegroundRGB(ADTESTER.lblADvalue[i], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADvalue[i], 40, 96, 72); MObjectSetTransparency(ADTESTER.lblADvalue[i], 0); MObjectSetResize(ADTESTER.lblADvalue[i], False, False); MObjectAlign(ADTESTER.lblADvalue[i], LEFT_ALIGN, TOP_ALIGN); } tb = MCreateTableForm(rowform, 3); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); ADTESTER.ADpb = MCreatePButton(tb, "Start", FIXED_SMALL); MPButtonSetCallback(ADTESTER.ADpb, ADTesterCB, (void *) 0); MObjectSetBackgroundRGB(ADTESTER.ADpb, 224, 224, 176); // MObjectSetBackgroundRGB(ADTESTER.ADpb, 192, 192, 192); MObjectSetCompositeWidth(ADTESTER.ADpb, 84); ADTESTER.ADInflbl = MCreateLabel(tb, "Click Start to test ", FIXED_SMALL); // MPButtonSetCallback(ADTESTER.ADpb, ADTesterCB, (void *) 0); MObjectSetForegroundRGB(ADTESTER.ADInflbl, 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.ADInflbl, 48, 20, 255); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); /*********************************************************/ MPagedFormSetActivePage(POCF, 0); MShellRealize(DAS.Gui.ConfigPanel.ShellConfig); // MShellRealizeXYWH(DAS.Gui.ConfigPanel.ShellConfig, 0,0,600,800); return 0; } */
3401  /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */
3402 
3403 }
3404 
3405 
3406 
3407 
3408 void edtCCDOffSet_CB(MOBJECT p, LIST_ACT *la, void *ad)
3409 {
3410 
3411  int c = (int) ad;
3412  int er = 0;
3413 
3414 
3415  DAS.Marconi.Offset = atoi(la->item);
3416 
3417 
3418  if(DAS.Flag.exemode != DBDEMO)
3419  DC_SetUsrGain(0, 0 , DAS.Marconi.Offset , 0);
3420 
3421 
3422 
3423 }
3424 
3425 
3426 
3427 void CONFP_param_page1(int mod, MOBJECT obj)
3428 {
3429 
3430  MOBJECT rowform1; // generic row form
3431  MOBJECT edit; // generic edit object
3432 
3433  MOBJECT pb, rb ;
3434 // MOBJECT list;
3435 // MOBJECT _tbutton000;
3436 // MOBJECT _tbutton001;
3437 // MOBJECT form2;
3438  MOBJECT lbl;
3439  MOBJECT tb; // generic table object
3440  char buf[64];
3441  int i, k, *p;
3442 
3443  MOBJECT list;
3444 
3445  int t=0;
3446  char str[80];
3447  char buff[_MAX_PATH];
3448 
3449  LIST_ACT * pla;
3450 
3451 
3452 
3453 
3454 
3455  MObjectSetText(obj, "Page 1");
3456 
3457 /******************************************************************************************************************/
3458 
3459  //Equipment Type section
3460  /*--------- Start ----------------*/
3461  lbl = MCreateLabel(obj, "Equipment Type", FIXED_SMALL);
3462  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3463  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
3464  MObjectSetTransparency(lbl, 0);
3466 
3467  tb = MCreateTableForm(obj, 3);
3469  MObjectSetBackgroundRGB(tb, 112, 128, 112);
3470  MObjectSetBackgroundRGB(tb, 56, 112, 112);
3471  MObjectSetResize(tb, True, False);
3473 
3474  // Instrument Type(0 = SPATRAM,
3475  // 1 = TROPOGAS, 2 = LIS,
3476  // 3 = SPATRAMPLUS, 4 = GASCODNG, )
3477 
3478  rb = MCreateRButton(tb, "SPATRAMPLUS", FIXED_SMALL);
3479  MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 3);
3481  MObjectSetForegroundRGB(rb, 255, 255, 255);
3482  MObjectSetCompositeWidth(rb, 105);
3483  if(DAS.Paramini.EqType == 3)
3484  MRButtonActivate(rb);
3485 
3486  rb = MCreateRButton(tb, "SPATRAM2", FIXED_SMALL);
3487  MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 9);
3489  MObjectSetForegroundRGB(rb, 255, 255, 255);
3490  MObjectSetCompositeWidth(rb, 105);
3491  if(DAS.Paramini.EqType == 9)
3492  MRButtonActivate(rb);
3493 
3494  rb = MCreateRButton(tb, "SPATRAM3", FIXED_SMALL);
3495  MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 10);
3497  MObjectSetForegroundRGB(rb, 255, 255, 255);
3498  MObjectSetCompositeWidth(rb, 105);
3499  if(DAS.Paramini.EqType == 10)
3500  MRButtonActivate(rb);
3501 
3502  /* rb = MCreateRButton(tb, "SPATRAM", FIXED_SMALL);
3503  MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 0);
3504  MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN);
3505  MObjectSetForegroundRGB(rb, 255, 255, 255);
3506  MObjectSetCompositeWidth(rb, 85);
3507  if( DAS.Paramini.EqType == 0)
3508  MRButtonActivate(rb);
3509  */
3510  rb = MCreateRButton(tb, "TROPOGAS", FIXED_SMALL);
3511  MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 1);
3513  MObjectSetForegroundRGB(rb, 255, 255, 255);
3514  MObjectSetCompositeWidth(rb, 85);
3515  if(DAS.Paramini.EqType == 1)
3516  MRButtonActivate(rb);
3517 
3518  rb = MCreateRButton(tb, "LIS", FIXED_SMALL);
3519  MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 2);
3521  MObjectSetForegroundRGB(rb, 255, 255, 255);
3522  MObjectSetCompositeWidth(rb, 85);
3523  if(DAS.Paramini.EqType == 2)
3524  MRButtonActivate(rb);
3525 
3526  rb = MCreateRButton(tb, "GASCODNG1", FIXED_SMALL);
3527  MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 4);
3529  MObjectSetForegroundRGB(rb, 255, 255, 255);
3530  MObjectSetCompositeWidth(rb, 85);
3531  if(DAS.Paramini.EqType == 4)
3532  MRButtonActivate(rb);
3533 
3534  /* rb = MCreateRButton(tb, "GASCODOffAxis", FIXED_SMALL);
3535  MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 5);
3536  MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN);
3537  MObjectSetForegroundRGB(rb, 255, 255, 255);
3538  MObjectSetCompositeWidth(rb, 105);
3539  if(DAS.Paramini.EqType == 5)
3540  MRButtonActivate(rb);
3541  */
3542 
3543 
3544  rb = MCreateRButton(tb, "GASCODNG2", FIXED_SMALL);
3545  MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 6);
3547  MObjectSetForegroundRGB(rb, 255, 255, 255);
3548  MObjectSetCompositeWidth(rb, 105);
3549  if(DAS.Paramini.EqType == 6)
3550  MRButtonActivate(rb);
3551 
3552  rb = MCreateRButton(tb, "GASCODNG3", FIXED_SMALL);
3553  MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 7);
3555  MObjectSetForegroundRGB(rb, 255, 255, 255);
3556  MObjectSetCompositeWidth(rb, 105);
3557  if(DAS.Paramini.EqType == 7)
3558  MRButtonActivate(rb);
3559 
3560  rb = MCreateRButton(tb, "GASCODNG4", FIXED_SMALL);
3561  MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 8);
3563  MObjectSetForegroundRGB(rb, 255, 255, 255);
3564  MObjectSetCompositeWidth(rb, 105);
3565  if(DAS.Paramini.EqType == 8)
3566  MRButtonActivate(rb);
3567 
3568 /*
3569  pb = MCreatePButton(tb, "Save", FIXED_SMALL);
3570  MPButtonSetCallback(pb, WriteEquipiniCB, 0);
3571  MObjectAlign(pb, LEFT_ALIGN, UNDEF_ALIGN);
3572  //MObjectSetForegroundRGB(pb, 255, 255, 255);
3573  MObjectSetCompositeWidth(pb, 105);
3574 */
3575 
3576  //CCD & OMU Temperature section
3577  /*--------- Start ----------------*/
3578 
3579 
3580  lbl = MCreateLabel(obj, "CCD & OMU Temp", FIXED_SMALL);
3581  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3582  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
3583  MObjectSetTransparency(lbl, 0);
3585 
3586 
3587  tb = MCreateTableForm(obj, 2);
3591  MObjectSetBackgroundRGB(tb, 56, 112, 112);
3592  MObjectSetResize(tb, True, False);
3593  MObjectSetCompositeWidth(tb, 347);
3594 
3595  lbl = MCreateLabel(tb, "CCD Target Temperature:", FIXED_SMALL);
3598  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3599  MObjectSetTransparency(lbl, 0);
3600 
3601  sprintf(buf, "%.1lf", DAS.Paramini.ITemp);
3602  edit = MCreateEdit(tb, buf, 5, FIXED_SMALL);
3604  MObjectSetForegroundRGB(edit, 255, 255, 255);
3605  MObjectSetBackgroundRGB(edit, 40, 96, 72);
3606  MEditSetValCallback(edit, ValidateCB, (void *) 1);
3607  MEditSetActCallback(edit, ActEditCB, (void *) 1);
3608 
3609  lbl = MCreateLabel(tb, "CCD Peltier Init Power:", FIXED_SMALL);
3612  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3613  MObjectSetTransparency(lbl, 0);
3614 
3615  sprintf(buf, "%.1lf%%",(double)DAS.Paramini.CoolPw / 10);
3616  edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL);
3618  MObjectSetForegroundRGB(edit, 255, 255, 255);
3619  MObjectSetBackgroundRGB(edit, 40, 96, 72);
3620  MObjectSetCompositeWidth(edit, 70);
3621  MEditSetValCallback(edit, ValidateCB, (void *) 2);
3622  MEditSetActCallback(edit, ActEditCB, (void *) 2);
3623 
3624 
3625  lbl = MCreateLabel(tb, "Optical Unit Target Temp:", FIXED_SMALL);
3628  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3629 
3630  sprintf(buf, "%.1lf", DAS.Paramini.TPelt);
3631  edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL);
3633  MObjectSetForegroundRGB(edit, 255, 255, 255);
3634  MObjectSetBackgroundRGB(edit, 40, 96, 72);
3635  MObjectSetCompositeWidth(edit, 70);
3636  MEditSetValCallback(edit, ValidateCB, (void *) 3);
3637  MEditSetActCallback(edit, ActEditCB, (void *) 3);
3638 
3639  lbl = MCreateLabel(tb, "OMU Peltier Init Power:", FIXED_SMALL);
3642  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3643  MObjectSetTransparency(lbl, 0);
3644 
3645  sprintf(buf, "%.1lf%%",(double)OMUTHR.PCPower / 10);
3646  edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL);
3648  MObjectSetForegroundRGB(edit, 255, 255, 255);
3649  MObjectSetBackgroundRGB(edit, 40, 96, 72);
3650  MObjectSetCompositeWidth(edit, 70);
3651  MEditSetValCallback(edit, ValidateCB, (void *) 2000);
3652  MEditSetActCallback(edit, ActEditCB, (void *) 2000);
3653 
3654  /*------------------- End CCD & OMU Temperature section -------------*/
3655 
3656  //CCD Window and vertical binning section
3657  /*##################### Start ##################################################*/
3658  lbl = MCreateLabel(obj, "CCD WINDOW - SETUP", FIXED_SMALL);
3659  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3660  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
3661  MObjectSetTransparency(lbl, 0);
3662  MObjectSetCompositeWidth(lbl, 347);
3663 
3664  rowform1 = MCreateRowForm(obj);
3665  MObjectSetBackgroundRGB(rowform1, 56, 112, 112);
3666  MObjectSetResize(rowform1, False, False);
3667  MObjectSetCompositeWidth(rowform1, 347); //357
3668  MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN);
3669 
3670  tb = MCreateTableForm(rowform1, 4);
3671  MObjectSetBackgroundRGB(tb, 56, 112, 112);
3673  MObjectSetResize(tb, True, True);
3674 // MObjectSetCompositeWidth(tb, 347);
3675  MObjectSetShadow(tb, WS_NONE, 0, 0);
3676 
3677 
3678  lbl = MCreateLabel(tb, "X Start:", FIXED_SMALL);
3680  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3681  MObjectSetTransparency(lbl, 0);
3682  MObjectSetResize(lbl, False, False);
3684 
3685  sprintf(buf, "%d",DAS.Paramini.ccdXoff);
3686  //sprintf(buf, "%d",(DC_CCD.dx - DC_CCD.dx));
3687  edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL);
3688  MObjectSetForegroundRGB(edit, 255, 255, 255);
3689  MObjectSetBackgroundRGB(edit, 40, 96, 72);
3690  MObjectSetCompositeWidth(edit, 70);
3692  MEditSetValCallback(edit, ValidateCB, (void *) 4);
3693  MEditSetActCallback(edit, ActEditCB, (void *) 4);
3694  //MEditDisableEditing(edit);
3695 
3696  lbl = MCreateLabel(tb, "X End:", FIXED_SMALL);
3698  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3699  MObjectSetTransparency(lbl, 0);
3700  MObjectSetResize(lbl, False, False);
3702 
3703  sprintf(buf, "%d",DAS.Paramini.ccdWx);
3704  //sprintf(buf, "%d",DC_CCD.dx);
3705  edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL);
3706  MObjectSetForegroundRGB(edit, 255, 255, 255);
3707  MObjectSetBackgroundRGB(edit, 40, 96, 72);
3708  MObjectSetCompositeWidth(edit, 70);
3710  MEditSetValCallback(edit, ValidateCB, (void *) 5);
3711  MEditSetActCallback(edit, ActEditCB, (void *) 5);
3712  // MEditDisableEditing(edit);
3713 
3714  lbl = MCreateLabel(tb, "Y Start:", FIXED_SMALL);
3716  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3717  MObjectSetTransparency(lbl, 0);
3718  MObjectSetResize(lbl, False, False);
3720 
3721  sprintf(buf, "%d",DAS.Paramini.ccdYoff);
3722  //sprintf(buf, "%d", (DC_CCD.dy-DC_CCD.dy));
3723  edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL);
3724  MObjectSetForegroundRGB(edit, 255, 255, 255);
3725  MObjectSetBackgroundRGB(edit, 40, 96, 72);
3726  MObjectSetCompositeWidth(edit, 70);
3728  MEditSetValCallback(edit, ValidateCB, (void *) 6);
3729  MEditSetActCallback(edit, ActEditCB, (void *) 6);
3730  // MEditDisableEditing(edit);
3731 
3732  lbl = MCreateLabel(tb, "Y End:", FIXED_SMALL);
3734  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3735  MObjectSetTransparency(lbl, 0);
3736  MObjectSetResize(lbl, False, False);
3738 
3739  sprintf(buf, "%d",DAS.Paramini.ccdWy);
3740  //sprintf(buf, "%d",DC_CCD.dy);
3741  edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL);
3742  MObjectSetForegroundRGB(edit, 255, 255, 255);
3743  MObjectSetBackgroundRGB(edit, 40, 96, 72);
3744  MObjectSetCompositeWidth(edit, 70);
3746  MEditSetValCallback(edit, ValidateCB, (void *) 7);
3747  MEditSetActCallback(edit, ActEditCB, (void *) 7);
3748  // MEditDisableEditing(edit);
3749 
3750  tb = MCreateTableForm(rowform1, 3);
3752  MObjectSetBackgroundRGB(tb, 56, 112, 112);
3754  MObjectSetCompositeWidth(tb, 347);
3755  MObjectSetShadow(tb, WS_NONE, 0, 0);
3756 
3757  lbl = MCreateLabel(tb, "Vertical Binning:", FIXED_SMALL);
3759  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3760  MObjectSetTransparency(lbl, 0);
3762  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
3763 
3764  sprintf(buf, "%d",DAS.Paramini.VBin);
3765  edit = MCreateClippedEdit(tb, buf, 3, 3, FIXED_SMALL);
3767  MObjectSetForegroundRGB(edit, 255, 255, 255);
3768  MObjectSetBackgroundRGB(edit, 40, 96, 72);
3769  MEditSetValCallback(edit, ValidateCB, (void *) 8);
3770  MEditSetActCallback(edit, ActEditCB, (void *) 8);
3771 
3772  pb = MCreatePButton(tb, "CCD Setup (DCS)", FIXED_SMALL);
3773  MPButtonSetCallback(pb, CCDSetupCB, (void *) 0);
3774  MObjectSetBackgroundRGB(pb, 224, 224, 176);
3775 
3776 
3777 
3778 /* tb = MCreateTableForm(rowform1, 3);
3779  MTableFormSetColAlign(tb, 0, LEFT_ALIGN);
3780  MObjectSetBackgroundRGB(tb, 56, 112, 112);
3781  MObjectSetResize(tb, False, False);
3782  MObjectSetCompositeWidth(tb, 347);
3783 */
3784  lbl = MCreateLabel(tb, "Max. Exp. Time (s) :", FIXED_SMALL);
3786  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3787  MObjectSetTransparency(lbl, 0);
3788  MObjectSetResize(lbl, False, False);
3791 
3792  sprintf(buf, "%.1lf", DAS.Paramini.maxtexp);
3793  edit = MCreateClippedEdit(tb, buf, 5, 5, FIXED_SMALL);
3794  MObjectSetForegroundRGB(edit, 255, 255, 255);
3795  MObjectSetBackgroundRGB(edit, 40, 96, 72);
3796  //MObjectSetCompositeWidth(edit, 35);
3798  k = 123;
3799  p = (void *) k;
3800  MEditSetValCallback(edit, ValidateCB, p);
3801  MEditSetActCallback(edit, ActEditCB, p);
3802 
3803  pb = MCreateImagePButtonExt(tb, "sys\\qmarkyellow.bmp", "sys\\qmarkblue.bmp", "", "sys\\qmarkred.bmp", "", "");
3804  MButtonSetImageMaskByPixel(pb, 0, 0);
3805  MObjectSetTransparency(pb, 255);
3806  MObjectSetShadow(pb, WS_NONE, 0, 0);
3807  MObjectSetBackgroundRGB(pb, 56, 112, 112);
3808  MPButtonSetCallback(pb, PB_H_CB, (void *) 0);
3809 
3810 
3811  /* End CCD Window and vertical binning section ###############*/
3812 /*
3813  lbl = MCreateLabel(obj, "Devices Offsets", FIXED_SMALL);
3814  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3815  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
3816  MObjectSetTransparency(lbl, 0);
3817 */
3818  rowform1 = MCreateRowForm(obj);
3819  MObjectSetBackgroundRGB(rowform1, 56, 112, 112);
3820  MObjectSetResize(rowform1, True, True);
3821  MObjectSetCompositeWidth(rowform1, 347);
3822 
3823 /**************************************************************************/
3824  //OFFSET HIRES 5 SECTION
3825  if (Cfg.Platform == 28)
3826  {
3827  lbl = MCreateLabel(rowform1, "HiresV OFFSET", FIXED_SMALL);
3828  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3829  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
3830  MObjectSetTransparency(lbl, 0);
3831 
3832 
3833  tb = MCreateTableForm(rowform1, 2);
3834  MObjectSetBackgroundRGB(tb, 112, 128, 112);
3835  MObjectSetBackgroundRGB(tb, 56, 112, 112);
3837 
3838 
3839  lbl = MCreateLabel(tb, "Offset", FIXED_SMALL);
3840  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3841  //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255);
3842  MObjectSetTransparency(lbl, 0);
3843 
3844  if(DAS.Paramini.EqType == 9) //SPATRAM2
3845  DAS.Marconi.Offset = 250;
3846  if(DAS.Paramini.EqType == 8) //GASCODNG4
3847  DAS.Marconi.Offset = 270;
3848 
3849 
3850 
3851  sprintf(buff, "%d", DAS.Marconi.Offset);
3852  edit = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL);
3853  MObjectSetForegroundRGB(edit, 255, 255, 255);
3854  MObjectSetBackgroundRGB(edit, 40, 96, 72);
3856  MEditDisableEditing(edit);
3857 
3858 
3859  list = MOptionEditGetList(edit);
3860  for(i=0; i<512; i++)
3861  {
3862 
3863  t = i;
3864 
3865  sprintf(str, "%d", t);
3866  MSListAddItem(list, str, 0L);
3867  if( strcmp(str,buff) ==0 )
3868  k=i;
3869 
3870  }
3871 
3872  MSListSelectElement(list, k);
3873  pla = MSListGetSelected(list);
3874  sprintf(str, "%s", pla->item );
3875  MObjectSetText(edit, str);
3876  MOptionEditSetListCallback(edit, edtCCDOffSet_CB, (void *) 0);
3877  DAS.Marconi.Offset = atoi(pla->item);
3878 
3879  }
3880 /**************************************************************************/
3881 /*************************************************************************/
3882 
3883 /*
3884  lbl = MCreateLabel(rowform1, "Input Mirror", FIXED_SMALL);
3885  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3886  MObjectSetTransparency(lbl, 0);
3887  MObjectSetCompositeWidth(lbl, 347);
3888 
3889  tb = MCreateTableForm(rowform1, 5);
3890  MTableFormSetColAlign(tb, 0, LEFT_ALIGN);
3891  MObjectSetBackgroundRGB(tb, 56, 112, 112);
3892  MObjectSetResize(tb, False, False);
3893  MObjectSetCompositeWidth(tb, 347);
3894 
3895  lbl = MCreateLabel(tb, "Home", FIXED_SMALL);
3896  MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN);
3897  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3898  MObjectSetTransparency(lbl, 0);
3899  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
3900 
3901  for(i=0;i<4;i++)
3902  {
3903  if (DAS.Paramini.EqType != TROPOGAS)
3904  sprintf(buf, "%s",Mir_Code[i]);
3905  else
3906  sprintf(buf, "%s",Mir_CodeTropo[i]);
3907 
3908  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3909  MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN);
3910  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3911  MObjectSetTransparency(lbl, 0);
3912  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
3913  }
3914 
3915  for(i=0;i<5;i++)
3916  {
3917  sprintf(buf, "%d",DAS.Paramini.Offset[i]);
3918  edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL);
3919  MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN);
3920  MObjectSetForegroundRGB(edit, 255, 255, 255);
3921  MObjectSetBackgroundRGB(edit, 40, 96, 72);
3922  MObjectSetCompositeWidth(edit, 65);
3923  k= i + 300;
3924  MEditSetValCallback(edit, ValidateCB, (void *) k);
3925  MEditSetActCallback(edit, ActEditCB, (void *) k);
3926  }
3927 /*
3928  // Command Button Section
3929  /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/
3930  rowform1 = MCreateTableForm(obj, 3);
3931  MObjectSetBackgroundRGB(rowform1, 56, 112, 112);
3932 // MObjectSetResize(rowform1, False, False);
3933  MObjectSetCompositeWidth(rowform1, 347);
3934 
3935  pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL);
3936  MPButtonSetCallback(pb, ApplyChCB, (void *) 0);
3937  if((DAS.Flag.exemode == DOASMODE) )
3938  MObjectSetUnsensitive(pb); // Set the button as Unensitive
3939  MObjectSetBackgroundRGB(pb, 224, 224, 176);
3940  MObjectSetCompositeWidth(pb, 74);
3941 
3942  pb = MCreatePButton(rowform1, "Store", FIXED_SMALL);
3943  MPButtonSetCallback(pb, WriteParaminiCB, (void *) 1);
3944  MObjectSetBackgroundRGB(pb, 224, 224, 176);
3945  MObjectSetCompositeWidth(pb, 84);
3946 
3947  pb = MCreatePButton(rowform1, "Close", FIXED_SMALL);
3949  MObjectSetBackgroundRGB(pb, 224, 224, 176);
3950  MObjectSetCompositeWidth(pb, 74);
3951  /* End Command Button Section æææææææææææææææææææææææææææææææææææ/ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ /**************************************************************************************************************/ } // Create the Parameters page void CONFP_Param(int mod, MOBJECT mo) { MOBJECT rowform; // generic row form // MOBJECT rowform1; // generic row form // MOBJECT edit; // generic edit object // MOBJECT pb; // generic pushbutton and radiobutton // MOBJECT lbl; //generic label // MOBJECT tb; // generic table object MOBJECT PPARAM; // char buf[64]; // int k; MObjectSetText(mo, "Parametrs"); rowform = MCreateRowForm(mo); MObjectSetBackgroundRGB(rowform, 56, 112, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); //357 MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); PPARAM = MCreateTabbedRowForm(rowform, 5, FIXED_SMALL); MObjectSetForegroundRGB(PPARAM, 255, 255, 255); MObjectSetBackgroundRGB(PPARAM, 56, 112, 112); MObjectAlign(PPARAM, CENTER_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(PPARAM, 357); MObjectSetResize(PPARAM, False, False); CONFP_param_page1(0, PPARAM); MPagedFormSetActivePage(PPARAM, 1); //Creation page 2 CONFP_param_page2(0, PPARAM); MPagedFormSetActivePage(PPARAM, 2); //Creation page 3 CONFP_param_page3(0, PPARAM); MPagedFormSetActivePage(PPARAM, 3); //Creation page 4 CONFP_param_page4(0, PPARAM); MPagedFormSetActivePage(PPARAM, 4); //Creation page 5 CONFP_param_page5(0, PPARAM); MPagedFormSetActivePage(PPARAM, 0); } void DB_MeasMode_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case 0: DAS.DOption.measmode = 0; //Single Meas MObjectSetUnsensitive(DAS.Gui.ConfigPanel.tbavg); //if (DAS.Marconi.AVGmat != 0) // free(DAS.Marconi.AVGmat); break; case 1: DAS.DOption.measmode = 1; //Average MObjectSetSensitive(DAS.Gui.ConfigPanel.tbavg); //if (DAS.Marconi.AVGmat != 0) //DAS.Marconi.AVGmat = AllocFloatMat(IDX, IDY); //np = (long) IDX * IDY * 2; //AVGmat = malloc(np * 4); //memset(AVGmat, 0, np * 4); break; } } } void DB_AVGAutoR_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case 0: DAS.DOption.avgautor = 1; //Autorange before average break; case 1: DAS.DOption.avgautor = 0; //NO Autorange before average break; } } } void SelDefPixFileCB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; char buf[_MAX_PATH]; char fname[_MAX_PATH], dirname[_MAX_PATH]; char str[_MAX_PATH]; // unsigned long ns; FB_PREFS fbp; strcpy (dirname, MGetCurrentDirectory ()); fname[0] = '\0'; memset (&fbp, 0, sizeof (fbp)); fbp.change_cwd = True; fbp.allow_dir_create = True; fbp.allow_dir_rename = True; fbp.allow_dir_delete = True; fbp.transparent_tree = False; fbp.font = HELV_SMALL; fbp.button_font = HELV_SMALL; //Set Img file sprintf(buf, "%s\\%s", BIL.DFILEM.HOMEDIRECTORY, "sys\\Tile2.bmp" ); fbp.bg_image_file =buf; er = MFileBrowseExt ("Select CCD Mask File", "*.cor", fname, dirname, &fbp); sprintf(DAS.DOption.DEFPIXFILENAME, "%s", fname); sprintf(buf, "%s%s", dirname, DAS.DOption.DEFPIXFILENAME); //if(DI_FileExist(buff)) // DI_FileExist --> Return: 1 if PATH exist, else return 0 // return 37; MObjectSetText(DAS.Gui.ConfigPanel.lblCorrPixF, DAS.DOption.DEFPIXFILENAME); //Load File er = LoadDB_DefectPixel(buf); if (er) { sprintf (str, "File: %s, Not FOUND", buf); MMessageDialog("DAS Inf.", str, "OK", NULL); } } // create the 1st page of the option page void CONFP_opt_page1(int mod, MOBJECT obj) { MOBJECT rowform; // generic row form MOBJECT pb, rb ; MOBJECT colform; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT tbavg; MOBJECT lbl; MOBJECT tb; // generic table object char buf[64]; int k, *p; MObjectSetText(obj, "Page 1"); /***************************************************************************/ /*********** Saving Mode Section - Start ****************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "SAVING OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Saving Mode:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 150); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "ASCII", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioModeSelCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(!DAS.DOption.savingmode) MRButtonActivate(rb); rb = MCreateRButton(tb, "Binary", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioModeSelCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.savingmode) MRButtonActivate(rb); /***************************************************************************/ /*********** Saving Mode Section - End ******************************/ /***************************************************************************/ /***************************************************************************/ /*********** File Name Type Section - Start *************************/ /***************************************************************************/ tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Saving File Names:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 150); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Free ", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFNSelCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(!DAS.DOption.filename) MRButtonActivate(rb); rb = MCreateRButton(tb, "Automatic", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFNSelCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); //MObjectSetResize(rb, False, False); if(DAS.DOption.filename) MRButtonActivate(rb); /***************************************************************************/ /*********** File Name Type Section - End ***************************/ /***************************************************************************/ /***************************************************************************/ /*********** START IMAGE TYPE SECTION *******************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "Type of Images:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); rowform = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, True, False); rb = MCreateRButton(rowform, "MONO ", FIXED_SMALL); MPButtonSetCallback(rb, DB_ImgTypeCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(!DAS.DOption.imgtype) MRButtonActivate(rb); rb = MCreateRButton(rowform, "RGB", FIXED_SMALL); MPButtonSetCallback(rb, DB_ImgTypeCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, False, False); if(DAS.DOption.imgtype) MRButtonActivate(rb); pb = MCreatePButton(rowform, "Apply img", FIXED_SMALL); MPButtonSetCallback(pb, ApplyImgCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); /***************************************************************************/ /*********** END IMAGE TYPE SECTION *******************************/ /***************************************************************************/ /***************************************************************************/ /*********** START AVERAGING SECTION *******************************/ /***************************************************************************/ DAS.Gui.ConfigPanel.tbavg = MCreateTableForm(obj, 1); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.tbavg, 112, 128, 112); MObjectSetResize(DAS.Gui.ConfigPanel.tbavg, True, False); // lbl = MCreateLabel(obj, "AVERAGE", FIXED_SMALL); lbl = MCreateLabel(DAS.Gui.ConfigPanel.tbavg, "AVERAGE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetBackgroundRGB(lbl, 96, 132, 152); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); /////////////////////////////////////////////////////// //tb = MCreateTableForm(obj, 3); tb = MCreateTableForm(DAS.Gui.ConfigPanel.tbavg, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Automatic ARange for AVG ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); //MObjectSetCompositeWidth(lbl, 200); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_AVGAutoR_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.avgautor == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_AVGAutoR_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.avgautor == 0) MRButtonActivate(rb); //tb = MCreateTableForm(obj, 2); tb = MCreateTableForm(DAS.Gui.ConfigPanel.tbavg, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.FixTExp = MCreateRButton(tb, "Fix TExp. ", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.FixTExp, DB_RadioAvgModeCB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.FixTExp, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.FixTExp, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.FixTExp, 85); DAS.Gui.ConfigPanel.FixMeasNum = MCreateRButton(tb, "Fix Meas. Number", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.FixMeasNum, DB_RadioAvgModeCB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.FixMeasNum, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.FixMeasNum, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.FixMeasNum, 123); if(DAS.DOption.avgmode) { DAS.Gui.ConfigPanel.lblAvg = MCreateLabel(tb, "TOT Exposure Time :", FIXED_SMALL); MLabelSetAlignment(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblAvg, 255, 255, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblAvg, 0); MObjectSetResize(DAS.Gui.ConfigPanel.lblAvg, False, False); MObjectAlign(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d", TOTTEXP); DAS.Gui.ConfigPanel.n_avg = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.n_avg, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.n_avg, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.n_avg, 35); MObjectAlign(DAS.Gui.ConfigPanel.n_avg, LEFT_ALIGN, TOP_ALIGN); k = 111; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.n_avg, ActEditCB, p); MRButtonActivate(DAS.Gui.ConfigPanel.FixTExp); } else { DAS.Gui.ConfigPanel.lblAvg = MCreateLabel(tb, "Repeat measure for: ", FIXED_SMALL); MLabelSetAlignment(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblAvg, 255, 255, 255); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblAvg, 0); MObjectSetResize(DAS.Gui.ConfigPanel.lblAvg, False, False); MObjectAlign(DAS.Gui.ConfigPanel.lblAvg, LEFT_ALIGN, TOP_ALIGN); sprintf(buf, "%d",N_AVG); DAS.Gui.ConfigPanel.n_avg = MCreateClippedEdit(tb, " ", 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.n_avg, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.n_avg, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.n_avg, 35); MObjectAlign(DAS.Gui.ConfigPanel.n_avg, LEFT_ALIGN, TOP_ALIGN); k = 111; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.n_avg, ActEditCB, p); MRButtonActivate(DAS.Gui.ConfigPanel.FixMeasNum); } /***************************************************************************/ /*********** END AVERAGING SECTION *******************************/ /***************************************************************************/ /***************************************************************************/ /*********** START MEASURING mode SECTION *******************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "MEASURING MODE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetBackgroundRGB(lbl, 96, 132, 152); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); //table for selecting Single or Averaged measurements tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "SINGLE", FIXED_SMALL); MPButtonSetCallback(rb, DB_MeasMode_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.measmode == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "AVERAGE", FIXED_SMALL); MPButtonSetCallback(rb, DB_MeasMode_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.measmode == 1) MRButtonActivate(rb); /***************************************************************************/ /*********** END MEASURING mode SECTION *******************************/ /***************************************************************************/ /*******************************************************************************/ /************* START Defective Pixel Correction SECTION ***********************/ /*******************************************************************************/ lbl = MCreateLabel(obj, "DEFECTIVE PIXELS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); pb = MCreatePButton(tb, "Map UNDER Exp", FIXED_SMALL); MPButtonSetCallback(pb, UnderOverPixCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); //MObjectSetCompositeWidth(pb, 250); pb = MCreatePButton(tb, "Map OVER Exp (T=0)", FIXED_SMALL); MPButtonSetCallback(pb, UnderOverPixCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); //MObjectSetCompositeWidth(pb, 220); pb = MCreatePButton(tb, "Map OVER Exp (T=5)", FIXED_SMALL); MPButtonSetCallback(pb, UnderOverPixCB, (void *) 2); MObjectSetBackgroundRGB(pb, 224, 224, 176); //MObjectSetCompositeWidth(pb, 220); lbl = MCreateLabel(obj, "Defective Pixel Correction:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 220); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbCorrPix[0] = MCreateRButton(tb, "DISABLE", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbCorrPix[0], DB_RadioPixCorrCB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbCorrPix[0], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbCorrPix[0], 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbCorrPix[0], 85); DAS.Gui.ConfigPanel.rbCorrPix[1] = MCreateRButton(tb, "ENABLE", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbCorrPix[1], DB_RadioPixCorrCB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbCorrPix[1], RIGHT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbCorrPix[1], 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbCorrPix[1], 123); colform = MCreateColForm(obj); MObjectSetBackgroundRGB(colform, 112, 128, 112); MObjectSetResize(colform, True, False); DAS.Gui.ConfigPanel.lblCorrPixF = MCreateLabel(colform, DAS.DOption.DEFPIXFILENAME, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblCorrPixF, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblCorrPixF, 96, 132, 152); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblCorrPixF, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); //MObjectSetCompositeWidth(lbl, 220); DAS.Gui.ConfigPanel.pbBrowseCorrPixF = MCreatePButton(colform, "...", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, SelDefPixFileCB, (void *) 0); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, 224, 224, 176); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, 30); MObjectAlign(DAS.Gui.ConfigPanel.pbBrowseCorrPixF, RIGHT_ALIGN, TOP_ALIGN); if(!DAS.DOption.pixcorr) MRButtonActivate(DAS.Gui.ConfigPanel.rbCorrPix[0]); if(DAS.DOption.pixcorr) MRButtonActivate(DAS.Gui.ConfigPanel.rbCorrPix[1]); /*******************************************************************************/ /************* END Defective Pixel Correction SECTION ***********************/ /*******************************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 2nd page of the option page void CONFP_opt_page2(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT pb, rb ; MOBJECT lbl; MOBJECT tb ; // generic table object char buf[64]; int i,k, *p; MObjectSetText(obj, "Page 2"); /***************************************************************************/ /***************************************************************************/ /*********** START DARK MEASUREMENT SECTION *******************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "DARK IMAGE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Remove Dark from Measurements ? ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.DOption.darkremove) MRButtonActivate(rb); MPButtonSetCallback(rb, DB_RadioDarkCB, (void *) 1); rb = MCreateRButton(tb, "No", FIXED_SMALL); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if(!DAS.DOption.darkremove) MRButtonActivate(rb); MPButtonSetCallback(rb, DB_RadioDarkCB, (void *) 0); lbl = MCreateLabel(obj, "Dark Source", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.FFDark = MCreateRButton(tb, "Full Frame", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.FFDark, DB_RadDrkSourceCB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.FFDark, LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.FFDark, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.FFDark, 85); // if(DAS.DOption.darkremove) if(DAS.DOption.darksource) MRButtonActivate(DAS.Gui.ConfigPanel.FFDark); DAS.Gui.ConfigPanel.BPDark = MCreateRButton(tb, "Blind Pixels", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.BPDark, DB_RadDrkSourceCB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.BPDark, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.BPDark, 255, 255, 255); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.BPDark, 123); // if(DAS.DOption.darkremove) if(!DAS.DOption.darksource) MRButtonActivate(DAS.Gui.ConfigPanel.BPDark); if (DAS.DOption.darkremove==0) { MObjectSetUnsensitive(DAS.Gui.ConfigPanel.FFDark); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.BPDark); } else { MObjectSetSensitive(DAS.Gui.ConfigPanel.FFDark); MObjectSetSensitive(DAS.Gui.ConfigPanel.BPDark); } /***************************************************************************/ /*********** END DARK MEASUREMENT SECTION ****************************/ /***************************************************************************/ /*---------------------------------------------------------------*/ /***************************************************************************/ /*********** START CCD TARGET TEMPERATURE SECTION *********************/ /***************************************************************************/ lbl = MCreateLabel(obj, "CCD TARGET TEMPERATURE", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "FIXED", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetCCDTargetTempCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(!FLAG.settempvar) MRButtonActivate(rb); rb = MCreateRButton(tb, "SZA DRIVED", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetCCDTargetTempCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if(FLAG.settempvar) MRButtonActivate(rb); /***************************************************************************/ /*********** END CCD TARGET TEMPERATURE SECTION *********************/ /***************************************************************************/ /*-----------------------------------------------------------------------*/ /***************************************************************************/ /***************************************************************************/ /************** START AUTORANGING SECTION ************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "AUTORANGING", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); //MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Max Autoranging value (<= 63000) ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); //MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%d",DAS.DOption.maxlvlar); DAS.Gui.ConfigPanel.edmaxlvlar = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edmaxlvlar, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edmaxlvlar, 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edmaxlvlar, LEFT_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.edmaxlvlar, 50); k = 600; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.edmaxlvlar, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.edmaxlvlar, ActEditCB, p); /***************************************************************************/ /************** STOP AUTORANGING SECTION ************************/ /***************************************************************************/ /***************************************************************************/ /***************************************************************************/ /************** START CONFIGURATION FILES SECTION ************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "CONFIG FILES", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "View/Modify", FIXED_SMALL); MPButtonSetCallback(rb, DB_VMRsfCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if(!FLAG.VMRsf) MRButtonActivate(rb); rb= MCreateRButton(tb, "ReLoad", FIXED_SMALL); MPButtonSetCallback(rb, DB_VMRsfCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); MObjectSetUnsensitive(rb); if(FLAG.VMRsf) MRButtonActivate(rb); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); pb = MCreatePButton(tb, "Param.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "DASSysColor.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "Options.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 2); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "ccd_defect_Danbo.cor", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 3); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "GeoCoord.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 4); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "AMS.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 6); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "Equipment.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 7); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "WlStep.INI", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 8); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); pb = MCreatePButton(tb, "Free Editor", FIXED_SMALL); MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 5); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 150); /***************************************************************************/ /************** END CONFIGURATION FILES SECTION ************************/ /***************************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 3rd page of the option page void CONFP_opt_page3(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT rb ; MOBJECT lbl; MOBJECT tb ; // generic table object int k, *p; char buf[64]; MObjectSetText(obj, "Page 3"); /***************************************************************************/ /***************************************************************************/ /******************* START PLOT OPTIONS SECTION **********************/ /***************************************************************************/ lbl = MCreateLabel(obj, "PLOT OPTIONS", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "X Axis Units", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "PIXEL", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(FLAG.Wl == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "WAVEL [A]", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(FLAG.Wl == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "WAVEL [nm]", FIXED_SMALL); MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(FLAG.Wl == 2) MRButtonActivate(rb); /* if(FLAG.Wl == 0) MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[0]); else if(FLAG.Wl == 1) MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[1]); else if(FLAG.Wl == 2) MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[2]); */ /*----------------- DISPLAY or NOT Plot after measurement -----------------*/ lbl = MCreateLabel(obj, "Display PLOT after measurement ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 300); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "No ", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotDisplayCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if(DAS.Flag.plotW == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotDisplayCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(DAS.Flag.plotW == 1) MRButtonActivate(rb); /* if(FLAG.plotW == 0) MRButtonActivate(DAS.Gui.ConfigPanel.PlotDisp[0]); else if(FLAG.plotW == 1) MRButtonActivate(DAS.Gui.ConfigPanel.PlotDisp[1]); */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " Y Axis", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Full Range", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotYAxisCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); MObjectSetResize(rb, True, False); if(FLAG.plotYRange == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Min/Max", FIXED_SMALL); MPButtonSetCallback(rb, DB_PlotYAxisCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); MObjectSetResize(rb, True, False); if(FLAG.plotYRange == 1) MRButtonActivate(rb); /* if(FLAG.plotYRange == 0) MRButtonActivate(DAS.Gui.ConfigPanel.PlotYAxis[0]); else if(FLAG.plotYRange == 1) MRButtonActivate(DAS.Gui.ConfigPanel.PlotYAxis[1]); /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*-------------------------------------------------------------------------*/ /* Hidden Lines section */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " Hidden lines ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Before Central Line ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%d",DAS.DOption.hlinebefore); DAS.Gui.ConfigPanel.HiddenL = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.HiddenL, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.HiddenL, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.HiddenL, 35); MObjectAlign(DAS.Gui.ConfigPanel.HiddenL, LEFT_ALIGN, TOP_ALIGN); k = 130; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.HiddenL, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.HiddenL, ActEditCB, p); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "After Central Line ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%d",DAS.DOption.hlineafter); DAS.Gui.ConfigPanel.HiddenL = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.HiddenL, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.HiddenL, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.HiddenL, 35); MObjectAlign(DAS.Gui.ConfigPanel.HiddenL, LEFT_ALIGN, TOP_ALIGN); k = 135; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.HiddenL, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.HiddenL, ActEditCB, p); /*-------------------------------------------------------------------------*/ /* Blind Pixel section */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " Display Blind Pixel? ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_DispBlindPixCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); MObjectSetResize(rb, True, False); if(FLAG.DispBlindPix == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_DispBlindPixCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); MObjectSetResize(rb, True, False); if(FLAG.DispBlindPix == 1) MRButtonActivate(rb); /*-------------------------------------------------------------------------*/ /***************************************************************************/ /******************* END PLOT OPTIONS SECTION **********************/ /***************************************************************************/ /*-------------------------------------------------------------------------*/ /* SZA Limit section */ /*-------------------------------------------------------------------------*/ lbl = MCreateLabel(obj, " SZA Limit ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Perform Measurements for SZA <= ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%d",SZAMax); DAS.Gui.ConfigPanel.SZAMax = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SZAMax, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SZAMax, 40, 96, 72); MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.SZAMax, 35); MObjectAlign(DAS.Gui.ConfigPanel.SZAMax, LEFT_ALIGN, TOP_ALIGN); k = 120; p = (void *) k; MEditSetValCallback(DAS.Gui.ConfigPanel.SZAMax, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.SZAMax, ActEditCB, p); lbl = MCreateLabel(tb, " ° ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); /**************************************************************/ /***************************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 4th page of the option page void CONFP_opt_page4(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT pb, rb ; MOBJECT lbl; MOBJECT tb ; // generic table object int k, *p; char buf[64]; MObjectSetText(obj, "Page 4"); /***************************************************************************/ /******************* BACK-UP SECTION *************************/ /***************************************************************************/ lbl = MCreateLabel(obj, "BACK-UP OPTIONS", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Perform FTP Back-Up", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFTPCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 85); if (DAS.DOption.ftpbackup) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_RadioFTPCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 123); if (!DAS.DOption.ftpbackup) MRButtonActivate(rb); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Server FTP Address:", FIXED_SMALL); MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%s",DFTP.ftpserver); DFTP.edServerFTP = MCreateClippedEdit(tb, buf, 15, 15, FIXED_SMALL); MObjectSetForegroundRGB(DFTP.edServerFTP, 255, 255, 255); MObjectSetBackgroundRGB(DFTP.edServerFTP, 40, 96, 72); // MObjectSetCompositeWidth(DFTP.edServerFTP, 35); MObjectAlign(DFTP.edServerFTP, RIGHT_ALIGN, TOP_ALIGN); k = 200; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DFTP.edServerFTP, ActEditCB, p); if (!DAS.DOption.ftpbackup) MEditEnableEditing(DFTP.edServerFTP); lbl = MCreateLabel(tb, "UserName:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%s",DFTP.ftpuser); DFTP.edid = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DFTP.edid, 255, 255, 255); MObjectSetBackgroundRGB(DFTP.edid, 40, 96, 72); // MObjectSetCompositeWidth(DFTP.edid, 35); MObjectAlign(DFTP.edid, RIGHT_ALIGN, TOP_ALIGN); k = 210; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DFTP.edid, ActEditCB, p); lbl = MCreateLabel(tb, "PWD:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); sprintf(buf, "%s",DFTP.ftppwd); DFTP.edpwd= MCreateHiddenEdit(tb, buf, 10, FIXED_SMALL, '*'); MObjectSetForegroundRGB(DFTP.edpwd, 255, 255, 255); MObjectSetBackgroundRGB(DFTP.edpwd, 40, 96, 72); // MObjectSetCompositeWidth(DFTP.edpwd, 35); MObjectAlign(DFTP.edpwd, RIGHT_ALIGN, TOP_ALIGN); k = 220; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DFTP.edpwd, ActEditCB, p); /* if (DAS.DOption.ftpbackup) MRButtonActivate(DFTP.rb[0]); else MRButtonActivate(DFTP.rb[1]); */ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); pb = MCreatePButton(tb, "Save FTP.INI", FIXED_SMALL); MPButtonSetCallback(pb, PbftpCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 94); pb = MCreatePButton(tb, "Test FTP", FIXED_SMALL); MPButtonSetCallback(pb, PbftpCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 94); /***************************************************************************/ /**************** OMU Thermo-regulation SECTION ***********************/ /***************************************************************************/ lbl = MCreateLabel(obj, "OMU THERMO-REGULATION", FIXED_SMALL); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Choose the Reference temp", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 200); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Pelt. Int.", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.refertemp == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Optic", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.refertemp == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "Grating", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.refertemp == 2) MRButtonActivate(rb); lbl = MCreateLabel(obj, "Choose the Thermo-regulation mode", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Cold only", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 3); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(OMUTHR.TRType == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "Heat only", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 4); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(OMUTHR.TRType == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "Cold/Heat", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 5); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(OMUTHR.TRType == 2) MRButtonActivate(rb); /***************/ lbl = MCreateLabel(obj, "Choose the Thermo-reg. Algorithm", FIXED_SMALL); MObjectAlign(lbl,CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); rb = MCreateRButton(tb, "Progressive", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 6); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 100); if(OMUTHR.PID_On == 0) MRButtonActivate(rb); rb = MCreateRButton(tb, "PID", FIXED_SMALL); MPButtonSetCallback(rb, DB_TempHistCB, (void *) 7); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetCompositeWidth(rb, 90); if(OMUTHR.PID_On == 1) MRButtonActivate(rb); if(OMUTHR.PID_On == 1) //Create the field for PID Parameters { tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(tb, "Prop.", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 90); lbl = MCreateLabel(tb, "Integral", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 90); lbl = MCreateLabel(tb, "Deriv.", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 112, 128, 112); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 90); sprintf(buf, "%.1lf",OMUTHR.PID_kp); DAS.Gui.ConfigPanel.PID_edt[0] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[0], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.PID_edt[0], 40, 96, 72); k = 500; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.PID_edt[0], ActEditCB, p); sprintf(buf, "%.3lf",OMUTHR.PID_ki); DAS.Gui.ConfigPanel.PID_edt[1] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[1], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.PID_edt[1], 40, 96, 72); k = 501; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.PID_edt[1], ActEditCB, p); sprintf(buf, "%.4lf",OMUTHR.PID_kd); DAS.Gui.ConfigPanel.PID_edt[2] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[2], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.PID_edt[2], 40, 96, 72); k = 502; p = (void *) k; // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p); MEditSetActCallback(DAS.Gui.ConfigPanel.PID_edt[2], ActEditCB, p); } pb = MCreatePButton(obj, "Temp History", FIXED_SMALL); MPButtonSetCallback(pb, PBTempHistoCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 123); /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } // create the 5th page of the option page void CONFP_opt_page5(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form MOBJECT rb ; MOBJECT lbl; MOBJECT tb,tb1 ; // generic table object // int i,k, *p; // char buf[64]; MObjectSetText(obj, "Page 5"); lbl = MCreateLabel(obj, "MIRROR IMAGE", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb1 = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb1, 112, 128, 112); MObjectSetResize(tb1, True, False); lbl = MCreateLabel(tb1, "Along the X Axis ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); lbl = MCreateLabel(tb1, "Along the Y Axis ?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(tb1, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.mirrorimg[XAX] == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.mirrorimg[XAX] == 0) MRButtonActivate(rb); tb = MCreateTableForm(tb1, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 2); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.mirrorimg[YAX] == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 3); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); // MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.mirrorimg[YAX] == 0) MRButtonActivate(rb); lbl = MCreateLabel(obj, "AMS OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Positioning Mode", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Simultaneous", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSposmode_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.smposmode == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "Sequential", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSposmode_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.smposmode == 0) MRButtonActivate(rb); lbl = MCreateLabel(obj, "Display progression bars?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); rb = MCreateRButton(tb, "Yes", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSProgBar_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.amsprogbar == 1) MRButtonActivate(rb); rb = MCreateRButton(tb, "No", FIXED_SMALL); MPButtonSetCallback(rb, DB_AMSProgBar_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.amsprogbar == 0) MRButtonActivate(rb); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ lbl = MCreateLabel(obj, "MIGE Platform OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "MIGE Status", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbMIGEStatus[0]=MCreateRButton(tb, "NOT Connected", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEStatus[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEStatus[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEStatus[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.linked == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[0]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEStatus[0], DB_MIGE_CB, (void *) 0); DAS.Gui.ConfigPanel.rbMIGEStatus[1] = MCreateRButton(tb, "Connected", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEStatus[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEStatus[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEStatus[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.linked == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[1]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEStatus[1], DB_MIGE_CB, (void *) 1); lbl = MCreateLabel(obj, "MIGE Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbMIGEtype[0] = MCreateRButton(tb, "Ver. 0.5", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEtype[0], DB_MIGEType_CB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEtype[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEtype[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEtype[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.type == 0 ) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEtype[0]); DAS.Gui.ConfigPanel.rbMIGEtype[1] = MCreateRButton(tb, "Ver. 1.5", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEtype[1], DB_MIGEType_CB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEtype[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEtype[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEtype[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.type == 1 ) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEtype[1]); DAS.Gui.ConfigPanel.rbMIGEtype[2] = MCreateRButton(tb, "Ver. 2.0", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEtype[2], DB_MIGEType_CB, (void *) 2); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEtype[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEtype[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEtype[2], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.MIGE.type == 2 ) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEtype[2]); lbl = MCreateLabel(obj, "Operating mode", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbMIGEopmode[0] = MCreateRButton(tb, "Solar Tracker", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEopmode[0], DB_MIGEopmode_CB, (void *) 0); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEopmode[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEopmode[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEopmode[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.aaopmode == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEopmode[0]); DAS.Gui.ConfigPanel.rbMIGEopmode[1] = MCreateRButton(tb, "Anti Solar Tracker", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEopmode[1], DB_MIGEopmode_CB, (void *) 1); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEopmode[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEopmode[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEopmode[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.aaopmode == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEopmode[1]); DAS.Gui.ConfigPanel.rbMIGEopmode[2] = MCreateRButton(tb, "Free positions", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbMIGEopmode[2], DB_MIGEopmode_CB, (void *) 2); MObjectAlign(DAS.Gui.ConfigPanel.rbMIGEopmode[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEopmode[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbMIGEopmode[2], True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.aaopmode == 2) MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEopmode[2]); if(DAS.MIGE.linked == 0) { MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[1]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[2]); } else MRButtonActivate(DAS.Gui.ConfigPanel.rbMIGEStatus[1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbMIGEopmode[2]); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } void edtDASReset_CB(MOBJECT p, LIST_ACT *la, void *ad) { int c = (int) ad; int er = 0; DAS.DOption.resetFreq = atoi(la->item); } void DB_ResetEnable_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v; // char buff[64], str[32]; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case 0: DAS.DOption.resetEnabled = 0; MObjectSetUnsensitive(DAS.Gui.ConfigPanel.listReset); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.edtDASReset); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.lblReset); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbDASResPer[0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbDASResPer[1]); break; case 1: DAS.DOption.resetEnabled = 1; MObjectSetSensitive(DAS.Gui.ConfigPanel.listReset); MObjectSetSensitive(DAS.Gui.ConfigPanel.edtDASReset); MObjectSetSensitive(DAS.Gui.ConfigPanel.lblReset); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbDASResPer[0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbDASResPer[1]); break; } } } void DB_ResetType_CB(MOBJECT o, void *a, void *v) { int er = 0; int c = (int) v,i,k; char buff[64], str[32]; LIST_ACT * pla; er = MRButtonGetActivationStatus(o); if(er) { switch (c) { case RHOUR: DAS.DOption.resetType = RHOUR; if (DAS.Gui.ConfigPanel.lblReset != 0) { sprintf(buff, "%d", (int)DAS.DOption.resetFreq); MSListClear(DAS.Gui.ConfigPanel.listReset); for(i=1; i<24; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(DAS.Gui.ConfigPanel.listReset, k-1); pla = MSListGetSelected(DAS.Gui.ConfigPanel.listReset); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDASReset, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDASReset, edtDASReset_CB, (void *) 0); DAS.DOption.resetFreq = atoi(pla->item); sprintf(buff, "Hour(s)"); MObjectSetText(DAS.Gui.ConfigPanel.lblReset, buff); } break; case RDAY: DAS.DOption.resetType = RDAY; if (DAS.Gui.ConfigPanel.lblReset != 0) { sprintf(buff, "%d", (int)DAS.DOption.resetFreq); MSListClear(DAS.Gui.ConfigPanel.listReset); for(i=1; i<365; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(DAS.Gui.ConfigPanel.listReset, k-1); pla = MSListGetSelected(DAS.Gui.ConfigPanel.listReset); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDASReset, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDASReset, edtDASReset_CB, (void *) 0); DAS.DOption.resetFreq = atoi(pla->item); sprintf(buff, "Day(s)"); MObjectSetText(DAS.Gui.ConfigPanel.lblReset, buff); } break; } } } // create the 7th page of the option page void CONFP_opt_page7(int mod, MOBJECT obj) { // MOBJECT rowform; // generic row form // MOBJECT pb, rb ; MOBJECT lbl; MOBJECT tb; // generic table object int i,k; // char buf[64]; // MOBJECT list; // int starti; float f=0; char str[80]; char buff[_MAX_PATH]; LIST_ACT * pla; MObjectSetText(obj, "Page 7"); /******************************************************************/ /*************** SHUTTER ******************************************/ /******************************************************************/ lbl = MCreateLabel(obj, "SHUTTER OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Is the EMShutter Installed?", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbSHUTStatus[0] = MCreateRButton(tb, "Yes", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTStatus[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTStatus[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTStatus[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.emshutter == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTStatus[0]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTStatus[0], DB_Shutter_CB, (void *) 1); DAS.Gui.ConfigPanel.rbSHUTStatus[1] = MCreateRButton(tb, "No", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , True, False); //MObjectSetCompositeWidth(rb, 90); if(DAS.DOption.emshutter == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTStatus[1] ); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , DB_Shutter_CB, (void *) 0); lbl = MCreateLabel(obj, "Choose Shutter Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbSHUTType [0] = MCreateRButton(tb, "UniBlitz VS25", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTType [0], DB_ShutterType_CB, (void *) VS25); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTType [0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTType [0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTType [0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.shuttertype == VS25) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTType [0]); DAS.Gui.ConfigPanel.rbSHUTType [1] = MCreateRButton(tb, "Rotating Sh.", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTType [1], DB_ShutterType_CB, (void *) ROTSHUT); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTType [1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTType [1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTType [1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.shuttertype == ROTSHUT) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTType [1]); DAS.Gui.ConfigPanel.rbSHUTType[2] = MCreateRButton(tb, "Torque Motor", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbSHUTType[2], DB_ShutterType_CB, (void *) TORQUEM); MObjectAlign(DAS.Gui.ConfigPanel.rbSHUTType[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTType[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbSHUTType[2], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.shuttertype == TORQUEM) MRButtonActivate(DAS.Gui.ConfigPanel.rbSHUTType[2]); if(DAS.DOption.emshutter == 0) { MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } else { MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } /******************************************************************/ /*************** END SHUTTER **************************************/ /******************************************************************/ /******************************************************************/ /*************** FILTER WHEEL *************************************/ /******************************************************************/ lbl = MCreateLabel(obj, "FILTER WHEEL OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); lbl = MCreateLabel(obj, "Choose Installed Module", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbFilterType [0] = MCreateRButton(tb, "Simple-SM3", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbFilterType [0], DB_FilterType_CB, (void *) FSIMPLE); MObjectAlign(DAS.Gui.ConfigPanel.rbFilterType [0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbFilterType [0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbFilterType [0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.filtertype == FSIMPLE) MRButtonActivate(DAS.Gui.ConfigPanel.rbFilterType [0]); DAS.Gui.ConfigPanel.rbFilterType [1] = MCreateRButton(tb, "Double-SM3+SM4", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbFilterType [1], DB_FilterType_CB, (void *) FDOUBLE); MObjectAlign(DAS.Gui.ConfigPanel.rbFilterType [1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbFilterType [1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbFilterType [1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.filtertype == FDOUBLE) MRButtonActivate(DAS.Gui.ConfigPanel.rbFilterType [1]); DAS.Gui.ConfigPanel.rbFilterType[2] = MCreateRButton(tb, "Plus-SM3+TM", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbFilterType[2], DB_FilterType_CB, (void *) FPLUS); MObjectAlign(DAS.Gui.ConfigPanel.rbFilterType[2], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbFilterType[2], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbFilterType[2], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.filtertype == FPLUS) MRButtonActivate(DAS.Gui.ConfigPanel.rbFilterType[2]); /* if(DAS.DOption.emshutter == 0) { MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } else { MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]); MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]); } */ /******************************************************************/ /*************** END FILTER WHEEL ********************************/ /******************************************************************/ /******************************************************************/ /*************** RESET DAS Windows Restart ***********************/ /******************************************************************/ lbl = MCreateLabel(obj, "RESET WINDOWS OPTIONS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); /*----------------------------------------------------------------*/ lbl = MCreateLabel(obj, "DAS/SYSTEM Reset ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbResetEnab[0] = MCreateRButton(tb, "Disabled", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbResetEnab[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbResetEnab[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbResetEnab[0], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.resetEnabled == 0) MRButtonActivate(DAS.Gui.ConfigPanel.rbResetEnab[0]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbResetEnab[0], DB_ResetEnable_CB, (void *) 0); DAS.Gui.ConfigPanel.rbResetEnab[1] = MCreateRButton(tb, "Enabled", FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.rbResetEnab[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbResetEnab[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbResetEnab[1], True, False); //MObjectSetCompositeWidth(rb, 100); if(DAS.DOption.resetEnabled == 1) MRButtonActivate(DAS.Gui.ConfigPanel.rbResetEnab[1]); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbResetEnab[1], DB_ResetEnable_CB, (void *) 1); /*----------------------------------------------------------------*/ lbl = MCreateLabel(obj, "Reset Type", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.rbDASResPer[0] = MCreateRButton(tb, "HOUR(s)", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDASResPer[0], DB_ResetType_CB, (void *) RHOUR); MObjectAlign(DAS.Gui.ConfigPanel.rbDASResPer[0], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDASResPer[0], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbDASResPer[0], True, False); //MObjectSetCompositeWidth(rb, 100); DAS.Gui.ConfigPanel.rbDASResPer[1] = MCreateRButton(tb, "DAY(s)", FIXED_SMALL); MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDASResPer[1], DB_ResetType_CB, (void *) RDAY); MObjectAlign(DAS.Gui.ConfigPanel.rbDASResPer[1], LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDASResPer[1], 255, 255, 255); MObjectSetResize(DAS.Gui.ConfigPanel.rbDASResPer[1], True, False); //MObjectSetCompositeWidth(rb, 100); lbl = MCreateLabel(obj, "Reset Frequency", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); tb = MCreateTableForm(obj, 3); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Re-start every ", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); //MObjectSetCompositeWidth(lbl, 250); sprintf(buff, "%d", (int)DAS.DOption.resetFreq); DAS.Gui.ConfigPanel.edtDASReset = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtDASReset, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtDASReset, 40, 96, 72); MObjectAlign(DAS.Gui.ConfigPanel.edtDASReset, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.edtDASReset); DAS.Gui.ConfigPanel.listReset = MOptionEditGetList(DAS.Gui.ConfigPanel.edtDASReset); if (DAS.DOption.resetType) // Days { for(i=1; i<365; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } } else //hours { for(i=1; i<24; i++) { sprintf(str, "%.d",i); MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } } /* list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtDSZA); for(i=0; i<20; i++) { f = f+0.10; sprintf(str, "%.3f",f); MSListAddItem(list, str, 0L); if( strcmp(str,buff) ==0 ) k=i; } MSListSelectElement(list, k); pla = MSListGetSelected(list); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDSZA, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDSZA, edtDSZA_CB, (void *) 0); SZADelta.DeltaSZA = atof(pla->item); */ MSListSelectElement(DAS.Gui.ConfigPanel.listReset, k-1); pla = MSListGetSelected(DAS.Gui.ConfigPanel.listReset); sprintf(str, "%s", pla->item ); MObjectSetText(DAS.Gui.ConfigPanel.edtDASReset, str); MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDASReset, edtDASReset_CB, (void *) 0); DAS.DOption.resetFreq = atoi(pla->item); if (DAS.DOption.resetType) // Days sprintf(buff, "Day(s)", DAS.DOption.resetFreq); else sprintf(buff, "Hour(s)", DAS.DOption.resetFreq); DAS.Gui.ConfigPanel.lblReset = MCreateLabel(tb, buff, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblReset, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblReset, 96, 132, 152); MObjectSetTransparency(DAS.Gui.ConfigPanel.lblReset, 0); MObjectSetShadow(DAS.Gui.ConfigPanel.lblReset, WS_ETCHED_IN, 1, 1); if(DAS.DOption.resetType == RHOUR) MRButtonActivate(DAS.Gui.ConfigPanel.rbDASResPer[0]); if(DAS.DOption.resetType == RDAY) MRButtonActivate(DAS.Gui.ConfigPanel.rbDASResPer[1]); /******************************************************************/ /*************** END RESET DAS ********************************/ /******************************************************************/ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } void CONFP_opt_ScheMeas(int mod, MOBJECT p) { // MOBJECT rowform; // generic row form MOBJECT rowform1; MOBJECT colform, colform2,colform3,colform4; MOBJECT rb ; MOBJECT lbl, list, optedit; // MOBJECT tb ; // generic table object int i; int lenedit = 12; char buf[64]; int maxangle; if (mod == 1) maxangle = 181; else maxangle = 96; colform = MCreateColForm(p); MFormSetSpacing(colform, 0); MObjectSetResize(colform, False, False); MObjectAlign(colform, CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform, 255); MObjectSetShadow(colform, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, True); MObjectAlign(rowform1, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(rowform1, 255); MObjectSetShadow(rowform1, WS_NONE, 0, 0); rb = MCreateRButton(rowform1, "", FIXED_SMALL); // MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetTransparency(rb, 255); MObjectSetResize(rb, True, False); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 1) // MRButtonActivate(rb); rb = MCreateRButton(rowform1, "", FIXED_SMALL); // MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); MObjectSetTransparency(rb, 255); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 0) // MRButtonActivate(rb); colform2 = MCreateColForm(colform); MFormSetSpacing(colform2, 0); MObjectSetResize(colform2, False, False); MObjectSetTransparency(colform2, 255); MObjectSetShadow(colform2, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform2); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, False); MObjectSetShadow(rowform1, WS_NONE, 0, 0); MObjectSetTransparency(rowform1, 255); colform3 = MCreateColForm(rowform1); MFormSetSpacing(colform3, 0); MObjectSetResize(colform3, False, False); MObjectAlign(colform3, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform3, 255); MObjectSetShadow(colform3, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); lbl = MCreateLabel(colform3, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, False, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } if (mod == 1) MSListSelectElement(list, 180); else MSListSelectElement(list, 95); colform4 = MCreateColForm(rowform1); MFormSetSpacing(colform4, 0); MObjectSetTransparency(colform4, 255); MObjectSetShadow(colform4, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); sprintf(buf, "<SZA<"); lbl = MCreateLabel(colform4, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "50"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 50); lbl = MCreateLabel(colform4, "OR", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "75"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 75); lbl = MCreateLabel(colform4, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<maxangle; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } if (mod == 1) MSListSelectElement(list, 180); else MSListSelectElement(list, 95); } // create the 6th page of the option page void CONFP_opt_page6(int mod, MOBJECT obj) { MOBJECT rowform; // generic row form // MOBJECT colform, colform1,colform2,colform3,colform4; // MOBJECT pb, rb ; MOBJECT lbl, list, optedit; MOBJECT tb ; // generic table object int i; int lenedit = 12; char buf[64], str[16]; unsigned char lesseq = 242, greateq=241; MObjectSetText(obj, "Page 6"); lbl = MCreateLabel(obj, "INPUTS <--> DEVICES", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); /* lbl = MCreateLabel(obj, "Input <--> Device", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ tb = MCreateTableForm(obj, 4); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, False, False); if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) sprintf(str, "%s",Mir_CodeTropo[0]); else sprintf(str, "%s",Mir_Code[0]); sprintf(buf, "%s",str); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%s",DeviceTypeInput[0]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) MSListSelectElement(list, 2); else MSListSelectElement(list, 0); sprintf(buf, "%s",Mir_Code[1]); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%s",DeviceTypeInput[6]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 1); if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) sprintf(str, "%s",Mir_CodeTropo[2]); else sprintf(str, "%s",Mir_Code[2]); sprintf(buf, "%s",str); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) sprintf(buf, "%s",DeviceTypeInput[7]); else sprintf(buf, "%s",DeviceTypeInput[2]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 ) MSListSelectElement(list, 7); else MSListSelectElement(list, 2); sprintf(buf, "%s",Mir_Code[3]); lbl = MCreateLabel(tb, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); // MObjectSetCompositeWidth(lbl, 250); sprintf(buf, "%s",DeviceTypeInput[3]); optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<8; i++) { sprintf(buf, "%s",DeviceTypeInput[i]); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 3); lbl = MCreateLabel(obj, "MEASUREMENTS SCHEDULING", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); /***************************************************************/ // 1 start rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "ZenithSky", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(0, rowform); /* colform = MCreateColForm(rowform); MFormSetSpacing(colform, 0); MObjectSetResize(colform, False, False); MObjectAlign(colform, CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform, 255); MObjectSetShadow(colform, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, True); MObjectAlign(rowform1, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(rowform1, 255); MObjectSetShadow(rowform1, WS_NONE, 0, 0); rb = MCreateRButton(rowform1, "", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 0); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetTransparency(rb, 255); MObjectSetResize(rb, True, False); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 1) // MRButtonActivate(rb); rb = MCreateRButton(rowform1, "", FIXED_SMALL); MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 1); MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN); MObjectSetForegroundRGB(rb, 255, 255, 255); MObjectSetResize(rb, True, False); MObjectSetTransparency(rb, 255); MObjectSetCompositeWidth(rb, 25); // if(DAS.DOption.mirrorimg == 0) // MRButtonActivate(rb); colform2 = MCreateColForm(colform); MFormSetSpacing(colform2, 0); MObjectSetResize(colform2, False, False); MObjectSetTransparency(colform2, 255); MObjectSetShadow(colform2, WS_NONE, 0, 0); rowform1 = MCreateRowForm(colform2); MFormSetSpacing(rowform1, 0); MObjectSetResize(rowform1, False, False); MObjectSetShadow(rowform1, WS_NONE, 0, 0); MObjectSetTransparency(rowform1, 255); colform3 = MCreateColForm(rowform1); MFormSetSpacing(colform3, 0); MObjectSetResize(colform3, False, False); MObjectAlign(colform3, LEFT_ALIGN, TOP_ALIGN); MObjectSetTransparency(colform3, 255); MObjectSetShadow(colform3, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); lbl = MCreateLabel(colform3, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, False, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 95); colform4 = MCreateColForm(rowform1); MFormSetSpacing(colform4, 0); MObjectSetTransparency(colform4, 255); MObjectSetShadow(colform4, WS_NONE, 0, 0); sprintf(buf, "0"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 0); sprintf(buf, "<SZA<"); lbl = MCreateLabel(colform4, buf, FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "50"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 50); lbl = MCreateLabel(colform4, "OR", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "75"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 75); lbl = MCreateLabel(colform4, "<SZA<", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetResize(lbl, True, False); sprintf(buf, "95"); optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL); MObjectSetForegroundRGB(optedit, 255, 255, 255); MObjectSetBackgroundRGB(optedit, 40, 96, 72); MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN); MEditDisableEditing(optedit); list = MOptionEditGetList(optedit); for(i=0; i<96; i++) { sprintf(buf, "%d",i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, 95); // 1 End /***************************************************************/ /***************************************************************/ // 2 start rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "Horizontal", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(1, rowform); /* lbl = MCreateLabel(obj, "Horizontal", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "Radiometric", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(0, rowform); /* lbl = MCreateLabel(obj, "Radiometric", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ rowform = MCreateRowForm(obj); MFormSetSpacing(rowform, 0); MObjectSetTransparency(rowform, 255); lbl = MCreateLabel(rowform, "Off-Axis", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); CONFP_opt_ScheMeas(0, rowform); /* lbl = MCreateLabel(obj, "Off-Axis", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 96, 132, 152); MObjectSetTransparency(lbl, 0); MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1); MObjectSetCompositeWidth(lbl, 250); */ /*---------------------------------------------------------------*/ /*------ Dummy table ---------------------------------------*/ tb = MCreateTableForm(obj, 2); MObjectSetBackgroundRGB(tb, 112, 128, 112); MObjectSetResize(tb, True, True); MObjectAlign(tb, LEFT_ALIGN, TOP_ALIGN); /*------ Dummy table ---------------------------------------*/ /*---------------------------------------------------------------*/ } //Create the Option page (with 6 sub-pages) void CONFP_Options(int mod, MOBJECT mo) { MOBJECT rowform; // generic row form MOBJECT rowform1; // generic row form // MOBJECT PFAMS; // paged form for AMS MOBJECT POPT; // paged form for AMS // MOBJECT edit; // generic edit object // MOBJECT radiobutt[2]; // generic radio button // MOBJECT RColButt; MOBJECT pb; // MOBJECT list; // MOBJECT _tbutton000; // MOBJECT _tbutton001; // MOBJECT form2; // MOBJECT lbl; MOBJECT tb; // generic table object // char buf[64]; // int *p; MObjectSetText(mo, "Options"); rowform = MCreateRowForm(mo); MObjectSetBackgroundRGB(rowform, 112, 128, 112); // MObjectSetResize(rowform, True, True); MObjectSetCompositeWidth(rowform, 400); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); POPT = MCreateTabbedRowForm(rowform, 7, FIXED_SMALL); MObjectSetForegroundRGB(POPT, 255, 255, 255); MObjectSetBackgroundRGB(POPT, 112, 128, 112); MObjectAlign(POPT, CENTER_ALIGN, TOP_ALIGN); MObjectSetCompositeWidth(POPT, 390); MObjectSetResize(POPT, False, False); //Creation page 1 CONFP_opt_page1(0, POPT); MPagedFormSetActivePage(POPT, 1); //Creation page 2 CONFP_opt_page2(0, POPT); MPagedFormSetActivePage(POPT, 2); //Creation page 3 CONFP_opt_page3(0, POPT); MPagedFormSetActivePage(POPT, 3); //Creation page 4 CONFP_opt_page4(0, POPT); MPagedFormSetActivePage(POPT, 4); //Creation page 5 CONFP_opt_page5(0, POPT); MPagedFormSetActivePage(POPT, 5); //Creation page 6 CONFP_opt_page6(0, POPT); MPagedFormSetActivePage(POPT, 6); //Creation page 7 CONFP_opt_page7(0, POPT); MPagedFormSetActivePage(POPT, 0); // Command Button Section rowform1 = MCreateRowForm(mo); MObjectSetBackgroundRGB(rowform1, 112, 128, 112); //MObjectSetResize(rowform, False, True); MObjectSetCompositeWidth(rowform1, 357); MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform1, 2); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); pb = MCreatePButton(tb, "Save", FIXED_SMALL); MPButtonSetCallback(pb, WriteOptioniniCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); } void AMS_AdvancedCB(MOBJECT o, void *od, void *ad) { char buff[_MAX_PATH]; int f; STARTUPINFO si; PROCESS_INFORMATION pi; // chdir(buff); sprintf(buff,"%s\\%s",BIL.DFILEM.HOMEDIRECTORY, "\\AMSTester50\\AMS50.exe"); // WinExec(buff, 1); // // perform the equivalent of WinExec in NT, but we use a Unicode string // memset(&si, 0, sizeof(si)); si.cb = sizeof(si); si.dwFlags= STARTF_USESHOWWINDOW; si.wShowWindow = SW_SHOW; f = CreateProcess(NULL, buff, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); // sprintf(buff,"%ss",BIL.DFILEM.HOMEDIRECTORY, "SolPosCalc"); chdir(BIL.DFILEM.HOMEDIRECTORY); } MOBJECT MDCreateDASConfig(void) { // MOBJECT _shell000; MOBJECT POCF; //Paged form for configuration panel // MOBJECT POPT; //Paged form for options MOBJECT rowform; // generic row form MOBJECT rowform1; // generic row form // MOBJECT PFAMS; // paged form for AMS // MOBJECT edit; // generic edit object // MOBJECT radiobutt[2]; // generic radio button MOBJECT RColButt; MOBJECT pb; // generic push button // MOBJECT rb; // generic radio button MOBJECT list; MOBJECT _tbutton000; MOBJECT _tbutton001; MOBJECT form2; MOBJECT label, lbl; MOBJECT tb; // generic table object // MOBJECT frm2_tb4; int r, g, b; int i; char buf[64]; // double percentuale,speedhz; const char *fontfamily; // struct confp *pconfp; LoadGeoDB(); MGetDefaultBackgroundRGB(&r, &g, &b); drawarea_bgc = MAllocColor(r, g, b); /********************************************************/ /************* MAIN SHELL *************************/ /********************************************************/ DAS.Gui.ConfigPanel.ShellConfig = MCreateShell("DAS Config", 0); MObjectSetResize(DAS.Gui.ConfigPanel.ShellConfig, True, True); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.ShellConfig, 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.ShellConfig, 96, 132, 152); MObjectSetResize(DAS.Gui.ConfigPanel.ShellConfig, True, True); MObjectAlign(DAS.Gui.ConfigPanel.ShellConfig, CENTER_ALIGN, TOP_ALIGN); // MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.ShellConfig, 670); // MObjectSetCompositeHeight(DAS.Gui.ConfigPanel.ShellConfig, 483); /********************************************************/ /************* CONFIG PAGED FORM **********************/ /********************************************************/ POCF = MCreateTabbedRowForm(DAS.Gui.ConfigPanel.ShellConfig, 6, FIXED_SMALL); MObjectSetForegroundRGB(POCF, 255, 255, 255); MObjectSetBackgroundRGB(POCF, 96, 132, 152); MObjectSetResize(POCF, True, True); MObjectAlign(POCF, CENTER_ALIGN, TOP_ALIGN); // MObjectSetCompositeWidth(POCF, 457); //457 /* Activation of POCF page 0 - Parameters*/ /* 00000000000000000000000000000000000000000000000000000000 */ MPagedFormSetActivePage(POCF, 0); // Creation page 0 - Parameters CONFP_Param(0, POCF); /* End Activation and creation of page 0 */ /* 0000000000000000000000000000000000000000000000000000000 */ /* Activation of POCF page 1 - Option */ /* 11111111111111111111111111111111111111111111111111111111 */ /* Start Creation of page 1 111111111111111111111*/ /* 11111111111111111111111111111111111111111111111111111111111111111*/ MPagedFormSetActivePage(POCF, 1); // Creation Page 1 - Options CONFP_Options(0, POCF); /* End Activation and creation of page 1 11111111111111111111*/ /* 11111111111111111111111111111111111111111111111111111111111111*/ /****************************************************************************/ /* Start Activation and creation of page 2 - Colors 2222222222*/ /* 22222222222222222222222222222222222222222222222222222222222222*/ MPagedFormSetActivePage(POCF, 2); MObjectSetText(POCF, "Colors"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(rowform, "SELECT OBJECT", FIXED_SMALL); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform, 2); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 112, 68, 72); MObjectSetResize(tb, True, False); DAS.Gui.ConfigPanel.RBColObj[0] = MCreateRButton(tb, "Unsel. Push Button", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[0], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[0], ColObjCB, (void *) 0); DAS.Gui.ConfigPanel.RBColObj[1] = MCreateRButton(tb, "Sel. Push Button", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[1], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[1], ColObjCB, (void *) 1); DAS.Gui.ConfigPanel.RBColObj[2] = MCreateRButton(tb, "Active Labels", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[2], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[2], ColObjCB, (void *) 2); DAS.Gui.ConfigPanel.RBColObj[3] = MCreateRButton(tb, "Passive LAbels", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[3], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[3], ColObjCB, (void *) 3); DAS.Gui.ConfigPanel.RBColObj[4] = MCreateRButton(tb, "Forms", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[4], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[4], ColObjCB, (void *) 4); DAS.Gui.ConfigPanel.RBColObj[5] = MCreateRButton(tb, "Capital Labels", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[5], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[5], ColObjCB, (void *) 5); if (DAS.Flag.exemode == DOASMODE ) { DAS.Gui.ConfigPanel.RBColObj[6] = MCreateRButton(tb, "Radio Button", FIXED_SMALL); MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[6], 255,255,255); MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[6], ColObjCB, (void *) 6); } /* RColButt = MCreateRButton(tb, "UnSel. Comm.", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 0); RColButt = MCreateRButton(tb, "Sel. Comm.", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 1); RColButt = MCreateRButton(tb, "Active labels", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 2); RColButt = MCreateRButton(tb, "Passive labels", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 3); RColButt = MCreateRButton(tb, "Forms", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 4); RColButt = MCreateRButton(tb, "K_labelsUP", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 5); if (DAS.Flag.exemode == DOASMODE ) { RColButt = MCreateRButton(tb, "Radio Buttons", FIXED_SMALL); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 6); } */ tb = MCreateTableForm(rowform, 2); MTableFormSetColAlign(tb, 1, LEFT_ALIGN); MObjectSetBackgroundRGB(tb, 160, 112, 112); MObjectSetResize(tb, True, False); RColButt = MCreateRButton(tb, "Background", FIXED_SMALL); MRButtonSetCallback(RColButt, (OBJ_VALUE_CB) ColPickBackForeGCB, (void *) 0); MObjectAlign(RColButt, CENTER_ALIGN, TOP_ALIGN); MRButtonActivate(RColButt); MObjectSetForegroundRGB(RColButt, 255, 255, 0); RColButt = MCreateRButton(tb, "Foreground", FIXED_SMALL); MRButtonSetCallback(RColButt, (OBJ_VALUE_CB) ColPickBackForeGCB, (void *) 1); MObjectAlign(RColButt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(RColButt, 255, 255, 0); rowform1 = MCreateRowForm(rowform); MObjectSetBackgroundRGB(rowform1 , 80, 56, 56); MObjectSetResize(rowform1 , True, True); lbl = MCreateLabel(rowform1 , "COLORS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1 , 1); MObjectSetBackgroundRGB(tb, 112, 68, 72); MObjectSetResize(tb, True, False); /******************************************/ form2 = MCreateRowForm(tb); MFormSetPrefAtt(form2, F_PREF_ATT_COL); label = MCreateLabel(form2, "Red: ", FIXED_SMALL); MObjectSetForegroundRGB(label, 255, 0, 0); r_label = MCreateLabel(form2, "000", FIXED_SMALL); MObjectSetForegroundRGB(r_label, 255, 0, 0); MObjectSetResize(label, False, False); MObjectSetResize(r_label, False, False); r_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32); MScrollBarSetPosCallback(r_sbar, DB_ChangeColorCellCB, 0L); form2 = MCreateRowForm(tb); MFormSetPrefAtt(form2, F_PREF_ATT_COL); label = MCreateLabel(form2, "Green: ", FIXED_SMALL); MObjectSetForegroundRGB(label, 0, 105, 0); g_label = MCreateLabel(form2, "000", FIXED_SMALL); MObjectSetForegroundRGB(g_label, 0, 105, 0); MObjectSetResize(label, False, False); MObjectSetResize(g_label, False, False); g_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32); MScrollBarSetPosCallback(g_sbar, DB_ChangeColorCellCB, (void *) 1); form2 = MCreateRowForm(tb); MFormSetPrefAtt(form2, F_PREF_ATT_COL); label = MCreateLabel(form2, "Blue: ", FIXED_SMALL); MObjectSetForegroundRGB(label, 0, 0, 255); b_label = MCreateLabel(form2, "000", FIXED_SMALL); MObjectSetForegroundRGB(b_label, 0, 0, 255); MObjectSetResize(label, False, False); MObjectSetResize(b_label, False, False); b_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32); MScrollBarSetPosCallback(b_sbar, DB_ChangeColorCellCB, (void *) 2); /************************************/ frm3_dr1 = MCreateDrawArea(rowform, 347, 30); MObjectSetResize(frm3_dr1, True, False); MDrawAreaSetExposeCallback(frm3_dr1, DB_CellExposeCB, 0L); MDrawAreaSetResizeCallback(frm3_dr1, DB_CellResizeCB, 0L); MObjectSetResize(frm3_dr1, True, False); r_c = g_c = b_c = 0; cell_color = MAllocCell(0, 0, 0); rowform1 = MCreateRowForm(rowform); MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(rowform1, 56, 84, 128); MObjectSetBackgroundRGB(rowform1, 112, 68, 72); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); lbl = MCreateLabel(rowform1, "COMMANDS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); pb = MCreatePButton(rowform1, "Load Palette", FIXED_SMALL); MPButtonSetCallback(pb, LoadPaletteCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); tb = MCreateTableForm(rowform1, 4); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 112, 68, 72); MObjectSetResize(tb, True, False); pb = MCreatePButton(tb, "Preview", FIXED_SMALL); MPButtonSetCallback(pb, ColorAssignCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); pb = MCreatePButton(tb, "Undo", FIXED_SMALL); MPButtonSetCallback(pb, D_UndoCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteColorsCB, (void *) 0); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); /* End Activation and creation of page 2 Colors 22222222222222222222*/ /* 22222222222222222222222222222222222222222222222222222222222222*/ /*********************** FONTS ***********************/ MPagedFormSetActivePage(POCF, 3); MObjectSetText(POCF, "Fonts"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); lbl = MCreateLabel(rowform, "SELECT OBJECT", FIXED_SMALL); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); MObjectSetCompositeWidth(lbl, 347); tb = MCreateTableForm(rowform, 2); MTableFormSetColAlign(tb, 1, LEFT_ALIGN); MObjectAlign(tb, CENTER_ALIGN, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 84, 128); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); RColButt = MCreateRButton(tb, "UnSel. Comm.", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 0); MObjectAlign(RColButt, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); MRButtonActivate(RColButt); RColButt = MCreateRButton(tb, "Sel. Comm.", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 1); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "Active labels", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 2); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "Passive labels", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 3); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "K_labelsUP", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 4); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); RColButt = MCreateRButton(tb, "K_labelsDW", FIXED_SMALL); MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 5); MObjectSetForegroundRGB(RColButt, 255, 255, 255); MObjectSetTransparency(RColButt, 0); DAS.Gui.ConfigPanel.frm4_dr1 = MCreateDrawArea(rowform, 347, 62); MObjectAlign(DAS.Gui.ConfigPanel.frm4_dr1, CENTER_ALIGN, TOP_ALIGN); MObjectSetResize(DAS.Gui.ConfigPanel.frm4_dr1, True, False); MObjectSetCompositeHeight(DAS.Gui.ConfigPanel.frm4_dr1, 62); MDrawAreaSetExposeCallback(DAS.Gui.ConfigPanel.frm4_dr1, DrawAreaExpFontCB, 0L); rowform1 = MCreateRowForm(rowform); MObjectSetBackgroundRGB(rowform1, 56, 84, 128); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); lbl = MCreateLabel(rowform1, "FONTS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1, 2); MTableFormSetColAlign(tb, 1, RIGHT_ALIGN); MObjectSetBackgroundRGB(tb, 56, 84, 128); MObjectSetResize(tb, True, False); lbl = MCreateLabel(tb, "Type:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); fontfamily = MGetFirstFontFamily (); e_fname = MCreateOptionEdit (tb, fontfamily, 22, 10, 6, FIXED_SMALL); MObjectSetForegroundRGB(e_fname, 255, 255, 255); MObjectSetBackgroundRGB(e_fname, 0, 24, 96); MEditDisableEditing (e_fname); list = MOptionEditGetList (e_fname); MSListSetSortCallback (list, stricmp); while (fontfamily) { MSListAddItem (list, fontfamily, 0L); fontfamily = MGetNextFontFamily (); } lbl = MCreateLabel(tb, "Dim.:", FIXED_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); e_fsize = MCreateOptionEdit(tb, "22", 22, 10, 6, FIXED_SMALL); MObjectSetForegroundRGB(e_fsize, 255, 255, 255); MObjectSetBackgroundRGB(e_fsize, 0, 24, 96); list = MOptionEditGetList(e_fsize); MSListAddItem(list, "12", 0L); MSListAddItem(list, "14", 0L); MSListAddItem(list, "16", 0L); MSListAddItem(list, "18", 0L); MSListAddItem(list, "20", 0L); MSListAddItem(list, "22", 0L); MSListAddItem(list, "24", 0L); MSListAddItem(list, "26", 0L); MSListAddItem(list, "28", 0L); MSListAddItem(list, "30", 0L); MSListAddItem(list, "32", 0L); MSListAddItem(list, "34", 0L); MSListAddItem(list, "36", 0L); MSListAddItem(list, "38", 0L); MSListAddItem(list, "40", 0L); MSListAddItem(list, "42", 0L); _tbutton000 = MCreateTButton(tb, "Bold", FIXED_SMALL); MTButtonSetCallback(_tbutton000, SetBoldCB, 0L); MObjectSetForegroundRGB(_tbutton000, 255, 255, 0); _tbutton001 = MCreateTButton(tb, "Italic", FIXED_SMALL); MTButtonSetCallback(_tbutton001, SetItalicCB, 0L); MObjectSetForegroundRGB(_tbutton001, 255, 255, 0); /*******************/ rowform1 = MCreateRowForm(rowform); MObjectSetForegroundRGB(rowform1, 56, 84, 128); MObjectSetBackgroundRGB(rowform1, 56, 84, 128); MObjectSetResize(rowform1, False, False); MObjectSetCompositeWidth(rowform1, 347); lbl = MCreateLabel(rowform1, "COMMANDS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform1, 5); MObjectSetBackgroundRGB(tb, 56, 84, 128); MObjectSetResize(tb, True, False); pb = MCreatePButton(tb, "Test", FIXED_SMALL); MPButtonSetCallback(pb, TestFontCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Preview", FIXED_SMALL); MPButtonSetCallback(pb, LoadFontCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Undo", FIXED_SMALL); MPButtonSetCallback(pb, UndoFCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteFontCB, 0L); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); // MObjectSetCompositeWidth(pb, 84); /******************* STEPPER MOTORS ***************************/ MPagedFormSetActivePage(POCF, 4); MObjectSetText(POCF, "Motors"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 457); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); /***************************************************************************/ /**************** STEPPER MOTORS SECTION ***********************************/ lbl = MCreateLabel(rowform, "STEPPER MOTORS", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectSetTransparency(lbl, 0); // MObjectSetCompositeWidth(lbl, 447); PFAMS = MCreateTabbedRowForm(rowform, (DAS.StepM.NAMS + 2), FIXED_SMALL); MObjectSetForegroundRGB(PFAMS, 255, 255, 255); MObjectSetBackgroundRGB(PFAMS, 80, 60, 0); MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2); MObjectSetCompositeWidth(PFAMS, 420); // MObjectSetResize(PFAMS, True, True); for (i=0;i<DAS.StepM.NAMS; i++) { MPagedFormSetActivePage(PFAMS, i); CONFP_AMS(PFAMS, i); //FrmStepperConfP(PFAMS, i); } MPagedFormSetActivePage(PFAMS, i); CONFP_AMS_Utility(PFAMS); MPagedFormSetActivePage(PFAMS, i+1); CONFP_AMS_NOVA(PFAMS); MPagedFormSetActivePage(PFAMS, 0); /* if (DAS.Paramini.EqType == TROPOGAS) { PFAMS = MCreateTabbedRowForm(rowform, 4, FIXED_SMALL); MObjectSetForegroundRGB(PFAMS, 255, 255, 255); MObjectSetBackgroundRGB(PFAMS, 80, 60, 0); MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2); } else { PFAMS = MCreateTabbedRowForm(rowform, 3, FIXED_SMALL); MObjectSetForegroundRGB(PFAMS, 255, 255, 255); MObjectSetBackgroundRGB(PFAMS, 80, 60, 0); MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2); } MPagedFormSetActivePage(PFAMS, 0); FrmStepperConfP(PFAMS, AMS1, &STEPM, &CONFP, &CPL); MPagedFormSetActivePage(PFAMS, 1); FrmStepperConfP(PFAMS, AMS2, &STEPM, &CONFP, &CPL); if (DAS.Paramini.EqType == TROPOGAS) { MPagedFormSetActivePage(PFAMS, 2); FrmStepperConfP(PFAMS, AMS3, &STEPM, &CONFP, &CPL); MPagedFormSetActivePage(PFAMS, 3); FrmAMS_Utility(PFAMS, &STEPM, &CONFP, &CPL); } else { MPagedFormSetActivePage(PFAMS, 2); FrmAMS_Utility(PFAMS, &STEPM, &CONFP, &CPL); } */ MPagedFormSetActivePage(PFAMS, 0); /*++++++++++++++++++++++++++++++++++++++++++++++++++++*/ tb = MCreateTableForm(rowform, 4); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); pb = MCreatePButton(tb, "Apply", FIXED_SMALL); MPButtonSetCallback(pb, ApplyChCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(tb, "Store", FIXED_SMALL); MPButtonSetCallback(pb, WriteAMSCB, (void *) 1); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 74); pb = MCreatePButton(tb, "ADVANCED", FIXED_SMALL); MPButtonSetCallback(pb, AMS_AdvancedCB, (void *) 0); MObjectSetBackgroundRGB(pb, 24, 24, 255); MObjectSetForegroundRGB(pb, 255, 245, 255); MObjectSetCompositeWidth(pb, 74); /*********************************************************/ /*********************************************************/ /*************** TEST AD Converter **************/ /*********************************************************/ MPagedFormSetActivePage(POCF, 5); MObjectSetText(POCF, "TEST AD Converter"); rowform = MCreateRowForm(POCF); MObjectSetBackgroundRGB(rowform, 112, 128, 112); MObjectSetResize(rowform, False, False); MObjectSetCompositeWidth(rowform, 357); MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN); /*+++++++++++++++++ START CURRENT SETUP ++++++++++*/ lbl = MCreateLabel(rowform , "AD Converter Current Setup", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 48, 20, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(lbl, 0); tb = MCreateTableForm(rowform, 4); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); lbl = MCreateLabel(tb , "Board Type:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); // sprintf(buf, "%s", DSCCB2STR()); ADTESTER.lblADsetup[0] = MCreateLabel(tb , "DMM", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[0], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[0], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[0], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[0], 0); lbl = MCreateLabel(tb , "Base Addr:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[1] = MCreateLabel(tb , "0x300", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[1], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[1], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[1], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[1], 0); lbl = MCreateLabel(tb , "Int.Lvl:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[2] = MCreateLabel(tb , "3", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[2], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[2], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[2], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[2], 0); lbl = MCreateLabel(tb , "DMA Lvl:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[3] = MCreateLabel(tb , "3", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[3], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[3], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[3], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[3], 0); lbl = MCreateLabel(tb , "ClockFreq:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[4] = MCreateLabel(tb , "10MHz", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[4], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[4], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[4], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[4], 0); lbl = MCreateLabel(tb , "Range:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[5] = MCreateLabel(tb , "5V", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[5], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[5], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[5], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[5], 0); lbl = MCreateLabel(tb , "Pol.:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[6] = MCreateLabel(tb , "UNIPOL", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[6], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[6], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[6], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[6], 0); lbl = MCreateLabel(tb , "Gain:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[7] = MCreateLabel(tb , "2", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[7], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[7], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[7], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[7], 0); lbl = MCreateLabel(tb , "LowCh:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[8] = MCreateLabel(tb , "0", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[8], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[8], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[8], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[8], 0); lbl = MCreateLabel(tb , "HighCh:", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); ADTESTER.lblADsetup[9] = MCreateLabel(tb , "15", FIXED_SMALL); MObjectSetForegroundRGB(ADTESTER.lblADsetup[9], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADsetup[9], 40, 96, 72); MObjectAlign(ADTESTER.lblADsetup[9], CENTER_ALIGN, TOP_ALIGN); MObjectSetTransparency(ADTESTER.lblADsetup[9], 0); // LoadDMMSetup(); /*+++++++++++++++++ END CURRENT SETUP ++++++++++*/ tb = MCreateTableForm(rowform, 2); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); ADTESTER.ADrb[0]= MCreateRButton(tb, "Volts", FIXED_SMALL); MPButtonSetCallback(ADTESTER.ADrb[0], DB_SelOutModeCB, (void *) 0); MObjectAlign(ADTESTER.ADrb[0], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(ADTESTER.ADrb[0], 255, 255, 255); MObjectSetCompositeWidth(ADTESTER.ADrb[0], 85); ADTESTER.ADrb[1] = MCreateRButton(tb, "Celsius", FIXED_SMALL); MPButtonSetCallback(ADTESTER.ADrb[1], DB_SelOutModeCB, (void *) 1); MObjectAlign(ADTESTER.ADrb[1], LEFT_ALIGN, UNDEF_ALIGN); MObjectSetForegroundRGB(ADTESTER.ADrb[1], 255, 255, 255); MObjectSetCompositeWidth(ADTESTER.ADrb[1], 85); if(ADTESTER.OutputMode == 0) MRButtonActivate(ADTESTER.ADrb[0]); else MRButtonActivate(ADTESTER.ADrb[0]); lbl = MCreateLabel(rowform , "Output", FIXED_SMALL); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectAlign(lbl, CENTER_ALIGN, TOP_ALIGN); tb = MCreateTableForm(rowform, 4); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); for(i=0;i<16;i++) { sprintf(buf, "Ch.%d:", i); ADTESTER.lblADch[i] = MCreateLabel(tb, buf, FIXED_SMALL); MLabelSetAlignment(ADTESTER.lblADch[i], LEFT_ALIGN); MObjectSetForegroundRGB(ADTESTER.lblADch[i], 255, 255, 255); MObjectSetTransparency(ADTESTER.lblADch[i], 0); MObjectSetResize(ADTESTER.lblADch[i], False, False); MObjectAlign(ADTESTER.lblADch[i], LEFT_ALIGN, TOP_ALIGN); // MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblADch[i], 40, 96, 72); ADTESTER.lblADvalue[i] = MCreateLabel(tb, " 0.0", FIXED_SMALL); MLabelSetAlignment(ADTESTER.lblADvalue[i], RIGHT_ALIGN); MObjectSetForegroundRGB(ADTESTER.lblADvalue[i], 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.lblADvalue[i], 40, 96, 72); MObjectSetTransparency(ADTESTER.lblADvalue[i], 0); MObjectSetResize(ADTESTER.lblADvalue[i], False, False); MObjectAlign(ADTESTER.lblADvalue[i], LEFT_ALIGN, TOP_ALIGN); } tb = MCreateTableForm(rowform, 3); MFormSetFocusHighlight(tb, True); MTableFormSetRowAlign(tb, 0, TOP_ALIGN); MObjectSetBackgroundRGB(tb, 56, 112, 112); MObjectSetResize(tb, False, False); MObjectSetCompositeWidth(tb, 347); ADTESTER.ADpb = MCreatePButton(tb, "Start", FIXED_SMALL); MPButtonSetCallback(ADTESTER.ADpb, ADTesterCB, (void *) 0); MObjectSetBackgroundRGB(ADTESTER.ADpb, 224, 224, 176); // MObjectSetBackgroundRGB(ADTESTER.ADpb, 192, 192, 192); MObjectSetCompositeWidth(ADTESTER.ADpb, 84); ADTESTER.ADInflbl = MCreateLabel(tb, "Click Start to test ", FIXED_SMALL); // MPButtonSetCallback(ADTESTER.ADpb, ADTesterCB, (void *) 0); MObjectSetForegroundRGB(ADTESTER.ADInflbl, 255, 255, 255); MObjectSetBackgroundRGB(ADTESTER.ADInflbl, 48, 20, 255); pb = MCreatePButton(tb, "Close", FIXED_SMALL); MPButtonSetCallback(pb, CloseConfigCB, (void *) DAS.Gui.ConfigPanel.ShellConfig); MObjectSetBackgroundRGB(pb, 224, 224, 176); MObjectSetCompositeWidth(pb, 84); /*********************************************************/ MPagedFormSetActivePage(POCF, 0); MShellRealize(DAS.Gui.ConfigPanel.ShellConfig); // MShellRealizeXYWH(DAS.Gui.ConfigPanel.ShellConfig, 0,0,600,800); return 0; } */
3952  /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */
3953 
3954 /**************************************************************************************************************/
3955 
3956 }
3957 
3958 
3959 
3960 // Create the Parameters page
3961 void CONFP_Param(int mod, MOBJECT mo)
3962 {
3963 
3964  MOBJECT rowform; // generic row form
3965 // MOBJECT rowform1; // generic row form
3966 // MOBJECT edit; // generic edit object
3967 
3968 // MOBJECT pb; // generic pushbutton and radiobutton
3969 // MOBJECT lbl; //generic label
3970 // MOBJECT tb; // generic table object
3971  MOBJECT PPARAM;
3972 // char buf[64];
3973 // int k;
3974 
3975 
3976 
3977  MObjectSetText(mo, "Parametrs");
3978 
3979  rowform = MCreateRowForm(mo);
3980  MObjectSetBackgroundRGB(rowform, 56, 112, 112);
3981  MObjectSetResize(rowform, False, False);
3982  MObjectSetCompositeWidth(rowform, 357); //357
3983  MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN);
3984 
3985 
3986 
3987  PPARAM = MCreateTabbedRowForm(rowform, 5, FIXED_SMALL);
3988  MObjectSetForegroundRGB(PPARAM, 255, 255, 255);
3989  MObjectSetBackgroundRGB(PPARAM, 56, 112, 112);
3991  MObjectSetCompositeWidth(PPARAM, 357);
3992  MObjectSetResize(PPARAM, False, False);
3993 
3994  CONFP_param_page1(0, PPARAM);
3995 
3996  MPagedFormSetActivePage(PPARAM, 1);
3997  //Creation page 2
3998  CONFP_param_page2(0, PPARAM);
3999 
4000  MPagedFormSetActivePage(PPARAM, 2);
4001  //Creation page 3
4002  CONFP_param_page3(0, PPARAM);
4003 
4004  MPagedFormSetActivePage(PPARAM, 3);
4005  //Creation page 4
4006  CONFP_param_page4(0, PPARAM);
4007 
4008  MPagedFormSetActivePage(PPARAM, 4);
4009  //Creation page 5
4010  CONFP_param_page5(0, PPARAM);
4011 
4012  MPagedFormSetActivePage(PPARAM, 0);
4013 
4014 
4015 }
4016 
4017 void DB_MeasMode_CB(MOBJECT o, void *a, void *v)
4018 {
4019 
4020  int er = 0;
4021  int c = (int) v;
4022 
4023 
4025 
4026  if(er)
4027  {
4028  switch (c)
4029  {
4030  case 0:
4031  DAS.DOption.measmode = 0; //Single Meas
4033  //if (DAS.Marconi.AVGmat != 0)
4034  // free(DAS.Marconi.AVGmat);
4035  break;
4036  case 1:
4037  DAS.DOption.measmode = 1; //Average
4039  //if (DAS.Marconi.AVGmat != 0)
4040  //DAS.Marconi.AVGmat = AllocFloatMat(IDX, IDY);
4041  //np = (long) IDX * IDY * 2;
4042 
4043  //AVGmat = malloc(np * 4);
4044  //memset(AVGmat, 0, np * 4);
4045 
4046  break;
4047 
4048  }
4049  }
4050 
4051 }
4052 
4053 
4054 
4055 void DB_AVGAutoR_CB(MOBJECT o, void *a, void *v)
4056 {
4057 
4058  int er = 0;
4059  int c = (int) v;
4060 
4061 
4063 
4064  if(er)
4065  {
4066  switch (c)
4067  {
4068  case 0:
4069  DAS.DOption.avgautor = 1; //Autorange before average
4070  break;
4071  case 1:
4072  DAS.DOption.avgautor = 0; //NO Autorange before average
4073  break;
4074 
4075  }
4076  }
4077 
4078 }
4079 
4080 
4081 void SelDefPixFileCB(MOBJECT o, void *a, void *v)
4082 {
4083 
4084  int er = 0;
4085  int c = (int) v;
4086 
4087  char buf[_MAX_PATH];
4088  char fname[_MAX_PATH], dirname[_MAX_PATH];
4089  char str[_MAX_PATH];
4090 // unsigned long ns;
4091 
4092 
4093  FB_PREFS fbp;
4094  strcpy (dirname, MGetCurrentDirectory ());
4095  fname[0] = '\0';
4096  memset (&fbp, 0, sizeof (fbp));
4097 
4098  fbp.change_cwd = True;
4099  fbp.allow_dir_create = True;
4100  fbp.allow_dir_rename = True;
4101  fbp.allow_dir_delete = True;
4102  fbp.transparent_tree = False;
4103  fbp.font = HELV_SMALL;
4104  fbp.button_font = HELV_SMALL;
4105  //Set Img file
4106  sprintf(buf, "%s\\%s", BIL.DFILEM.HOMEDIRECTORY, "sys\\Tile2.bmp" );
4107  fbp.bg_image_file =buf;
4108 
4109 
4110  er = MFileBrowseExt ("Select CCD Mask File", "*.cor", fname, dirname, &fbp);
4111  sprintf(DAS.DOption.DEFPIXFILENAME, "%s", fname);
4112 
4113  sprintf(buf, "%s%s", dirname, DAS.DOption.DEFPIXFILENAME);
4114  //if(DI_FileExist(buff)) // DI_FileExist --> Return: 1 if PATH exist, else return 0
4115  // return 37;
4117  //Load File
4118  er = LoadDB_DefectPixel(buf);
4119  if (er)
4120  {
4121  sprintf (str, "File: %s, Not FOUND", buf);
4122  MMessageDialog("DAS Inf.", str, "OK", NULL);
4123 
4124  }
4125 
4126 
4127 
4128 
4129 }
4130 
4131 // create the 1st page of the option page
4132 void CONFP_opt_page1(int mod, MOBJECT obj)
4133 {
4134 
4135  MOBJECT rowform; // generic row form
4136 
4137  MOBJECT pb, rb ;
4138  MOBJECT colform;
4139 // MOBJECT _tbutton000;
4140 // MOBJECT _tbutton001;
4141 // MOBJECT tbavg;
4142  MOBJECT lbl;
4143  MOBJECT tb; // generic table object
4144  char buf[64];
4145  int k, *p;
4146 
4147  MObjectSetText(obj, "Page 1");
4148 
4149  /***************************************************************************/
4150  /*********** Saving Mode Section - Start ****************************/
4151  /***************************************************************************/
4152  lbl = MCreateLabel(obj, "SAVING OPTIONS", FIXED_SMALL);
4153  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4154  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
4155  MObjectSetTransparency(lbl, 0);
4156 
4157 
4158  tb = MCreateTableForm(obj, 3);
4159  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4160  MObjectSetResize(tb, True, False);
4161 
4162  lbl = MCreateLabel(tb, "Saving Mode:", FIXED_SMALL);
4163  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4164  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4165  MObjectSetTransparency(lbl, 0);
4166  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4167  MObjectSetCompositeWidth(lbl, 150);
4169 
4170  rb = MCreateRButton(tb, "ASCII", FIXED_SMALL);
4171  MPButtonSetCallback(rb, DB_RadioModeSelCB, (void *) 0);
4173  MObjectSetForegroundRGB(rb, 255, 255, 255);
4174  MObjectSetCompositeWidth(rb, 90);
4175  if(!DAS.DOption.savingmode)
4176  MRButtonActivate(rb);
4177 
4178 
4179  rb = MCreateRButton(tb, "Binary", FIXED_SMALL);
4180  MPButtonSetCallback(rb, DB_RadioModeSelCB, (void *) 1);
4182  MObjectSetForegroundRGB(rb, 255, 255, 255);
4183  MObjectSetCompositeWidth(rb, 90);
4184  if(DAS.DOption.savingmode)
4185  MRButtonActivate(rb);
4186 
4187  /***************************************************************************/
4188  /*********** Saving Mode Section - End ******************************/
4189  /***************************************************************************/
4190  /***************************************************************************/
4191  /*********** File Name Type Section - Start *************************/
4192  /***************************************************************************/
4193 
4194 
4195  tb = MCreateTableForm(obj, 3);
4196  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4197  MObjectSetResize(tb, True, False);
4198 
4199  lbl = MCreateLabel(tb, "Saving File Names:", FIXED_SMALL);
4200  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4201  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4202  MObjectSetTransparency(lbl, 0);
4203  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4204  MObjectSetCompositeWidth(lbl, 150);
4206 
4207  rb = MCreateRButton(tb, "Free ", FIXED_SMALL);
4208  MPButtonSetCallback(rb, DB_RadioFNSelCB, (void *) 0);
4210  MObjectSetForegroundRGB(rb, 255, 255, 255);
4211  MObjectSetCompositeWidth(rb, 90);
4212  if(!DAS.DOption.filename)
4213  MRButtonActivate(rb);
4214 
4215  rb = MCreateRButton(tb, "Automatic", FIXED_SMALL);
4216  MPButtonSetCallback(rb, DB_RadioFNSelCB, (void *) 1);
4218  MObjectSetForegroundRGB(rb, 255, 255, 255);
4219  MObjectSetCompositeWidth(rb, 90);
4220  //MObjectSetResize(rb, False, False);
4221  if(DAS.DOption.filename)
4222  MRButtonActivate(rb);
4223  /***************************************************************************/
4224  /*********** File Name Type Section - End ***************************/
4225  /***************************************************************************/
4226 
4227  /***************************************************************************/
4228  /*********** START IMAGE TYPE SECTION *******************************/
4229  /***************************************************************************/
4230  lbl = MCreateLabel(obj, "Type of Images:", FIXED_SMALL);
4231  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4232  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4233  MObjectSetTransparency(lbl, 0);
4234  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4235  MObjectSetCompositeWidth(lbl, 200);
4236 
4237  rowform = MCreateTableForm(obj, 3);
4238  MObjectSetBackgroundRGB(rowform, 112, 128, 112);
4239  MObjectSetResize(rowform, True, False);
4240 
4241  rb = MCreateRButton(rowform, "MONO ", FIXED_SMALL);
4242  MPButtonSetCallback(rb, DB_ImgTypeCB, (void *) 0);
4244  MObjectSetForegroundRGB(rb, 255, 255, 255);
4245  MObjectSetCompositeWidth(rb, 85);
4246  if(!DAS.DOption.imgtype)
4247  MRButtonActivate(rb);
4248 
4249  rb = MCreateRButton(rowform, "RGB", FIXED_SMALL);
4250  MPButtonSetCallback(rb, DB_ImgTypeCB, (void *) 1);
4252  MObjectSetForegroundRGB(rb, 255, 255, 255);
4253  MObjectSetResize(rb, False, False);
4254  if(DAS.DOption.imgtype)
4255  MRButtonActivate(rb);
4256 
4257  pb = MCreatePButton(rowform, "Apply img", FIXED_SMALL);
4258  MPButtonSetCallback(pb, ApplyImgCB, (void *) 0);
4259  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4260  MObjectSetCompositeWidth(pb, 74);
4261  /***************************************************************************/
4262  /*********** END IMAGE TYPE SECTION *******************************/
4263  /***************************************************************************/
4264 
4265 
4266  /***************************************************************************/
4267  /*********** START AVERAGING SECTION *******************************/
4268  /***************************************************************************/
4269  DAS.Gui.ConfigPanel.tbavg = MCreateTableForm(obj, 1);
4270  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.tbavg, 112, 128, 112);
4272 
4273 
4274 // lbl = MCreateLabel(obj, "AVERAGE", FIXED_SMALL);
4275  lbl = MCreateLabel(DAS.Gui.ConfigPanel.tbavg, "AVERAGE", FIXED_SMALL);
4276  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4277  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
4278  MObjectSetTransparency(lbl, 0);
4279 // MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4280 // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4281 // MObjectSetCompositeWidth(lbl, 200);
4282 
4283 
4284 
4285 
4287  //tb = MCreateTableForm(obj, 3);
4288  tb = MCreateTableForm(DAS.Gui.ConfigPanel.tbavg, 3);
4289  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4290  MObjectSetResize(tb, True, False);
4291 
4292  lbl = MCreateLabel(tb, "Automatic ARange for AVG ?", FIXED_SMALL);
4293  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4294  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4295  MObjectSetTransparency(lbl, 0);
4296  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4297  //MObjectSetCompositeWidth(lbl, 200);
4298 
4299  rb = MCreateRButton(tb, "Yes", FIXED_SMALL);
4300  MPButtonSetCallback(rb, DB_AVGAutoR_CB, (void *) 0);
4302  MObjectSetForegroundRGB(rb, 255, 255, 255);
4303  //MObjectSetCompositeWidth(rb, 100);
4304  if(DAS.DOption.avgautor == 1)
4305  MRButtonActivate(rb);
4306 
4307  rb = MCreateRButton(tb, "No", FIXED_SMALL);
4308  MPButtonSetCallback(rb, DB_AVGAutoR_CB, (void *) 1);
4310  MObjectSetForegroundRGB(rb, 255, 255, 255);
4311  //MObjectSetCompositeWidth(rb, 90);
4312  if(DAS.DOption.avgautor == 0)
4313  MRButtonActivate(rb);
4314 
4315 
4316 
4317  //tb = MCreateTableForm(obj, 2);
4318  tb = MCreateTableForm(DAS.Gui.ConfigPanel.tbavg, 2);
4319  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4320  MObjectSetResize(tb, True, False);
4321 
4322  DAS.Gui.ConfigPanel.FixTExp = MCreateRButton(tb, "Fix TExp. ", FIXED_SMALL);
4325  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.FixTExp, 255, 255, 255);
4327 
4328  DAS.Gui.ConfigPanel.FixMeasNum = MCreateRButton(tb, "Fix Meas. Number", FIXED_SMALL);
4331  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.FixMeasNum, 255, 255, 255);
4333 
4334  if(DAS.DOption.avgmode)
4335  {
4336  DAS.Gui.ConfigPanel.lblAvg = MCreateLabel(tb, "TOT Exposure Time :", FIXED_SMALL);
4338  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblAvg, 255, 255, 255);
4342 
4343  sprintf(buf, "%d", TOTTEXP);
4344  DAS.Gui.ConfigPanel.n_avg = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL);
4345  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.n_avg, 255, 255, 255);
4346  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.n_avg, 40, 96, 72);
4349  k = 111;
4350  p = (void *) k;
4353 
4355  }
4356  else
4357  {
4358  DAS.Gui.ConfigPanel.lblAvg = MCreateLabel(tb, "Repeat measure for: ", FIXED_SMALL);
4360  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblAvg, 255, 255, 255);
4364 
4365  sprintf(buf, "%d",N_AVG);
4366  DAS.Gui.ConfigPanel.n_avg = MCreateClippedEdit(tb, " ", 10, 5, FIXED_SMALL);
4367  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.n_avg, 255, 255, 255);
4368  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.n_avg, 40, 96, 72);
4371  k = 111;
4372  p = (void *) k;
4375 
4377  }
4378  /***************************************************************************/
4379  /*********** END AVERAGING SECTION *******************************/
4380  /***************************************************************************/
4381  /***************************************************************************/
4382  /*********** START MEASURING mode SECTION *******************************/
4383  /***************************************************************************/
4384  lbl = MCreateLabel(obj, "MEASURING MODE", FIXED_SMALL);
4385  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4386  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
4387  MObjectSetTransparency(lbl, 0);
4388  // MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4389  // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4390  // MObjectSetCompositeWidth(lbl, 200);
4391 
4392  //table for selecting Single or Averaged measurements
4393  tb = MCreateTableForm(obj, 2);
4394  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4395  MObjectSetResize(tb, True, False);
4396 
4397 
4398  rb = MCreateRButton(tb, "SINGLE", FIXED_SMALL);
4399  MPButtonSetCallback(rb, DB_MeasMode_CB, (void *) 0);
4401  MObjectSetForegroundRGB(rb, 255, 255, 255);
4402  //MObjectSetCompositeWidth(rb, 100);
4403  if(DAS.DOption.measmode == 0)
4404  MRButtonActivate(rb);
4405 
4406  rb = MCreateRButton(tb, "AVERAGE", FIXED_SMALL);
4407  MPButtonSetCallback(rb, DB_MeasMode_CB, (void *) 1);
4409  MObjectSetForegroundRGB(rb, 255, 255, 255);
4410  //MObjectSetCompositeWidth(rb, 90);
4411  if(DAS.DOption.measmode == 1)
4412  MRButtonActivate(rb);
4413 
4414 
4415 
4416  /***************************************************************************/
4417  /*********** END MEASURING mode SECTION *******************************/
4418  /***************************************************************************/
4419 
4420  /*******************************************************************************/
4421  /************* START Defective Pixel Correction SECTION ***********************/
4422  /*******************************************************************************/
4423  lbl = MCreateLabel(obj, "DEFECTIVE PIXELS", FIXED_SMALL);
4424  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4425  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
4426  MObjectSetTransparency(lbl, 0);
4427 
4428  tb = MCreateTableForm(obj, 3);
4429  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4430  MObjectSetResize(tb, True, False);
4431 
4432  pb = MCreatePButton(tb, "Map UNDER Exp", FIXED_SMALL);
4433  MPButtonSetCallback(pb, UnderOverPixCB, (void *) 0);
4434  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4435  //MObjectSetCompositeWidth(pb, 250);
4436 
4437  pb = MCreatePButton(tb, "Map OVER Exp (T=0)", FIXED_SMALL);
4438  MPButtonSetCallback(pb, UnderOverPixCB, (void *) 1);
4439  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4440  //MObjectSetCompositeWidth(pb, 220);
4441 
4442  pb = MCreatePButton(tb, "Map OVER Exp (T=5)", FIXED_SMALL);
4443  MPButtonSetCallback(pb, UnderOverPixCB, (void *) 2);
4444  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4445  //MObjectSetCompositeWidth(pb, 220);
4446 
4447 
4448  lbl = MCreateLabel(obj, "Defective Pixel Correction:", FIXED_SMALL);
4449  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4450  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4451  MObjectSetTransparency(lbl, 0);
4452  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4453  MObjectSetCompositeWidth(lbl, 220);
4454 
4455  tb = MCreateTableForm(obj, 2);
4456  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4457  MObjectSetResize(tb, True, False);
4458 
4459  DAS.Gui.ConfigPanel.rbCorrPix[0] = MCreateRButton(tb, "DISABLE", FIXED_SMALL);
4462  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbCorrPix[0], 255, 255, 255);
4464 
4465  DAS.Gui.ConfigPanel.rbCorrPix[1] = MCreateRButton(tb, "ENABLE", FIXED_SMALL);
4468  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbCorrPix[1], 255, 255, 255);
4470 
4471  colform = MCreateColForm(obj);
4472  MObjectSetBackgroundRGB(colform, 112, 128, 112);
4473  MObjectSetResize(colform, True, False);
4474 
4475 
4477  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblCorrPixF, 255, 255, 255);
4480  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4481  //MObjectSetCompositeWidth(lbl, 220);
4482 
4483 
4489 
4490  if(!DAS.DOption.pixcorr)
4492  if(DAS.DOption.pixcorr)
4494 
4495 
4496  /*******************************************************************************/
4497  /************* END Defective Pixel Correction SECTION ***********************/
4498  /*******************************************************************************/
4499 
4500  /*---------------------------------------------------------------*/
4501  /*------ Dummy table ---------------------------------------*/
4502  tb = MCreateTableForm(obj, 2);
4503  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4504  MObjectSetResize(tb, True, True);
4506  /*------ Dummy table ---------------------------------------*/
4507  /*---------------------------------------------------------------*/
4508 
4509 
4510 }
4511 
4512 
4513 // create the 2nd page of the option page
4514 void CONFP_opt_page2(int mod, MOBJECT obj)
4515 {
4516 
4517 // MOBJECT rowform; // generic row form
4518  MOBJECT pb, rb ;
4519  MOBJECT lbl;
4520  MOBJECT tb ; // generic table object
4521  char buf[64];
4522  int i,k, *p;
4523 
4524  MObjectSetText(obj, "Page 2");
4525  /***************************************************************************/
4526  /***************************************************************************/
4527  /*********** START DARK MEASUREMENT SECTION *******************************/
4528  /***************************************************************************/
4529 
4530  lbl = MCreateLabel(obj, "DARK IMAGE", FIXED_SMALL);
4531  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4532  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
4533  MObjectSetTransparency(lbl, 0);
4534 
4535  lbl = MCreateLabel(obj, "Remove Dark from Measurements ? ", FIXED_SMALL);
4536  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4537  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4538  MObjectSetTransparency(lbl, 0);
4539  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4540  MObjectSetCompositeWidth(lbl, 250);
4541 
4542  tb = MCreateTableForm(obj, 2);
4543  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4544  MObjectSetResize(tb, True, False);
4545 
4546  rb = MCreateRButton(tb, "Yes", FIXED_SMALL);
4548  MObjectSetForegroundRGB(rb, 255, 255, 255);
4549  MObjectSetCompositeWidth(rb, 85);
4550  if(DAS.DOption.darkremove)
4551  MRButtonActivate(rb);
4552  MPButtonSetCallback(rb, DB_RadioDarkCB, (void *) 1);
4553 
4554  rb = MCreateRButton(tb, "No", FIXED_SMALL);
4556  MObjectSetForegroundRGB(rb, 255, 255, 255);
4557  MObjectSetCompositeWidth(rb, 123);
4558  if(!DAS.DOption.darkremove)
4559  MRButtonActivate(rb);
4560  MPButtonSetCallback(rb, DB_RadioDarkCB, (void *) 0);
4561 
4562  lbl = MCreateLabel(obj, "Dark Source", FIXED_SMALL);
4563  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4564  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4565  MObjectSetTransparency(lbl, 0);
4566  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4567  MObjectSetCompositeWidth(lbl, 200);
4568 
4569  tb = MCreateTableForm(obj, 2);
4570  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4571  MObjectSetResize(tb, True, False);
4572 
4573  DAS.Gui.ConfigPanel.FFDark = MCreateRButton(tb, "Full Frame", FIXED_SMALL);
4576  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.FFDark, 255, 255, 255);
4578 // if(DAS.DOption.darkremove)
4579  if(DAS.DOption.darksource)
4581 
4582  DAS.Gui.ConfigPanel.BPDark = MCreateRButton(tb, "Blind Pixels", FIXED_SMALL);
4585  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.BPDark, 255, 255, 255);
4587 // if(DAS.DOption.darkremove)
4588  if(!DAS.DOption.darksource)
4590 
4591 
4592  if (DAS.DOption.darkremove==0)
4593  {
4596  }
4597  else
4598  {
4601  }
4602 
4603  /***************************************************************************/
4604  /*********** END DARK MEASUREMENT SECTION ****************************/
4605  /***************************************************************************/
4606  /*---------------------------------------------------------------*/
4607  /***************************************************************************/
4608  /*********** START CCD TARGET TEMPERATURE SECTION *********************/
4609  /***************************************************************************/
4610  lbl = MCreateLabel(obj, "CCD TARGET TEMPERATURE", FIXED_SMALL);
4612  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4613  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
4614  MObjectSetTransparency(lbl, 0);
4615 
4616  tb = MCreateTableForm(obj, 2);
4617  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4618  MObjectSetResize(tb, True, False);
4620 
4621  rb = MCreateRButton(tb, "FIXED", FIXED_SMALL);
4622  MPButtonSetCallback(rb, DB_SetCCDTargetTempCB, (void *) 0);
4624  MObjectSetForegroundRGB(rb, 255, 255, 255);
4625  MObjectSetCompositeWidth(rb, 85);
4626  if(!FLAG.settempvar)
4627  MRButtonActivate(rb);
4628 
4629  rb = MCreateRButton(tb, "SZA DRIVED", FIXED_SMALL);
4630  MPButtonSetCallback(rb, DB_SetCCDTargetTempCB, (void *) 1);
4632  MObjectSetForegroundRGB(rb, 255, 255, 255);
4633  MObjectSetCompositeWidth(rb, 123);
4634  if(FLAG.settempvar)
4635  MRButtonActivate(rb);
4636 
4637  /***************************************************************************/
4638  /*********** END CCD TARGET TEMPERATURE SECTION *********************/
4639  /***************************************************************************/
4640  /*-----------------------------------------------------------------------*/
4641 
4642  /***************************************************************************/
4643  /***************************************************************************/
4644  /************** START AUTORANGING SECTION ************************/
4645  /***************************************************************************/
4646 
4647 
4648  lbl = MCreateLabel(obj, "AUTORANGING", FIXED_SMALL);
4649  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4650  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
4651  MObjectSetTransparency(lbl, 0);
4652 
4653 
4654  tb = MCreateTableForm(obj, 2);
4655  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4656  //MObjectSetResize(tb, True, False);
4657 
4658  lbl = MCreateLabel(tb, "Max Autoranging value (<= 63000) ", FIXED_SMALL);
4659  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4660  //MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4661  MObjectSetTransparency(lbl, 0);
4662  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4664  MObjectSetCompositeWidth(lbl, 250);
4665 
4666  sprintf(buf, "%d",DAS.DOption.maxlvlar);
4667  DAS.Gui.ConfigPanel.edmaxlvlar = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL);
4668  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edmaxlvlar, 255, 255, 255);
4672 
4673  k = 600;
4674  p = (void *) k;
4677 
4678 
4679 
4680  /***************************************************************************/
4681  /************** STOP AUTORANGING SECTION ************************/
4682  /***************************************************************************/
4683 
4684 
4685  /***************************************************************************/
4686  /***************************************************************************/
4687  /************** START CONFIGURATION FILES SECTION ************************/
4688  /***************************************************************************/
4689 
4690  lbl = MCreateLabel(obj, "CONFIG FILES", FIXED_SMALL);
4692  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4693  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
4694  MObjectSetTransparency(lbl, 0);
4695 
4696  tb = MCreateTableForm(obj, 2);
4697  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4698  MObjectSetResize(tb, True, False);
4700 
4701  rb = MCreateRButton(tb, "View/Modify", FIXED_SMALL);
4702  MPButtonSetCallback(rb, DB_VMRsfCB, (void *) 0);
4704  MObjectSetForegroundRGB(rb, 255, 255, 255);
4705  MObjectSetCompositeWidth(rb, 123);
4706  if(!FLAG.VMRsf)
4707  MRButtonActivate(rb);
4708 
4709  rb= MCreateRButton(tb, "ReLoad", FIXED_SMALL);
4710  MPButtonSetCallback(rb, DB_VMRsfCB, (void *) 1);
4712  MObjectSetForegroundRGB(rb, 255, 255, 255);
4713  MObjectSetCompositeWidth(rb, 123);
4715  if(FLAG.VMRsf)
4716  MRButtonActivate(rb);
4717 
4718  tb = MCreateTableForm(obj, 2);
4719  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4720  MObjectSetResize(tb, True, False);
4722 
4723  pb = MCreatePButton(tb, "Param.INI", FIXED_SMALL);
4724  MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 0);
4725  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4726  MObjectSetCompositeWidth(pb, 150);
4727 
4728  pb = MCreatePButton(tb, "DASSysColor.INI", FIXED_SMALL);
4729  MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 1);
4730  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4731  MObjectSetCompositeWidth(pb, 150);
4732 
4733  pb = MCreatePButton(tb, "Options.INI", FIXED_SMALL);
4734  MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 2);
4735  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4736  MObjectSetCompositeWidth(pb, 150);
4737 
4738  pb = MCreatePButton(tb, "ccd_defect_Danbo.cor", FIXED_SMALL);
4739  MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 3);
4740  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4741  MObjectSetCompositeWidth(pb, 150);
4742 
4743  pb = MCreatePButton(tb, "GeoCoord.INI", FIXED_SMALL);
4744  MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 4);
4745  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4746  MObjectSetCompositeWidth(pb, 150);
4747 
4748  pb = MCreatePButton(tb, "AMS.INI", FIXED_SMALL);
4749  MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 6);
4750  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4751  MObjectSetCompositeWidth(pb, 150);
4752 
4753  pb = MCreatePButton(tb, "Equipment.INI", FIXED_SMALL);
4754  MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 7);
4755  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4756  MObjectSetCompositeWidth(pb, 150);
4757 
4758  pb = MCreatePButton(tb, "WlStep.INI", FIXED_SMALL);
4759  MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 8);
4760  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4761  MObjectSetCompositeWidth(pb, 150);
4762 
4763  pb = MCreatePButton(tb, "Free Editor", FIXED_SMALL);
4764  MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 5);
4765  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4766  MObjectSetCompositeWidth(pb, 150);
4767 
4768 
4769  /***************************************************************************/
4770  /************** END CONFIGURATION FILES SECTION ************************/
4771  /***************************************************************************/
4772 
4773 
4774 
4775  /*---------------------------------------------------------------*/
4776  /*------ Dummy table ---------------------------------------*/
4777  tb = MCreateTableForm(obj, 2);
4778  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4779  MObjectSetResize(tb, True, True);
4781  /*------ Dummy table ---------------------------------------*/
4782  /*---------------------------------------------------------------*/
4783 
4784 
4785 }
4786 
4787 
4788 // create the 3rd page of the option page
4789 void CONFP_opt_page3(int mod, MOBJECT obj)
4790 {
4791 
4792 // MOBJECT rowform; // generic row form
4793  MOBJECT rb ;
4794  MOBJECT lbl;
4795  MOBJECT tb ; // generic table object
4796  int k, *p;
4797  char buf[64];
4798 
4799  MObjectSetText(obj, "Page 3");
4800  /***************************************************************************/
4801  /***************************************************************************/
4802  /******************* START PLOT OPTIONS SECTION **********************/
4803  /***************************************************************************/
4804  lbl = MCreateLabel(obj, "PLOT OPTIONS", FIXED_SMALL);
4806  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4807  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
4808  MObjectSetTransparency(lbl, 0);
4809 
4810  lbl = MCreateLabel(obj, "X Axis Units", FIXED_SMALL);
4811  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4812  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4813  MObjectSetTransparency(lbl, 0);
4814  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4815  MObjectSetCompositeWidth(lbl, 200);
4816 
4817  tb = MCreateTableForm(obj, 3);
4818  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4819  MObjectSetResize(tb, True, False);
4821 
4822  rb = MCreateRButton(tb, "PIXEL", FIXED_SMALL);
4823  MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 0);
4825  MObjectSetForegroundRGB(rb, 255, 255, 255);
4826  MObjectSetCompositeWidth(rb, 85);
4827  if(FLAG.Wl == 0)
4828  MRButtonActivate(rb);
4829 
4830  rb = MCreateRButton(tb, "WAVEL [A]", FIXED_SMALL);
4831  MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 1);
4833  MObjectSetForegroundRGB(rb, 255, 255, 255);
4834  MObjectSetCompositeWidth(rb, 100);
4835  if(FLAG.Wl == 1)
4836  MRButtonActivate(rb);
4837 
4838  rb = MCreateRButton(tb, "WAVEL [nm]", FIXED_SMALL);
4839  MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 2);
4841  MObjectSetForegroundRGB(rb, 255, 255, 255);
4842  MObjectSetCompositeWidth(rb, 100);
4843  if(FLAG.Wl == 2)
4844  MRButtonActivate(rb);
4845 /*
4846 
4847  if(FLAG.Wl == 0)
4848  MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[0]);
4849  else if(FLAG.Wl == 1)
4850  MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[1]);
4851  else if(FLAG.Wl == 2)
4852  MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[2]);
4853 */
4854 /*----------------- DISPLAY or NOT Plot after measurement -----------------*/
4855 
4856  lbl = MCreateLabel(obj, "Display PLOT after measurement ?", FIXED_SMALL);
4857  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4858  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4859  MObjectSetTransparency(lbl, 0);
4860  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4861  MObjectSetCompositeWidth(lbl, 300);
4862 
4863  tb = MCreateTableForm(obj, 2);
4864  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4865  MObjectSetResize(tb, True, False);
4867 
4868  rb = MCreateRButton(tb, "No ", FIXED_SMALL);
4869  MPButtonSetCallback(rb, DB_PlotDisplayCB, (void *) 0);
4871  MObjectSetForegroundRGB(rb, 255, 255, 255);
4872  MObjectSetCompositeWidth(rb, 85);
4873  if(DAS.Flag.plotW == 0)
4874  MRButtonActivate(rb);
4875 
4876  rb = MCreateRButton(tb, "Yes", FIXED_SMALL);
4877  MPButtonSetCallback(rb, DB_PlotDisplayCB, (void *) 1);
4879  MObjectSetForegroundRGB(rb, 255, 255, 255);
4880  MObjectSetCompositeWidth(rb, 100);
4881  if(DAS.Flag.plotW == 1)
4882  MRButtonActivate(rb);
4883 /*
4884  if(FLAG.plotW == 0)
4885  MRButtonActivate(DAS.Gui.ConfigPanel.PlotDisp[0]);
4886  else if(FLAG.plotW == 1)
4887  MRButtonActivate(DAS.Gui.ConfigPanel.PlotDisp[1]);
4888 */
4889 /*-------------------------------------------------------------------------*/
4890  lbl = MCreateLabel(obj, " Y Axis", FIXED_SMALL);
4891  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4892  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4893  MObjectSetTransparency(lbl, 0);
4894  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4895  MObjectSetCompositeWidth(lbl, 200);
4896 
4897  tb = MCreateTableForm(obj, 2);
4898  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4899  MObjectSetResize(tb, True, False);
4901 
4902  rb = MCreateRButton(tb, "Full Range", FIXED_SMALL);
4903  MPButtonSetCallback(rb, DB_PlotYAxisCB, (void *) 0);
4905  MObjectSetForegroundRGB(rb, 255, 255, 255);
4906  MObjectSetCompositeWidth(rb, 85);
4907  MObjectSetResize(rb, True, False);
4908  if(FLAG.plotYRange == 0)
4909  MRButtonActivate(rb);
4910 
4911  rb = MCreateRButton(tb, "Min/Max", FIXED_SMALL);
4912  MPButtonSetCallback(rb, DB_PlotYAxisCB, (void *) 1);
4914  MObjectSetForegroundRGB(rb, 255, 255, 255);
4915  MObjectSetCompositeWidth(rb, 100);
4916  MObjectSetResize(rb, True, False);
4917  if(FLAG.plotYRange == 1)
4918  MRButtonActivate(rb);
4919 /*
4920  if(FLAG.plotYRange == 0)
4921  MRButtonActivate(DAS.Gui.ConfigPanel.PlotYAxis[0]);
4922  else if(FLAG.plotYRange == 1)
4923  MRButtonActivate(DAS.Gui.ConfigPanel.PlotYAxis[1]);
4924 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
4925 /*-------------------------------------------------------------------------*/
4926 /* Hidden Lines section */
4927 /*-------------------------------------------------------------------------*/
4928  lbl = MCreateLabel(obj, " Hidden lines ", FIXED_SMALL);
4929  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4930  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4931  MObjectSetTransparency(lbl, 0);
4932  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4933  MObjectSetCompositeWidth(lbl, 200);
4934 
4935  tb = MCreateTableForm(obj, 2);
4936  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4937  MObjectSetResize(tb, True, False);
4939 
4940  lbl = MCreateLabel(tb, "Before Central Line ", FIXED_SMALL);
4941  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4942  MObjectSetBackgroundRGB(lbl, 112, 128, 112);
4943  MObjectSetTransparency(lbl, 0);
4944  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4945  // MObjectSetCompositeWidth(lbl, 200);
4946 
4947  sprintf(buf, "%d",DAS.DOption.hlinebefore);
4948  DAS.Gui.ConfigPanel.HiddenL = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL);
4949  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.HiddenL, 255, 255, 255);
4953  k = 130;
4954  p = (void *) k;
4957 
4958  tb = MCreateTableForm(obj, 2);
4959  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4960  MObjectSetResize(tb, True, False);
4962 
4963  lbl = MCreateLabel(tb, "After Central Line ", FIXED_SMALL);
4964  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4965  MObjectSetBackgroundRGB(lbl, 112, 128, 112);
4966  MObjectSetTransparency(lbl, 0);
4967  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4968  // MObjectSetCompositeWidth(lbl, 200);
4969 
4970  sprintf(buf, "%d",DAS.DOption.hlineafter);
4971  DAS.Gui.ConfigPanel.HiddenL = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL);
4972  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.HiddenL, 255, 255, 255);
4976  k = 135;
4977  p = (void *) k;
4980 
4981 /*-------------------------------------------------------------------------*/
4982 /* Blind Pixel section */
4983 /*-------------------------------------------------------------------------*/
4984  lbl = MCreateLabel(obj, " Display Blind Pixel? ", FIXED_SMALL);
4985  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4986  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4987  MObjectSetTransparency(lbl, 0);
4988  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4989  MObjectSetCompositeWidth(lbl, 200);
4990 
4991  tb = MCreateTableForm(obj, 2);
4992  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4993  MObjectSetResize(tb, True, False);
4995 
4996  rb = MCreateRButton(tb, "No", FIXED_SMALL);
4997  MPButtonSetCallback(rb, DB_DispBlindPixCB, (void *) 0);
4999  MObjectSetForegroundRGB(rb, 255, 255, 255);
5000  MObjectSetCompositeWidth(rb, 85);
5001  MObjectSetResize(rb, True, False);
5002  if(FLAG.DispBlindPix == 0)
5003  MRButtonActivate(rb);
5004 
5005 
5006  rb = MCreateRButton(tb, "Yes", FIXED_SMALL);
5007  MPButtonSetCallback(rb, DB_DispBlindPixCB, (void *) 1);
5009  MObjectSetForegroundRGB(rb, 255, 255, 255);
5010  MObjectSetCompositeWidth(rb, 100);
5011  MObjectSetResize(rb, True, False);
5012  if(FLAG.DispBlindPix == 1)
5013  MRButtonActivate(rb);
5014 
5015  /*-------------------------------------------------------------------------*/
5016  /***************************************************************************/
5017  /******************* END PLOT OPTIONS SECTION **********************/
5018  /***************************************************************************/
5019  /*-------------------------------------------------------------------------*/
5020  /* SZA Limit section */
5021  /*-------------------------------------------------------------------------*/
5022  lbl = MCreateLabel(obj, " SZA Limit ", FIXED_SMALL);
5023  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5024  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
5025  MObjectSetTransparency(lbl, 0);
5026  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5027  // MObjectSetCompositeWidth(lbl, 200);
5028 
5029  tb = MCreateTableForm(obj, 3);
5030  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5031  MObjectSetResize(tb, True, False);
5033 
5034  lbl = MCreateLabel(tb, "Perform Measurements for SZA <= ", FIXED_SMALL);
5035  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5036  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5037  MObjectSetTransparency(lbl, 0);
5038  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5039  // MObjectSetCompositeWidth(lbl, 200);
5040 
5041  sprintf(buf, "%d",SZAMax);
5042  DAS.Gui.ConfigPanel.SZAMax = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL);
5043  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SZAMax, 255, 255, 255);
5044  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SZAMax, 40, 96, 72);
5047  k = 120;
5048  p = (void *) k;
5051 
5052  lbl = MCreateLabel(tb, " ° ", FIXED_SMALL);
5053  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5054  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5055  MObjectSetTransparency(lbl, 0);
5056  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5057 
5058  /**************************************************************/
5059  /***************************************************************************/
5060 
5061 
5062  /*---------------------------------------------------------------*/
5063  /*------ Dummy table ---------------------------------------*/
5064  tb = MCreateTableForm(obj, 2);
5065  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5066  MObjectSetResize(tb, True, True);
5068  /*------ Dummy table ---------------------------------------*/
5069  /*---------------------------------------------------------------*/
5070 
5071 
5072 }
5073 
5074 
5075 // create the 4th page of the option page
5076 void CONFP_opt_page4(int mod, MOBJECT obj)
5077 {
5078 
5079 // MOBJECT rowform; // generic row form
5080  MOBJECT pb, rb ;
5081  MOBJECT lbl;
5082  MOBJECT tb ; // generic table object
5083  int k, *p;
5084  char buf[64];
5085 
5086  MObjectSetText(obj, "Page 4");
5087 
5088 
5089  /***************************************************************************/
5090  /******************* BACK-UP SECTION *************************/
5091  /***************************************************************************/
5092  lbl = MCreateLabel(obj, "BACK-UP OPTIONS", FIXED_SMALL);
5094  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5095  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
5096  MObjectSetTransparency(lbl, 0);
5097 
5098  lbl = MCreateLabel(obj, "Perform FTP Back-Up", FIXED_SMALL);
5100  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5101  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5102  MObjectSetTransparency(lbl, 0);
5103  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5104  MObjectSetCompositeWidth(lbl, 200);
5105 
5106  tb = MCreateTableForm(obj, 2);
5107  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5108  MObjectSetResize(tb, True, False);
5110 
5111  rb = MCreateRButton(tb, "Yes", FIXED_SMALL);
5112  MPButtonSetCallback(rb, DB_RadioFTPCB, (void *) 0);
5114  MObjectSetForegroundRGB(rb, 255, 255, 255);
5115  MObjectSetCompositeWidth(rb, 85);
5116  if (DAS.DOption.ftpbackup)
5117  MRButtonActivate(rb);
5118 
5119  rb = MCreateRButton(tb, "No", FIXED_SMALL);
5120  MPButtonSetCallback(rb, DB_RadioFTPCB, (void *) 1);
5122  MObjectSetForegroundRGB(rb, 255, 255, 255);
5123  MObjectSetCompositeWidth(rb, 123);
5124  if (!DAS.DOption.ftpbackup)
5125  MRButtonActivate(rb);
5126 
5127  tb = MCreateTableForm(obj, 2);
5128  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5129  MObjectSetResize(tb, True, False);
5131 
5132  lbl = MCreateLabel(tb, "Server FTP Address:", FIXED_SMALL);
5135  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5136  MObjectSetBackgroundRGB(lbl, 112, 128, 112);
5137  MObjectSetTransparency(lbl, 0);
5138  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5139  MObjectSetCompositeWidth(lbl, 200);
5140 
5141  sprintf(buf, "%s",DFTP.ftpserver);
5142  DFTP.edServerFTP = MCreateClippedEdit(tb, buf, 15, 15, FIXED_SMALL);
5143  MObjectSetForegroundRGB(DFTP.edServerFTP, 255, 255, 255);
5144  MObjectSetBackgroundRGB(DFTP.edServerFTP, 40, 96, 72);
5145  // MObjectSetCompositeWidth(DFTP.edServerFTP, 35);
5147  k = 200;
5148  p = (void *) k;
5149  // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p);
5151  if (!DAS.DOption.ftpbackup)
5153 
5154  lbl = MCreateLabel(tb, "UserName:", FIXED_SMALL);
5157  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5158  MObjectSetBackgroundRGB(lbl, 112, 128, 112);
5159  MObjectSetTransparency(lbl, 0);
5160  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5161  MObjectSetCompositeWidth(lbl, 200);
5162 
5163  sprintf(buf, "%s",DFTP.ftpuser);
5164  DFTP.edid = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL);
5165  MObjectSetForegroundRGB(DFTP.edid, 255, 255, 255);
5166  MObjectSetBackgroundRGB(DFTP.edid, 40, 96, 72);
5167  // MObjectSetCompositeWidth(DFTP.edid, 35);
5169  k = 210;
5170  p = (void *) k;
5171  // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p);
5172  MEditSetActCallback(DFTP.edid, ActEditCB, p);
5173 
5174 
5175  lbl = MCreateLabel(tb, "PWD:", FIXED_SMALL);
5178  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5179  MObjectSetBackgroundRGB(lbl, 112, 128, 112);
5180  MObjectSetTransparency(lbl, 0);
5181  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5182  MObjectSetCompositeWidth(lbl, 200);
5183 
5184  sprintf(buf, "%s",DFTP.ftppwd);
5185  DFTP.edpwd= MCreateHiddenEdit(tb, buf, 10, FIXED_SMALL, '*');
5186  MObjectSetForegroundRGB(DFTP.edpwd, 255, 255, 255);
5187  MObjectSetBackgroundRGB(DFTP.edpwd, 40, 96, 72);
5188  // MObjectSetCompositeWidth(DFTP.edpwd, 35);
5190  k = 220;
5191  p = (void *) k;
5192  // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p);
5193  MEditSetActCallback(DFTP.edpwd, ActEditCB, p);
5194 /*
5195  if (DAS.DOption.ftpbackup)
5196  MRButtonActivate(DFTP.rb[0]);
5197  else
5198  MRButtonActivate(DFTP.rb[1]);
5199 */
5200  tb = MCreateTableForm(obj, 2);
5201  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5202  MObjectSetResize(tb, True, False);
5204 
5205  pb = MCreatePButton(tb, "Save FTP.INI", FIXED_SMALL);
5206  MPButtonSetCallback(pb, PbftpCB, (void *) 0);
5207  MObjectSetBackgroundRGB(pb, 224, 224, 176);
5208  MObjectSetCompositeWidth(pb, 94);
5209 
5210  pb = MCreatePButton(tb, "Test FTP", FIXED_SMALL);
5211  MPButtonSetCallback(pb, PbftpCB, (void *) 1);
5212  MObjectSetBackgroundRGB(pb, 224, 224, 176);
5213  MObjectSetCompositeWidth(pb, 94);
5214 
5215 /***************************************************************************/
5216 /**************** OMU Thermo-regulation SECTION ***********************/
5217 /***************************************************************************/
5218 
5219  lbl = MCreateLabel(obj, "OMU THERMO-REGULATION", FIXED_SMALL);
5221  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5222  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
5223  MObjectSetTransparency(lbl, 0);
5224 
5225  lbl = MCreateLabel(obj, "Choose the Reference temp", FIXED_SMALL);
5227  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5228  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5229  MObjectSetTransparency(lbl, 0);
5230  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5231  MObjectSetCompositeWidth(lbl, 200);
5232 
5233  tb = MCreateTableForm(obj, 3);
5234  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5235  MObjectSetResize(tb, True, False);
5237 
5238  rb = MCreateRButton(tb, "Pelt. Int.", FIXED_SMALL);
5239  MPButtonSetCallback(rb, DB_TempHistCB, (void *) 0);
5241  MObjectSetForegroundRGB(rb, 255, 255, 255);
5242  MObjectSetCompositeWidth(rb, 100);
5243  if(DAS.DOption.refertemp == 0)
5244  MRButtonActivate(rb);
5245 
5246  rb = MCreateRButton(tb, "Optic", FIXED_SMALL);
5247  MPButtonSetCallback(rb, DB_TempHistCB, (void *) 1);
5249  MObjectSetForegroundRGB(rb, 255, 255, 255);
5250  MObjectSetCompositeWidth(rb, 90);
5251  if(DAS.DOption.refertemp == 1)
5252  MRButtonActivate(rb);
5253 
5254  rb = MCreateRButton(tb, "Grating", FIXED_SMALL);
5255  MPButtonSetCallback(rb, DB_TempHistCB, (void *) 2);
5257  MObjectSetForegroundRGB(rb, 255, 255, 255);
5258  MObjectSetCompositeWidth(rb, 90);
5259  if(DAS.DOption.refertemp == 2)
5260  MRButtonActivate(rb);
5261 
5262  lbl = MCreateLabel(obj, "Choose the Thermo-regulation mode", FIXED_SMALL);
5264  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5265  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5266  MObjectSetTransparency(lbl, 0);
5267  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5268  MObjectSetCompositeWidth(lbl, 250);
5269 
5270  tb = MCreateTableForm(obj, 3);
5271  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5272  MObjectSetResize(tb, True, False);
5274 
5275  rb = MCreateRButton(tb, "Cold only", FIXED_SMALL);
5276  MPButtonSetCallback(rb, DB_TempHistCB, (void *) 3);
5278  MObjectSetForegroundRGB(rb, 255, 255, 255);
5279  MObjectSetCompositeWidth(rb, 100);
5280  if(OMUTHR.TRType == 0)
5281  MRButtonActivate(rb);
5282 
5283  rb = MCreateRButton(tb, "Heat only", FIXED_SMALL);
5284  MPButtonSetCallback(rb, DB_TempHistCB, (void *) 4);
5286  MObjectSetForegroundRGB(rb, 255, 255, 255);
5287  MObjectSetCompositeWidth(rb, 90);
5288  if(OMUTHR.TRType == 1)
5289  MRButtonActivate(rb);
5290 
5291  rb = MCreateRButton(tb, "Cold/Heat", FIXED_SMALL);
5292  MPButtonSetCallback(rb, DB_TempHistCB, (void *) 5);
5294  MObjectSetForegroundRGB(rb, 255, 255, 255);
5295  MObjectSetCompositeWidth(rb, 90);
5296  if(OMUTHR.TRType == 2)
5297  MRButtonActivate(rb);
5298 
5299 /***************/
5300  lbl = MCreateLabel(obj, "Choose the Thermo-reg. Algorithm", FIXED_SMALL);
5302  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5303  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5304  MObjectSetTransparency(lbl, 0);
5305  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5306  MObjectSetCompositeWidth(lbl, 250);
5307 
5308  tb = MCreateTableForm(obj, 2);
5309  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5310  MObjectSetResize(tb, True, False);
5312 
5313  rb = MCreateRButton(tb, "Progressive", FIXED_SMALL);
5314  MPButtonSetCallback(rb, DB_TempHistCB, (void *) 6);
5316  MObjectSetForegroundRGB(rb, 255, 255, 255);
5317  MObjectSetCompositeWidth(rb, 100);
5318  if(OMUTHR.PID_On == 0)
5319  MRButtonActivate(rb);
5320 
5321  rb = MCreateRButton(tb, "PID", FIXED_SMALL);
5322  MPButtonSetCallback(rb, DB_TempHistCB, (void *) 7);
5324  MObjectSetForegroundRGB(rb, 255, 255, 255);
5325  MObjectSetCompositeWidth(rb, 90);
5326  if(OMUTHR.PID_On == 1)
5327  MRButtonActivate(rb);
5328 
5329  if(OMUTHR.PID_On == 1) //Create the field for PID Parameters
5330  {
5331  tb = MCreateTableForm(obj, 3);
5332  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5333  MObjectSetResize(tb, True, False);
5335 
5336  lbl = MCreateLabel(tb, "Prop.", FIXED_SMALL);
5338  //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN);
5339  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5340  MObjectSetBackgroundRGB(lbl, 112, 128, 112);
5341  MObjectSetTransparency(lbl, 0);
5342  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5343  MObjectSetCompositeWidth(lbl, 90);
5344 
5345  lbl = MCreateLabel(tb, "Integral", FIXED_SMALL);
5347  //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN);
5348  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5349  MObjectSetBackgroundRGB(lbl, 112, 128, 112);
5350  MObjectSetTransparency(lbl, 0);
5351  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5352  MObjectSetCompositeWidth(lbl, 90);
5353 
5354  lbl = MCreateLabel(tb, "Deriv.", FIXED_SMALL);
5356  //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN);
5357  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5358  MObjectSetBackgroundRGB(lbl, 112, 128, 112);
5359  MObjectSetTransparency(lbl, 0);
5360  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5361  MObjectSetCompositeWidth(lbl, 90);
5362 
5363 
5364  sprintf(buf, "%.1lf",OMUTHR.PID_kp);
5365  DAS.Gui.ConfigPanel.PID_edt[0] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL);
5366  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[0], 255, 255, 255);
5367  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.PID_edt[0], 40, 96, 72);
5368  k = 500;
5369  p = (void *) k;
5370  // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p);
5372 
5373 
5374  sprintf(buf, "%.3lf",OMUTHR.PID_ki);
5375  DAS.Gui.ConfigPanel.PID_edt[1] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL);
5376  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[1], 255, 255, 255);
5377  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.PID_edt[1], 40, 96, 72);
5378  k = 501;
5379  p = (void *) k;
5380  // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p);
5382 
5383  sprintf(buf, "%.4lf",OMUTHR.PID_kd);
5384 
5385  DAS.Gui.ConfigPanel.PID_edt[2] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL);
5386  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[2], 255, 255, 255);
5387  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.PID_edt[2], 40, 96, 72);
5388  k = 502;
5389  p = (void *) k;
5390  // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p);
5392  }
5393 
5394  pb = MCreatePButton(obj, "Temp History", FIXED_SMALL);
5395  MPButtonSetCallback(pb, PBTempHistoCB, (void *) 0);
5396  MObjectSetBackgroundRGB(pb, 224, 224, 176);
5397  MObjectSetCompositeWidth(pb, 123);
5398 
5399 
5400  /*---------------------------------------------------------------*/
5401  /*------ Dummy table ---------------------------------------*/
5402  tb = MCreateTableForm(obj, 2);
5403  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5404  MObjectSetResize(tb, True, True);
5406  /*------ Dummy table ---------------------------------------*/
5407  /*---------------------------------------------------------------*/
5408 
5409 
5410 
5411 }
5412 
5413 // create the 5th page of the option page
5414 void CONFP_opt_page5(int mod, MOBJECT obj)
5415 {
5416 
5417 // MOBJECT rowform; // generic row form
5418  MOBJECT rb ;
5419  MOBJECT lbl;
5420  MOBJECT tb,tb1 ; // generic table object
5421 // int i,k, *p;
5422 // char buf[64];
5423 
5424  MObjectSetText(obj, "Page 5");
5425 
5426 
5427  lbl = MCreateLabel(obj, "MIRROR IMAGE", FIXED_SMALL);
5428  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5429  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
5430  MObjectSetTransparency(lbl, 0);
5431 
5432 
5433  tb1 = MCreateTableForm(obj, 2);
5434  MObjectSetBackgroundRGB(tb1, 112, 128, 112);
5435  MObjectSetResize(tb1, True, False);
5436 
5437 
5438  lbl = MCreateLabel(tb1, "Along the X Axis ?", FIXED_SMALL);
5439  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5440  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5441  MObjectSetTransparency(lbl, 0);
5442  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5443  // MObjectSetCompositeWidth(lbl, 250);
5444 
5445  lbl = MCreateLabel(tb1, "Along the Y Axis ?", FIXED_SMALL);
5446  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5447  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5448  MObjectSetTransparency(lbl, 0);
5449  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5450  // MObjectSetCompositeWidth(lbl, 250);
5451 
5452  tb = MCreateTableForm(tb1, 2);
5453  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5454  MObjectSetResize(tb, True, False);
5455 
5456  rb = MCreateRButton(tb, "Yes", FIXED_SMALL);
5457  MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 0);
5459  MObjectSetForegroundRGB(rb, 255, 255, 255);
5460  // MObjectSetCompositeWidth(rb, 100);
5461  if(DAS.DOption.mirrorimg[XAX] == 1)
5462  MRButtonActivate(rb);
5463 
5464  rb = MCreateRButton(tb, "No", FIXED_SMALL);
5465  MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 1);
5467  MObjectSetForegroundRGB(rb, 255, 255, 255);
5468  // MObjectSetCompositeWidth(rb, 90);
5469  if(DAS.DOption.mirrorimg[XAX] == 0)
5470  MRButtonActivate(rb);
5471 
5472 
5473  tb = MCreateTableForm(tb1, 2);
5474  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5475  MObjectSetResize(tb, True, False);
5476 
5477 
5478 
5479  rb = MCreateRButton(tb, "Yes", FIXED_SMALL);
5480  MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 2);
5482  MObjectSetForegroundRGB(rb, 255, 255, 255);
5483  // MObjectSetCompositeWidth(rb, 100);
5484  if(DAS.DOption.mirrorimg[YAX] == 1)
5485  MRButtonActivate(rb);
5486 
5487  rb = MCreateRButton(tb, "No", FIXED_SMALL);
5488  MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 3);
5490  MObjectSetForegroundRGB(rb, 255, 255, 255);
5491  // MObjectSetCompositeWidth(rb, 90);
5492  if(DAS.DOption.mirrorimg[YAX] == 0)
5493  MRButtonActivate(rb);
5494 
5495 
5496  lbl = MCreateLabel(obj, "AMS OPTIONS", FIXED_SMALL);
5497  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5498  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
5499  MObjectSetTransparency(lbl, 0);
5500 
5501  lbl = MCreateLabel(obj, "Positioning Mode", FIXED_SMALL);
5502  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5503  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5504  MObjectSetTransparency(lbl, 0);
5505  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5506  MObjectSetCompositeWidth(lbl, 250);
5507 
5508  tb = MCreateTableForm(obj, 2);
5509  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5510  MObjectSetResize(tb, True, False);
5511 
5512  rb = MCreateRButton(tb, "Simultaneous", FIXED_SMALL);
5513  MPButtonSetCallback(rb, DB_AMSposmode_CB, (void *) 0);
5515  MObjectSetForegroundRGB(rb, 255, 255, 255);
5516  MObjectSetResize(rb, True, False);
5517  //MObjectSetCompositeWidth(rb, 100);
5518  if(DAS.DOption.smposmode == 1)
5519  MRButtonActivate(rb);
5520 
5521  rb = MCreateRButton(tb, "Sequential", FIXED_SMALL);
5522  MPButtonSetCallback(rb, DB_AMSposmode_CB, (void *) 1);
5524  MObjectSetForegroundRGB(rb, 255, 255, 255);
5525  MObjectSetResize(rb, True, False);
5526  //MObjectSetCompositeWidth(rb, 90);
5527  if(DAS.DOption.smposmode == 0)
5528  MRButtonActivate(rb);
5529 
5530 
5531  lbl = MCreateLabel(obj, "Display progression bars?", FIXED_SMALL);
5532  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5533  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5534  MObjectSetTransparency(lbl, 0);
5535  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5536  MObjectSetCompositeWidth(lbl, 250);
5537 
5538  tb = MCreateTableForm(obj, 2);
5539  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5540  MObjectSetResize(tb, True, False);
5541 
5542  rb = MCreateRButton(tb, "Yes", FIXED_SMALL);
5543  MPButtonSetCallback(rb, DB_AMSProgBar_CB, (void *) 1);
5545  MObjectSetForegroundRGB(rb, 255, 255, 255);
5546  MObjectSetResize(rb, True, False);
5547  //MObjectSetCompositeWidth(rb, 100);
5548  if(DAS.DOption.amsprogbar == 1)
5549  MRButtonActivate(rb);
5550 
5551  rb = MCreateRButton(tb, "No", FIXED_SMALL);
5552  MPButtonSetCallback(rb, DB_AMSProgBar_CB, (void *) 0);
5554  MObjectSetForegroundRGB(rb, 255, 255, 255);
5555  MObjectSetResize(rb, True, False);
5556  //MObjectSetCompositeWidth(rb, 90);
5557  if(DAS.DOption.amsprogbar == 0)
5558  MRButtonActivate(rb);
5559 
5560  /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
5561  /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
5562  lbl = MCreateLabel(obj, "MIGE Platform OPTIONS", FIXED_SMALL);
5563  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5564  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
5565  MObjectSetTransparency(lbl, 0);
5566 
5567  lbl = MCreateLabel(obj, "MIGE Status", FIXED_SMALL);
5568  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5569  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5570  MObjectSetTransparency(lbl, 0);
5571  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5572  MObjectSetCompositeWidth(lbl, 250);
5573 
5574  tb = MCreateTableForm(obj, 2);
5575  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5576  MObjectSetResize(tb, True, False);
5577 
5578  DAS.Gui.ConfigPanel.rbMIGEStatus[0]=MCreateRButton(tb, "NOT Connected", FIXED_SMALL);
5580  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEStatus[0], 255, 255, 255);
5582  //MObjectSetCompositeWidth(rb, 100);
5583  if(DAS.MIGE.linked == 0)
5586 
5587  DAS.Gui.ConfigPanel.rbMIGEStatus[1] = MCreateRButton(tb, "Connected", FIXED_SMALL);
5589  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEStatus[1], 255, 255, 255);
5591  //MObjectSetCompositeWidth(rb, 100);
5592  if(DAS.MIGE.linked == 1)
5595 
5596 
5597  lbl = MCreateLabel(obj, "MIGE Type", FIXED_SMALL);
5598  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5599  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5600  MObjectSetTransparency(lbl, 0);
5601  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5602  MObjectSetCompositeWidth(lbl, 250);
5603 
5604  tb = MCreateTableForm(obj, 2);
5605  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5606  MObjectSetResize(tb, True, False);
5607 
5608  DAS.Gui.ConfigPanel.rbMIGEtype[0] = MCreateRButton(tb, "Ver. 0.5", FIXED_SMALL);
5611  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEtype[0], 255, 255, 255);
5613  //MObjectSetCompositeWidth(rb, 100);
5614  if(DAS.MIGE.type == 0 )
5616 
5617  DAS.Gui.ConfigPanel.rbMIGEtype[1] = MCreateRButton(tb, "Ver. 1.5", FIXED_SMALL);
5620  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEtype[1], 255, 255, 255);
5622  //MObjectSetCompositeWidth(rb, 100);
5623  if(DAS.MIGE.type == 1 )
5625 
5626  DAS.Gui.ConfigPanel.rbMIGEtype[2] = MCreateRButton(tb, "Ver. 2.0", FIXED_SMALL);
5629  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEtype[2], 255, 255, 255);
5631  //MObjectSetCompositeWidth(rb, 100);
5632  if(DAS.MIGE.type == 2 )
5634 
5635 
5636 
5637 
5638  lbl = MCreateLabel(obj, "Operating mode", FIXED_SMALL);
5639  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5640  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5641  MObjectSetTransparency(lbl, 0);
5642  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5643  MObjectSetCompositeWidth(lbl, 250);
5644 
5645  tb = MCreateTableForm(obj, 2);
5646  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5647  MObjectSetResize(tb, True, False);
5648 
5649 
5650  DAS.Gui.ConfigPanel.rbMIGEopmode[0] = MCreateRButton(tb, "Solar Tracker", FIXED_SMALL);
5653  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEopmode[0], 255, 255, 255);
5655  //MObjectSetCompositeWidth(rb, 100);
5656  if(DAS.DOption.aaopmode == 0)
5658 
5659  DAS.Gui.ConfigPanel.rbMIGEopmode[1] = MCreateRButton(tb, "Anti Solar Tracker", FIXED_SMALL);
5662  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEopmode[1], 255, 255, 255);
5664  //MObjectSetCompositeWidth(rb, 100);
5665  if(DAS.DOption.aaopmode == 1)
5667 
5668  DAS.Gui.ConfigPanel.rbMIGEopmode[2] = MCreateRButton(tb, "Free positions", FIXED_SMALL);
5671  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbMIGEopmode[2], 255, 255, 255);
5673  //MObjectSetCompositeWidth(rb, 90);
5674  if(DAS.DOption.aaopmode == 2)
5676 
5677 
5678  if(DAS.MIGE.linked == 0)
5679  {
5684  }
5685  else
5690 
5691  /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
5692  /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
5693  /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
5694 
5695 
5696 
5697  /*---------------------------------------------------------------*/
5698  /*------ Dummy table ---------------------------------------*/
5699  tb = MCreateTableForm(obj, 2);
5700  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5701  MObjectSetResize(tb, True, True);
5703  /*------ Dummy table ---------------------------------------*/
5704  /*---------------------------------------------------------------*/
5705 
5706 
5707 }
5708 
5709 
5710 void edtDASReset_CB(MOBJECT p, LIST_ACT *la, void *ad)
5711 {
5712 
5713  int c = (int) ad;
5714  int er = 0;
5715 
5716 
5717  DAS.DOption.resetFreq = atoi(la->item);
5718 
5719 
5720 }
5721 
5722 void DB_ResetEnable_CB(MOBJECT o, void *a, void *v)
5723 {
5724 
5725  int er = 0;
5726  int c = (int) v;
5727 // char buff[64], str[32];
5728 
5730 
5731  if(er)
5732  {
5733  switch (c)
5734  {
5735  case 0:
5736 
5737  DAS.DOption.resetEnabled = 0;
5738 
5744 
5745 
5746  break;
5747  case 1:
5748  DAS.DOption.resetEnabled = 1;
5749 
5755  break;
5756 
5757  }
5758 
5759 
5760  }
5761 
5762 }
5763 
5764 
5765 void DB_ResetType_CB(MOBJECT o, void *a, void *v)
5766 {
5767 
5768  int er = 0;
5769  int c = (int) v,i,k;
5770  char buff[64], str[32];
5771 
5772  LIST_ACT * pla;
5773 
5774 
5775 
5776 
5778 
5779  if(er)
5780  {
5781  switch (c)
5782  {
5783  case RHOUR:
5784  DAS.DOption.resetType = RHOUR;
5785 
5786  if (DAS.Gui.ConfigPanel.lblReset != 0)
5787  {
5788  sprintf(buff, "%d", (int)DAS.DOption.resetFreq);
5790  for(i=1; i<24; i++)
5791  {
5792  sprintf(str, "%.d",i);
5793  MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L);
5794  if( strcmp(str,buff) ==0 )
5795  k=i;
5796  }
5799  sprintf(str, "%s", pla->item );
5802  DAS.DOption.resetFreq = atoi(pla->item);
5803 
5804  sprintf(buff, "Hour(s)");
5806  }
5807  break;
5808  case RDAY:
5809  DAS.DOption.resetType = RDAY;
5810 
5811  if (DAS.Gui.ConfigPanel.lblReset != 0)
5812  {
5813  sprintf(buff, "%d", (int)DAS.DOption.resetFreq);
5815  for(i=1; i<365; i++)
5816  {
5817  sprintf(str, "%.d",i);
5818  MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L);
5819  if( strcmp(str,buff) ==0 )
5820  k=i;
5821  }
5824  sprintf(str, "%s", pla->item );
5827  DAS.DOption.resetFreq = atoi(pla->item);
5828 
5829 
5830  sprintf(buff, "Day(s)");
5832  }
5833  break;
5834 
5835  }
5836 
5837 
5838  }
5839 
5840 }
5841 
5842 
5843 
5844 // create the 7th page of the option page
5845 void CONFP_opt_page7(int mod, MOBJECT obj)
5846 {
5847 
5848 // MOBJECT rowform; // generic row form
5849 // MOBJECT pb, rb ;
5850  MOBJECT lbl;
5851  MOBJECT tb; // generic table object
5852  int i,k;
5853 // char buf[64];
5854 // MOBJECT list;
5855 // int starti;
5856  float f=0;
5857  char str[80];
5858  char buff[_MAX_PATH];
5859 
5860  LIST_ACT * pla;
5861 
5862 
5863  MObjectSetText(obj, "Page 7");
5864 
5865 
5866 
5867  /******************************************************************/
5868  /*************** SHUTTER ******************************************/
5869  /******************************************************************/
5870 
5871  lbl = MCreateLabel(obj, "SHUTTER OPTIONS", FIXED_SMALL);
5872  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5873  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
5874  MObjectSetTransparency(lbl, 0);
5875 
5876  lbl = MCreateLabel(obj, "Is the EMShutter Installed?", FIXED_SMALL);
5877  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5878  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5879  MObjectSetTransparency(lbl, 0);
5880  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5881  MObjectSetCompositeWidth(lbl, 250);
5882 
5883  tb = MCreateTableForm(obj, 2);
5884  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5885  MObjectSetResize(tb, True, False);
5886 
5887  DAS.Gui.ConfigPanel.rbSHUTStatus[0] = MCreateRButton(tb, "Yes", FIXED_SMALL);
5889  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTStatus[0], 255, 255, 255);
5891  //MObjectSetCompositeWidth(rb, 100);
5892  if(DAS.DOption.emshutter == 1)
5895 
5896 
5899  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTStatus[1] , 255, 255, 255);
5901  //MObjectSetCompositeWidth(rb, 90);
5902  if(DAS.DOption.emshutter == 0)
5905 
5906  lbl = MCreateLabel(obj, "Choose Shutter Type", FIXED_SMALL);
5907  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5908  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5909  MObjectSetTransparency(lbl, 0);
5910  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5911  MObjectSetCompositeWidth(lbl, 250);
5912 
5913  tb = MCreateTableForm(obj, 3);
5914  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5915  MObjectSetResize(tb, True, False);
5916 
5917  DAS.Gui.ConfigPanel.rbSHUTType [0] = MCreateRButton(tb, "UniBlitz VS25", FIXED_SMALL);
5920  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTType [0], 255, 255, 255);
5922  //MObjectSetCompositeWidth(rb, 100);
5923  if(DAS.DOption.shuttertype == VS25)
5925 
5926  DAS.Gui.ConfigPanel.rbSHUTType [1] = MCreateRButton(tb, "Rotating Sh.", FIXED_SMALL);
5929  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTType [1], 255, 255, 255);
5931  //MObjectSetCompositeWidth(rb, 100);
5932  if(DAS.DOption.shuttertype == ROTSHUT)
5934 
5935  DAS.Gui.ConfigPanel.rbSHUTType[2] = MCreateRButton(tb, "Torque Motor", FIXED_SMALL);
5938  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbSHUTType[2], 255, 255, 255);
5940  //MObjectSetCompositeWidth(rb, 100);
5941  if(DAS.DOption.shuttertype == TORQUEM)
5943 
5944 
5945 
5946  if(DAS.DOption.emshutter == 0)
5947  {
5951  }
5952  else
5953  {
5957  }
5958  /******************************************************************/
5959  /*************** END SHUTTER **************************************/
5960  /******************************************************************/
5961 
5962 
5963 
5964  /******************************************************************/
5965  /*************** FILTER WHEEL *************************************/
5966  /******************************************************************/
5967 
5968  lbl = MCreateLabel(obj, "FILTER WHEEL OPTIONS", FIXED_SMALL);
5969  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5970  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
5971  MObjectSetTransparency(lbl, 0);
5972 
5973 
5974  lbl = MCreateLabel(obj, "Choose Installed Module", FIXED_SMALL);
5975  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5976  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5977  MObjectSetTransparency(lbl, 0);
5978  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5979  MObjectSetCompositeWidth(lbl, 250);
5980 
5981  tb = MCreateTableForm(obj, 3);
5982  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5983  MObjectSetResize(tb, True, False);
5984 
5985  DAS.Gui.ConfigPanel.rbFilterType [0] = MCreateRButton(tb, "Simple-SM3", FIXED_SMALL);
5988  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbFilterType [0], 255, 255, 255);
5990  //MObjectSetCompositeWidth(rb, 100);
5991  if(DAS.DOption.filtertype == FSIMPLE)
5993 
5994  DAS.Gui.ConfigPanel.rbFilterType [1] = MCreateRButton(tb, "Double-SM3+SM4", FIXED_SMALL);
5997  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbFilterType [1], 255, 255, 255);
5999  //MObjectSetCompositeWidth(rb, 100);
6000  if(DAS.DOption.filtertype == FDOUBLE)
6002 
6003  DAS.Gui.ConfigPanel.rbFilterType[2] = MCreateRButton(tb, "Plus-SM3+TM", FIXED_SMALL);
6006  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbFilterType[2], 255, 255, 255);
6008  //MObjectSetCompositeWidth(rb, 100);
6009  if(DAS.DOption.filtertype == FPLUS)
6011 
6012 
6013 /*
6014  if(DAS.DOption.emshutter == 0)
6015  {
6016  MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]);
6017  MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]);
6018  MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]);
6019  }
6020  else
6021  {
6022  MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]);
6023  MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]);
6024  MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]);
6025  }
6026 
6027 */
6028 
6029  /******************************************************************/
6030  /*************** END FILTER WHEEL ********************************/
6031  /******************************************************************/
6032 
6033  /******************************************************************/
6034  /*************** RESET DAS Windows Restart ***********************/
6035  /******************************************************************/
6036 
6037  lbl = MCreateLabel(obj, "RESET WINDOWS OPTIONS", FIXED_SMALL);
6038  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6039  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
6040  MObjectSetTransparency(lbl, 0);
6041 
6042  /*----------------------------------------------------------------*/
6043 
6044  lbl = MCreateLabel(obj, "DAS/SYSTEM Reset ", FIXED_SMALL);
6045  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6046  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6047  MObjectSetTransparency(lbl, 0);
6048  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6049  MObjectSetCompositeWidth(lbl, 250);
6050 
6051  tb = MCreateTableForm(obj, 2);
6052  MObjectSetBackgroundRGB(tb, 112, 128, 112);
6053  MObjectSetResize(tb, True, False);
6054 
6055  DAS.Gui.ConfigPanel.rbResetEnab[0] = MCreateRButton(tb, "Disabled", FIXED_SMALL);
6057  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbResetEnab[0], 255, 255, 255);
6059  //MObjectSetCompositeWidth(rb, 100);
6060  if(DAS.DOption.resetEnabled == 0)
6063 
6064 
6065  DAS.Gui.ConfigPanel.rbResetEnab[1] = MCreateRButton(tb, "Enabled", FIXED_SMALL);
6067  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbResetEnab[1], 255, 255, 255);
6069  //MObjectSetCompositeWidth(rb, 100);
6070  if(DAS.DOption.resetEnabled == 1)
6073 
6074 
6075 
6076  /*----------------------------------------------------------------*/
6077  lbl = MCreateLabel(obj, "Reset Type", FIXED_SMALL);
6078  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6079  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6080  MObjectSetTransparency(lbl, 0);
6081  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6082  MObjectSetCompositeWidth(lbl, 250);
6083 
6084  tb = MCreateTableForm(obj, 2);
6085  MObjectSetBackgroundRGB(tb, 112, 128, 112);
6086  MObjectSetResize(tb, True, False);
6087 
6088  DAS.Gui.ConfigPanel.rbDASResPer[0] = MCreateRButton(tb, "HOUR(s)", FIXED_SMALL);
6091  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDASResPer[0], 255, 255, 255);
6093  //MObjectSetCompositeWidth(rb, 100);
6094 
6095  DAS.Gui.ConfigPanel.rbDASResPer[1] = MCreateRButton(tb, "DAY(s)", FIXED_SMALL);
6098  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDASResPer[1], 255, 255, 255);
6100  //MObjectSetCompositeWidth(rb, 100);
6101 
6102 
6103  lbl = MCreateLabel(obj, "Reset Frequency", FIXED_SMALL);
6104  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6105  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6106  MObjectSetTransparency(lbl, 0);
6107  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6108  MObjectSetCompositeWidth(lbl, 250);
6109 
6110  tb = MCreateTableForm(obj, 3);
6111  MObjectSetBackgroundRGB(tb, 112, 128, 112);
6112  MObjectSetResize(tb, True, False);
6113 
6114  lbl = MCreateLabel(tb, "Re-start every ", FIXED_SMALL);
6115  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6116  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6117  MObjectSetTransparency(lbl, 0);
6118  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6119  //MObjectSetCompositeWidth(lbl, 250);
6120 
6121 
6122 
6123  sprintf(buff, "%d", (int)DAS.DOption.resetFreq);
6124  DAS.Gui.ConfigPanel.edtDASReset = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL);
6125  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtDASReset, 255, 255, 255);
6129 
6130 
6132  if (DAS.DOption.resetType) // Days
6133  {
6134  for(i=1; i<365; i++)
6135  {
6136  sprintf(str, "%.d",i);
6137  MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L);
6138  if( strcmp(str,buff) ==0 )
6139  k=i;
6140  }
6141  }
6142  else //hours
6143  {
6144  for(i=1; i<24; i++)
6145  {
6146  sprintf(str, "%.d",i);
6147  MSListAddItem(DAS.Gui.ConfigPanel.listReset, str, 0L);
6148  if( strcmp(str,buff) ==0 )
6149  k=i;
6150  }
6151 
6152  }
6153 /*
6154 
6155  list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtDSZA);
6156  for(i=0; i<20; i++)
6157  {
6158  f = f+0.10;
6159  sprintf(str, "%.3f",f);
6160  MSListAddItem(list, str, 0L);
6161  if( strcmp(str,buff) ==0 )
6162  k=i;
6163 
6164  }
6165 
6166  MSListSelectElement(list, k);
6167  pla = MSListGetSelected(list);
6168  sprintf(str, "%s", pla->item );
6169  MObjectSetText(DAS.Gui.ConfigPanel.edtDSZA, str);
6170  MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDSZA, edtDSZA_CB, (void *) 0);
6171  SZADelta.DeltaSZA = atof(pla->item);
6172 
6173 
6174 */
6175 
6176 
6179  sprintf(str, "%s", pla->item );
6182  DAS.DOption.resetFreq = atoi(pla->item);
6183 
6184  if (DAS.DOption.resetType) // Days
6185  sprintf(buff, "Day(s)", DAS.DOption.resetFreq);
6186  else
6187  sprintf(buff, "Hour(s)", DAS.DOption.resetFreq);
6188 
6189  DAS.Gui.ConfigPanel.lblReset = MCreateLabel(tb, buff, FIXED_SMALL);
6190  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblReset, 255, 255, 255);
6191  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblReset, 96, 132, 152);
6194 
6195  if(DAS.DOption.resetType == RHOUR)
6197 
6198  if(DAS.DOption.resetType == RDAY)
6200 
6201  /******************************************************************/
6202  /*************** END RESET DAS ********************************/
6203  /******************************************************************/
6204 
6205 
6206  /*---------------------------------------------------------------*/
6207  /*------ Dummy table ---------------------------------------*/
6208  tb = MCreateTableForm(obj, 2);
6209  MObjectSetBackgroundRGB(tb, 112, 128, 112);
6210  MObjectSetResize(tb, True, True);
6212  /*------ Dummy table ---------------------------------------*/
6213  /*---------------------------------------------------------------*/
6214 
6215 
6216 }
6217 
6218 
6219 
6221 {
6222 
6223 // MOBJECT rowform; // generic row form
6224  MOBJECT rowform1;
6225  MOBJECT colform, colform2,colform3,colform4;
6226  MOBJECT rb ;
6227  MOBJECT lbl, list, optedit;
6228 // MOBJECT tb ; // generic table object
6229  int i;
6230  int lenedit = 12;
6231  char buf[64];
6232  int maxangle;
6233 
6234  if (mod == 1)
6235  maxangle = 181;
6236  else
6237  maxangle = 96;
6238 
6239  colform = MCreateColForm(p);
6240  MFormSetSpacing(colform, 0);
6241  MObjectSetResize(colform, False, False);
6242  MObjectAlign(colform, CENTER_ALIGN, TOP_ALIGN);
6243  MObjectSetTransparency(colform, 255);
6244  MObjectSetShadow(colform, WS_NONE, 0, 0);
6245 
6246 
6247 
6248  rowform1 = MCreateRowForm(colform);
6249  MFormSetSpacing(rowform1, 0);
6250  MObjectSetResize(rowform1, False, True);
6251  MObjectAlign(rowform1, LEFT_ALIGN, TOP_ALIGN);
6252  MObjectSetTransparency(rowform1, 255);
6253  MObjectSetShadow(rowform1, WS_NONE, 0, 0);
6254 
6255 
6256  rb = MCreateRButton(rowform1, "", FIXED_SMALL);
6257 // MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 0);
6259  MObjectSetForegroundRGB(rb, 255, 255, 255);
6260  MObjectSetTransparency(rb, 255);
6261  MObjectSetResize(rb, True, False);
6262  MObjectSetCompositeWidth(rb, 25);
6263 // if(DAS.DOption.mirrorimg == 1)
6264 // MRButtonActivate(rb);
6265 
6266 
6267  rb = MCreateRButton(rowform1, "", FIXED_SMALL);
6268 // MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 1);
6270  MObjectSetForegroundRGB(rb, 255, 255, 255);
6271  MObjectSetResize(rb, True, False);
6272  MObjectSetTransparency(rb, 255);
6273  MObjectSetCompositeWidth(rb, 25);
6274 // if(DAS.DOption.mirrorimg == 0)
6275 // MRButtonActivate(rb);
6276 
6277 
6278 
6279  colform2 = MCreateColForm(colform);
6280  MFormSetSpacing(colform2, 0);
6281  MObjectSetResize(colform2, False, False);
6282  MObjectSetTransparency(colform2, 255);
6283  MObjectSetShadow(colform2, WS_NONE, 0, 0);
6284 
6285  rowform1 = MCreateRowForm(colform2);
6286  MFormSetSpacing(rowform1, 0);
6287  MObjectSetResize(rowform1, False, False);
6288  MObjectSetShadow(rowform1, WS_NONE, 0, 0);
6289  MObjectSetTransparency(rowform1, 255);
6290 
6291  colform3 = MCreateColForm(rowform1);
6292  MFormSetSpacing(colform3, 0);
6293  MObjectSetResize(colform3, False, False);
6294  MObjectAlign(colform3, LEFT_ALIGN, TOP_ALIGN);
6295  MObjectSetTransparency(colform3, 255);
6296  MObjectSetShadow(colform3, WS_NONE, 0, 0);
6297 
6298  sprintf(buf, "0");
6299  optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL);
6300  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6301  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6302  MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN);
6303  MEditDisableEditing(optedit);
6304  list = MOptionEditGetList(optedit);
6305  for(i=0; i<maxangle; i++)
6306  {
6307  sprintf(buf, "%d",i);
6308  MSListAddItem(list, buf, 0L);
6309  }
6310  MSListSelectElement(list, 0);
6311 
6312  lbl = MCreateLabel(colform3, "<SZA<", FIXED_SMALL);
6313  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6314  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6315  MObjectSetTransparency(lbl, 0);
6316  MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN);
6317  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6318  MObjectSetResize(lbl, False, False);
6319 
6320  sprintf(buf, "95");
6321  optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL);
6322  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6323  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6324  MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN);
6325  MEditDisableEditing(optedit);
6326  list = MOptionEditGetList(optedit);
6327  for(i=0; i<maxangle; i++)
6328  {
6329  sprintf(buf, "%d",i);
6330  MSListAddItem(list, buf, 0L);
6331  }
6332  if (mod == 1)
6333  MSListSelectElement(list, 180);
6334  else
6335  MSListSelectElement(list, 95);
6336 
6337 
6338 
6339  colform4 = MCreateColForm(rowform1);
6340  MFormSetSpacing(colform4, 0);
6341  MObjectSetTransparency(colform4, 255);
6342  MObjectSetShadow(colform4, WS_NONE, 0, 0);
6343 
6344 
6345 
6346 
6347  sprintf(buf, "0");
6348  optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL);
6349  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6350  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6351  MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN);
6352  MEditDisableEditing(optedit);
6353  list = MOptionEditGetList(optedit);
6354  for(i=0; i<maxangle; i++)
6355  {
6356  sprintf(buf, "%d",i);
6357  MSListAddItem(list, buf, 0L);
6358  }
6359  MSListSelectElement(list, 0);
6360 
6361 
6362  sprintf(buf, "<SZA<");
6363  lbl = MCreateLabel(colform4, buf, FIXED_SMALL);
6364  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6365  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6366  MObjectSetTransparency(lbl, 0);
6367  // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6368  MObjectSetResize(lbl, True, False);
6369 
6370  sprintf(buf, "50");
6371  optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL);
6372  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6373  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6374  MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN);
6375  MEditDisableEditing(optedit);
6376  list = MOptionEditGetList(optedit);
6377  for(i=0; i<maxangle; i++)
6378  {
6379  sprintf(buf, "%d",i);
6380  MSListAddItem(list, buf, 0L);
6381  }
6382  MSListSelectElement(list, 50);
6383 
6384 
6385  lbl = MCreateLabel(colform4, "OR", FIXED_SMALL);
6386  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6387  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6388  MObjectSetTransparency(lbl, 0);
6389  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6390  MObjectSetResize(lbl, True, False);
6391 
6392  sprintf(buf, "75");
6393  optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL);
6394  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6395  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6396  MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN);
6397  MEditDisableEditing(optedit);
6398  list = MOptionEditGetList(optedit);
6399  for(i=0; i<maxangle; i++)
6400  {
6401  sprintf(buf, "%d",i);
6402  MSListAddItem(list, buf, 0L);
6403  }
6404  MSListSelectElement(list, 75);
6405 
6406  lbl = MCreateLabel(colform4, "<SZA<", FIXED_SMALL);
6407  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6408  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6409  MObjectSetTransparency(lbl, 0);
6410  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6411  MObjectSetResize(lbl, True, False);
6412 
6413  sprintf(buf, "95");
6414  optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL);
6415  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6416  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6417  MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN);
6418  MEditDisableEditing(optedit);
6419  list = MOptionEditGetList(optedit);
6420  for(i=0; i<maxangle; i++)
6421  {
6422  sprintf(buf, "%d",i);
6423  MSListAddItem(list, buf, 0L);
6424  }
6425  if (mod == 1)
6426  MSListSelectElement(list, 180);
6427  else
6428  MSListSelectElement(list, 95);
6429 
6430 
6431 }
6432 
6433 
6434 
6435 // create the 6th page of the option page
6436 void CONFP_opt_page6(int mod, MOBJECT obj)
6437 {
6438 
6439  MOBJECT rowform; // generic row form
6440 // MOBJECT colform, colform1,colform2,colform3,colform4;
6441 // MOBJECT pb, rb ;
6442  MOBJECT lbl, list, optedit;
6443  MOBJECT tb ; // generic table object
6444  int i;
6445  int lenedit = 12;
6446  char buf[64], str[16];
6447  unsigned char lesseq = 242, greateq=241;
6448 
6449 
6450  MObjectSetText(obj, "Page 6");
6451 
6452  lbl = MCreateLabel(obj, "INPUTS <--> DEVICES", FIXED_SMALL);
6453  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6454  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
6455  MObjectSetTransparency(lbl, 0);
6456 
6457 /* lbl = MCreateLabel(obj, "Input <--> Device", FIXED_SMALL);
6458  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6459  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6460  MObjectSetTransparency(lbl, 0);
6461  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6462  MObjectSetCompositeWidth(lbl, 250);
6463 */
6464  tb = MCreateTableForm(obj, 4);
6465  MObjectSetBackgroundRGB(tb, 112, 128, 112);
6467 
6468  if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 )
6469  sprintf(str, "%s",Mir_CodeTropo[0]);
6470  else
6471  sprintf(str, "%s",Mir_Code[0]);
6472 
6473  sprintf(buf, "%s",str);
6474  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
6475  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6476  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6477  MObjectSetTransparency(lbl, 0);
6478  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6479 // MObjectSetCompositeWidth(lbl, 250);
6480 
6481 
6482  sprintf(buf, "%s",DeviceTypeInput[0]);
6483  optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL);
6484  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6485  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6486  MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN);
6487  MEditDisableEditing(optedit);
6488  list = MOptionEditGetList(optedit);
6489 
6490  for(i=0; i<8; i++)
6491  {
6492  sprintf(buf, "%s",DeviceTypeInput[i]);
6493  MSListAddItem(list, buf, 0L);
6494  }
6495  if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 )
6496  MSListSelectElement(list, 2);
6497  else
6498  MSListSelectElement(list, 0);
6499 
6500  sprintf(buf, "%s",Mir_Code[1]);
6501  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
6502  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6503  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6504  MObjectSetTransparency(lbl, 0);
6505  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6506 // MObjectSetCompositeWidth(lbl, 250);
6507 
6508  sprintf(buf, "%s",DeviceTypeInput[6]);
6509  optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL);
6510  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6511  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6512  MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN);
6513  MEditDisableEditing(optedit);
6514  list = MOptionEditGetList(optedit);
6515  for(i=0; i<8; i++)
6516  {
6517  sprintf(buf, "%s",DeviceTypeInput[i]);
6518  MSListAddItem(list, buf, 0L);
6519  }
6520  MSListSelectElement(list, 1);
6521 
6522 
6523  if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 )
6524  sprintf(str, "%s",Mir_CodeTropo[2]);
6525  else
6526  sprintf(str, "%s",Mir_Code[2]);
6527 
6528  sprintf(buf, "%s",str);
6529  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
6530  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6531  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6532  MObjectSetTransparency(lbl, 0);
6533  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6534 // MObjectSetCompositeWidth(lbl, 250);
6535 
6536  if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 )
6537  sprintf(buf, "%s",DeviceTypeInput[7]);
6538  else
6539  sprintf(buf, "%s",DeviceTypeInput[2]);
6540  optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL);
6541  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6542  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6543  MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN);
6544  MEditDisableEditing(optedit);
6545  list = MOptionEditGetList(optedit);
6546  for(i=0; i<8; i++)
6547  {
6548  sprintf(buf, "%s",DeviceTypeInput[i]);
6549  MSListAddItem(list, buf, 0L);
6550  }
6551  if (DAS.Paramini.EqType == TROPOGAS || DAS.Paramini.EqType == SPATRAM3 || DAS.Paramini.EqType == GASCODNG4 )
6552  MSListSelectElement(list, 7);
6553  else
6554  MSListSelectElement(list, 2);
6555 
6556  sprintf(buf, "%s",Mir_Code[3]);
6557  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
6558  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6559  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6560  MObjectSetTransparency(lbl, 0);
6561  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6562 // MObjectSetCompositeWidth(lbl, 250);
6563 
6564  sprintf(buf, "%s",DeviceTypeInput[3]);
6565  optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL);
6566  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6567  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6568  MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN);
6569  MEditDisableEditing(optedit);
6570  list = MOptionEditGetList(optedit);
6571  for(i=0; i<8; i++)
6572  {
6573  sprintf(buf, "%s",DeviceTypeInput[i]);
6574  MSListAddItem(list, buf, 0L);
6575  }
6576  MSListSelectElement(list, 3);
6577 
6578 
6579  lbl = MCreateLabel(obj, "MEASUREMENTS SCHEDULING", FIXED_SMALL);
6580  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6581  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
6582  MObjectSetTransparency(lbl, 0);
6583 
6584 
6585 /***************************************************************/
6586 // 1 start
6587  rowform = MCreateRowForm(obj);
6588  MFormSetSpacing(rowform, 0);
6589  MObjectSetTransparency(rowform, 255);
6590 
6591 
6592  lbl = MCreateLabel(rowform, "ZenithSky", FIXED_SMALL);
6593  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6594  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6595  MObjectSetTransparency(lbl, 0);
6596  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6597  MObjectSetCompositeWidth(lbl, 250);
6598 
6599 
6600  CONFP_opt_ScheMeas(0, rowform);
6601 /*
6602  colform = MCreateColForm(rowform);
6603  MFormSetSpacing(colform, 0);
6604  MObjectSetResize(colform, False, False);
6605  MObjectAlign(colform, CENTER_ALIGN, TOP_ALIGN);
6606  MObjectSetTransparency(colform, 255);
6607  MObjectSetShadow(colform, WS_NONE, 0, 0);
6608 
6609 
6610 
6611  rowform1 = MCreateRowForm(colform);
6612  MFormSetSpacing(rowform1, 0);
6613  MObjectSetResize(rowform1, False, True);
6614  MObjectAlign(rowform1, LEFT_ALIGN, TOP_ALIGN);
6615  MObjectSetTransparency(rowform1, 255);
6616  MObjectSetShadow(rowform1, WS_NONE, 0, 0);
6617 
6618 
6619  rb = MCreateRButton(rowform1, "", FIXED_SMALL);
6620  MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 0);
6621  MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN);
6622  MObjectSetForegroundRGB(rb, 255, 255, 255);
6623  MObjectSetTransparency(rb, 255);
6624  MObjectSetResize(rb, True, False);
6625  MObjectSetCompositeWidth(rb, 25);
6626 // if(DAS.DOption.mirrorimg == 1)
6627 // MRButtonActivate(rb);
6628 
6629 
6630  rb = MCreateRButton(rowform1, "", FIXED_SMALL);
6631  MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 1);
6632  MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN);
6633  MObjectSetForegroundRGB(rb, 255, 255, 255);
6634  MObjectSetResize(rb, True, False);
6635  MObjectSetTransparency(rb, 255);
6636  MObjectSetCompositeWidth(rb, 25);
6637 // if(DAS.DOption.mirrorimg == 0)
6638 // MRButtonActivate(rb);
6639 
6640 
6641 
6642  colform2 = MCreateColForm(colform);
6643  MFormSetSpacing(colform2, 0);
6644  MObjectSetResize(colform2, False, False);
6645  MObjectSetTransparency(colform2, 255);
6646  MObjectSetShadow(colform2, WS_NONE, 0, 0);
6647 
6648  rowform1 = MCreateRowForm(colform2);
6649  MFormSetSpacing(rowform1, 0);
6650  MObjectSetResize(rowform1, False, False);
6651  MObjectSetShadow(rowform1, WS_NONE, 0, 0);
6652  MObjectSetTransparency(rowform1, 255);
6653 
6654  colform3 = MCreateColForm(rowform1);
6655  MFormSetSpacing(colform3, 0);
6656  MObjectSetResize(colform3, False, False);
6657  MObjectAlign(colform3, LEFT_ALIGN, TOP_ALIGN);
6658  MObjectSetTransparency(colform3, 255);
6659  MObjectSetShadow(colform3, WS_NONE, 0, 0);
6660 
6661  sprintf(buf, "0");
6662  optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL);
6663  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6664  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6665  MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN);
6666  MEditDisableEditing(optedit);
6667  list = MOptionEditGetList(optedit);
6668  for(i=0; i<96; i++)
6669  {
6670  sprintf(buf, "%d",i);
6671  MSListAddItem(list, buf, 0L);
6672  }
6673  MSListSelectElement(list, 0);
6674 
6675  lbl = MCreateLabel(colform3, "<SZA<", FIXED_SMALL);
6676  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6677  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6678  MObjectSetTransparency(lbl, 0);
6679  MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN);
6680  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6681  MObjectSetResize(lbl, False, False);
6682 
6683  sprintf(buf, "95");
6684  optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL);
6685  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6686  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6687  MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN);
6688  MEditDisableEditing(optedit);
6689  list = MOptionEditGetList(optedit);
6690  for(i=0; i<96; i++)
6691  {
6692  sprintf(buf, "%d",i);
6693  MSListAddItem(list, buf, 0L);
6694  }
6695  MSListSelectElement(list, 95);
6696 
6697 
6698  colform4 = MCreateColForm(rowform1);
6699  MFormSetSpacing(colform4, 0);
6700  MObjectSetTransparency(colform4, 255);
6701  MObjectSetShadow(colform4, WS_NONE, 0, 0);
6702 
6703 
6704 
6705 
6706  sprintf(buf, "0");
6707  optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL);
6708  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6709  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6710  MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN);
6711  MEditDisableEditing(optedit);
6712  list = MOptionEditGetList(optedit);
6713  for(i=0; i<96; i++)
6714  {
6715  sprintf(buf, "%d",i);
6716  MSListAddItem(list, buf, 0L);
6717  }
6718  MSListSelectElement(list, 0);
6719 
6720 
6721  sprintf(buf, "<SZA<");
6722  lbl = MCreateLabel(colform4, buf, FIXED_SMALL);
6723  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6724  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6725  MObjectSetTransparency(lbl, 0);
6726  // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6727  MObjectSetResize(lbl, True, False);
6728 
6729  sprintf(buf, "50");
6730  optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL);
6731  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6732  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6733  MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN);
6734  MEditDisableEditing(optedit);
6735  list = MOptionEditGetList(optedit);
6736  for(i=0; i<96; i++)
6737  {
6738  sprintf(buf, "%d",i);
6739  MSListAddItem(list, buf, 0L);
6740  }
6741  MSListSelectElement(list, 50);
6742 
6743 
6744  lbl = MCreateLabel(colform4, "OR", FIXED_SMALL);
6745  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6746  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6747  MObjectSetTransparency(lbl, 0);
6748  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6749  MObjectSetResize(lbl, True, False);
6750 
6751  sprintf(buf, "75");
6752  optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL);
6753  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6754  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6755  MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN);
6756  MEditDisableEditing(optedit);
6757  list = MOptionEditGetList(optedit);
6758  for(i=0; i<96; i++)
6759  {
6760  sprintf(buf, "%d",i);
6761  MSListAddItem(list, buf, 0L);
6762  }
6763  MSListSelectElement(list, 75);
6764 
6765  lbl = MCreateLabel(colform4, "<SZA<", FIXED_SMALL);
6766  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6767  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6768  MObjectSetTransparency(lbl, 0);
6769  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6770  MObjectSetResize(lbl, True, False);
6771 
6772  sprintf(buf, "95");
6773  optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL);
6774  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6775  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6776  MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN);
6777  MEditDisableEditing(optedit);
6778  list = MOptionEditGetList(optedit);
6779  for(i=0; i<96; i++)
6780  {
6781  sprintf(buf, "%d",i);
6782  MSListAddItem(list, buf, 0L);
6783  }
6784  MSListSelectElement(list, 95);
6785 
6786 
6787 // 1 End
6788 /***************************************************************/
6789 
6790 /***************************************************************/
6791 // 2 start
6792  rowform = MCreateRowForm(obj);
6793  MFormSetSpacing(rowform, 0);
6794  MObjectSetTransparency(rowform, 255);
6795 
6796 
6797  lbl = MCreateLabel(rowform, "Horizontal", FIXED_SMALL);
6798  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6799  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6800  MObjectSetTransparency(lbl, 0);
6801  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6802  MObjectSetCompositeWidth(lbl, 250);
6803 
6804 
6805  CONFP_opt_ScheMeas(1, rowform);
6806 
6807 /*
6808 
6809  lbl = MCreateLabel(obj, "Horizontal", FIXED_SMALL);
6810  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6811  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6812  MObjectSetTransparency(lbl, 0);
6813  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6814  MObjectSetCompositeWidth(lbl, 250);
6815 
6816 */
6817 
6818  rowform = MCreateRowForm(obj);
6819  MFormSetSpacing(rowform, 0);
6820  MObjectSetTransparency(rowform, 255);
6821 
6822 
6823  lbl = MCreateLabel(rowform, "Radiometric", FIXED_SMALL);
6824  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6825  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6826  MObjectSetTransparency(lbl, 0);
6827  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6828  MObjectSetCompositeWidth(lbl, 250);
6829 
6830 
6831  CONFP_opt_ScheMeas(0, rowform);
6832 
6833 /*
6834  lbl = MCreateLabel(obj, "Radiometric", FIXED_SMALL);
6835  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6836  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6837  MObjectSetTransparency(lbl, 0);
6838  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6839  MObjectSetCompositeWidth(lbl, 250);
6840 
6841 */
6842  rowform = MCreateRowForm(obj);
6843  MFormSetSpacing(rowform, 0);
6844  MObjectSetTransparency(rowform, 255);
6845 
6846 
6847  lbl = MCreateLabel(rowform, "Off-Axis", FIXED_SMALL);
6848  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6849  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6850  MObjectSetTransparency(lbl, 0);
6851  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6852  MObjectSetCompositeWidth(lbl, 250);
6853 
6854 
6855  CONFP_opt_ScheMeas(0, rowform);
6856 /*
6857 
6858  lbl = MCreateLabel(obj, "Off-Axis", FIXED_SMALL);
6859  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6860  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6861  MObjectSetTransparency(lbl, 0);
6862  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6863  MObjectSetCompositeWidth(lbl, 250);
6864 */
6865 
6866  /*---------------------------------------------------------------*/
6867  /*------ Dummy table ---------------------------------------*/
6868  tb = MCreateTableForm(obj, 2);
6869  MObjectSetBackgroundRGB(tb, 112, 128, 112);
6870  MObjectSetResize(tb, True, True);
6872  /*------ Dummy table ---------------------------------------*/
6873  /*---------------------------------------------------------------*/
6874 
6875 
6876 }
6877 
6878 
6879 
6880 //Create the Option page (with 6 sub-pages)
6881 void CONFP_Options(int mod, MOBJECT mo)
6882 {
6883 
6884 
6885  MOBJECT rowform; // generic row form
6886 
6887  MOBJECT rowform1; // generic row form
6888 // MOBJECT PFAMS; // paged form for AMS
6889  MOBJECT POPT; // paged form for AMS
6890 // MOBJECT edit; // generic edit object
6891 // MOBJECT radiobutt[2]; // generic radio button
6892 
6893 // MOBJECT RColButt;
6894  MOBJECT pb;
6895 // MOBJECT list;
6896 // MOBJECT _tbutton000;
6897 // MOBJECT _tbutton001;
6898 // MOBJECT form2;
6899 // MOBJECT lbl;
6900  MOBJECT tb; // generic table object
6901 // char buf[64];
6902 // int *p;
6903 
6904 
6905  MObjectSetText(mo, "Options");
6906 
6907  rowform = MCreateRowForm(mo);
6908  MObjectSetBackgroundRGB(rowform, 112, 128, 112);
6909 // MObjectSetResize(rowform, True, True);
6910  MObjectSetCompositeWidth(rowform, 400);
6911  MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN);
6912 
6913  POPT = MCreateTabbedRowForm(rowform, 7, FIXED_SMALL);
6914  MObjectSetForegroundRGB(POPT, 255, 255, 255);
6915  MObjectSetBackgroundRGB(POPT, 112, 128, 112);
6917  MObjectSetCompositeWidth(POPT, 390);
6918  MObjectSetResize(POPT, False, False);
6919 
6920 
6921 
6922 
6923 
6924 
6925 
6926  //Creation page 1
6927  CONFP_opt_page1(0, POPT);
6928 
6929  MPagedFormSetActivePage(POPT, 1);
6930  //Creation page 2
6931  CONFP_opt_page2(0, POPT);
6932 
6933  MPagedFormSetActivePage(POPT, 2);
6934  //Creation page 3
6935  CONFP_opt_page3(0, POPT);
6936 
6937  MPagedFormSetActivePage(POPT, 3);
6938  //Creation page 4
6939  CONFP_opt_page4(0, POPT);
6940 
6941  MPagedFormSetActivePage(POPT, 4);
6942  //Creation page 5
6943  CONFP_opt_page5(0, POPT);
6944 
6945  MPagedFormSetActivePage(POPT, 5);
6946  //Creation page 6
6947  CONFP_opt_page6(0, POPT);
6948 
6949  MPagedFormSetActivePage(POPT, 6);
6950  //Creation page 7
6951  CONFP_opt_page7(0, POPT);
6952 
6953 
6954  MPagedFormSetActivePage(POPT, 0);
6955 
6956  // Command Button Section
6957  rowform1 = MCreateRowForm(mo);
6958  MObjectSetBackgroundRGB(rowform1, 112, 128, 112);
6959  //MObjectSetResize(rowform, False, True);
6960  MObjectSetCompositeWidth(rowform1, 357);
6961  MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN);
6962 
6963  tb = MCreateTableForm(rowform1, 2);
6964  MObjectSetBackgroundRGB(tb, 56, 112, 112);
6966  MObjectSetCompositeWidth(tb, 347);
6967 
6968  pb = MCreatePButton(tb, "Save", FIXED_SMALL);
6969  MPButtonSetCallback(pb, WriteOptioniniCB, (void *) 0);
6970  MObjectSetBackgroundRGB(pb, 224, 224, 176);
6971  MObjectSetCompositeWidth(pb, 74);
6972 
6973 
6974  pb = MCreatePButton(tb, "Close", FIXED_SMALL);
6976  MObjectSetBackgroundRGB(pb, 224, 224, 176);
6977  MObjectSetCompositeWidth(pb, 74);
6978 
6979 }
6980 
6981 
6982 
6983 void AMS_AdvancedCB(MOBJECT o, void *od, void *ad)
6984 {
6985 
6986  char buff[_MAX_PATH];
6987  int f;
6988 
6989  STARTUPINFO si;
6990  PROCESS_INFORMATION pi;
6991 
6992 
6993 // chdir(buff);
6994 
6995  sprintf(buff,"%s\\%s",BIL.DFILEM.HOMEDIRECTORY, "\\AMSTester50\\AMS50.exe");
6996 
6997 // WinExec(buff, 1);
6998 
6999 
7000  // // perform the equivalent of WinExec in NT, but we use a Unicode string
7001  //
7002  memset(&si, 0, sizeof(si));
7003  si.cb = sizeof(si);
7004  si.dwFlags= STARTF_USESHOWWINDOW;
7005  si.wShowWindow = SW_SHOW;
7006  f = CreateProcess(NULL, buff, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
7007 
7008 
7009 // sprintf(buff,"%ss",BIL.DFILEM.HOMEDIRECTORY, "SolPosCalc");
7010 
7011  chdir(BIL.DFILEM.HOMEDIRECTORY);
7012 
7013 
7014 }
7015 
7016 
7018 {
7019 
7020 // MOBJECT _shell000;
7021  MOBJECT POCF; //Paged form for configuration panel
7022 // MOBJECT POPT; //Paged form for options
7023  MOBJECT rowform; // generic row form
7024 
7025  MOBJECT rowform1; // generic row form
7026 // MOBJECT PFAMS; // paged form for AMS
7027 // MOBJECT edit; // generic edit object
7028 // MOBJECT radiobutt[2]; // generic radio button
7029 
7030  MOBJECT RColButt;
7031  MOBJECT pb; // generic push button
7032 // MOBJECT rb; // generic radio button
7033  MOBJECT list;
7034  MOBJECT _tbutton000;
7035  MOBJECT _tbutton001;
7036  MOBJECT form2;
7037  MOBJECT label, lbl;
7038  MOBJECT tb; // generic table object
7039 // MOBJECT frm2_tb4;
7040  int r, g, b;
7041  int i;
7042  char buf[64];
7043 // double percentuale,speedhz;
7044  const char *fontfamily;
7045 
7046 // struct confp *pconfp;
7047 
7048  LoadGeoDB();
7049 
7050  MGetDefaultBackgroundRGB(&r, &g, &b);
7051  drawarea_bgc = MAllocColor(r, g, b);
7052 /********************************************************/
7053 /************* MAIN SHELL *************************/
7054 /********************************************************/
7055  DAS.Gui.ConfigPanel.ShellConfig = MCreateShell("DAS Config", 0);
7057  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.ShellConfig, 255, 255, 255);
7061 // MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.ShellConfig, 670);
7062 // MObjectSetCompositeHeight(DAS.Gui.ConfigPanel.ShellConfig, 483);
7063 
7064 
7065 /********************************************************/
7066 /************* CONFIG PAGED FORM **********************/
7067 /********************************************************/
7069  MObjectSetForegroundRGB(POCF, 255, 255, 255);
7070  MObjectSetBackgroundRGB(POCF, 96, 132, 152);
7071  MObjectSetResize(POCF, True, True);
7073 // MObjectSetCompositeWidth(POCF, 457); //457
7074 
7075 /* Activation of POCF page 0 - Parameters*/
7076 /* 00000000000000000000000000000000000000000000000000000000 */
7077  MPagedFormSetActivePage(POCF, 0);
7078 
7079  // Creation page 0 - Parameters
7080  CONFP_Param(0, POCF);
7081 
7082 /* End Activation and creation of page 0 */
7083 /* 0000000000000000000000000000000000000000000000000000000 */
7084 
7085 /* Activation of POCF page 1 - Option */
7086 /* 11111111111111111111111111111111111111111111111111111111 */
7087 
7088 /* Start Creation of page 1 111111111111111111111*/
7089 /* 11111111111111111111111111111111111111111111111111111111111111111*/
7090  MPagedFormSetActivePage(POCF, 1);
7091 
7092  // Creation Page 1 - Options
7093  CONFP_Options(0, POCF);
7094 
7095 /* End Activation and creation of page 1 11111111111111111111*/
7096 /* 11111111111111111111111111111111111111111111111111111111111111*/
7097 
7098 /****************************************************************************/
7099 
7100 /* Start Activation and creation of page 2 - Colors 2222222222*/
7101 /* 22222222222222222222222222222222222222222222222222222222222222*/
7102 
7103  MPagedFormSetActivePage(POCF, 2);
7104 
7105  MObjectSetText(POCF, "Colors");
7106  rowform = MCreateRowForm(POCF);
7107  MObjectSetBackgroundRGB(rowform, 112, 128, 112);
7108  MObjectSetResize(rowform, False, False);
7109  MObjectSetCompositeWidth(rowform, 357);
7110  MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN);
7111 
7112  lbl = MCreateLabel(rowform, "SELECT OBJECT", FIXED_SMALL);
7114  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7115  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
7116  MObjectSetTransparency(lbl, 0);
7117 
7118  tb = MCreateTableForm(rowform, 2);
7120  MObjectSetBackgroundRGB(tb, 112, 68, 72);
7121  MObjectSetResize(tb, True, False);
7122 
7123 
7124  DAS.Gui.ConfigPanel.RBColObj[0] = MCreateRButton(tb, "Unsel. Push Button", FIXED_SMALL);
7125  MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[0], 255,255,255);
7126  MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[0], ColObjCB, (void *) 0);
7127 
7128  DAS.Gui.ConfigPanel.RBColObj[1] = MCreateRButton(tb, "Sel. Push Button", FIXED_SMALL);
7129  MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[1], 255,255,255);
7130  MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[1], ColObjCB, (void *) 1);
7131 
7132  DAS.Gui.ConfigPanel.RBColObj[2] = MCreateRButton(tb, "Active Labels", FIXED_SMALL);
7133  MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[2], 255,255,255);
7134  MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[2], ColObjCB, (void *) 2);
7135 
7136  DAS.Gui.ConfigPanel.RBColObj[3] = MCreateRButton(tb, "Passive LAbels", FIXED_SMALL);
7137  MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[3], 255,255,255);
7138  MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[3], ColObjCB, (void *) 3);
7139 
7140  DAS.Gui.ConfigPanel.RBColObj[4] = MCreateRButton(tb, "Forms", FIXED_SMALL);
7141  MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[4], 255,255,255);
7142  MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[4], ColObjCB, (void *) 4);
7143 
7144  DAS.Gui.ConfigPanel.RBColObj[5] = MCreateRButton(tb, "Capital Labels", FIXED_SMALL);
7145  MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[5], 255,255,255);
7146  MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[5], ColObjCB, (void *) 5);
7147 
7148  if (DAS.Flag.exemode == DOASMODE )
7149  {
7150  DAS.Gui.ConfigPanel.RBColObj[6] = MCreateRButton(tb, "Radio Button", FIXED_SMALL);
7151  MObjectSetForegroundRGB( DAS.Gui.ConfigPanel.RBColObj[6], 255,255,255);
7152  MPButtonSetCallback( DAS.Gui.ConfigPanel.RBColObj[6], ColObjCB, (void *) 6);
7153  }
7154 /*
7155 
7156  RColButt = MCreateRButton(tb, "UnSel. Comm.", FIXED_SMALL);
7157  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7158  MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 0);
7159 
7160  RColButt = MCreateRButton(tb, "Sel. Comm.", FIXED_SMALL);
7161  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7162  MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 1);
7163 
7164  RColButt = MCreateRButton(tb, "Active labels", FIXED_SMALL);
7165  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7166  MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 2);
7167 
7168  RColButt = MCreateRButton(tb, "Passive labels", FIXED_SMALL);
7169  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7170  MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 3);
7171 
7172  RColButt = MCreateRButton(tb, "Forms", FIXED_SMALL);
7173  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7174  MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 4);
7175 
7176  RColButt = MCreateRButton(tb, "K_labelsUP", FIXED_SMALL);
7177  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7178  MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 5);
7179 
7180 if (DAS.Flag.exemode == DOASMODE )
7181 {
7182 
7183  RColButt = MCreateRButton(tb, "Radio Buttons", FIXED_SMALL);
7184  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7185  MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 6);
7186 }
7187 */
7188  tb = MCreateTableForm(rowform, 2);
7190  MObjectSetBackgroundRGB(tb, 160, 112, 112);
7191  MObjectSetResize(tb, True, False);
7192 
7193  RColButt = MCreateRButton(tb, "Background", FIXED_SMALL);
7194  MRButtonSetCallback(RColButt, (OBJ_VALUE_CB) ColPickBackForeGCB, (void *) 0);
7195  MObjectAlign(RColButt, CENTER_ALIGN, TOP_ALIGN);
7196  MRButtonActivate(RColButt);
7197  MObjectSetForegroundRGB(RColButt, 255, 255, 0);
7198 
7199  RColButt = MCreateRButton(tb, "Foreground", FIXED_SMALL);
7200  MRButtonSetCallback(RColButt, (OBJ_VALUE_CB) ColPickBackForeGCB, (void *) 1);
7201  MObjectAlign(RColButt, LEFT_ALIGN, TOP_ALIGN);
7202  MObjectSetForegroundRGB(RColButt, 255, 255, 0);
7203 
7204  rowform1 = MCreateRowForm(rowform);
7205  MObjectSetBackgroundRGB(rowform1 , 80, 56, 56);
7206  MObjectSetResize(rowform1 , True, True);
7207 
7208  lbl = MCreateLabel(rowform1 , "COLORS", FIXED_SMALL);
7209  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7210  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
7211  MObjectSetTransparency(lbl, 0);
7212 
7213  tb = MCreateTableForm(rowform1 , 1);
7214  MObjectSetBackgroundRGB(tb, 112, 68, 72);
7215  MObjectSetResize(tb, True, False);
7216 
7217 /******************************************/
7218 
7219  form2 = MCreateRowForm(tb);
7221  label = MCreateLabel(form2, "Red: ", FIXED_SMALL);
7222  MObjectSetForegroundRGB(label, 255, 0, 0);
7223  r_label = MCreateLabel(form2, "000", FIXED_SMALL);
7224  MObjectSetForegroundRGB(r_label, 255, 0, 0);
7225  MObjectSetResize(label, False, False);
7227  r_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32);
7229 
7230  form2 = MCreateRowForm(tb);
7232  label = MCreateLabel(form2, "Green: ", FIXED_SMALL);
7233  MObjectSetForegroundRGB(label, 0, 105, 0);
7234  g_label = MCreateLabel(form2, "000", FIXED_SMALL);
7235  MObjectSetForegroundRGB(g_label, 0, 105, 0);
7236  MObjectSetResize(label, False, False);
7238  g_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32);
7240 
7241  form2 = MCreateRowForm(tb);
7243  label = MCreateLabel(form2, "Blue: ", FIXED_SMALL);
7244  MObjectSetForegroundRGB(label, 0, 0, 255);
7245  b_label = MCreateLabel(form2, "000", FIXED_SMALL);
7246  MObjectSetForegroundRGB(b_label, 0, 0, 255);
7247  MObjectSetResize(label, False, False);
7249  b_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32);
7251 /************************************/
7252 
7253 
7254 
7255 
7256 
7257  frm3_dr1 = MCreateDrawArea(rowform, 347, 30);
7262  r_c = g_c = b_c = 0;
7263  cell_color = MAllocCell(0, 0, 0);
7264 
7265  rowform1 = MCreateRowForm(rowform);
7266  MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN);
7267  MObjectSetForegroundRGB(rowform1, 56, 84, 128);
7268  MObjectSetBackgroundRGB(rowform1, 112, 68, 72);
7269  MObjectSetResize(rowform1, False, False);
7270  MObjectSetCompositeWidth(rowform1, 347);
7271 
7272  lbl = MCreateLabel(rowform1, "COMMANDS", FIXED_SMALL);
7273  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7274  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
7275  MObjectSetTransparency(lbl, 0);
7276 
7277  pb = MCreatePButton(rowform1, "Load Palette", FIXED_SMALL);
7279  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7280 
7281 
7282  tb = MCreateTableForm(rowform1, 4);
7284  MObjectSetBackgroundRGB(tb, 112, 68, 72);
7285  MObjectSetResize(tb, True, False);
7286 
7287  pb = MCreatePButton(tb, "Preview", FIXED_SMALL);
7289  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7290 
7291  pb = MCreatePButton(tb, "Undo", FIXED_SMALL);
7292  MPButtonSetCallback(pb, D_UndoCB, 0L);
7293  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7294  MObjectSetCompositeWidth(pb, 84);
7295 
7296  pb = MCreatePButton(tb, "Store", FIXED_SMALL);
7297  MPButtonSetCallback(pb, WriteColorsCB, (void *) 0);
7298  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7299  MObjectSetCompositeWidth(pb, 84);
7300 
7301  pb = MCreatePButton(tb, "Close", FIXED_SMALL);
7303  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7304  MObjectSetCompositeWidth(pb, 84);
7305 
7306 /* End Activation and creation of page 2 Colors 22222222222222222222*/
7307 /* 22222222222222222222222222222222222222222222222222222222222222*/
7308 
7309  /*********************** FONTS ***********************/
7310  MPagedFormSetActivePage(POCF, 3);
7311 
7312  MObjectSetText(POCF, "Fonts");
7313  rowform = MCreateRowForm(POCF);
7314  MObjectSetBackgroundRGB(rowform, 112, 128, 112);
7315  MObjectSetResize(rowform, False, False);
7316  MObjectSetCompositeWidth(rowform, 357);
7317  MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN);
7318 
7319  lbl = MCreateLabel(rowform, "SELECT OBJECT", FIXED_SMALL);
7321  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7322  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
7323  MObjectSetTransparency(lbl, 0);
7324  MObjectSetCompositeWidth(lbl, 347);
7325 
7326  tb = MCreateTableForm(rowform, 2);
7329  MObjectSetBackgroundRGB(tb, 56, 84, 128);
7331  MObjectSetCompositeWidth(tb, 347);
7332 
7333  RColButt = MCreateRButton(tb, "UnSel. Comm.", FIXED_SMALL);
7334  MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 0);
7335  MObjectAlign(RColButt, LEFT_ALIGN, TOP_ALIGN);
7336  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7337  MObjectSetTransparency(RColButt, 0);
7338  MRButtonActivate(RColButt);
7339 
7340  RColButt = MCreateRButton(tb, "Sel. Comm.", FIXED_SMALL);
7341  MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 1);
7342  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7343  MObjectSetTransparency(RColButt, 0);
7344 
7345  RColButt = MCreateRButton(tb, "Active labels", FIXED_SMALL);
7346  MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 2);
7347  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7348  MObjectSetTransparency(RColButt, 0);
7349 
7350  RColButt = MCreateRButton(tb, "Passive labels", FIXED_SMALL);
7351  MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 3);
7352  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7353  MObjectSetTransparency(RColButt, 0);
7354 
7355  RColButt = MCreateRButton(tb, "K_labelsUP", FIXED_SMALL);
7356  MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 4);
7357  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7358  MObjectSetTransparency(RColButt, 0);
7359 
7360  RColButt = MCreateRButton(tb, "K_labelsDW", FIXED_SMALL);
7361  MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 5);
7362  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7363  MObjectSetTransparency(RColButt, 0);
7364 
7365  DAS.Gui.ConfigPanel.frm4_dr1 = MCreateDrawArea(rowform, 347, 62);
7370 
7371 
7372  rowform1 = MCreateRowForm(rowform);
7373  MObjectSetBackgroundRGB(rowform1, 56, 84, 128);
7374  MObjectSetResize(rowform1, False, False);
7375  MObjectSetCompositeWidth(rowform1, 347);
7376 
7377  lbl = MCreateLabel(rowform1, "FONTS", FIXED_SMALL);
7378  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7379  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
7380  MObjectSetTransparency(lbl, 0);
7381 
7382  tb = MCreateTableForm(rowform1, 2);
7384  MObjectSetBackgroundRGB(tb, 56, 84, 128);
7385  MObjectSetResize(tb, True, False);
7386 
7387  lbl = MCreateLabel(tb, "Type:", FIXED_SMALL);
7390  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7391  MObjectSetTransparency(lbl, 0);
7392 
7393  fontfamily = MGetFirstFontFamily ();
7394  e_fname = MCreateOptionEdit (tb, fontfamily, 22, 10, 6, FIXED_SMALL);
7395  MObjectSetForegroundRGB(e_fname, 255, 255, 255);
7396  MObjectSetBackgroundRGB(e_fname, 0, 24, 96);
7398  list = MOptionEditGetList (e_fname);
7399  MSListSetSortCallback (list, stricmp);
7400 
7401  while (fontfamily)
7402  {
7403  MSListAddItem (list, fontfamily, 0L);
7404  fontfamily = MGetNextFontFamily ();
7405  }
7406 
7407  lbl = MCreateLabel(tb, "Dim.:", FIXED_SMALL);
7409  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7410  MObjectSetTransparency(lbl, 0);
7411 
7412 
7413  e_fsize = MCreateOptionEdit(tb, "22", 22, 10, 6, FIXED_SMALL);
7414  MObjectSetForegroundRGB(e_fsize, 255, 255, 255);
7415  MObjectSetBackgroundRGB(e_fsize, 0, 24, 96);
7416  list = MOptionEditGetList(e_fsize);
7417  MSListAddItem(list, "12", 0L);
7418  MSListAddItem(list, "14", 0L);
7419  MSListAddItem(list, "16", 0L);
7420  MSListAddItem(list, "18", 0L);
7421  MSListAddItem(list, "20", 0L);
7422  MSListAddItem(list, "22", 0L);
7423  MSListAddItem(list, "24", 0L);
7424  MSListAddItem(list, "26", 0L);
7425  MSListAddItem(list, "28", 0L);
7426  MSListAddItem(list, "30", 0L);
7427  MSListAddItem(list, "32", 0L);
7428  MSListAddItem(list, "34", 0L);
7429  MSListAddItem(list, "36", 0L);
7430  MSListAddItem(list, "38", 0L);
7431  MSListAddItem(list, "40", 0L);
7432  MSListAddItem(list, "42", 0L);
7433 
7434 
7435  _tbutton000 = MCreateTButton(tb, "Bold", FIXED_SMALL);
7436  MTButtonSetCallback(_tbutton000, SetBoldCB, 0L);
7437  MObjectSetForegroundRGB(_tbutton000, 255, 255, 0);
7438 
7439  _tbutton001 = MCreateTButton(tb, "Italic", FIXED_SMALL);
7440  MTButtonSetCallback(_tbutton001, SetItalicCB, 0L);
7441  MObjectSetForegroundRGB(_tbutton001, 255, 255, 0);
7442 /*******************/
7443  rowform1 = MCreateRowForm(rowform);
7444  MObjectSetForegroundRGB(rowform1, 56, 84, 128);
7445  MObjectSetBackgroundRGB(rowform1, 56, 84, 128);
7446  MObjectSetResize(rowform1, False, False);
7447  MObjectSetCompositeWidth(rowform1, 347);
7448 
7449  lbl = MCreateLabel(rowform1, "COMMANDS", FIXED_SMALL);
7450  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7451  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
7452  MObjectSetTransparency(lbl, 0);
7453 
7454  tb = MCreateTableForm(rowform1, 5);
7455  MObjectSetBackgroundRGB(tb, 56, 84, 128);
7456  MObjectSetResize(tb, True, False);
7457 
7458 
7459 
7460  pb = MCreatePButton(tb, "Test", FIXED_SMALL);
7462  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7463 // MObjectSetCompositeWidth(pb, 84);
7464 
7465  pb = MCreatePButton(tb, "Preview", FIXED_SMALL);
7467  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7468 // MObjectSetCompositeWidth(pb, 84);
7469 
7470  pb = MCreatePButton(tb, "Undo", FIXED_SMALL);
7471  MPButtonSetCallback(pb, UndoFCB, 0L);
7472  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7473 // MObjectSetCompositeWidth(pb, 84);
7474 
7475  pb = MCreatePButton(tb, "Store", FIXED_SMALL);
7477  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7478 // MObjectSetCompositeWidth(pb, 84);
7479 
7480  pb = MCreatePButton(tb, "Close", FIXED_SMALL);
7482  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7483 // MObjectSetCompositeWidth(pb, 84);
7484 
7485 
7486 /******************* STEPPER MOTORS ***************************/
7487  MPagedFormSetActivePage(POCF, 4);
7488 
7489  MObjectSetText(POCF, "Motors");
7490  rowform = MCreateRowForm(POCF);
7491  MObjectSetBackgroundRGB(rowform, 112, 128, 112);
7492  MObjectSetResize(rowform, False, False);
7493  MObjectSetCompositeWidth(rowform, 457);
7494  MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN);
7495 
7496 
7497 /***************************************************************************/
7498 /**************** STEPPER MOTORS SECTION ***********************************/
7499 
7500  lbl = MCreateLabel(rowform, "STEPPER MOTORS", FIXED_SMALL);
7501  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7502  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
7503  MObjectSetTransparency(lbl, 0);
7504 // MObjectSetCompositeWidth(lbl, 447);
7505 
7506  PFAMS = MCreateTabbedRowForm(rowform, (DAS.StepM.NAMS + 2), FIXED_SMALL);
7507  MObjectSetForegroundRGB(PFAMS, 255, 255, 255);
7508  MObjectSetBackgroundRGB(PFAMS, 80, 60, 0);
7511 
7512 // MObjectSetResize(PFAMS, True, True);
7513 
7514  for (i=0;i<DAS.StepM.NAMS; i++)
7515  {
7517  CONFP_AMS(PFAMS, i);
7518  //FrmStepperConfP(PFAMS, i);
7519  }
7520 
7523 
7526 
7528 
7529 /*
7530  if (DAS.Paramini.EqType == TROPOGAS)
7531  {
7532  PFAMS = MCreateTabbedRowForm(rowform, 4, FIXED_SMALL);
7533  MObjectSetForegroundRGB(PFAMS, 255, 255, 255);
7534  MObjectSetBackgroundRGB(PFAMS, 80, 60, 0);
7535  MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2);
7536  }
7537  else
7538  {
7539  PFAMS = MCreateTabbedRowForm(rowform, 3, FIXED_SMALL);
7540  MObjectSetForegroundRGB(PFAMS, 255, 255, 255);
7541  MObjectSetBackgroundRGB(PFAMS, 80, 60, 0);
7542  MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2);
7543  }
7544  MPagedFormSetActivePage(PFAMS, 0);
7545 
7546  FrmStepperConfP(PFAMS, AMS1, &STEPM, &CONFP, &CPL);
7547 
7548  MPagedFormSetActivePage(PFAMS, 1);
7549 
7550  FrmStepperConfP(PFAMS, AMS2, &STEPM, &CONFP, &CPL);
7551 
7552  if (DAS.Paramini.EqType == TROPOGAS)
7553  {
7554  MPagedFormSetActivePage(PFAMS, 2);
7555 
7556  FrmStepperConfP(PFAMS, AMS3, &STEPM, &CONFP, &CPL);
7557 
7558  MPagedFormSetActivePage(PFAMS, 3);
7559 
7560  FrmAMS_Utility(PFAMS, &STEPM, &CONFP, &CPL);
7561  }
7562  else
7563  {
7564  MPagedFormSetActivePage(PFAMS, 2);
7565 
7566  FrmAMS_Utility(PFAMS, &STEPM, &CONFP, &CPL);
7567  }
7568 */
7570 
7571  /*++++++++++++++++++++++++++++++++++++++++++++++++++++*/
7572 
7573  tb = MCreateTableForm(rowform, 4);
7574  MObjectSetBackgroundRGB(tb, 56, 112, 112);
7576  MObjectSetCompositeWidth(tb, 347);
7577 
7578 
7579  pb = MCreatePButton(tb, "Apply", FIXED_SMALL);
7580  MPButtonSetCallback(pb, ApplyChCB, (void *) 1);
7581  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7582  MObjectSetCompositeWidth(pb, 74);
7583 
7584  pb = MCreatePButton(tb, "Store", FIXED_SMALL);
7585  MPButtonSetCallback(pb, WriteAMSCB, (void *) 1);
7586  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7587  MObjectSetCompositeWidth(pb, 84);
7588 
7589  pb = MCreatePButton(tb, "Close", FIXED_SMALL);
7591  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7592  MObjectSetCompositeWidth(pb, 74);
7593 
7594  pb = MCreatePButton(tb, "ADVANCED", FIXED_SMALL);
7595  MPButtonSetCallback(pb, AMS_AdvancedCB, (void *) 0);
7596  MObjectSetBackgroundRGB(pb, 24, 24, 255);
7597  MObjectSetForegroundRGB(pb, 255, 245, 255);
7598  MObjectSetCompositeWidth(pb, 74);
7599 
7600 /*********************************************************/
7601 
7602 /*********************************************************/
7603 /*************** TEST AD Converter **************/
7604 /*********************************************************/
7605 
7606  MPagedFormSetActivePage(POCF, 5);
7607 
7608  MObjectSetText(POCF, "TEST AD Converter");
7609 
7610  rowform = MCreateRowForm(POCF);
7611  MObjectSetBackgroundRGB(rowform, 112, 128, 112);
7612  MObjectSetResize(rowform, False, False);
7613  MObjectSetCompositeWidth(rowform, 357);
7614  MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN);
7615 
7616  /*+++++++++++++++++ START CURRENT SETUP ++++++++++*/
7617 
7618  lbl = MCreateLabel(rowform , "AD Converter Current Setup", FIXED_SMALL);
7619  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7620  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
7622  MObjectSetTransparency(lbl, 0);
7623 
7624  tb = MCreateTableForm(rowform, 4);
7627  MObjectSetBackgroundRGB(tb, 56, 112, 112);
7629  MObjectSetCompositeWidth(tb, 347);
7630 
7631  lbl = MCreateLabel(tb , "Board Type:", FIXED_SMALL);
7632  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7634 
7635 // sprintf(buf, "%s", DSCCB2STR());
7636  ADTESTER.lblADsetup[0] = MCreateLabel(tb , "DMM", FIXED_SMALL);
7637  MObjectSetForegroundRGB(ADTESTER.lblADsetup[0], 255, 255, 255);
7638  MObjectSetBackgroundRGB(ADTESTER.lblADsetup[0], 40, 96, 72);
7640  MObjectSetTransparency(ADTESTER.lblADsetup[0], 0);
7641 
7642  lbl = MCreateLabel(tb , "Base Addr:", FIXED_SMALL);
7643  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7645 
7646  ADTESTER.lblADsetup[1] = MCreateLabel(tb , "0x300", FIXED_SMALL);
7647  MObjectSetForegroundRGB(ADTESTER.lblADsetup[1], 255, 255, 255);
7648  MObjectSetBackgroundRGB(ADTESTER.lblADsetup[1], 40, 96, 72);
7650  MObjectSetTransparency(ADTESTER.lblADsetup[1], 0);
7651 
7652  lbl = MCreateLabel(tb , "Int.Lvl:", FIXED_SMALL);
7653  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7655 
7656  ADTESTER.lblADsetup[2] = MCreateLabel(tb , "3", FIXED_SMALL);
7657  MObjectSetForegroundRGB(ADTESTER.lblADsetup[2], 255, 255, 255);
7658  MObjectSetBackgroundRGB(ADTESTER.lblADsetup[2], 40, 96, 72);
7660  MObjectSetTransparency(ADTESTER.lblADsetup[2], 0);
7661 
7662  lbl = MCreateLabel(tb , "DMA Lvl:", FIXED_SMALL);
7663  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7665 
7666  ADTESTER.lblADsetup[3] = MCreateLabel(tb , "3", FIXED_SMALL);
7667  MObjectSetForegroundRGB(ADTESTER.lblADsetup[3], 255, 255, 255);
7668  MObjectSetBackgroundRGB(ADTESTER.lblADsetup[3], 40, 96, 72);
7670  MObjectSetTransparency(ADTESTER.lblADsetup[3], 0);
7671 
7672  lbl = MCreateLabel(tb , "ClockFreq:", FIXED_SMALL);
7673  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7675 
7676  ADTESTER.lblADsetup[4] = MCreateLabel(tb , "10MHz", FIXED_SMALL);
7677  MObjectSetForegroundRGB(ADTESTER.lblADsetup[4], 255, 255, 255);
7678  MObjectSetBackgroundRGB(ADTESTER.lblADsetup[4], 40, 96, 72);
7680  MObjectSetTransparency(ADTESTER.lblADsetup[4], 0);
7681 
7682  lbl = MCreateLabel(tb , "Range:", FIXED_SMALL);
7683  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7685 
7686  ADTESTER.lblADsetup[5] = MCreateLabel(tb , "5V", FIXED_SMALL);
7687  MObjectSetForegroundRGB(ADTESTER.lblADsetup[5], 255, 255, 255);
7688  MObjectSetBackgroundRGB(ADTESTER.lblADsetup[5], 40, 96, 72);
7690  MObjectSetTransparency(ADTESTER.lblADsetup[5], 0);
7691 
7692  lbl = MCreateLabel(tb , "Pol.:", FIXED_SMALL);
7693  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7695 
7696  ADTESTER.lblADsetup[6] = MCreateLabel(tb , "UNIPOL", FIXED_SMALL);
7697  MObjectSetForegroundRGB(ADTESTER.lblADsetup[6], 255, 255, 255);
7698  MObjectSetBackgroundRGB(ADTESTER.lblADsetup[6], 40, 96, 72);
7700  MObjectSetTransparency(ADTESTER.lblADsetup[6], 0);
7701 
7702  lbl = MCreateLabel(tb , "Gain:", FIXED_SMALL);
7703  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7705 
7706  ADTESTER.lblADsetup[7] = MCreateLabel(tb , "2", FIXED_SMALL);
7707  MObjectSetForegroundRGB(ADTESTER.lblADsetup[7], 255, 255, 255);
7708  MObjectSetBackgroundRGB(ADTESTER.lblADsetup[7], 40, 96, 72);
7710  MObjectSetTransparency(ADTESTER.lblADsetup[7], 0);
7711 
7712  lbl = MCreateLabel(tb , "LowCh:", FIXED_SMALL);
7713  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7715 
7716  ADTESTER.lblADsetup[8] = MCreateLabel(tb , "0", FIXED_SMALL);
7717  MObjectSetForegroundRGB(ADTESTER.lblADsetup[8], 255, 255, 255);
7718  MObjectSetBackgroundRGB(ADTESTER.lblADsetup[8], 40, 96, 72);
7720  MObjectSetTransparency(ADTESTER.lblADsetup[8], 0);
7721 
7722  lbl = MCreateLabel(tb , "HighCh:", FIXED_SMALL);
7723  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7725 
7726  ADTESTER.lblADsetup[9] = MCreateLabel(tb , "15", FIXED_SMALL);
7727  MObjectSetForegroundRGB(ADTESTER.lblADsetup[9], 255, 255, 255);
7728  MObjectSetBackgroundRGB(ADTESTER.lblADsetup[9], 40, 96, 72);
7730  MObjectSetTransparency(ADTESTER.lblADsetup[9], 0);
7731 
7732 
7733 // LoadDMMSetup();
7734 /*+++++++++++++++++ END CURRENT SETUP ++++++++++*/
7735 
7736  tb = MCreateTableForm(rowform, 2);
7739  MObjectSetBackgroundRGB(tb, 56, 112, 112);
7741  MObjectSetCompositeWidth(tb, 347);
7742 
7743 
7744  ADTESTER.ADrb[0]= MCreateRButton(tb, "Volts", FIXED_SMALL);
7745  MPButtonSetCallback(ADTESTER.ADrb[0], DB_SelOutModeCB, (void *) 0);
7746  MObjectAlign(ADTESTER.ADrb[0], LEFT_ALIGN, UNDEF_ALIGN);
7747  MObjectSetForegroundRGB(ADTESTER.ADrb[0], 255, 255, 255);
7748  MObjectSetCompositeWidth(ADTESTER.ADrb[0], 85);
7749 
7750  ADTESTER.ADrb[1] = MCreateRButton(tb, "Celsius", FIXED_SMALL);
7751  MPButtonSetCallback(ADTESTER.ADrb[1], DB_SelOutModeCB, (void *) 1);
7752  MObjectAlign(ADTESTER.ADrb[1], LEFT_ALIGN, UNDEF_ALIGN);
7753  MObjectSetForegroundRGB(ADTESTER.ADrb[1], 255, 255, 255);
7754  MObjectSetCompositeWidth(ADTESTER.ADrb[1], 85);
7755 
7756 
7757  if(ADTESTER.OutputMode == 0)
7758  MRButtonActivate(ADTESTER.ADrb[0]);
7759  else
7760  MRButtonActivate(ADTESTER.ADrb[0]);
7761 
7762 
7763 
7764  lbl = MCreateLabel(rowform , "Output", FIXED_SMALL);
7765  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7767 
7768  tb = MCreateTableForm(rowform, 4);
7771  MObjectSetBackgroundRGB(tb, 56, 112, 112);
7773  MObjectSetCompositeWidth(tb, 347);
7774 
7775 
7776 
7777  for(i=0;i<16;i++)
7778  {
7779 
7780  sprintf(buf, "Ch.%d:", i);
7781  ADTESTER.lblADch[i] = MCreateLabel(tb, buf, FIXED_SMALL);
7782  MLabelSetAlignment(ADTESTER.lblADch[i], LEFT_ALIGN);
7783  MObjectSetForegroundRGB(ADTESTER.lblADch[i], 255, 255, 255);
7784  MObjectSetTransparency(ADTESTER.lblADch[i], 0);
7785  MObjectSetResize(ADTESTER.lblADch[i], False, False);
7786  MObjectAlign(ADTESTER.lblADch[i], LEFT_ALIGN, TOP_ALIGN);
7787 
7788 // MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblADch[i], 40, 96, 72);
7789 
7790  ADTESTER.lblADvalue[i] = MCreateLabel(tb, " 0.0", FIXED_SMALL);
7792  MObjectSetForegroundRGB(ADTESTER.lblADvalue[i], 255, 255, 255);
7793  MObjectSetBackgroundRGB(ADTESTER.lblADvalue[i], 40, 96, 72);
7794  MObjectSetTransparency(ADTESTER.lblADvalue[i], 0);
7795  MObjectSetResize(ADTESTER.lblADvalue[i], False, False);
7797 
7798  }
7799 
7800 
7801  tb = MCreateTableForm(rowform, 3);
7804  MObjectSetBackgroundRGB(tb, 56, 112, 112);
7806  MObjectSetCompositeWidth(tb, 347);
7807 
7808 
7809  ADTESTER.ADpb = MCreatePButton(tb, "Start", FIXED_SMALL);
7810  MPButtonSetCallback(ADTESTER.ADpb, ADTesterCB, (void *) 0);
7811  MObjectSetBackgroundRGB(ADTESTER.ADpb, 224, 224, 176);
7812 // MObjectSetBackgroundRGB(ADTESTER.ADpb, 192, 192, 192);
7813  MObjectSetCompositeWidth(ADTESTER.ADpb, 84);
7814 
7815  ADTESTER.ADInflbl = MCreateLabel(tb, "Click Start to test ", FIXED_SMALL);
7816 // MPButtonSetCallback(ADTESTER.ADpb, ADTesterCB, (void *) 0);
7817  MObjectSetForegroundRGB(ADTESTER.ADInflbl, 255, 255, 255);
7818  MObjectSetBackgroundRGB(ADTESTER.ADInflbl, 48, 20, 255);
7819 
7820 
7821  pb = MCreatePButton(tb, "Close", FIXED_SMALL);
7823  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7824  MObjectSetCompositeWidth(pb, 84);
7825 
7826 
7827 /*********************************************************/
7828  MPagedFormSetActivePage(POCF, 0);
7830 // MShellRealizeXYWH(DAS.Gui.ConfigPanel.ShellConfig, 0,0,600,800);
7831 
7832  return 0;
7833 }
7834 
7835 
7836 
void DB_MIGEopmode_CB(MOBJECT o, void *a, void *v)
callback selecting the operation mode for the AltAzPlatform
void DMessage(char *str)
void MEditDisableEditing(MOBJECT edit)
MOBJECT PID_edt[3]
edit MObjects for PID parameters
MOBJECT tbrb
Table Object for rbuttons.
stepm StepM
Stepper motors parameters structure.
const char * rename_menu
Definition: Mguidefs.h:1513
void CONFP_param_page4(int mod, MOBJECT obj)
MOBJECT edtDSZA
edit box for delta SZA
#define RIGHT_ALIGN
Definition: Mguidefs.h:916
void ADTesterCB(MOBJECT shell, void *od, void *ad)
Test Temperature AD Converter callback.
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
void ColPickBackForeGCB(MOBJECT o, void *a, void *v)
select if the foreground or background color of the selected object will be picked ...
int hometype[AMSMAX][2]
#define WS_NONE
Definition: Mguidefs.h:956
MOBJECT MCreateTButton(MOBJECT parent, const char *text, MTFont font)
const char * create_menu
Definition: Mguidefs.h:1511
MOBJECT rbFilterType[3]
radio button for SHUTTER type
int WriteEquipini(void)
Write equipment.ini file .
MOBJECT lblAvg
void DB_RadioModeSelCB(MOBJECT o, void *id, void *a_data)
Set the saving mode.
void CONFP_Options(int mod, MOBJECT mo)
MOBJECT MCreatePixmapFromFile(MOBJECT parent, const char *fname)
MOBJECT lbl
Definition: DFileMan.c:42
MTColor MAllocCell(int r, int g, int b)
MOBJECT edmaxlvlar
edit object maximum level for autoranging
const char * remove_menu
Definition: Mguidefs.h:1515
flag FLAG
Definition: DAS_Spat_Conf.c:44
int LoadPaletteCB(MOBJECT o, void *o_data, void *a_data)
Callback for LoadTestPalette.
void PB_H_CB(MOBJECT p, void *od, void *ad)
Quick Help Callback.
MOBJECT r_label
Definition: DAS_Spatram.h:3058
void ColorAssignCB(MOBJECT o, void *o_data, void *a_data)
const char * close_button
Definition: Mguidefs.h:1509
void DB_CellExposeCB(MOBJECT obj, MEvent *pexp, void *a_data)
display selected Color
void DB_AMSposmode_CB(MOBJECT o, void *a, void *v)
callback selecting the positioning mode for stepper motors ( sequential or simulaneaous) ...
MOBJECT MOptionEditGetList(MOBJECT ce)
optionini DOption
Options for DAS execution.
void DB_ChangeColorCellCB(MOBJECT o, MVALUE o_data, void *a_data)
draw the object &#39;o&#39; with the selected color
INT32 MVALUE
Definition: Mguidefs.h:1422
int savingmode
Flag to set saving mode: 0=ASCII, 1=Binary.
double alititude
Station altitude.
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
const char * Mir_Code[]
const char array for the realisation of the Mirrors buttons in the Mirror shell
Definition: DAS_Spat.c:231
void edtCCDOffSet_CB(MOBJECT p, LIST_ACT *la, void *ad)
void MSelectObject(MOBJECT f)
MOBJECT b_sbar
Definition: DAS_Spatram.h:3057
void MShellRealize(MOBJECT obj)
void LoadFontCB(MOBJECT obj, void *a, void *data)
This callback tries to load the specified font.
dsza SZADelta
Definition: DAS_Spat.c:76
nova NOVA
Definition: DAS_Spat_Conf.c:54
int NAMS
Number of AMSs Devices.
void DB_TempHistCB(MOBJECT o, void *a, void *v)
CARD8 change_cwd
Definition: Mguidefs.h:1485
int TRType
Type of thermo regulation (0=TRTCOOL, 1 = TRTHEAT, 2= TRTBOTH)
void edtDSZA_CB(MOBJECT p, LIST_ACT *la, void *ad)
MOBJECT MCreateEdit(MOBJECT parent, const char *text, int len, MTFont font)
void WDT_CB(MOBJECT p, void *od, void *ad)
Definition: DAS_Spat.c:1507
MOBJECT SM_multiplier[AMSMAX][2]
double newlatitude[20]
New Station latitude.
char * text
Definition: Mguidefs.h:1389
MOBJECT edit[5]
Edit Object.
void MObjectSetUnsensitive(MOBJECT obj)
void MBottomAttach(MOBJECT child, int att_type, int off, MOBJECT obj)
char LOGDIR[_MAX_PATH]
Definition: bildef.h:209
#define TORQUEM
Torque Motor.
int HomeMirror(void)
Input Mirror in the reference Position. The Input Mirror reaches the reference Position.
Definition: Init.c:685
double newlongitude[20]
New Station longitude.
int PCPower
Power to the Peltier for Cooling.
omutemp OMUTEMP
structure for OMU temperatures
Definition: DAS_Spat_Conf.c:50
int Wl
Flag for the units on the X scale plot.
void WriteFontCB(MOBJECT obj, void *a, void *v)
This callback write on file the selected font (Not implemented yet)
MOBJECT r_sbar
Definition: DAS_Spatram.h:3057
void MTButtonDeactivate(MOBJECT o)
int WritewlstepiniCB(MOBJECT shell, void *od, void *ad)
Write wlstep.ini file .
MOBJECT SM_hometype[AMSMAX][2]
#define WS_ETCHED_OUT
Definition: Mguidefs.h:960
List Item Activation.
Definition: Mguidefs.h:1179
DXL structure. Structure for the serial communication with the AMS adapter.
Definition: DXL.H:16
struct dtime * ptimeMat
Definition: bildef.h:101
void MOptionEditSetListCallback(MOBJECT obj, LIST_ACT_CB cb, void *data)
int plotW
Flag for the plot display.
void DB_TestHomeTypeCB(MOBJECT p, void *od, void *ad)
void MPixmapSetImageFile(MOBJECT pixmap, const char *fname)
void MFormSetFocusHighlight(MOBJECT f, int true_false)
MOBJECT rbDSZA[2]
radio button for delta SZA measurements
das structure (contain all the previous structures) .
CARD8 allow_dir_create
Definition: Mguidefs.h:1487
MOBJECT MDCreateDASConfig(void)
DAS Config shell. Procedure that build the shell for the DAS Config panels. The DAS Config allow for ...
Definition: DSCUD.H:340
void D_UndoCB(MOBJECT o, void *a, void *v)
Undo the previous color setting operation.
int VMRsf
ViewModifyReloadsystemfile: 0 = ViewModify, 1 = Reload.
void DB_AMSProgBar_CB(MOBJECT o, void *a, void *v)
callback selecting if show or not the progress bar for motor positioning
MOBJECT edtSZA[2]
edit boxes for limits for delta sza measurements (0–> szamin; 1–>sza max)
#define RDAY
double filter wheel
int ccdWx
CCD X End.
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
Control Panel and push buttons colors .
void DB_Shutter_CB(MOBJECT o, void *a, void *v)
callback selecting if the shutter is installed or not
double latitude
Station latitude.
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
#define DOASMODE
execution for DOAS Processing
const char * DeviceTypeInput[]
const char array for the Device type <-> Input association
Definition: DAS_Spat.c:247
void MTButtonActivate(MOBJECT o)
int ReadLogFile(int mod, char *dir, char *filename, int nx, int ny, struct omutemp datatemp)
Read DAS LOG File. .
MTFont button_font
Definition: Mguidefs.h:1501
CARD8 allow_dir_delete
Definition: Mguidefs.h:1493
flag Flag
Structure for different flags.
MOBJECT tbavg
table for avg section
void NovaTypeCB(MOBJECT p, void *od, void *ad)
Callback for NOVA selection.
int darkremove
Flag to set Dark Removal from measurements; motors0 = No Dark Removal, 1 = Dark Removal.
structure for FTP setting
char HOMEDIRECTORY[_MAX_PATH]
Definition: bildef.h:200
int filtertype
type of installed filter module: 0=Simple-SM3, 1=Double-SM3+SM4, 2=simpleplus-SM3+TM) ...
#define DBDEMO
execution in demo mode
MTFont font
Definition: Mguidefs.h:1499
#define False
Definition: Mguidefs.h:236
void DB_ResetEnable_CB(MOBJECT o, void *a, void *v)
void MObjectAlign(MOBJECT obj, int h_align, int v_align)
#define XAX
X Axis.
int Offset[16]
Offset of the hardware devices (Input Mirror (5), Grating, Filter Wheel...)
void ModifyConfFileCB(MOBJECT o, void *id, void *a_data)
Modification DAS Configuration files Callback Set if the blind pixels will be displayed or not on the...
MOBJECT WDT_edt
edit Mobject for Watch-Dog elapsed time
unsigned short DigOut
Digital Output.
#define NOVA945GSE
NOVA945GSE (SPATRAM2, GASCODNG1, GASCODNG4)
int slope[AMSMAX][2]
Stepper Motors Slope.
void ActEditCB(MOBJECT edit, char *text, void *ed)
Text Application callback Apply to the variables the text typed in various text box and validated by ...
#define NOVA6612G2
NOVA6612G2 (not used in TROPOGAS, LIS, GASCODNG2/3)
int ccdXoff
CCD X Start.
MOBJECT OOP[AMSMAX][8]
OptoOutput Port N (N=0,1...,7), for AMSx (x=0,1,...AMSMAX-1)
void MTableFormSetColAlign(MOBJECT form, int col, int al)
void DB_SetXUnitsCB(MOBJECT o, void *id, void *a_data)
Select the X axis Unit mode .
MOBJECT frm4_dr1
void CONFP_param_page1(int mod, MOBJECT obj)
void PbftpCB(MOBJECT o, void *a, void *v)
void DB_DispBlindPixCB(MOBJECT o, void *id, void *a_data)
Display Blind Pixel Callback Set if the blind pixels will be displayed or not on the plot window...
int HomeGratingFast(int mod)
(Fastest) Grating in the reference Position. The Grating reaches the reference Position. Similar to HomeGrating(void), but faster
Definition: Init.c:780
void MSListSelectElement(MOBJECT p, long n)
adtester ADTESTER
Definition: DAS_Spat_Conf.c:48
void DB_SetCCDTargetTempCB(MOBJECT o, void *id, void *a_data)
Select the CCD temperature mode .
int LoadGeoDB(void)
Definition: Load.c:1432
#define ROTSHUT
Rotating Shutter.
int type
int avgautor
autoranging for averaged measurement, 0 = NO AutoR before average; 1 = AutoR before average; ...
void CONFP_opt_page5(int mod, MOBJECT obj)
char * item
Definition: Mguidefs.h:1181
MOBJECT MCreateClippedEdit(MOBJECT parent, const char *text, int len, int clip_len, MTFont font)
MOBJECT rbResetEnab[2]
radio button for DAS Reset Enable/Disable
void SetItalicCB(MOBJECT obj, MVALUE a, void *data)
This callback toggles the Italic attribute.
void ReadInputCB(MOBJECT p, void *od, void *ad)
int FlgBG
Definition: DAS_Spat_Conf.c:91
void MObjectSetPopupHelp(MOBJECT obj, const char *str, int delay, int duration)
MOBJECT IOP[AMSMAX][8]
OptoInput Port N (N=0,1...,7), for AMSx (x=0,1,...AMSMAX-1)
void DB_VMRsfCB(MOBJECT o, void *id, void *a_data)
Set the flag for modification or reload of DAS configuration files Set the VMRsf (View Modify Re-load...
int ApplyGeoCB(MOBJECT shell, void *od, void *ad)
void CONFP_opt_ScheMeas(int mod, MOBJECT p)
void MDrawAreaSetResizeCallback(MOBJECT obj, DRAWAREA_PREF_CB cb, void *ad)
void CONFP_AMS_TabSingMotor(int id, int snum, MOBJECT tb1)
void valstedt(MOBJECT edit, EDIT_VAL *ev, void *ii)
float multiplier[AMSMAX][2]
multiplier, > 0 multiplier, < 0 demultiplier
MOBJECT MCreateOptionEdit(MOBJECT parent, const char *text, int len, int clip_len, int nrow, MTFont font)
long pos
Definition: Mguidefs.h:1185
void MShellUnrealize(MOBJECT obj)
int selitem
unsigned char ti_hour
Definition: bildef.h:79
#define UNDEF_ALIGN
Definition: Mguidefs.h:920
void ApplyChCB(MOBJECT shell, void *od, void *ad)
Apply changes in DAS Config callback.
void CONFP_AMS_IOPort(MOBJECT dtb, int amsn)
#define TIMES_SMALL
Definition: Mguidefs.h:883
void MObjectSetText(MOBJECT obj, const char *text)
MOBJECT e_fsize
Definition: DAS_Spatram.h:3064
void DB_CellResizeCB(MOBJECT obj, DRAWAREA_PREF *pref, void *a_data)
display selected Color
int SZAMax
Maximum SZA for performing measurements.
Definition: DAS_Spat.c:116
MOBJECT g_label
Definition: DAS_Spatram.h:3058
float * CCDPwr
Definition: bildef.h:103
void CONFP_param_page2(int mod, MOBJECT obj)
int WriteOptioniniCB(MOBJECT shell, void *od, void *ad)
Write Options.ini file .
static double ch
Definition: SOLPOS.C:120
void DB_ShutterType_CB(MOBJECT o, void *a, void *v)
callback selecting the type of installed shutter
void WDT_Task_CB(MOBJECT o, void *od, void *ad)
Definition: DAS_Spat.c:1547
MOBJECT lblADsetup[10]
int ChkDigIO(unsigned char word, int bitn)
check for digital I/O Status
undopal UDPAL
Definition: DAS_Spat_Conf.c:34
void CONFP_Param(int mod, MOBJECT mo)
void DB_ResetType_CB(MOBJECT o, void *a, void *v)
d_geo DGeo
struct for Station location
#define EM_MOTION
Definition: Mguidefs.h:319
MOBJECT edid
edit for FTP server user
MOBJECT rbDASResPer[2]
radio button for DAS Reset type (HOURs/DAYs)
void CONFP_opt_page4(int mod, MOBJECT obj)
void MShellDestroy(MOBJECT obj)
int MRButtonGetActivationStatus(MOBJECT o)
void UndoFCB(MOBJECT obj, void *a, void *v)
This callback UnDo the font choice (Not implemented yet)
MOBJECT SM_power[AMSMAX][2]
MOBJECT RBColObj[7]
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
void MEditEnableEditing(MOBJECT edit)
Control Flags.
void DB_RadioDarkCB(MOBJECT o, void *id, void *a_data)
Set the dark removing from the measurements.
int ccdWy
CCD Y End.
void DB_SelOutModeCB(MOBJECT o, void *id, void *a_data)
Select the Output for the Temperature AD Converter .
#define TROPOGAS
TROPOspheric Gas Analyzer Spectrometer.
File Browser Preferences. Used by the Utility functions MFileBowserExt() and MDirBowserExt().
Definition: Mguidefs.h:1482
int WriteColorsCB(MOBJECT o, void *a, void *v)
Write selected color in DASSysColor.INI.
MOBJECT rb[21]
Maximum number of station 21.
int hlinebefore
Number of HiddenLines before the central line in Plot.
MOBJECT lblADvalue[16]
int timezone
Station timezone.
char s_name[4]
Station name.
void MRButtonSetCallback(MOBJECT button, OBJ_VALUE_CB cb, void *data)
void MTButtonSetCallback(MOBJECT button, OBJ_VALUE_CB cb, void *data)
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
const char * ok_button
Definition: Mguidefs.h:1507
config Cfg
Definition: DAS_Spat_Conf.c:43
int dimx
Definition: bildef.h:113
#define FDOUBLE
double filter wheel
void DB_MIGE_CB(MOBJECT o, void *a, void *v)
callback selecting the operation mode for the AltAzPlatform
#define FPLUS
Filter Wheel Torque Motor.
float PID_ki
CARD8 transparent_tree
Definition: Mguidefs.h:1495
MOBJECT rbMIGEStatus[2]
radio button for MIGE status
d_fileman DFILEM
Definition: bildef.h:257
int avgmode
Flag to set Averaging mode: 0 = Repeat measurements for fixed number, 1 = Repeat measurements for fix...
int WriteParaminiCB(MOBJECT shell, void *od, void *ad)
Write Param.ini file .
#define TRTHEAT
Thermoregulation mode: heat only.
void FontOBJSelCB(MOBJECT obj, void *a, void *v)
This callback select the object for applying font.
#define CENTER_ALIGN
Definition: Mguidefs.h:917
const char * MGetNextFontFamily(void)
MOBJECT ADrb[3]
MOBJECT MDCreate_2DPlot(char *title)
2DPlot Panel. Procedure that build the shell for the plotting of the LOG files.
Definition: 2DPlot.c:473
int HomeAzimFast(void)
Home for Azimuth Axis.
Definition: Init.c:1229
void MObjectSetFGColorFromParent(MOBJECT obj, int true_false)
#define TRTCOOL
Thermoregulation mode: cool only.
void ReadLine(char *buf, int nc, FILE *f)
Read Line on a file Read one record of nc character on the file f.
Definition: Load.c:72
void OOP_CB(MOBJECT obj, MVALUE value, void *ad)
void DB_PlotDisplayCB(MOBJECT o, void *id, void *a_data)
Select if the PLOT will be displayed after the measurement .
MOBJECT edServerFTP
edit for FTP server address
int BrowseLog(void)
void MObjectSetCompositeHeight(MOBJECT obj, int h)
unsigned char ti_sec
Definition: bildef.h:81
unsigned char OOP[AMSMAX]
2 byte Word for AMS Opto insulated Output Port Status
void MSListClear(MOBJECT p)
#define HELV_SMALL
Definition: Mguidefs.h:881
MOBJECT MCreateScrollBar(MOBJECT parent, int type, long n, long max)
void DB_EqTypeCB(MOBJECT o, void *a, void *v)
int VBin
CCD Vertical Binning.
listf LISTF
Definition: DAS_Spat_Conf.c:38
omuthr OMUTHR
Definition: DAS_Spat_Conf.c:57
int PID_On
PID activation.
paramini structure . It contains some of the parameters defined in the file PARAM.INI .
void MEditSetActCallback(MOBJECT edit, OBJ_STRING_CB cb, void *data)
int CoolPw
CCD Init Power.
int Addr[AMSMAX]
address of AMs
void CONFP_AMS_NOVA(MOBJECT pf)
bil BIL
Definition: DAS_Spat_Conf.c:51
#define FIXED_SMALL
Definition: Mguidefs.h:878
int LoadDB_DefectPixel(char *buff)
Load Defective pixel mask. Procedure that load the Defective pixel mask in the file {homedir}/config/...
Definition: Load.c:182
MOBJECT MDCreate2DPlot(char *title, int x, int y, int dx, int dy, int mode)
create the 2D_Plot panel via the MDCreate_2DPlot.
int WriteGeo(int mode)
void PBH_CB(MOBJECT p, void *od, void *ad)
void DB_RadDrkSourceCB(MOBJECT o, void *a, void *v)
Set the dark source.
#define SPATRAMPLUS
As SPATRAM plus AltAzimuth platform.
id&#39;s for different tasks .
MOBJECT SM_step[AMSMAX][2]
char CONFIGDIREQUIPMENT[_MAX_PATH]
Definition: bildef.h:208
MOBJECT ADInflbl
double MaxSZA
Maximum SZA.
const char * MGetCurrentDirectory(void)
#define SBT_HOR
Definition: Mguidefs.h:1139
MOBJECT MCreateHiddenEdit(MOBJECT parent, const char *text, int len, MTFont font, char shown_char)
void SetBoldCB(MOBJECT obj, MVALUE a, void *data)
This callback toggles the Bold attribute.
int StoreGeoCB(MOBJECT shell, void *od, void *ad)
int NOVA_Out(int novatype, unsigned int out)
Write the NOVA Output port.
Definition: DAS_Spat.c:1375
void DrawAreaExpFontCB(MOBJECT obj, MEvent *pe, void *data)
This callback draws strings using the selected font.
int emshutter
Presence of the CCD Shutter, emshutter = 1 –> Shutter IS Installed, = 0 –> Shutter NOT Installed...
mige MIGE
void FrmNOVA_IO_Test(int mod, MOBJECT obj)
void valwledt(MOBJECT edit, EDIT_VAL *ev, void *ii)
void delay(unsigned long d)
Pauses for a specified number of milliseconds. .
Definition: Dxl.c:1113
int b_c
Definition: DAS_Spatram.h:3060
void DB_PlotYAxisCB(MOBJECT o, void *id, void *a_data)
Select the Y axis Unit mode .
NOVA7892 structure .
int FlgFG
Definition: DAS_Spat_Conf.c:92
MTColor MAllocColor(int r, int g, int b)
double DeltaSZA
DeltaSZA.
int DeltaSZA
= 1 Delta SZA measurements activated, = 0 Continous measurements
void edtDASReset_CB(MOBJECT p, LIST_ACT *la, void *ad)
void ValidateCB(MOBJECT edit, EDIT_VAL *ev, void *ii)
Text Validation callback Validation callback for the text typed in different text box...
void MLabelSetMargin(MOBJECT p, int wm, int hm)
void MEditSetValCallback(MOBJECT edit, EDIT_VAL_CB cb, void *data)
void(* OBJ_EVENT_CB)(MOBJECT obj, MEvent *e, void *ad)
Definition: Mguidefs.h:1456
DSCCB dsccb
Definition: DAS_Spat_Conf.c:45
void MRButtonActivate(MOBJECT o)
const char * file_label
Definition: Mguidefs.h:1505
char ftpuser[32]
FTP server users.
int plotYRange
0 –> full range; 1 –> min/max
int bold
Definition: DAS_Spat_Conf.c:88
MOBJECT MCreateDrawArea(MOBJECT parent, int width, int height)
int resetFreq
frequency of DAS/Windows Reset
MOBJECT edtDASReset
edit box for DAS Reset
MOBJECT FixMeasNum
void SelDefPixFileCB(MOBJECT o, void *a, void *v)
MOBJECT MCreateColForm(MOBJECT parent)
int MFileBrowseExt(const char *t, const char *ext, char *fname, char *dname, FB_PREFS *prefs)
das DAS
Definition: DAS_Spat_Conf.c:56
#define VS25
Uniblitz Shutter VS25.
MOBJECT FixTExp
MOBJECT SM_slope[AMSMAX][2]
void MObjectAddEventNotifyCallback(MOBJECT obj, OBJ_EVENT_CB cb, CARD32 event_mask, void *a_data)
void stedtCB(MOBJECT edit, char *text, void *ed)
int r_c
Definition: DAS_Spatram.h:3060
double int2hertz(int mod, int k)
void NOVAIn_CB(MOBJECT obj, void *od, void *ad)
void DB_MIGEType_CB(MOBJECT o, void *a, void *v)
void MButtonSetImageMaskByPixel(MOBJECT obj, int x, int y)
MOBJECT lblSZA[3]
labels for delta sza measurements
#define GASCODNG1
GASCODNG 1 (with ATX power supply & HiresIV)
void MDrawAreaSetExposeCallback(MOBJECT obj, OBJ_EVENT_CB cb, void *ad)
MOBJECT SM_pbtesthome[AMSMAX][2]
Function prototypes.
#define RHOUR
simple filter wheel
#define GASCODNG4
GASCODNG 4.
double cop_perc[AMSMAX][2]
Stepper Motors Power percent.
void DB_RadioFNSelCB(MOBJECT o, void *id, void *a_data)
Set the file name mode.
int newtimezone[20]
Station timezone.
Definition: bildef.h:77
int DeleteGeoCB(MOBJECT shell, void *od, void *ad)
char news_name[20][4]
New Station name.
int TOTTEXP
Total Exposure time in Averaging mode.
Definition: DAS_Spat.c:115
void wledtCB(MOBJECT edit, char *text, void *ed)
double newalititude[20]
New Station altitude.
const char * bg_image_file
Definition: Mguidefs.h:1519
int amsprogbar
display/hide prograssion bar, 0 = Hide, 1 = display
MOBJECT g_sbar
Definition: DAS_Spatram.h:3057
#define FSIMPLE
simple filter wheel
char ftpserver[32]
FTP server address.
#define _MAX_PATH
Definition: Dildef.h:202
MOBJECT MCreateShell(const char *title, int flags)
int hlineafter
Number of HiddenLines after the central line in Plot.
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
structure for OMU temperatures .
Definition: bildef.h:97
int TestFTP(void)
int linked
char lfraz[6]
Definition: DAS_Spat_Conf.c:94
int nitem
Number of items of the GeoDB.ini.
MTColor cell_color
Definition: DAS_Spatram.h:3059
void Message(char *str, int er)
Create a message shell for the AMS errors (Debug Use). .
Definition: Dxl.c:1085
void DB_GeocoordCB(MOBJECT o, void *a, void *v)
#define YAX
Y Axis.
int HomeFiltersFast(void)
(Fastest) Fliter wheel in the reference Position. The Fliter wheel reaches the reference Position...
Definition: Init.c:853
#define SPATRAM3
SPATRAM3.
paramini PARAM
Definition: DAS_Spat_Conf.c:36
MOBJECT listReset
list for reset frequency
MOBJECT INP[4]
Input widgets.
MOBJECT frm3_dr1
Definition: DAS_Spatram.h:3058
MOBJECT MCreateRButton(MOBJECT parent, const char *text, MTFont font)
int FlgOBJ
Definition: DAS_Spat_Conf.c:93
Definition: DOASdef.h:54
void DB_MeasMode_CB(MOBJECT o, void *a, void *v)
nova Nova
NOVA structure.
configpanel ConfigPanel
Configuration panel structure.
double int2perc(int mod, int k)
translate the AMS digit unit in text. The power assigned to the motor trough the AMS, is translated in text
Function prototypes.
#define SET2D_GRID
Definition: Dildef.h:156
ptf DC_HP
Definition: DAS_Spat_Conf.c:42
int AMS_wopto(int id, unsigned int w)
write the value on the optoinsulated port write the value on the optoinsulated port.
Definition: Dxl.c:911
#define FALSE
Definition: DSCUD.H:110
structure for AD Tester
void AMS_AdvancedCB(MOBJECT o, void *od, void *ad)
void MSListSetSortCallback(MOBJECT obj, STRCMP_CB cb)
void ColObjCB(MOBJECT o, void *a, void *v)
select the object to consider for color picking
Validation data for the EditField Object.
Definition: Mguidefs.h:1387
static double p
Definition: SOLPOS.C:131
int SetWorkDirMGUIenv(char *buff)
set DAS and MGUI enviroment when the program is launched undirectly (for offlineplot or log or auto o...
Definition: DAS_Spat.c:3353
void CONFP_opt_page6(int mod, MOBJECT obj)
int mirrorimg[2]
Flag to set the mirroring of the CCD image: 0 = NO Mirroring, 1= YES Mirroring (element 0 for X axis;...
MIMAGE bg_image
Definition: Mguidefs.h:1517
char step_fraz[AMSMAX][2][6]
Stepper Motors Step fraction.
void MTableFormSetRowAlign(MOBJECT form, int row, int al)
void CONFP_AMS_SM_OFFSET(MOBJECT obj, int nams)
void DSZArb_CB(MOBJECT o, void *a, void *v)
void(* OBJ_VALUE_CB)(MOBJECT obj, MVALUE value, void *ad)
Definition: Mguidefs.h:1458
#define TRTBOTH
Thermoregulation mode: cool and heat.
void CONFP_AMS(MOBJECT pf, int amsn)
int LoadDB_DispCoeff(void)
Load dispersion parameters. Procedure that load the dispersion parameters from file {homedir}/DOAS/Di...
Definition: Load.c:234
void MEditSetFilter(MOBJECT edit, int filter, const char *extra_chars)
MOBJECT lblReset
label for reset frequency
void MGetDefaultBackgroundRGB(int *pr, int *pg, int *pb)
void MLabelSetAlignment(MOBJECT p, int align)
int wl[]
WaveLength definition - for SD_Grating.
Definition: DAS_Spat.c:182
MOBJECT tb1
Definition: DFileMan.c:41
int pixcorr
Flag to set defective pixel correction: 0=NOT Corrected, 1=Corrected.
#define F_ATT_FORM
Definition: Mguidefs.h:1107
MOBJECT ShellConfig
Shell configuration panel.
void CONFP_opt_page3(int mod, MOBJECT obj)
unsigned char ti_min
Definition: bildef.h:78
void DB_MirrorImg_CB(MOBJECT o, void *a, void *v)
callback selecting the activation of the mirroring of the CCD image along the X or Y axis ...
void edtSZA_CB(MOBJECT p, LIST_ACT *la, void *ad)
int ftpbackup
Flag to set back up: 0 = NO FTP Back-UP; 1 = Perform FTP Back-UP.
int MPagedFormGetActivePage(MOBJECT form)
Bortul Image Library Structure .
Definition: bildef.h:250
int imgtype
Flag to set Image type: 0=MONOINT, 1=RGB.
void MPagedFormSetActivePage(MOBJECT form, int page)
int flagnewstation
New Station Flag.
MOBJECT rbSHUTType[3]
radio button for SHUTTER type
void CONFP_opt_page1(int mod, MOBJECT obj)
void MFormSetSpacing(MOBJECT p, int offset)
double longitude
Station longitude.
float * PltPwr
Definition: bildef.h:104
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
MOBJECT PFAMS
Definition: DAS_Spat_Conf.c:96
void NOVAOut_CB(MOBJECT obj, MVALUE value, void *ad)
int AMS_chkbitsts(int id, int bitn)
check bit status Procedure for the determination of the bit number status.
Definition: Dxl.c:192
int measmode
measuring mode: 0 = Single; 1 = Averaged
palette DPAL
Definition: DAS_Spat_Conf.c:39
MOBJECT BPDark
void TestFontCB(MOBJECT obj, void *a, void *data)
This callback tries to load the specified font.
void MObjectSetCompositeWidth(MOBJECT obj, int w)
int g_c
Definition: DAS_Spatram.h:3060
MOBJECT rbMIGEtype[5]
radio button for MIGE type
const char * Relais_Code[]
Definition: DAS_Spat_Conf.c:98
int settempvar
int speed[AMSMAX][2]
Stepper Motors Speed.
const char * filter_label
Definition: Mguidefs.h:1503
void CONFP_opt_page2(int mod, MOBJECT obj)
float PID_kp
int step[AMSMAX][2]
Stepper Motors Step.
void * MOBJECT
Definition: Mguidefs.h:192
ccd cc
Definition: DAS_Spat_Conf.c:32
#define BOTTOM_ALIGN
Definition: Mguidefs.h:919
MOBJECT rbCorrPix[2]
radio button for defective CCD Correction
#define True
Definition: Mguidefs.h:235
MOBJECT e_fname
Definition: DAS_Spatram.h:3064
#define LEFT_ALIGN
Definition: Mguidefs.h:915
MOBJECT rbSHUTStatus[2]
radio button for SHUTTER status
double speed_Hz[AMSMAX][2]
Stepper Motors Speed [Hz].
MOBJECT b_label
Definition: DAS_Spatram.h:3058
double maxtexp
Maximum exposure time (used in Autorange())
MOBJECT ADpb
MOBJECT lblADch[16]
int aaopmode
operation mode for the Alt Az Platform, 0 = solar Traxker; 1 = Anti-Solar Tracker; 2 = Free Positioni...
Definition: dcldef.h:1020
CTYPE void DLL DC_SetUsrGain(int Gain, int Range, int Offset, int Camera)
Procedure that allows you to set the ccd gain. Procedure that allows you to set the ccd gain...
float * AllocFloatMat(int hp, int vp)
Definition: Spat_Plot.c:2009
char ftppwd[32]
FTP server pwd.
int NOVA_In(int novatype, unsigned int DigIn)
Read the NOVA Input port.
Definition: DAS_Spat.c:1306
void DB_RadioPixCorrCB(MOBJECT o, void *id, void *a_data)
Set the image Correction flag.
int MSListAddItem(MOBJECT p, const char *item, void *data)
#define F_PREF_ATT_COL
Definition: Mguidefs.h:1098
Definition: dcldef.h:1043
ids IDS
ID tasks.
Definition: DAS_Spat_Conf.c:47
void CONFP_param_page3(int mod, MOBJECT obj)
int dimy
Definition: bildef.h:113
void listval2fraz(int mod, int val)
Decimal value to ratio value The decimal value indicating the fractioning of the step is translated i...
int smposmode
positioning mode for stepper , 0 = sequential mode; 1 = simoultaneous mode
void CONFP_opt_page7(int mod, MOBJECT obj)
void DB_HomeTypeCB(MOBJECT p, LIST_ACT *la, void *ad)
float * CCDTemp
Definition: bildef.h:102
void DGeoeditCB(MOBJECT edit, EDIT_VAL *ev, void *ii)
int filename
Flag to set file name mode 0=Free choice, 1 = Automatic.
ccd DC_CCD
Definition: DAS_Spat_Conf.c:41
void DB_RadioAvgModeCB(MOBJECT o, void *id, void *a_data)
Set the Averaging mode flag.
MOBJECT edpwd
edit for FTP server pwd
int EqType
Spectrometer Type.
void DB_ImgTypeCB(MOBJECT o, void *id, void *a_data)
Set the Image type.
int HomeZenithFast(void)
Home for Zenith Axis.
Definition: Init.c:1143
void DB_AVGAutoR_CB(MOBJECT o, void *a, void *v)
CARD8 allow_dir_rename
Definition: Mguidefs.h:1490
MOBJECT HiddenL
void ApplyImgCB(MOBJECT shell, void *od, void *ad)
Image type Application callback Apply to the CCD buffer the selected type of image (MONO or RGB) ...
#define NOVA7892
NOVA7892 monoboard (old)
MOBJECT rbMIGEopmode[3]
radio button for MIGE operating mode
int AddStCB(MOBJECT shell, void *od, void *ad)
char CONFIGDIRCOMMON[_MAX_PATH]
Definition: bildef.h:206
unsigned char DigIn
Digital Input.
void DB_FilterType_CB(MOBJECT o, void *a, void *v)
callback selecting the type of installed filter wheel module
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
int WriteHardwareiniCB(MOBJECT shell, void *od, void *ad)
Write hardware.ini file .
unsigned focus_leave
Definition: Mguidefs.h:1397
int N_AVG
Number of measurements for Averaging mode in fixed number of meas. mode.
Definition: DAS_Spat.c:113
int darksource
Flag to set Dark source: 0 = Blind Pixels, 1 = Full Frame.
int resetEnabled
DAS/Windows reset option (1 = Enabled; 0 = disabled)
int refertemp
Flag to set the reference temp for thermo-regulation: 0 = AVGPINT; 1 = OPTIC; 2 = GRATING...
void FrmStepperHomeMode(int mod, MOBJECT obj)
U32 Platform
(R/W) Platform code Camera platform definitions
Definition: dcldef.h:1065
long wav[]
Step Number definition - for SD_Grating.
Definition: DAS_Spat.c:195
void MShellSetWMCloseCallback(MOBJECT p, WM_CLOSE_CB cb, void *a_data)
void MObjectSetSensitive(MOBJECT obj)
int type
type of NOVA monoboard used (7892 or 945GSE)
int resetType
type of period for DAS Reset: 0=Hours, 1=Days
void Rebuildrb(int mode)
MOBJECT lblCorrPixF
label for name file used for defec pix correction
int DispBlindPix
Display Blind Pix: 0 = NO, 1 = Yes.
MOBJECT SM_speed[AMSMAX][2]
void MObjectDestroy(MOBJECT obj)
MOBJECT MCreateRowForm(MOBJECT parent)
void PBTempHistoCB(MOBJECT o, void *a, void *v)
#define WS_ETCHED_IN
Definition: Mguidefs.h:959
MOBJECT pbBrowseCorrPixF
Push button for file selection.
int ccdYoff
CCD Y Start.
int shuttertype
type of installed shutter: 0 = VS25, 1 = Rotating Shutter, 2 = TorqueMotor
void DB_StorePB(MOBJECT obj, MAnyWindowEvent *pe, void *a_data)
MOBJECT MCreateImagePButtonExt(MOBJECT parent, const char *npf, const char *apf, const char *upf, const char *non, const char *aon, const char *uon)
double ITemp
CCD Target Temperature.
unsigned int maxlvlar
maximum level of autoranging (max 65000)
int WriteFTPINI(void)
UNDO Control Panel and push buttons colors .
MOBJECT FFDark
unsigned short WDT_TOUT
WDT timeout.
void DB_RadioFTPCB(MOBJECT o, void *a, void *v)
#define TOP_ALIGN
Definition: Mguidefs.h:918
MOBJECT MCreateTabbedRowForm(MOBJECT parent, int npage, MTFont f)
void MScrollBarSetPosCallback(MOBJECT p, OBJ_VALUE_CB cb, void *data)
int exemode
Set the Execution MODE (Execution modes)
const char * MGetFirstFontFamily(void)
double TPelt
OMU Target Temperature.
void CONFP_param_page5(int mod, MOBJECT obj)
void DB_2DPlot(char *title, int x, int y, int dx, int dy, int mode)
2D_Plot panel callback.
void CloseConfigCB(MOBJECT shell, void *od, void *ad)
Close DAS-Config callback close the DAS_Config window. If the testing of the ADConverter is running i...
void CCDSetupCB(MOBJECT shell, void *od, void *ad)
CCD setup Callback. Execute DCS.exe (DTA Camera Select)
OMU Thermoregulation structure .
float * pTempMat
Definition: bildef.h:100
MTColor drawarea_bgc
Definition: DAS_Spatram.h:3062
DXL_par DXL
Definition: DAS_Spat_Conf.c:33
double MinSZA
Minimum SZA.
void CloseShTempCB(MOBJECT p, void *od, void *ad)
MOBJECT lbltelap
label elapsed time (for WDT)
dftp DFTP
Definition: DAS_Spat_Conf.c:49
int WriteAMSCB(MOBJECT shell, void *od, void *ad)
Write AMS.ini file .
#define WS_SHADOW_OUT
Definition: Mguidefs.h:957
MOBJECT SZAMax
void CONFP_AMS_Utility(MOBJECT pf)
MOBJECT MCreateImageTButtonExt(MOBJECT parent, const char *npf, const char *apf, const char *upf, const char *non, const char *aon, const char *uon)
MOBJECT sh
Definition: bildef.h:108
void UnderOverPixCB(MOBJECT o, void *id, void *a_data)
Under/Over exposed pixels Callback At the pression of the button in DAS_Config the appropriate shell...
char DEFPIXFILENAME[_MAX_PATH]
defective pixel filename with path
int power[AMSMAX][2]
Stepper Motors Power.
float PID_kd
int italic
Definition: DAS_Spat_Conf.c:89
marconi Marconi
CCD Sensor struct.
const char * Mir_CodeTropo[]
const char array for the realisation of the Mirrors buttons in the Mirror shell for TROPOGAS ...
Definition: DAS_Spat.c:234
paramini Paramini
structure for the parameters defined in param.ini configuration file
LIST_ACT * MSListGetSelected(MOBJECT p)
void MFormSetPrefAtt(MOBJECT p, int pref_att)
______________________________________________________________________________________
Generated on Mon Sep 18 2017 11:44:07 for DAS - Rel. 3.1.6 - 18/09/2017.