예제 #1
0
 public VisualizeShellService()
 {
     _userInfo        = IoC.Get <UserInfo>();
     _shellView       = IoC.Get <MainView>();
     _rtClientService = IoC.Get <IRtClientService>();
     _meetingSdkAgent = IoC.Get <IMeetingSdkAgent>();
 }
예제 #2
0
 public VisualizeShellService()
 {
     _userInfo        = DependencyResolver.Current.GetService <UserInfo>();
     _sdkService      = DependencyResolver.Current.GetService <ISdk>();
     _shellView       = DependencyResolver.Current.GetService <MainView>();
     _rtClientService = DependencyResolver.Current.GetService <IRtClientService>();
 }
예제 #3
0
        private async void _timer_Elapsed(object sender, ElapsedEventArgs e)
        {
            Log.Logger.Debug("【refresh token begins】");
            IBms bmsService = IoC.Get <IBms>();

            ResponseResult refreshResult;

            if (GlobalData.Instance.Device.EnableLogin)
            {
                refreshResult =
                    await
                    bmsService.GetImeiToken(GlobalData.Instance.Device.Id,
                                            GlobalData.Instance.AggregatedConfig.DeviceKey);
            }
            else
            {
                UserInfo userInfo = IoC.Get <UserInfo>();
                refreshResult =
                    await bmsService.ApplyForToken(userInfo.UserName, userInfo.Pwd, GlobalData.Instance.Device.Id);
            }

            Log.Logger.Debug(
                $"【refresh token result】:status={refreshResult.Status}, msg={refreshResult.Message}, data={refreshResult.Data}");

            if (refreshResult.Status == "0")
            {
                IRtClientService rtClientService = IoC.Get <IRtClientService>();

                rtClientService.RefreshToken(bmsService.AccessToken);
            }
            else
            {
                //await Application.Current.Dispatcher.BeginInvoke(new Action(() =>
                //{
                //    SscDialog refreshTokenDialog =
                //        new SscDialog($"{Messages.WarningRefreshTokenFailed}\r\n{refreshResult.Message}");
                //    refreshTokenDialog.ShowDialog();
                //}));
            }
        }
예제 #4
0
 public GroupManager()
 {
     _rtClientService = IoC.Get <IRtClientService>();
 }
예제 #5
0
 public GroupManager()
 {
     _rtClientService = DependencyResolver.Current.GetService <IRtClientService>();
 }