Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions InfoBox.Designer/CodeGeneration/CSharpGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class CSharpGenerator : ICodeGenerator
/// <param name="useAutoClose">if set to <c>true</c> [use auto close].</param>
/// <param name="autoClose">The auto-close parameters.</param>
/// <param name="design">The design.</param>
/// <param name="fontParameters">The font parameters.</param>
/// <param name="titleStyle">The title style.</param>
/// <param name="titleIconFileName">Filename of the title icon .</param>
/// <param name="opacity">The opacity.</param>
Expand Down Expand Up @@ -67,6 +68,7 @@ public string GenerateSingleCall(InformationBoxBehavior behavior,
bool useAutoClose,
AutoCloseParameters autoClose,
DesignParameters design,
FontParameters fontParameters,
InformationBoxTitleIconStyle titleStyle,
string titleIconFileName,
InformationBoxOpacity opacity,
Expand Down Expand Up @@ -222,6 +224,12 @@ public string GenerateSingleCall(InformationBoxBehavior behavior,
codeBuilder.AppendFormat(CultureInfo.InvariantCulture, "design: new DesignParameters(System.Drawing.Color.FromArgb({0},{1},{2}), System.Drawing.Color.FromArgb({3},{4},{5})), ", design.FormBackColor.R, design.FormBackColor.G, design.FormBackColor.B, design.BarsBackColor.R, design.BarsBackColor.G, design.BarsBackColor.B);
}

if (null != fontParameters && fontParameters.MessageFont != null)
{
codeBuilder.AppendFormat(CultureInfo.InvariantCulture, "fontParameters: new FontParameters(new System.Drawing.Font(\"{0}\", {1}F)), ",
fontParameters.MessageFont.Name, fontParameters.MessageFont.Size);
}

if (titleStyle == InformationBoxTitleIconStyle.Custom)
{
codeBuilder.AppendFormat(CultureInfo.InvariantCulture, "titleIcon: new InformationBoxTitleIcon(@\"{0}\"), ", titleIconFileName);
Expand Down
2 changes: 2 additions & 0 deletions InfoBox.Designer/CodeGeneration/ICodeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public interface ICodeGenerator
/// <param name="useAutoClose">if set to <c>true</c> [use auto close].</param>
/// <param name="autoClose">The auto-close parameters.</param>
/// <param name="design">The design.</param>
/// <param name="fontParameters">The font parameters.</param>
/// <param name="titleStyle">The title style.</param>
/// <param name="titleIconFileName">Filename of the title icon .</param>
/// <param name="opacity">The opacity.</param>
Expand Down Expand Up @@ -59,6 +60,7 @@ string GenerateSingleCall(InformationBoxBehavior behavior,
bool useAutoClose,
AutoCloseParameters autoClose,
DesignParameters design,
FontParameters fontParameters,
InformationBoxTitleIconStyle titleStyle,
string titleIconFileName,
InformationBoxOpacity opacity,
Expand Down
9 changes: 8 additions & 1 deletion InfoBox.Designer/CodeGeneration/VbNetGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ public class VbNetGenerator : ICodeGenerator
/// <param name="useAutoClose">if set to <c>true</c> [use auto close].</param>
/// <param name="autoClose">The auto-close parameters.</param>
/// <param name="design">The design.</param>
/// <param name="fontParameters">The font parameters.</param>
/// <param name="titleStyle">The title style.</param>
/// <param name="titleIconFileName">Filename of the title icon .</param>
/// <param name="opacity">The opacity.</param>
/// <param name="order">The order.</param>
/// <param name="sound">The sound.</param>
/// <returns></returns>
public string GenerateSingleCall(InformationBoxBehavior behavior, string text, string title, InformationBoxButtons buttons, string button1Text, string button2Text, string button3Text, InformationBoxIcon icon, string iconFileName, InformationBoxDefaultButton defaultButton, InformationBoxButtonsLayout buttonsLayout, InformationBoxAutoSizeMode autoSize, InformationBoxPosition position, bool showHelp, string helpFile, string helpTopic, System.Windows.Forms.HelpNavigator navigator, InformationBoxCheckBox checkState, string doNotShowAgainText, InformationBoxStyle style, bool useAutoClose, AutoCloseParameters autoClose, DesignParameters design, InformationBoxTitleIconStyle titleStyle, string titleIconFileName, InformationBoxOpacity opacity, InformationBoxOrder order, InformationBoxSound sound)
public string GenerateSingleCall(InformationBoxBehavior behavior, string text, string title, InformationBoxButtons buttons, string button1Text, string button2Text, string button3Text, InformationBoxIcon icon, string iconFileName, InformationBoxDefaultButton defaultButton, InformationBoxButtonsLayout buttonsLayout, InformationBoxAutoSizeMode autoSize, InformationBoxPosition position, bool showHelp, string helpFile, string helpTopic, System.Windows.Forms.HelpNavigator navigator, InformationBoxCheckBox checkState, string doNotShowAgainText, InformationBoxStyle style, bool useAutoClose, AutoCloseParameters autoClose, DesignParameters design, FontParameters fontParameters, InformationBoxTitleIconStyle titleStyle, string titleIconFileName, InformationBoxOpacity opacity, InformationBoxOrder order, InformationBoxSound sound)
{
StringBuilder codeBuilder = new StringBuilder();
if (checkState == 0)
Expand Down Expand Up @@ -191,6 +192,12 @@ public string GenerateSingleCall(InformationBoxBehavior behavior, string text, s
codeBuilder.AppendFormat(CultureInfo.InvariantCulture, "New DesignParameters(Color.FromArgb({0},{1},{2}), Color.FromArgb({3},{4},{5})), ", design.FormBackColor.R, design.FormBackColor.G, design.FormBackColor.B, design.BarsBackColor.R, design.BarsBackColor.G, design.BarsBackColor.B);
}

if (null != fontParameters && fontParameters.MessageFont != null)
{
codeBuilder.AppendFormat(CultureInfo.InvariantCulture, "New FontParameters(New Font(\"{0}\", {1}F)), ",
fontParameters.MessageFont.Name, fontParameters.MessageFont.Size);
}

if (titleStyle == InformationBoxTitleIconStyle.Custom)
{
codeBuilder.AppendFormat(CultureInfo.InvariantCulture, "New InformationBoxTitleIcon(@\"{0}\"), ", titleIconFileName);
Expand Down
Loading
Loading