private void navSettings_SelectionChanged(Syncfusion.Windows.Forms.Tools.TreeNavigator sender, Syncfusion.Windows.Forms.Tools.SelectionStateChangedEventArgs e) { TreeMenuItem tm = e.SelectedItem; switch (tm.Text) { case "Video": panelVideoSettings.Visible = true; panelMapsSettings.Visible = false; break; case "Maps": panelVideoSettings.Visible = true; panelMapsSettings.Visible = true; break; } }
private void treeNavigator1_SelectionChanged(Syncfusion.Windows.Forms.Tools.TreeNavigator sender, Syncfusion.Windows.Forms.Tools.SelectionStateChangedEventArgs e) { TreeMenuItem tm = e.SelectedItem; switch (tm.Text) { case "General": panelGeneral.Visible = true; panelVideoStream.Visible = false; break; case "WebSocket": panelGeneral.Visible = true; panelVideoStream.Visible = true; panelWebSocket.Visible = true; panelMavLink.Visible = false; break; case "MAVLink": panelGeneral.Visible = true; panelVideoStream.Visible = true; panelWebSocket.Visible = true; panelMavLink.Visible = true; break; case "Video Stream": panelGeneral.Visible = true; panelVideoStream.Visible = true; panelWebSocket.Visible = false; panelMavLink.Visible = false; break; case "Telemetry": if (telemetryTabIsOpened) { panelGeneral.Visible = false; } else { panelVideoStream.Visible = true; telemetryTabIsOpened = true; } break; } }