private void OnEntryDeleted(WidgetHostTargetEntry sender) { _hostTargets.Remove(sender); _hostTargetsCanvas.Remove(sender); MainApp.GetInstance().GetHostsController().RemoveHost(sender.GetHost()); RefreshVisuals(); }
private void AddHostEntry(HostStatus host) { WidgetHostTargetEntry hostTargetWidget = new WidgetHostTargetEntry(host); hostTargetWidget.OnEntryDeletedEvent += OnEntryDeleted; hostTargetWidget.OnEntryUpdateConnectionEvent += OnEntryUpdateConnectionEvent; hostTargetWidget.Show(); _hostTargets.Add(hostTargetWidget); _hostTargetsCanvas.Add(hostTargetWidget); RefreshVisuals(); }
private void OnEntryUpdateConnectionEvent(WidgetHostTargetEntry sender) { MainApp.GetInstance().GetHostsController().TryConnectHost(sender.GetHost()); }