public void Initialise(mgcUser aUser) { _mainMGCHwnd = apiHelper.apiFindWindow(IntPtr.Zero, IntPtr.Zero, null, "NetPropagate MGC-EP"); _mainUVCHwnd = apiHelper.apiFindWindow(IntPtr.Zero, IntPtr.Zero, null, "UVC"); _user = aUser; _loginControls = apiHelper.fillLoginControls(_mainMGCHwnd); doLogin(); _conferenceControls = apiHelper.fillMainControls(_mainMGCHwnd); _tick.Elapsed += new ElapsedEventHandler(tick_Elapsed); }
public static mgcLoginControls fillLoginControls(IntPtr hwnd) { // get login controls here (mgc must be started, or all Zero) IntPtr temp1 = apiFindWindow(hwnd,IntPtr.Zero, null, null); IntPtr temp2 = apiFindWindow(temp1, IntPtr.Zero, null, null); IntPtr temp3 = apiFindWindow(temp2, IntPtr.Zero, null, null); mgcLoginControls controls = new mgcLoginControls(); controls.hwndMainWindow = hwnd; controls.hwndLoginBTN = apiFindWindow(temp3, IntPtr.Zero, MGC_BUTTON, null); controls.hwndPasswordTB = apiFindWindow(temp3, controls.hwndLoginBTN, MGC_TEXTBOX, null); controls.hwndUsernameTB = apiFindWindow(temp3, controls.hwndPasswordTB, MGC_TEXTBOX, null); return controls; }