public void ResetForm() { treeAzureARM.Enabled = false; treeAzureARM.Nodes.Clear(); if (_SelectedNodes != null) { _SelectedNodes.Clear(); } ClearContext?.Invoke(); }
private void ResetForm() { if (treeAzureASM != null) { treeAzureASM.Enabled = false; treeAzureASM.Nodes.Clear(); } if (treeViewSourceResourceManager1 != null) { treeViewSourceResourceManager1.Enabled = false; treeViewSourceResourceManager1.ResetForm(); } if (_SelectedNodes != null) { _SelectedNodes.Clear(); } ClearContext?.Invoke(); }
private async void cmbAzureResourceTypeSource_SelectedIndexChanged(object sender, EventArgs e) { treeAzureASM.Nodes.Clear(); treeViewSourceResourceManager1.ResetForm(); switch (cmbAzureResourceTypeSource.SelectedItem.ToString()) { case "Azure Service Management (ASM / Classic)": treeAzureASM.Enabled = true; treeAzureASM.Visible = true; treeViewSourceResourceManager1.Enabled = false; treeViewSourceResourceManager1.Visible = false; await BindAsmResources(_AzureContextSource, _TargetSettings); break; case "Azure Resource Manager (ARM)": treeAzureASM.Enabled = false; treeAzureASM.Visible = false; treeViewSourceResourceManager1.Enabled = true; treeViewSourceResourceManager1.Visible = true; if (_TargetSettings != null) { await treeViewSourceResourceManager1.BindArmResources(_AzureContextSource, _AzureContextSource.AzureSubscription, _TargetSettings); } break; default: throw new ArgumentException("Unknown Azure Resource Type Source: " + cmbAzureResourceTypeSource.SelectedItem.ToString()); } ClearContext?.Invoke(); }
private void treeViewSourceResourceManager1_ClearContext() { ClearContext?.Invoke(); }