コード例 #1
0
ファイル: Gui.cs プロジェクト: tatonka21/genbanking
        public static void SetGui(SWIGTYPE_p_AB_BANKING abHandle, IAqGui guiobj)
        {
            // retrieve function pointers for callbacks
            msgdel        = new MessageBoxDelegate(guiobj.MessageBox);
            MessageBoxPtr = Marshal.GetFunctionPointerForDelegate(msgdel);

            inputdel    = new InputBoxDelegate(guiobj.InputBox);
            InputBoxPtr = Marshal.GetFunctionPointerForDelegate(inputdel);

            showdel    = new ShowBoxDelegate(guiobj.ShowBox);
            ShowBoxPtr = Marshal.GetFunctionPointerForDelegate(showdel);

            passwdstatusdel      = new SetPasswordStatusDelegate(guiobj.SetPasswordStatus);
            SetPasswordStatusPtr = Marshal.GetFunctionPointerForDelegate(passwdstatusdel);

            checkcertdel = new CheckCertDelegate(guiobj.CheckCert);
            CheckCertPtr = Marshal.GetFunctionPointerForDelegate(checkcertdel);

            getpassdel     = new GetPasswordDelegate(guiobj.GetPassword);
            GetPasswordPtr = Marshal.GetFunctionPointerForDelegate(getpassdel);

            // register function pointers to callback
            gui = AqGui.GWEN_Gui_new();

            AqGui.GWEN_Gui_SetMessageBoxFn(gui, MessageBoxPtr);
            AqGui.GWEN_Gui_SetInputBoxFn(gui, InputBoxPtr);
            AqGui.GWEN_Gui_SetShowBoxFn(gui, ShowBoxPtr);
            AqGui.GWEN_Gui_SetSetPasswordStatusFn(gui, SetPasswordStatusPtr);
            AqGui.GWEN_Gui_SetCheckCertFn(gui, CheckCertPtr);
            AqGui.GWEN_Gui_SetGetPasswordFn(gui, GetPasswordPtr);
            AqGui.GWEN_Gui_SetGui(gui);
        }
コード例 #2
0
ファイル: Gui.cs プロジェクト: Dynalon/genbanking
        public static void SetGui(SWIGTYPE_p_AB_BANKING abHandle, IAqGui guiobj)
        {
            // retrieve function pointers for callbacks
            msgdel = new MessageBoxDelegate (guiobj.MessageBox);
            MessageBoxPtr = Marshal.GetFunctionPointerForDelegate (msgdel);

            inputdel = new InputBoxDelegate (guiobj.InputBox);
            InputBoxPtr = Marshal.GetFunctionPointerForDelegate (inputdel);

            showdel = new ShowBoxDelegate (guiobj.ShowBox);
            ShowBoxPtr = Marshal.GetFunctionPointerForDelegate (showdel);

            passwdstatusdel = new SetPasswordStatusDelegate (guiobj.SetPasswordStatus);
            SetPasswordStatusPtr = Marshal.GetFunctionPointerForDelegate (passwdstatusdel);

            checkcertdel = new CheckCertDelegate (guiobj.CheckCert);
            CheckCertPtr = Marshal.GetFunctionPointerForDelegate (checkcertdel);

            getpassdel = new GetPasswordDelegate (guiobj.GetPassword);
            GetPasswordPtr = Marshal.GetFunctionPointerForDelegate (getpassdel);

            // register function pointers to callback
            gui = AqGui.GWEN_Gui_new ();

            AqGui.GWEN_Gui_SetMessageBoxFn (gui, MessageBoxPtr);
            AqGui.GWEN_Gui_SetInputBoxFn (gui, InputBoxPtr);
            AqGui.GWEN_Gui_SetShowBoxFn (gui, ShowBoxPtr);
            AqGui.GWEN_Gui_SetSetPasswordStatusFn (gui, SetPasswordStatusPtr);
            AqGui.GWEN_Gui_SetCheckCertFn (gui, CheckCertPtr);
            AqGui.GWEN_Gui_SetGetPasswordFn (gui, GetPasswordPtr);
            AqGui.GWEN_Gui_SetGui (gui);
        }