public void UpdateContent(ChangeFor change) { ThreadHelper.ThrowIfNotOnUIThread(); lbQtVersions.Items.Clear(); var vm = QtVersionManager.The(); foreach (var versionName in vm.GetVersions()) { lbQtVersions.Items.Add(versionName); } lbQtVersions.Items.Add("$(DefaultQtVersion)"); string qtVer = null; if (change == ChangeFor.Solution) { qtVer = vm.GetSolutionQtVersion(QtVsToolsPackage.Instance.Dte.Solution); if (qtVer == null) { qtVer = vm.GetDefaultVersion(); } if (qtVer != null) { lbQtVersions.SelectedItem = qtVer; } Text = SR.GetString("SolutionQtVersion"); } else { var pro = HelperFunctions.GetSelectedProject(QtVsToolsPackage.Instance.Dte); qtVer = vm.GetProjectQtVersion(pro); if (qtVer == null) { qtVer = vm.GetDefaultVersion(); } if (qtVer != null) { lbQtVersions.SelectedItem = qtVer; } Text = SR.GetString("ProjectQtVersion"); } }
public void UpdateContent(ChangeFor change) { lbQtVersions.Items.Clear(); QtVersionManager vm = QtVersionManager.The(); foreach (string versionName in vm.GetVersions()) { lbQtVersions.Items.Add(versionName); } lbQtVersions.Items.Add("$(DefaultQtVersion)"); string qtVer = null; if (change == ChangeFor.Solution) { qtVer = vm.GetSolutionQtVersion(Connect._applicationObject.Solution); if (qtVer == null) { qtVer = vm.GetDefaultVersion(); } if (qtVer != null) { lbQtVersions.SelectedItem = qtVer; } this.Text = SR.GetString("SolutionQtVersion"); } else { Project pro = HelperFunctions.GetSelectedProject(Connect._applicationObject); qtVer = vm.GetProjectQtVersion(pro); if (qtVer == null) { qtVer = vm.GetDefaultVersion(); } if (qtVer != null) { lbQtVersions.SelectedItem = qtVer; } this.Text = SR.GetString("ProjectQtVersion"); } }
public void UpdateContent(ChangeFor change) { lbQtVersions.Items.Clear(); QtVersionManager vm = QtVersionManager.The(); foreach (string versionName in vm.GetVersions()) { lbQtVersions.Items.Add(versionName); } lbQtVersions.Items.Add("$(DefaultQtVersion)"); string qtVer = null; if (change == ChangeFor.Solution) { qtVer = vm.GetSolutionQtVersion(Connect._applicationObject.Solution); if (qtVer == null) qtVer = vm.GetDefaultVersion(); if (qtVer != null) lbQtVersions.SelectedItem = qtVer; this.Text = SR.GetString("SolutionQtVersion"); } else { Project pro = HelperFunctions.GetSelectedProject(Connect._applicationObject); qtVer = vm.GetProjectQtVersion(pro); if (qtVer == null) qtVer = vm.GetDefaultVersion(); if (qtVer != null) lbQtVersions.SelectedItem = qtVer; this.Text = SR.GetString("ProjectQtVersion"); } }