-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.xaml.cs
68 lines (58 loc) · 1.94 KB
/
App.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using ZOOM_SDK_DOTNET_WRAP;
namespace RaiseHandApp
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
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");
}
}
}
private void Application_Exit(object sender, ExitEventArgs e)
{
//clean up sdk
try
{
CZoomSDKeDotNetWrap.Instance.CleanUp();
}
catch
{
}
}
}
}