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 }
protected virtual void OnConnectionSucceeded(ExpandoObject data) { Debug.Log($"[SnipeCommunicator] {this.name} Connection succeeded"); if (ConnectionSucceeded != null) { ConnectionSucceeded.Invoke(); } Client.MessageReceived += OnSnipeResponse; RequestLogin(); }
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(); }
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(); }
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(); } }
private void InvokeConnectionSucceeded(object sender, ConnectionSucceededEventArgs e) { ConnectionSucceeded?.Invoke(sender, e); }
private void OnConnectionSucceeded(Uri server) { ConnectionSucceeded?.Invoke(this, new ConnectionSucceededEventArgs(server)); }