c# - Can't connect to camera show login loop -


i go project smart parking.
have problem when connect ip of camera, call function connect() , show login screen, when login success must show form way. but, when login successfull, show login screen again , loop.
here code:

if write code in event formload actived. event formactived broken. in form way: axlivex1 control of camera geovision.

public void opencamera(bool position, string username, string password, string ipaddress)         {              try             {                 if (!position)                 {                     axlivex1.ipaddress = ipaddress;                     axlivex1.username = username;                     axlivex1.password = password;                     axlivex1.defaultcam = 11;                     axlivex1.connect();                 }             }             catch (exception ex)             {                 #if debug                     debug.writeline(ex.tostring());                 #endif              }         } private void frmway_activated(object sender, eventargs e)         {             try             {                 camerabus camerabus = new camerabus();                 datatable dt = camerabus.camera_getbyall();                 declares.eventcomport1.lfdatareceived += new lfdatareceivedeventhandler(eventcomport1_lfdatareceived);                 declares.eventcomport2.lfdatareceived += new lfdatareceivedeventhandler(eventcomport2_lfdatareceived);                 loaddatatogrid();                 foreach (datarow row in dt.rows)                 {                      cameradto camera = new cameradto(row);                     opencamera(camera.position, camera.user, camera.pass, camera.ip);                  }             }             catch (exception ex)             { #if debug                 debug.writeline(ex.tostring()); #endif 

here link image show error

thank much.


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -