void OnConnectionOpening(object sender, OpenEventArgs e) { var command = (Open)e.Command; // 'command.IdleTimeOut' is the Idle time out specified in the client OPEN frame // Server will send heart beats honoring this timeout(every 7/8 of IdleTimeout) if (command.IdleTimeOut == null || command.IdleTimeOut == 0) { command.IdleTimeOut = Constants.DefaultAmqpHeartbeatSendInterval; } else if (command.IdleTimeOut < Constants.MinimumAmqpHeartbeatSendInterval) { throw new EdgeHubConnectionException($"Connection idle timeout specified is less than minimum acceptable value: {Constants.MinimumAmqpHeartbeatSendInterval}"); } var amqpConnection = (AmqpConnection)sender; // If the AmqpConnection does not use username/password or certs, create a CbsNode for the connection // and add it to the Extensions if (!(amqpConnection.Principal is SaslPrincipal || amqpConnection.Principal is X509Principal)) { ICbsNode cbsNode = new CbsNode(this.clientCredentialsFactory, this.iotHubHostName, this.authenticator, this.credentialsCache); amqpConnection.Extensions.Add(cbsNode); } IConnectionHandler connectionHandler = new ConnectionHandler(new EdgeAmqpConnection(amqpConnection), this.connectionProvider); amqpConnection.Extensions.Add(connectionHandler); }
protected override void OnOpen(OpenEventArgs args) { this.controller.ConnectionStateChanged += this.ConnectionStateChanged; this.controller.ExceptionThrown += this.ExceptionThrown; this.controller.PositionChanged += this.PositionChanged; this.controller.ResponseReceived += this.ResponseReceived; this.controller.VideoStreamingStateChanged += this.Controller_VideoStreamingStateChanged; }
/*! \brief Open window in response to an event. */ protected virtual void OnOpen(OpenEventArgs e) { if (Opening != null) { Opening(this, e); } Wimp.OpenWindow(ref e.OpenWimpBlock); }
private void onOpenEvent(object sender, OpenEventArgs e) { DialogResult dr = openTestDialog.ShowDialog(); if (dr == DialogResult.OK) { services.PlaceController.GoTo(new Test.TestPlace(openTestDialog.FileName)); } }
private void OpenMenu_Click(object sender, EventArgs e) { var OpenDialog = new OpenFileDialog(); if (OpenDialog.ShowDialog() == DialogResult.OK) { var Args = new OpenEventArgs(OpenDialog.FileName); Open(this, Args); Result = Args.Result; FillCalculationResult(); SetCalculationInputData(Args.id); } }
private void openCorpusToolStripMenuItem_Click(object sender, EventArgs e) { indexDialog = new FolderBrowserDialog(); indexDialog.Description = "Select previously indexed corpus"; DialogResult result = indexDialog.ShowDialog(); if (result == DialogResult.OK) { //this.CurrentIndexPath = indexDialog.SelectedPath; OpenEventArgs args = new OpenEventArgs(); args.Path = indexDialog.SelectedPath; chatViewSetUp = false; sit.Clear(); OpenIndexedCorpus?.Invoke(this, args); } }
private void _view_OpenIndexedCorpus(object sender, OpenEventArgs e) { //ProjectInfo.CurrentIndexPath = _main.CurrentIndexPath; ProjectInfo.UnloadData(); _service.UnloadData(); SituationIndex.UnloadData(); ProjectInfo.LoadProject(e.Path); if (LuceneService.OpenIndex()) { MessageContainer.Messages = new List <DynamicMessage>(); _main.SetLineCount(ProjectInfo.Data.LineCount); _main.FileLoadState = true; AddDocumentsToDisplay(2000); _main.ShowDates(ProjectInfo.Data.MessagesPerDay.Keys.ToList()); //_main.UpdateNgramState(_ngrammer.IndexExists); } else { MessageBox.Show("No index"); } }
private void csvDialog_FileOk(object sender, CancelEventArgs e) { string path = csvDialog.FileName; string name = Path.GetFileNameWithoutExtension(path); string folderPath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); if (Directory.Exists(folderPath + "\\CCA")) { Directory.CreateDirectory(folderPath + "\\CCA" + "\\" + name); } else { MessageBox.Show("Something went wrong. Please restart"); } //this.CurrentIndexPath = folderPath + "\\CCA" + "\\" + name; OpenEventArgs args = new OpenEventArgs(); args.Path = folderPath + "\\CCA" + "\\" + name; args.FilePath = csvDialog.FileName; chatViewSetUp = false; FileAndIndexSelected?.Invoke(this, args); }
void View_Open(object sender, OpenEventArgs e) { Model.Open(e.FileName, out CalculationInputData id, out Dictionary <StagesVariableValues, OutputParameters> io); e.id = id; e.Result = io; }
private Task OnOpenAsync(OpenEventArgs arg) => Task.CompletedTask;
protected override void OnOpen(OpenEventArgs args) { this.stateObserver.StateChanged += this.StateChanged; }
private void onOpenEvent(object sender, OpenEventArgs e) { DialogResult dr = openTestDialog.ShowDialog(); if (dr == DialogResult.OK) { services.PlaceController.GoTo(new Test.TestPlace(openTestDialog.FileName)); } }
void OnOpen(object sender, OpenEventArgs args) { Debug.Log($"WebSocket opened"); OnSocketOpened?.Invoke(args); }
protected override void OnOpen(OpenEventArgs args) { _videoObserver.VideoSampleReady += Observer_VideoSampleReady; }
protected override void OnOpen(OpenEventArgs args) { this.StateViewModel.Open(args); this.VideoViewModel.Open(args); this.ControllerViewModel.Open(args); }
private void OnOpen(OpenEventArgs e) { if (Open != null) { Open(this, e); } }
private void _view_FileAndIndexSelected(object sender, OpenEventArgs e) { this._path = e.Path; this._filepath = e.FilePath; _delim.ShowView(); }
private static void Socket_OnOpen(object sender, OpenEventArgs e) { linkFlag = true; }
private void Socket_OnOpen(object sender, OpenEventArgs e) { AddLog(string.Format("Connected: {0}\n", address)); }
protected override void OnOpen(OpenEventArgs args) { StateViewModel.Open(args); VideoViewModel.Open(args); ControllerViewModel.Open(args); }