Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/oleg-shilo/wixsharp
Browse files Browse the repository at this point in the history
  • Loading branch information
lbs-contributor committed May 17, 2020
2 parents e38d9dc + 1c3eb15 commit 29d5380
Show file tree
Hide file tree
Showing 10 changed files with 265 additions and 274 deletions.
8 changes: 5 additions & 3 deletions Source/src/WixSharp.UI/ManagedUI/Forms/ExitDialog.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Windows.Forms;

namespace WixSharp.UI.Forms
Expand Down Expand Up @@ -82,7 +80,11 @@ void viewLog_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
System.IO.File.WriteAllText(logFile, Shell.Log);
Process.Start(logFile);
}
catch { }
catch
{
//Catch all, we don't want the installer to crash in an
//attempt to view the log.
}
}
}
}
11 changes: 3 additions & 8 deletions Source/src/WixSharp.UI/ManagedUI/Forms/FeaturesDialog.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Windows.Forms;

Expand Down Expand Up @@ -33,7 +31,6 @@ public FeaturesDialog()

void FeaturesDialog_Load(object sender, System.EventArgs e)
{
//Debug.Assert(false);
string drawTextOnlyProp = Runtime.Session.Property("WixSharpUI_TreeNode_TexOnlyDrawing");

bool drawTextOnly = true;
Expand All @@ -45,11 +42,9 @@ void FeaturesDialog_Load(object sender, System.EventArgs e)
}
else
{
float dpi = this.CreateGraphics().DpiY;
float dpi = CreateGraphics().DpiY;
if (dpi == 96) // the checkbox custom drawing is only compatible with 96 DPI
drawTextOnly = false;
else
drawTextOnly = true;
}

ReadOnlyTreeNode.Behavior.AttachTo(featuresTree, drawTextOnly);
Expand Down Expand Up @@ -88,12 +83,12 @@ void ResetLayout()
/// <summary>
/// The collection of the features selected by user as the features to be installed.
/// </summary>
public static List<string> UserSelectedItems;
public static List<string> UserSelectedItems { get; private set; }

/// <summary>
/// The initial/default set of selected items (features) before user made any selection(s).
/// </summary>
public static List<string> InitialUserSelectedItems;
public static List<string> InitialUserSelectedItems { get; private set; }

void BuildFeaturesHierarchy()
{
Expand Down
479 changes: 239 additions & 240 deletions Source/src/WixSharp.UI/ManagedUI/Forms/InstallDirDialog.Designer.cs

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions Source/src/WixSharp.UI/ManagedUI/Forms/InstallDirDialog.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Drawing;
using System.Windows.Forms;

namespace WixSharp.UI.Forms
Expand Down Expand Up @@ -90,9 +89,5 @@ void change_Click(object sender, EventArgs e)
}
}
}

private void label2_Click(object sender, EventArgs e)
{
}
}
}
13 changes: 10 additions & 3 deletions Source/src/WixSharp.UI/ManagedUI/Forms/LicenceDialog.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Windows.Forms;

Expand Down Expand Up @@ -78,7 +77,11 @@ void print_Click(object sender, EventArgs e)
io.File.WriteAllText(file, agreement.Rtf);
Process.Start(file);
}
catch { }
catch
{
//Catch all, we don't want the installer to crash in an
//attempt to write to a file.
}
}

void copyToolStripMenuItem_Click(object sender, EventArgs e)
Expand All @@ -100,7 +103,11 @@ void copyToolStripMenuItem_Click(object sender, EventArgs e)

Clipboard.SetDataObject(data);
}
catch { }
catch
{
//Catch all, we don't want the installer to crash in an
//attempt at setting data on the clipboard.
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Diagnostics;
using System.Linq;

namespace WixSharp.UI.Forms
Expand All @@ -24,8 +23,7 @@ Type ProgressDialog
get
{
return Shell.Dialogs
.Where(d => d.GetInterfaces().Contains(typeof(IProgressDialog)))
.FirstOrDefault();
.FirstOrDefault(d => d.GetInterfaces().Contains(typeof(IProgressDialog)));
}
}

Expand Down
11 changes: 6 additions & 5 deletions Source/src/WixSharp.UI/ManagedUI/Forms/ProgressDialog.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
using System;
using System.Diagnostics;
using System.Drawing;
using System.Security.Principal;
using System.Threading;
using System.Windows.Forms;
using Microsoft.Deployment.WindowsInstaller;
using WixSharp.CommonTasks;

Expand Down Expand Up @@ -164,9 +161,13 @@ messageRecord[2] unconditionally contains the string to display
}

if (message.IsNotEmpty())
currentAction.Text = currentActionLabel.Text + " " + message;
currentAction.Text = "{0} {1}".FormatWith(currentActionLabel.Text, message);
}
catch
{
//Catch all, we don't want the installer to crash in an
//attempt to process message.
}
catch { }
}
break;
}
Expand Down
3 changes: 1 addition & 2 deletions Source/src/WixSharp.UI/ManagedUI/Forms/SetupTypeDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ Type ProgressDialog
get
{
return Shell.Dialogs
.Where(d => d.GetInterfaces().Contains(typeof(IProgressDialog)))
.FirstOrDefault();
.FirstOrDefault(d => d.GetInterfaces().Contains(typeof(IProgressDialog)));
}
}

Expand Down
2 changes: 0 additions & 2 deletions Source/src/WixSharp.UI/ManagedUI/Forms/WelcomeDialog.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Diagnostics;
using System.Windows.Forms;

namespace WixSharp.UI.Forms
{
Expand Down
3 changes: 0 additions & 3 deletions Source/src/WixSharp/Compiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ THE SOFTWARE.
using WixSharp.CommonTasks;
using IO = System.IO;

//WIX References:
//http://www.wixwiki.com/index.php?title=Main_Page

namespace WixSharp
{

Expand Down

0 comments on commit 29d5380

Please sign in to comment.