mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-18 16:41:36 -07:00
Fix bug with launch closing not cancelling
so apparently this is just a problem that has always existed lol
This commit is contained in:
parent
199842547c
commit
0cca373833
@ -406,6 +406,9 @@ namespace Bloxstrap
|
||||
return;
|
||||
}
|
||||
|
||||
if (_cancelFired)
|
||||
return;
|
||||
|
||||
App.Logger.WriteLine(LOG_IDENT, "Cancelling install...");
|
||||
|
||||
_cancelTokenSource.Cancel();
|
||||
|
@ -8,6 +8,8 @@ namespace Bloxstrap.UI.Elements.Bootstrapper.Base
|
||||
{
|
||||
public Bloxstrap.Bootstrapper? Bootstrapper { get; set; }
|
||||
|
||||
private bool _isClosing;
|
||||
|
||||
#region UI Elements
|
||||
protected virtual string _message { get; set; } = "Please wait...";
|
||||
protected virtual ProgressBarStyle _progressStyle { get; set; }
|
||||
@ -81,11 +83,15 @@ namespace Bloxstrap.UI.Elements.Bootstrapper.Base
|
||||
Icon = App.Settings.Prop.BootstrapperIcon.GetIcon();
|
||||
}
|
||||
|
||||
public void ButtonCancel_Click(object? sender, EventArgs e)
|
||||
#region WinForms event handlers
|
||||
public void ButtonCancel_Click(object? sender, EventArgs e) => Close();
|
||||
|
||||
public void Dialog_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
Bootstrapper?.CancelInstall();
|
||||
Close();
|
||||
if (!_isClosing)
|
||||
Bootstrapper?.CancelInstall();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region IBootstrapperDialog Methods
|
||||
public void ShowBootstrapper() => ShowDialog();
|
||||
@ -93,9 +99,14 @@ namespace Bloxstrap.UI.Elements.Bootstrapper.Base
|
||||
public virtual void CloseBootstrapper()
|
||||
{
|
||||
if (InvokeRequired)
|
||||
{
|
||||
Invoke(CloseBootstrapper);
|
||||
}
|
||||
else
|
||||
{
|
||||
_isClosing = true;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void ShowSuccess(string message, Action? callback) => BaseFunctions.ShowSuccess(message, callback);
|
||||
|
@ -10,7 +10,8 @@
|
||||
WindowStyle="None"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
AllowsTransparency="True"
|
||||
Background="Transparent">
|
||||
Background="Transparent"
|
||||
Closing="Window_Closing">
|
||||
<Border CornerRadius="10" BorderBrush="#33393B3D" Background="{Binding Background}" BorderThickness="{Binding DialogBorder}">
|
||||
<Grid>
|
||||
<Image Source="{Binding ByfronLogoLocation}" Width="114" Height="108" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="17,13,0,0" />
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System.Windows;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
@ -17,6 +18,8 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
||||
|
||||
public Bloxstrap.Bootstrapper? Bootstrapper { get; set; }
|
||||
|
||||
private bool _isClosing;
|
||||
|
||||
#region UI Elements
|
||||
public string Message
|
||||
{
|
||||
@ -84,12 +87,21 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
||||
|
||||
InitializeComponent();
|
||||
}
|
||||
private void Window_Closing(object sender, CancelEventArgs e)
|
||||
{
|
||||
if (!_isClosing)
|
||||
Bootstrapper?.CancelInstall();
|
||||
}
|
||||
|
||||
#region IBootstrapperDialog Methods
|
||||
// Referencing FluentDialog
|
||||
public void ShowBootstrapper() => this.ShowDialog();
|
||||
|
||||
public void CloseBootstrapper() => Dispatcher.BeginInvoke(this.Close);
|
||||
public void CloseBootstrapper()
|
||||
{
|
||||
_isClosing = true;
|
||||
Dispatcher.BeginInvoke(this.Close);
|
||||
}
|
||||
|
||||
public void ShowSuccess(string message, Action? callback) => BaseFunctions.ShowSuccess(message, callback);
|
||||
#endregion
|
||||
|
@ -12,7 +12,8 @@
|
||||
Background="{ui:ThemeResource ApplicationBackgroundBrush}"
|
||||
ExtendsContentIntoTitleBar="True"
|
||||
WindowBackdropType="Mica"
|
||||
WindowStartupLocation="CenterScreen">
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Closing="UiWindow_Closing">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System.Windows.Forms;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using Wpf.Ui.Appearance;
|
||||
using Wpf.Ui.Mvvm.Contracts;
|
||||
@ -20,6 +21,8 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
||||
|
||||
public Bloxstrap.Bootstrapper? Bootstrapper { get; set; }
|
||||
|
||||
private bool _isClosing;
|
||||
|
||||
#region UI Elements
|
||||
public string Message
|
||||
{
|
||||
@ -77,11 +80,20 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
#region IBootstrapperDialog Methods
|
||||
private void UiWindow_Closing(object sender, CancelEventArgs e)
|
||||
{
|
||||
if (!_isClosing)
|
||||
Bootstrapper?.CancelInstall();
|
||||
}
|
||||
|
||||
#region IBootstrapperDialog Methods
|
||||
public void ShowBootstrapper() => this.ShowDialog();
|
||||
|
||||
public void CloseBootstrapper() => Dispatcher.BeginInvoke(this.Close);
|
||||
public void CloseBootstrapper()
|
||||
{
|
||||
_isClosing = true;
|
||||
Dispatcher.BeginInvoke(this.Close);
|
||||
}
|
||||
|
||||
public void ShowSuccess(string message, Action? callback) => BaseFunctions.ShowSuccess(message, callback);
|
||||
#endregion
|
||||
|
@ -30,61 +30,61 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.labelMessage = new System.Windows.Forms.Label();
|
||||
this.ProgressBar = new System.Windows.Forms.ProgressBar();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
labelMessage = new Label();
|
||||
ProgressBar = new ProgressBar();
|
||||
buttonCancel = new Button();
|
||||
SuspendLayout();
|
||||
//
|
||||
// labelMessage
|
||||
//
|
||||
this.labelMessage.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.labelMessage.Location = new System.Drawing.Point(12, 16);
|
||||
this.labelMessage.Name = "labelMessage";
|
||||
this.labelMessage.Size = new System.Drawing.Size(287, 17);
|
||||
this.labelMessage.TabIndex = 0;
|
||||
this.labelMessage.Text = "Please wait...";
|
||||
labelMessage.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
labelMessage.Location = new System.Drawing.Point(12, 16);
|
||||
labelMessage.Name = "labelMessage";
|
||||
labelMessage.Size = new System.Drawing.Size(287, 17);
|
||||
labelMessage.TabIndex = 0;
|
||||
labelMessage.Text = "Please wait...";
|
||||
//
|
||||
// ProgressBar
|
||||
//
|
||||
this.ProgressBar.Location = new System.Drawing.Point(15, 47);
|
||||
this.ProgressBar.MarqueeAnimationSpeed = 33;
|
||||
this.ProgressBar.Name = "ProgressBar";
|
||||
this.ProgressBar.Size = new System.Drawing.Size(281, 20);
|
||||
this.ProgressBar.Style = System.Windows.Forms.ProgressBarStyle.Marquee;
|
||||
this.ProgressBar.TabIndex = 1;
|
||||
ProgressBar.Location = new System.Drawing.Point(15, 47);
|
||||
ProgressBar.MarqueeAnimationSpeed = 33;
|
||||
ProgressBar.Name = "ProgressBar";
|
||||
ProgressBar.Size = new System.Drawing.Size(281, 20);
|
||||
ProgressBar.Style = ProgressBarStyle.Marquee;
|
||||
ProgressBar.TabIndex = 1;
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.Enabled = false;
|
||||
this.buttonCancel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.buttonCancel.Location = new System.Drawing.Point(221, 83);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonCancel.TabIndex = 3;
|
||||
this.buttonCancel.Text = "Cancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
this.buttonCancel.Click += new System.EventHandler(this.ButtonCancel_Click);
|
||||
buttonCancel.Enabled = false;
|
||||
buttonCancel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
buttonCancel.Location = new System.Drawing.Point(221, 83);
|
||||
buttonCancel.Name = "buttonCancel";
|
||||
buttonCancel.Size = new System.Drawing.Size(75, 23);
|
||||
buttonCancel.TabIndex = 3;
|
||||
buttonCancel.Text = "Cancel";
|
||||
buttonCancel.UseVisualStyleBackColor = true;
|
||||
buttonCancel.Click += ButtonCancel_Click;
|
||||
//
|
||||
// LegacyDialog2008
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(311, 122);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.ProgressBar);
|
||||
this.Controls.Add(this.labelMessage);
|
||||
this.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MaximumSize = new System.Drawing.Size(327, 161);
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(327, 161);
|
||||
this.Name = "LegacyDialog2008";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "LegacyDialog2008";
|
||||
this.Load += new System.EventHandler(this.LegacyDialog2008_Load);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new System.Drawing.Size(311, 122);
|
||||
Controls.Add(buttonCancel);
|
||||
Controls.Add(ProgressBar);
|
||||
Controls.Add(labelMessage);
|
||||
Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
FormBorderStyle = FormBorderStyle.FixedSingle;
|
||||
MaximizeBox = false;
|
||||
MaximumSize = new System.Drawing.Size(327, 161);
|
||||
MinimizeBox = false;
|
||||
MinimumSize = new System.Drawing.Size(327, 161);
|
||||
Name = "LegacyDialog2008";
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
Text = "LegacyDialog2008";
|
||||
FormClosing += Dialog_FormClosing;
|
||||
Load += LegacyDialog2008_Load;
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -9,10 +9,10 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
||||
|
||||
public partial class LegacyDialog2008 : WinFormsDialogBase
|
||||
{
|
||||
protected override string _message
|
||||
{
|
||||
get => labelMessage.Text;
|
||||
set => labelMessage.Text = value;
|
||||
protected override string _message
|
||||
{
|
||||
get => labelMessage.Text;
|
||||
set => labelMessage.Text = value;
|
||||
}
|
||||
|
||||
protected override ProgressBarStyle _progressStyle
|
||||
@ -27,10 +27,10 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
||||
set => ProgressBar.Value = value;
|
||||
}
|
||||
|
||||
protected override bool _cancelEnabled
|
||||
{
|
||||
get => this.buttonCancel.Enabled;
|
||||
set => this.buttonCancel.Enabled = value;
|
||||
protected override bool _cancelEnabled
|
||||
{
|
||||
get => this.buttonCancel.Enabled;
|
||||
set => this.buttonCancel.Enabled = value;
|
||||
}
|
||||
|
||||
public LegacyDialog2008()
|
||||
|
@ -1,4 +1,64 @@
|
||||
<root>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
|
@ -30,75 +30,75 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.labelMessage = new System.Windows.Forms.Label();
|
||||
this.ProgressBar = new System.Windows.Forms.ProgressBar();
|
||||
this.IconBox = new System.Windows.Forms.PictureBox();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.IconBox)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
labelMessage = new Label();
|
||||
ProgressBar = new ProgressBar();
|
||||
IconBox = new PictureBox();
|
||||
buttonCancel = new Button();
|
||||
((System.ComponentModel.ISupportInitialize)IconBox).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// labelMessage
|
||||
//
|
||||
this.labelMessage.Location = new System.Drawing.Point(55, 23);
|
||||
this.labelMessage.Name = "labelMessage";
|
||||
this.labelMessage.Size = new System.Drawing.Size(287, 17);
|
||||
this.labelMessage.TabIndex = 0;
|
||||
this.labelMessage.Text = "Please wait...";
|
||||
labelMessage.Location = new System.Drawing.Point(55, 23);
|
||||
labelMessage.Name = "labelMessage";
|
||||
labelMessage.Size = new System.Drawing.Size(287, 17);
|
||||
labelMessage.TabIndex = 0;
|
||||
labelMessage.Text = "Please wait...";
|
||||
//
|
||||
// ProgressBar
|
||||
//
|
||||
this.ProgressBar.Location = new System.Drawing.Point(58, 51);
|
||||
this.ProgressBar.MarqueeAnimationSpeed = 33;
|
||||
this.ProgressBar.Name = "ProgressBar";
|
||||
this.ProgressBar.Size = new System.Drawing.Size(287, 26);
|
||||
this.ProgressBar.Style = System.Windows.Forms.ProgressBarStyle.Marquee;
|
||||
this.ProgressBar.TabIndex = 1;
|
||||
ProgressBar.Location = new System.Drawing.Point(58, 51);
|
||||
ProgressBar.MarqueeAnimationSpeed = 33;
|
||||
ProgressBar.Name = "ProgressBar";
|
||||
ProgressBar.Size = new System.Drawing.Size(287, 26);
|
||||
ProgressBar.Style = ProgressBarStyle.Marquee;
|
||||
ProgressBar.TabIndex = 1;
|
||||
//
|
||||
// IconBox
|
||||
//
|
||||
this.IconBox.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||
this.IconBox.ImageLocation = "";
|
||||
this.IconBox.Location = new System.Drawing.Point(19, 16);
|
||||
this.IconBox.Name = "IconBox";
|
||||
this.IconBox.Size = new System.Drawing.Size(32, 32);
|
||||
this.IconBox.TabIndex = 2;
|
||||
this.IconBox.TabStop = false;
|
||||
IconBox.BackgroundImageLayout = ImageLayout.Zoom;
|
||||
IconBox.ImageLocation = "";
|
||||
IconBox.Location = new System.Drawing.Point(19, 16);
|
||||
IconBox.Name = "IconBox";
|
||||
IconBox.Size = new System.Drawing.Size(32, 32);
|
||||
IconBox.TabIndex = 2;
|
||||
IconBox.TabStop = false;
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.Enabled = false;
|
||||
this.buttonCancel.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.buttonCancel.Location = new System.Drawing.Point(271, 83);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonCancel.TabIndex = 3;
|
||||
this.buttonCancel.Text = "Cancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
this.buttonCancel.Visible = false;
|
||||
this.buttonCancel.Click += new System.EventHandler(this.ButtonCancel_Click);
|
||||
buttonCancel.Enabled = false;
|
||||
buttonCancel.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
buttonCancel.Location = new System.Drawing.Point(271, 83);
|
||||
buttonCancel.Name = "buttonCancel";
|
||||
buttonCancel.Size = new System.Drawing.Size(75, 23);
|
||||
buttonCancel.TabIndex = 3;
|
||||
buttonCancel.Text = "Cancel";
|
||||
buttonCancel.UseVisualStyleBackColor = true;
|
||||
buttonCancel.Visible = false;
|
||||
buttonCancel.Click += ButtonCancel_Click;
|
||||
//
|
||||
// LegacyDialog2011
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(362, 131);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.IconBox);
|
||||
this.Controls.Add(this.ProgressBar);
|
||||
this.Controls.Add(this.labelMessage);
|
||||
this.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MaximumSize = new System.Drawing.Size(378, 170);
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(378, 170);
|
||||
this.Name = "LegacyDialog2011";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "LegacyDialog2011";
|
||||
this.Load += new System.EventHandler(this.LegacyDialog2011_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.IconBox)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new System.Drawing.Size(362, 131);
|
||||
Controls.Add(buttonCancel);
|
||||
Controls.Add(IconBox);
|
||||
Controls.Add(ProgressBar);
|
||||
Controls.Add(labelMessage);
|
||||
Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
FormBorderStyle = FormBorderStyle.FixedSingle;
|
||||
MaximizeBox = false;
|
||||
MaximumSize = new System.Drawing.Size(378, 170);
|
||||
MinimizeBox = false;
|
||||
MinimumSize = new System.Drawing.Size(378, 170);
|
||||
Name = "LegacyDialog2011";
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
Text = "LegacyDialog2011";
|
||||
FormClosing += Dialog_FormClosing;
|
||||
Load += LegacyDialog2011_Load;
|
||||
((System.ComponentModel.ISupportInitialize)IconBox).EndInit();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -8,10 +8,10 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
||||
|
||||
public partial class LegacyDialog2011 : WinFormsDialogBase
|
||||
{
|
||||
protected override string _message
|
||||
{
|
||||
get => labelMessage.Text;
|
||||
set => labelMessage.Text = value;
|
||||
protected override string _message
|
||||
{
|
||||
get => labelMessage.Text;
|
||||
set => labelMessage.Text = value;
|
||||
}
|
||||
|
||||
protected override ProgressBarStyle _progressStyle
|
||||
@ -26,10 +26,10 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
||||
set => ProgressBar.Value = value;
|
||||
}
|
||||
|
||||
protected override bool _cancelEnabled
|
||||
{
|
||||
get => this.buttonCancel.Enabled;
|
||||
set => this.buttonCancel.Enabled = this.buttonCancel.Visible = value;
|
||||
protected override bool _cancelEnabled
|
||||
{
|
||||
get => this.buttonCancel.Enabled;
|
||||
set => this.buttonCancel.Enabled = this.buttonCancel.Visible = value;
|
||||
}
|
||||
|
||||
public LegacyDialog2011()
|
||||
|
@ -1,4 +1,64 @@
|
||||
<root>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
|
@ -30,93 +30,93 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.ProgressBar = new System.Windows.Forms.ProgressBar();
|
||||
this.labelMessage = new System.Windows.Forms.Label();
|
||||
this.IconBox = new System.Windows.Forms.PictureBox();
|
||||
this.buttonCancel = new System.Windows.Forms.PictureBox();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.IconBox)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.buttonCancel)).BeginInit();
|
||||
this.panel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
ProgressBar = new ProgressBar();
|
||||
labelMessage = new Label();
|
||||
IconBox = new PictureBox();
|
||||
buttonCancel = new PictureBox();
|
||||
panel1 = new Panel();
|
||||
((System.ComponentModel.ISupportInitialize)IconBox).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)buttonCancel).BeginInit();
|
||||
panel1.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// ProgressBar
|
||||
//
|
||||
this.ProgressBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.ProgressBar.Location = new System.Drawing.Point(29, 241);
|
||||
this.ProgressBar.MarqueeAnimationSpeed = 20;
|
||||
this.ProgressBar.Name = "ProgressBar";
|
||||
this.ProgressBar.Size = new System.Drawing.Size(460, 20);
|
||||
this.ProgressBar.Style = System.Windows.Forms.ProgressBarStyle.Marquee;
|
||||
this.ProgressBar.TabIndex = 0;
|
||||
ProgressBar.Anchor = AnchorStyles.Left | AnchorStyles.Right;
|
||||
ProgressBar.Location = new System.Drawing.Point(29, 241);
|
||||
ProgressBar.MarqueeAnimationSpeed = 20;
|
||||
ProgressBar.Name = "ProgressBar";
|
||||
ProgressBar.Size = new System.Drawing.Size(460, 20);
|
||||
ProgressBar.Style = ProgressBarStyle.Marquee;
|
||||
ProgressBar.TabIndex = 0;
|
||||
//
|
||||
// labelMessage
|
||||
//
|
||||
this.labelMessage.Font = new System.Drawing.Font("Tahoma", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.labelMessage.Location = new System.Drawing.Point(29, 199);
|
||||
this.labelMessage.Name = "labelMessage";
|
||||
this.labelMessage.Size = new System.Drawing.Size(460, 18);
|
||||
this.labelMessage.TabIndex = 1;
|
||||
this.labelMessage.Text = "Please wait...";
|
||||
this.labelMessage.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
this.labelMessage.UseMnemonic = false;
|
||||
labelMessage.Font = new System.Drawing.Font("Tahoma", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
labelMessage.Location = new System.Drawing.Point(29, 199);
|
||||
labelMessage.Name = "labelMessage";
|
||||
labelMessage.Size = new System.Drawing.Size(460, 18);
|
||||
labelMessage.TabIndex = 1;
|
||||
labelMessage.Text = "Please wait...";
|
||||
labelMessage.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
labelMessage.UseMnemonic = false;
|
||||
//
|
||||
// IconBox
|
||||
//
|
||||
this.IconBox.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||
this.IconBox.ImageLocation = "";
|
||||
this.IconBox.Location = new System.Drawing.Point(212, 66);
|
||||
this.IconBox.Name = "IconBox";
|
||||
this.IconBox.Size = new System.Drawing.Size(92, 92);
|
||||
this.IconBox.TabIndex = 2;
|
||||
this.IconBox.TabStop = false;
|
||||
IconBox.BackgroundImageLayout = ImageLayout.Zoom;
|
||||
IconBox.ImageLocation = "";
|
||||
IconBox.Location = new System.Drawing.Point(212, 66);
|
||||
IconBox.Name = "IconBox";
|
||||
IconBox.Size = new System.Drawing.Size(92, 92);
|
||||
IconBox.TabIndex = 2;
|
||||
IconBox.TabStop = false;
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.Enabled = false;
|
||||
this.buttonCancel.Image = global::Bloxstrap.Properties.Resources.CancelButton;
|
||||
this.buttonCancel.Location = new System.Drawing.Point(194, 264);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(130, 44);
|
||||
this.buttonCancel.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.buttonCancel.TabIndex = 3;
|
||||
this.buttonCancel.TabStop = false;
|
||||
this.buttonCancel.Visible = false;
|
||||
this.buttonCancel.Click += new System.EventHandler(this.ButtonCancel_Click);
|
||||
this.buttonCancel.MouseEnter += new System.EventHandler(this.ButtonCancel_MouseEnter);
|
||||
this.buttonCancel.MouseLeave += new System.EventHandler(this.ButtonCancel_MouseLeave);
|
||||
buttonCancel.Enabled = false;
|
||||
buttonCancel.Image = Properties.Resources.CancelButton;
|
||||
buttonCancel.Location = new System.Drawing.Point(194, 264);
|
||||
buttonCancel.Name = "buttonCancel";
|
||||
buttonCancel.Size = new System.Drawing.Size(130, 44);
|
||||
buttonCancel.SizeMode = PictureBoxSizeMode.Zoom;
|
||||
buttonCancel.TabIndex = 3;
|
||||
buttonCancel.TabStop = false;
|
||||
buttonCancel.Visible = false;
|
||||
buttonCancel.Click += ButtonCancel_Click;
|
||||
buttonCancel.MouseEnter += ButtonCancel_MouseEnter;
|
||||
buttonCancel.MouseLeave += ButtonCancel_MouseLeave;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.BackColor = System.Drawing.SystemColors.Window;
|
||||
this.panel1.Controls.Add(this.labelMessage);
|
||||
this.panel1.Controls.Add(this.IconBox);
|
||||
this.panel1.Controls.Add(this.buttonCancel);
|
||||
this.panel1.Controls.Add(this.ProgressBar);
|
||||
this.panel1.Location = new System.Drawing.Point(1, 1);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(518, 318);
|
||||
this.panel1.TabIndex = 4;
|
||||
panel1.BackColor = System.Drawing.SystemColors.Window;
|
||||
panel1.Controls.Add(labelMessage);
|
||||
panel1.Controls.Add(IconBox);
|
||||
panel1.Controls.Add(buttonCancel);
|
||||
panel1.Controls.Add(ProgressBar);
|
||||
panel1.Location = new System.Drawing.Point(1, 1);
|
||||
panel1.Name = "panel1";
|
||||
panel1.Size = new System.Drawing.Size(518, 318);
|
||||
panel1.TabIndex = 4;
|
||||
//
|
||||
// ProgressDialog
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.ActiveBorder;
|
||||
this.ClientSize = new System.Drawing.Size(520, 320);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.MaximumSize = new System.Drawing.Size(520, 320);
|
||||
this.MinimumSize = new System.Drawing.Size(520, 320);
|
||||
this.Name = "ProgressDialog";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "ProgressDialog";
|
||||
this.Load += new System.EventHandler(this.ProgressDialog_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.IconBox)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.buttonCancel)).EndInit();
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
BackColor = System.Drawing.SystemColors.ActiveBorder;
|
||||
ClientSize = new System.Drawing.Size(520, 320);
|
||||
Controls.Add(panel1);
|
||||
FormBorderStyle = FormBorderStyle.None;
|
||||
MaximumSize = new System.Drawing.Size(520, 320);
|
||||
MinimumSize = new System.Drawing.Size(520, 320);
|
||||
Name = "ProgressDialog";
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
Text = "ProgressDialog";
|
||||
FormClosing += Dialog_FormClosing;
|
||||
Load += ProgressDialog_Load;
|
||||
((System.ComponentModel.ISupportInitialize)IconBox).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)buttonCancel).EndInit();
|
||||
panel1.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -1,4 +1,64 @@
|
||||
<root>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
|
@ -42,6 +42,7 @@
|
||||
this.Text = "VistaDialog";
|
||||
this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
|
||||
this.Load += new System.EventHandler(this.VistaDialog_Load);
|
||||
this.FormClosing += this.Dialog_FormClosing;
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user