コード例 #1
0
        private async void btnOpenSdkLoginCtrl_Click(object sender, EventArgs e)
        {
            var connectionDetail = await crmWebResourceUpdaterClient.UseSdkLoginControlAsync(this.connectionDetailId, false);

            if (connectionDetail != null)
            {
                ConnetctionDetail = connectionDetail;
                ConnectionSucceeded?.Invoke(this, null);
            }
            //txtReplyUrl.Text
            //txtAzureAdAppId.Text
            //rdbUseCustom.Checked
        }
コード例 #2
0
        protected virtual void OnConnectionSucceeded(ExpandoObject data)
        {
            Debug.Log($"[SnipeCommunicator] {this.name} Connection succeeded");

            if (ConnectionSucceeded != null)
            {
                ConnectionSucceeded.Invoke();
            }

            Client.MessageReceived += OnSnipeResponse;

            RequestLogin();
        }
コード例 #3
0
        private void btnOpenSdkLoginCtrl_Click(object sender, EventArgs e)
        {
            var ctrl = new CRMLoginForm1(connectionDetailId, !isNew);

            if (rdbUseCustom.Checked)
            {
                ctrl.AppId       = txtAzureAdAppId.Text;
                ctrl.RedirectUri = new Uri(txtReplyUrl.Text);
            }
            else
            {
                ctrl.AppId       = "51f81489-12ee-4a9e-aaae-a2591f45987d";
                ctrl.RedirectUri = new Uri("app://58145B91-0C36-4500-8554-080854F2AC97");
            }
            ctrl.ConnectionToCrmCompleted += (loginCtrl, evt) =>
            {
                ConnectionManager = ((CRMLoginForm1)loginCtrl).CrmConnectionMgr;
                SetAuthType();
                ConnectionSucceeded?.Invoke(this, null);
            };
            ctrl.ShowDialog();
        }
コード例 #4
0
        private void btnOpenSdkLoginCtrl_Click(object sender, EventArgs e)
        {
            var ctrl = new CRMLoginForm1(connectionDetailId, !isNew);

            if (rdbUseCustom.Checked)
            {
                ctrl.AppId       = txtAzureAdAppId.Text;
                ctrl.RedirectUri = new Uri(txtReplyUrl.Text);
            }
            else
            {
                ctrl.AppId       = "2ad88395-b77d-4561-9441-d0e40824f9bc";
                ctrl.RedirectUri = new Uri("app://5d3e90d6-aa8e-48a8-8f2c-58b45cc67315");
            }
            ctrl.ConnectionToCrmCompleted += (loginCtrl, evt) =>
            {
                ConnectionManager = ((CRMLoginForm1)loginCtrl).CrmConnectionMgr;
                SetAuthType();
                ConnectionSucceeded?.Invoke(this, null);
            };
            ctrl.ShowDialog();
        }
コード例 #5
0
        public void Connect(IPEndPoint ipEndPoint)
        {
            _tcpClient = new TcpClient();
            _tcpClient.ReceiveBufferSize = 256 * 256 * 32; /* omg */
            try
            {
                _tcpClient.Connect(ipEndPoint);
                ConnectionSucceeded?.Invoke(this, new ConnectionSucceededEventArgs());
            }
            catch (Exception e)
            {
                ConnectionFailed?.Invoke(this, new ConnectionFailedEventArgs(e));
                _tcpClient = null;
            }

            if (_tcpClient != null)
            {
                _manualRefusal = false;
                _thread        = new Thread(Run);
                _thread.Start();
            }
        }
コード例 #6
0
 private void InvokeConnectionSucceeded(object sender, ConnectionSucceededEventArgs e)
 {
     ConnectionSucceeded?.Invoke(sender, e);
 }
コード例 #7
0
 private void OnConnectionSucceeded(Uri server)
 {
     ConnectionSucceeded?.Invoke(this, new ConnectionSucceededEventArgs(server));
 }