From 75246c1f64653299c407cb39e2ef561f78636e84 Mon Sep 17 00:00:00 2001 From: Christian Wade Date: Sun, 8 Dec 2019 21:42:49 -0800 Subject: [PATCH] Bug fix for unhandled exception --- BismNormalizer/AlmToolkit/Program.cs | 1 + BismNormalizer/BismNormalizer.sln | 1 - .../TabularCompare/UI/ConnectionsAlmt.cs | 17 +++++++++++++++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/BismNormalizer/AlmToolkit/Program.cs b/BismNormalizer/AlmToolkit/Program.cs index 1dafadf..6dd832e 100644 --- a/BismNormalizer/AlmToolkit/Program.cs +++ b/BismNormalizer/AlmToolkit/Program.cs @@ -18,6 +18,7 @@ namespace AlmToolkit { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); + Application.SetUnhandledExceptionMode(UnhandledExceptionMode.ThrowException); if (args != null && args.Length > 0) { diff --git a/BismNormalizer/BismNormalizer.sln b/BismNormalizer/BismNormalizer.sln index 8707c01..ce97149 100644 --- a/BismNormalizer/BismNormalizer.sln +++ b/BismNormalizer/BismNormalizer.sln @@ -64,7 +64,6 @@ Global {765C0612-BB8F-4261-87AE-B5B842BE3C26}.Release|x64.ActiveCfg = Release|x64 {765C0612-BB8F-4261-87AE-B5B842BE3C26}.Release|x64.Build.0 = Release|x64 {03220A9A-AB29-4B5F-8BCB-D3545FD8F3EF}.Debug|Any CPU.ActiveCfg = Debug - {03220A9A-AB29-4B5F-8BCB-D3545FD8F3EF}.Debug|Any CPU.Build.0 = Debug {03220A9A-AB29-4B5F-8BCB-D3545FD8F3EF}.Debug|x64.ActiveCfg = Debug {03220A9A-AB29-4B5F-8BCB-D3545FD8F3EF}.Debug|x64.Build.0 = Debug {03220A9A-AB29-4B5F-8BCB-D3545FD8F3EF}.Release|Any CPU.ActiveCfg = Release diff --git a/BismNormalizer/BismNormalizer/TabularCompare/UI/ConnectionsAlmt.cs b/BismNormalizer/BismNormalizer/TabularCompare/UI/ConnectionsAlmt.cs index b351b60..1fbb5e4 100644 --- a/BismNormalizer/BismNormalizer/TabularCompare/UI/ConnectionsAlmt.cs +++ b/BismNormalizer/BismNormalizer/TabularCompare/UI/ConnectionsAlmt.cs @@ -401,8 +401,15 @@ namespace BismNormalizer.TabularCompare.UI infoSourceTemp.UseProject = rdoSourceDesktop.Checked; infoSourceTemp.UseBimFile = rdoSourceFile.Checked; infoSourceTemp.ProjectName = cboSourceDesktop.Text; + + //Fudge start //infoSourceTemp.Project = (PowerBIInstance)cboSourceDesktop.SelectedValue; - int portSourceTemp = (int)cboSourceDesktop.SelectedValue; //Fudge start + int portSourceTemp = -1; + if (cboSourceDesktop.SelectedValue != null) + { + portSourceTemp = (int)cboSourceDesktop.SelectedValue; + } + infoSourceTemp.ServerName = cboSourceServer.Text; infoSourceTemp.DatabaseName = cboSourceDatabase.Text; infoSourceTemp.BimFile = txtSourceFile.Text; @@ -420,8 +427,14 @@ namespace BismNormalizer.TabularCompare.UI rdoTargetFile.Checked = infoSourceTemp.UseBimFile; rdoTargetDataset.Checked = (!infoSourceTemp.UseProject && !infoSourceTemp.UseBimFile); cboTargetDesktop.Text = infoSourceTemp.ProjectName; + //cboTargetDesktop.SelectedValue = infoSourceTemp.Project; - cboTargetDesktop.SelectedValue = portSourceTemp; //Fudge end + if (portSourceTemp != -1) + { + cboTargetDesktop.SelectedValue = portSourceTemp; + } + //Fudge end + cboTargetServer.Text = infoSourceTemp.ServerName; cboTargetDatabase.Text = infoSourceTemp.DatabaseName; txtTargetFile.Text = infoSourceTemp.BimFile;