Ejemplo n.º 1
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            //init sdk
            {
                ZOOM_SDK_DOTNET_WRAP.InitParam param = new ZOOM_SDK_DOTNET_WRAP.InitParam();
                param.web_domain = "https://jworg.zoom.us";
                ZOOM_SDK_DOTNET_WRAP.SDKError err = CZoomSDKeDotNetWrap.Instance.Initialize(param);
                if (SDKError.SDKERR_SUCCESS == err)
                {
                    Console.WriteLine("SDK loaded");

                    var key        = ConfigurationManager.AppSettings["zoomkey"];
                    var secret     = ConfigurationManager.AppSettings["zoomsecret"];
                    var authparams = new AuthParam()
                    {
                        appKey    = key,
                        appSecret = secret
                    };

                    ZOOM_SDK_DOTNET_WRAP.SDKError autherr = CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().SDKAuth(authparams);

                    if (autherr == SDKError.SDKERR_SUCCESS)
                    {
                        Console.WriteLine("APi auth success");
                    }
                }
                else//error handle.todo
                {
                    Console.WriteLine(err);
                    Console.WriteLine("Sdk loading failed");
                }
            }
        }
Ejemplo n.º 2
0
 private void Application_Startup(object sender, StartupEventArgs e)
 {
     //init sdk
     {
         ZOOM_SDK_DOTNET_WRAP.InitParam param = new ZOOM_SDK_DOTNET_WRAP.InitParam();
         param.web_domain = "https://zoom.us";
         ZOOM_SDK_DOTNET_WRAP.SDKError err = ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.Initialize(param);
         if (ZOOM_SDK_DOTNET_WRAP.SDKError.SDKERR_SUCCESS == err)
         {
             //register callbacks
             CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().Add_CB_onAuthenticationReturn(onAuthenticationReturn);
             CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().Add_CB_onLoginRet(onLoginRet);
             CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().Add_CB_onLogout(onLogout);
             AuthParam authParam = new AuthParam
             {
                 appKey    = ConfigurationManager.AppSettings.Get("appKey"),
                 appSecret = ConfigurationManager.AppSettings.Get("appSecret")
             };
             var sdkError = ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().SDKAuth(authParam);
             if (sdkError != SDKError.SDKERR_SUCCESS)
             {
                 MessageBox.Show("Failed to connect: " + sdkError.ToString());
                 Current.Shutdown();
             }
         }
         else
         {
             MessageBox.Show("Failed to initialise: " + err.ToString());
             Current.Shutdown();
         }
     }
 }
 private void Application_Startup(object sender, StartupEventArgs e)
 {
     //init sdk
     {
         ZOOM_SDK_DOTNET_WRAP.InitParam param = new ZOOM_SDK_DOTNET_WRAP.InitParam();
         param.web_domain = "https://zoom.us";
         ZOOM_SDK_DOTNET_WRAP.SDKError err = ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.Initialize(param);
         if (ZOOM_SDK_DOTNET_WRAP.SDKError.SDKERR_SUCCESS == err)
         {
         }
         else//error handle.todo
         {
         }
     }
 }