void THRESHOLDOBJ::load(HANDLE hFile) { float temp; load_object_basics(this); load_property("play_interval",P_INT,&play_interval); load_property("interval_len",P_INT,&interval_len); load_property("gain",P_INT,&signal_gain); load_property("from-input",P_FLOAT,&from_input); load_property("to-input",P_FLOAT,&to_input); load_property("and/or",P_INT,&op); load_property("show-meter",P_INT,&showmeter); load_property("only-rising",P_INT,&rising); load_property("only-falling",P_INT,&falling); load_property("usemedian",P_INT,&usemedian); load_property("baseline",P_INT,&baseline); load_property("color",P_FLOAT,&temp); color=(COLORREF)temp; load_property("bkcol",P_FLOAT,&temp); bkcolor=(COLORREF)temp; if (bkcolor==color) bkcolor=RGB(255,255,255); temp=0; load_property("fontcol",P_FLOAT,&temp); fontcolor=(COLORREF)temp; temp=RGB(255,255,255); load_property("fontbkcol",P_FLOAT,&temp); fontbkcolor=(COLORREF)temp; load_property("top",P_INT,&top); load_property("left",P_INT,&left); load_property("right",P_INT,&right); load_property("bottom",P_INT,&bottom); load_property("bigadapt",P_INT,&bigadapt); load_property("smalladapt",P_INT,&smalladapt); load_property("adaptinterval",P_INT,&adapt_interval); load_property("fontsize",P_INT,&fontsize); if (fontsize) { if (font) DeleteObject(font); if (!(font = CreateFont(-MulDiv(fontsize, GetDeviceCaps(GetDC(NULL), LOGPIXELSY), 72), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "Arial"))) report_error("Font creation failed!"); } load_property("barsize",P_INT,&barsize); load_property("wndcaption",P_STRING,wndcaption); if (!showmeter) { if (displayWnd!=NULL){ DestroyWindow(displayWnd); displayWnd=NULL; } } else { MoveWindow(displayWnd,left,top,right-left,bottom-top,TRUE); if (GLOBAL.locksession) { SetWindowLong(displayWnd, GWL_STYLE, GetWindowLong(displayWnd, GWL_STYLE)&~WS_SIZEBOX); //SetWindowLong(displayWnd, GWL_STYLE, 0); } else { SetWindowLong(displayWnd, GWL_STYLE, GetWindowLong(displayWnd, GWL_STYLE) | WS_SIZEBOX); } SetWindowText(displayWnd,wndcaption); InvalidateRect (displayWnd, NULL, TRUE); } redraw=1; }
void BUTTONOBJ::load(HANDLE hFile) { float temp; load_object_basics(this); load_property("transcolor",P_FLOAT,&temp); transcolor=(COLORREF)temp; load_property("bkcol",P_FLOAT,&temp); bkcolor=(COLORREF)temp; temp=0;bitmapsize=100; load_property("top",P_INT,&top); load_property("left",P_INT,&left); load_property("right",P_INT,&right); load_property("bottom",P_INT,&bottom); load_property("buttonpath",P_STRING,buttonpath); load_property("displayborder",P_INT,&displayborder); load_property("bitmapsize",P_INT,&bitmapsize); load_property("buttonfunction",P_INT,&buttonfunction); load_property("value1",P_INT,&value1); load_property("value2",P_INT,&value2); load_property("buttoncaption",P_STRING,buttoncaption); MoveWindow(displayWnd,left,top,right-left,bottom-top,TRUE); update_border(displayWnd,displayborder); SetWindowText(displayWnd,buttoncaption); InvalidateRect (displayWnd, NULL, TRUE); redraw=1; }
void DOKUOBJ::load(HANDLE hFile) { load_object_basics(this); load_property("text",P_STRING,text); apply_nl(); }
void INTEGRATEOBJ::load(HANDLE hFile) { load_object_basics(this); load_property("ivalue",P_INT,&i_value); load_property("imin",P_FLOAT,&min); load_property("imax",P_FLOAT,&max); }
void KEYCAPTUREOBJ::load(HANDLE hFile) { load_object_basics(this); load_property("mode",P_INT,&mode); load_property("findcode",P_INT,&findcode); load_property("replacecode",P_INT,&replacecode); }
void MAGNITUDEOBJ::load(HANDLE hFile) { char sztemp[30]; char szorder[5]; load_object_basics(this); load_property("type",P_INT,&filtertype); load_property("order",P_INT,&order); load_property("center",P_FLOAT,¢er); load_property("width",P_FLOAT,&wid); load_property("gain",P_INT,&gain); strcpy(sztemp,PASSTYPE[filtertype].init); sprintf(szorder,"%d",order); strcat(sztemp,szorder); if (lp1fbuf!=NULL) fid_run_freebuf(lp1fbuf); if (lp1filt!=NULL) fid_run_free(lp1filt); if (lp2fbuf!=NULL) fid_run_freebuf(lp2fbuf); if (lp2filt!=NULL) fid_run_free(lp2filt); lp1filt= fid_design(sztemp, PACKETSPERSECOND, (double)wid, 0, 0, 0); lp1run= fid_run_new(lp1filt, &(lp1funcp)); lp1fbuf=fid_run_newbuf(lp1run); lp2filt= fid_design(sztemp, PACKETSPERSECOND,(double)wid, 0, 0, 0); lp2run= fid_run_new(lp2filt, &(lp2funcp)); lp2fbuf=fid_run_newbuf(lp2run); }
void PARTICLEOBJ::load(HANDLE hFile) { load_object_basics(this); load_property("mute",P_INT,&mute); load_property("palette-file",P_STRING,palettefile); if (strcmp(palettefile,"none")) { char szFileName[MAX_PATH] = ""; strcpy(szFileName,GLOBAL.resourcepath); strcat(szFileName,"PALETTES\\"); strcat(szFileName,palettefile); if (!load_from_file(szFileName, cols, sizeof(cols) )) { report_error(szFileName); report_error("Could not load Color Palette "); } else { for (t=0;t<128;t++) { colors[t][0]=(float)((cols[t]&0xff)/256.0); colors[t][1]=(float)(((cols[t]>>8)&0xff)/256.0); colors[t][2]=(float)((cols[t]>>16)/256.0); } } }
void SAMPLE_HOLDOBJ::load(HANDLE hFile) { load_object_basics(this); load_property("hold",P_FLOAT,&hold); load_property("trigmode",P_INT,&mode); load_property("resetvalue",P_FLOAT,&resetvalue); }
void MCIOBJ::load(HANDLE hFile) { load_object_basics(this); load_property("mci-file",P_STRING,mcifile); load_property("wnd-top",P_INT,&top); load_property("wnd-bottom",P_INT,&bottom); load_property("wnd-left",P_INT,&left); load_property("wnd-right",P_INT,&right); load_property("upd_speed",P_INT,&upd_speed); load_property("pos_center",P_INT,&pos_center); load_property("play_once",P_INT,&play_once); if (strcmp(mcifile,"none")) { char szFileName[MAX_PATH] = ""; strcpy(szFileName,mcifile); // m_video = MCIWndCreate(ghWndMain, hInst,WS_VISIBLE|WS_THICKFRAME|MCIWNDF_NOMENU|MCIWNDF_NOPLAYBAR|MCIWNDF_NOERRORDLG,mcifile); m_video = MCIWndCreate(ghWndMain, hInst,WS_VISIBLE|WS_THICKFRAME|MCIWNDF_NOERRORDLG,mcifile); if (!m_video) report_error ("Cannot open MCI File"); else { MCIWndSetTimeFormat(m_video ,"ms"); MCIWndSetActiveTimer(m_video,500); if ((!strstr(mcifile,".mp3")) && (!strstr(mcifile,".wav"))) SetWindowPos(m_video,HWND_TOPMOST,left,top,right-left,bottom-top,SWP_SHOWWINDOW); else ShowWindow(m_video,FALSE); } } }
void EDF_READEROBJ::load(HANDLE hFile) { state=0; loading=1; load_object_basics(this); load_property("filename",P_STRING,&filename); load_property("offset",P_INT,&offset); if ((edffile=open_edf_file(&header,channel,filename))==INVALID_HANDLE_VALUE) { char st[150]; reduce_filepath(st,filename); strcpy(filename,GLOBAL.resourcepath); strcat(filename,"ARCHIVES\\"); strcat(filename,st); edffile=open_edf_file(&header,channel,filename); } if (edffile!=INVALID_HANDLE_VALUE) { header.samplingrate=PACKETSPERSECOND; calc_session_length(); session_pos(0); outports=header.channels; state=1; } else { report_error("EDF archive file not found, please open file in EDF-Reader"); sessionlength=0; } height=CON_START+outports*CON_HEIGHT+5; sampos=0; get_captions(); loading=0; }
void COM_WRITEROBJ::load(HANDLE hFile) { load_object_basics(this); load_property("command",P_INT,&command); load_property("data1",P_INT,&data1); load_property("data2",P_INT,&data2); load_property("trigger",P_INT,&en_trigger); }
void EVALOBJ::load(HANDLE hFile) { char expr[MAXEXPRLENGTH]; load_object_basics(this); load_property("expression",P_STRING,expr); setExpression(expr); }
void NEUROBITOBJ::load(HANDLE hFile) { load_object_basics(this); load_property("device",P_STRING,device); if (DevCtx>=0) NdCloseDevContext(DevCtx); load_devctx(); update_channelinfo(); GLOBAL.neurobit_available=1; }
void PORTOBJ::load(HANDLE hFile) { load_object_basics(this); load_property("triggermode",P_INT,&triggermode); load_property("val0",P_INT,&val0); load_property("val1",P_INT,&val1); load_property("portaddress",P_INT,&portaddress); load_property("portval",P_INT,&portval); }
void MIXER4OBJ::load(HANDLE hFile) { load_object_basics(this); load_property("chn1vol",P_FLOAT,&chn1vol); load_property("chn2vol",P_FLOAT,&chn2vol); load_property("chn3vol",P_FLOAT,&chn3vol); load_property("chn4vol",P_FLOAT,&chn4vol); load_property("invmode",P_INT,&invmode); }
static gboolean load_attributes (GckObject *object, GckBuilder *builder, GCancellable *cancellable, GError **lerror) { gboolean ret = FALSE; gulong klass; gulong type; if (!load_object_basics (object, builder, cancellable, &klass, &type, lerror)) return FALSE; switch (klass) { case CKO_CERTIFICATE: switch (type) { case CKC_X_509: ret = load_x509_attributes (object, builder, cancellable, lerror); break; default: _gcr_debug ("unsupported certificate type: %lu", type); break; } break; case CKO_PUBLIC_KEY: case CKO_PRIVATE_KEY: switch (type) { case CKK_RSA: ret = load_rsa_attributes (object, builder, cancellable, lerror); break; case CKK_DSA: ret = load_dsa_attributes (object, builder, cancellable, lerror); break; default: _gcr_debug ("unsupported key type: %lu", type); break; } break; default: _gcr_debug ("unsupported class: %lu", type); break; } if (ret == FALSE && lerror != NULL && *lerror == NULL) { g_set_error_literal (lerror, GCR_DATA_ERROR, GCR_ERROR_UNRECOGNIZED, _("Unrecognized or unavailable attributes for key")); } return ret; }
void TCP_RECEIVEOBJ::load(HANDLE hFile) { load_object_basics(this); load_property("host",P_STRING,&host); load_property("header",P_STRING,&edfheader); parse_edf_header(&header, channel, edfheader); outports=header.channels; height=CON_START+outports*CON_HEIGHT+5; get_captions(); }
void FILE_READEROBJ::load(HANDLE hFile) { load_object_basics(this); load_property("filename",P_STRING,&filename); load_property("format",P_INT,&format); load_property("outports",P_INT,&outports); height=CON_START+outports*CON_HEIGHT+5; if (strcmp(filename,"none")) open_textarchive(this); }
void SIGNALOBJ::load(HANDLE hFile) { load_object_basics(this); load_property("frequency",P_FLOAT,&frequency); load_property("center",P_FLOAT,¢er); load_property("gain",P_FLOAT,&gain); load_property("phase",P_FLOAT,&phase); load_property("noise",P_INT,&noise); load_property("type",P_INT,&sigtype); load_property("enable_in",P_INT,&enable_in); if (enable_in) { width=80; height=CON_START+2*CON_HEIGHT+5;} else {width=50; height=CON_START+CON_HEIGHT+5; } }
void BALLGAMEOBJ::load(HANDLE hFile) { load_object_basics(this); load_property("speed",P_INT,&speed); load_property("racket",P_INT,&racket); load_property("best",P_INT,&best); load_property("middle",P_INT,&reset_middle); load_property("top",P_INT,&top); load_property("left",P_INT,&left); load_property("right",P_INT,&right); load_property("bottom",P_INT,&bottom); MoveWindow(displayWnd,left,top,right-left,bottom-top,TRUE); }
void KEYSTRIKEOBJ::load(HANDLE hFile) { int i; char sztemp[50]; load_object_basics(this); load_property("numkeys",P_INT,&numkeys); for (i=0;i<numkeys;i++) { wsprintf(sztemp,"key%d:",i+1); load_property(sztemp,P_STRING,keylist[i]); } }
void TRANSLATEOBJ::load(HANDLE hFile) { int t; char sztemp[20]; load_object_basics(this); load_property("points",P_INT,&points); for (t=0;t<points;t++) { wsprintf(sztemp,"pointx%d",t); load_property(sztemp,P_INT,&pointx[t]); wsprintf(sztemp,"pointy%d",t); load_property(sztemp,P_FLOAT,&pointy[t]); } calculate_map(); }
void ARRAY3600OBJ::load(HANDLE hFile) { load_object_basics(this); load_property("comport",P_INT,&comport); load_property("baudrate",P_INT,&baudrate); load_property("connected",P_INT,&connected); load_property("periodic",P_INT,&periodic); load_property("period",P_INT,&period); load_property("maxvoltage",P_INT,&maxvoltage); load_property("maxcurrent",P_INT,&maxcurrent); load_property("maxpower",P_INT,&maxpower); load_property("address",P_INT,&address); load_property("voltage",P_INT,&voltage); if (connected) { connected=SetupComPort(comport); if (connected) setToPcControlOn(); } }
void SPELLEROBJ::load(HANDLE hFile) { load_object_basics(this); load_property("top",P_INT,&top); load_property("left",P_INT,&left); load_property("right",P_INT,&right); load_property("bottom",P_INT,&bottom); load_property("speed",P_INT,&speed); load_property("press",P_INT,&press); load_property("idle",P_INT,&idle); load_property("mode",P_INT,&mode); load_property("selections",P_INT,&selections); load_property("wordfile",P_STRING,wordfile); load_property("dictfile",P_STRING,dictfile); load_property("autolearn",P_INT,&autolearn); load_property("directsend",P_INT,&directsend); if (strlen(dictfile)>6) load_dictionary(dictfile); MoveWindow(displayWnd,left,top,right-left,bottom-top,TRUE); }
void CAMOBJ::load(HANDLE hFile) { load_object_basics(this); load_property("interval",P_INT,&interval); load_property("autorestore",P_INT,&autorestore); load_property("dist_threshold",P_FLOAT,&dist_threshold); load_property("angle_threshold",P_FLOAT,&angle_threshold); load_property("threshold_time",P_INT,&threshold_time); load_property("pt1_xpos",P_FLOAT,&PT1_xpos); load_property("pt1_ypos",P_FLOAT,&PT1_ypos); load_property("pt2_xpos",P_FLOAT,&PT2_xpos); load_property("pt2_ypos",P_FLOAT,&PT2_ypos); load_property("mode",P_INT,&mode); load_property("showlive",P_INT,&showlive); load_property("tracking",P_INT,&enable_tracking); load_property("trackface",P_INT,&trackface); load_property("archive",P_STRING,videofilename); if (!showlive) cvDestroyWindow("Camera"); if (trackface) MAX_COUNT=2; else MAX_COUNT=1; }
void AVIOBJ::load(HANDLE hFile) { load_object_basics(this); load_property("avi-file",P_STRING,avifile); load_property("wnd-top",P_INT,&top); load_property("wnd-bottom",P_INT,&bottom); load_property("wnd-left",P_INT,&left); load_property("wnd-right",P_INT,&right); if (strcmp(avifile,"none")) { char szFileName[MAX_PATH] = ""; strcpy(szFileName,avifile); if (!OpenAVI (szFileName)) { strcpy(szFileName,"could not Open AVI-File: "); strcat(szFileName,avifile); report_error ( szFileName); } } MoveWindow(displayWnd,left,top,right-left,bottom-top,TRUE); }
void COUNTEROBJ::load(HANDLE hFile) { float temp; load_object_basics(this); load_property("mode",P_INT,&mode); load_property("coutnervalue",P_FLOAT,&countervalue); load_property("resetvalue",P_FLOAT,&resetvalue); load_property("showcounter",P_INT,&showcounter); load_property("fontsize",P_INT,&fontsize); if (font) DeleteObject(font); if (!(font = CreateFont(-MulDiv(fontsize, GetDeviceCaps(GetDC(NULL), LOGPIXELSY), 72), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "Arial"))) report_error("Font creation failed!"); load_property("fontcolor",P_FLOAT,&temp); fontcolor=(COLORREF)temp; load_property("bkcolor",P_FLOAT,&temp); bkcolor=(COLORREF)temp; if ((bkcolor==0)&&(fontcolor==0)) fontcolor=255; load_property("top",P_INT,&top); load_property("left",P_INT,&left); load_property("right",P_INT,&right); load_property("bottom",P_INT,&bottom); load_property("integer",P_INT,&integer); load_property("wndcaption",P_STRING,wndcaption); if (!showcounter) { if (displayWnd!=NULL) { DestroyWindow(displayWnd); displayWnd=NULL; } } else { MoveWindow(displayWnd,left,top,right-left,bottom-top,TRUE); SetWindowText(displayWnd,wndcaption); } }
void FILTEROBJ::load(HANDLE hFile) { char sztemp[30]; char szorder[5]; load_object_basics(this); load_property("name",P_STRING,name); load_property("type",P_INT,&filtertype); load_property("order",P_INT,&par0); load_property("display-from",P_INT,&dispfrom); load_property("display-to",P_INT,&dispto); load_property("par1",P_FLOAT,&par1); load_property("par2",P_FLOAT,&par2); if (fbuf!=NULL) fid_run_freebuf(fbuf); if (filt!=NULL) fid_run_free(filt); strcpy(sztemp,FILTERTYPE[filtertype].init); wsprintf(szorder,"%d",par0); strcat(sztemp,szorder); filt=fid_design(sztemp, PACKETSPERSECOND, par1, par2, 0, 0); run= fid_run_new(filt, &(funcp)); fbuf=fid_run_newbuf(run); }
void CONSTANTOBJ::load(HANDLE hFile) { load_object_basics(this); load_property("value",P_FLOAT,&value); }
void DEVIATIONOBJ::load(HANDLE hFile) { load_object_basics(this); load_property("interval",P_INT,&interval); }