mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
Fixed incorrectly displaying progressBar
I broke the circularProgressBar but now it works fine. Messed with the style a bit to get the look I wanted. Also adjusted the positioning of the text in the middle.
This commit is contained in:
parent
ca7c696b06
commit
189e3271a0
@ -329,8 +329,8 @@ namespace HeliosPlus {
|
|||||||
|
|
||||||
// Set up the UI forms to show
|
// Set up the UI forms to show
|
||||||
ApplyingProfileForm timeoutForm = new ApplyingProfileForm(null, 3, $"Changing to '{profile.Name}' Profile", "Press ESC to cancel", Color.Orange, true);
|
ApplyingProfileForm timeoutForm = new ApplyingProfileForm(null, 3, $"Changing to '{profile.Name}' Profile", "Press ESC to cancel", Color.Orange, true);
|
||||||
ApplyingProfileForm topologyForm = new ApplyingProfileForm(applyTopologyTask, 15, $"Changing to '{profile.Name}' Profile", "Applying NVIDIA Grid Topology", Color.Aquamarine);
|
ApplyingProfileForm topologyForm = new ApplyingProfileForm(applyTopologyTask, 30, $"Changing to '{profile.Name}' Profile", "Applying NVIDIA Grid Topology", Color.Aquamarine);
|
||||||
ApplyingProfileForm pathInfoForm = new ApplyingProfileForm(applyPathInfoTask, 15, $"Changing to '{profile.Name}' Profile", "Applying Windows Display Device settings", Color.LawnGreen);
|
ApplyingProfileForm pathInfoForm = new ApplyingProfileForm(applyPathInfoTask, 15, $"Changing to '{profile.Name}' Profile", "Adjusting Windows Display Device positions", Color.LawnGreen);
|
||||||
|
|
||||||
if (timeoutForm.ShowDialog() == DialogResult.Cancel)
|
if (timeoutForm.ShowDialog() == DialogResult.Cancel)
|
||||||
{
|
{
|
||||||
|
24
HeliosPlus/UIForms/ApplyingProfileForm.Designer.cs
generated
24
HeliosPlus/UIForms/ApplyingProfileForm.Designer.cs
generated
@ -44,16 +44,16 @@
|
|||||||
this.progressPanel.Controls.Add(this.lbl_sub_message);
|
this.progressPanel.Controls.Add(this.lbl_sub_message);
|
||||||
this.progressPanel.Controls.Add(this.progressBar);
|
this.progressPanel.Controls.Add(this.progressBar);
|
||||||
this.progressPanel.Controls.Add(this.lbl_message);
|
this.progressPanel.Controls.Add(this.lbl_message);
|
||||||
this.progressPanel.Location = new System.Drawing.Point(77, 154);
|
this.progressPanel.Location = new System.Drawing.Point(40, 154);
|
||||||
this.progressPanel.Name = "progressPanel";
|
this.progressPanel.Name = "progressPanel";
|
||||||
this.progressPanel.Size = new System.Drawing.Size(621, 270);
|
this.progressPanel.Size = new System.Drawing.Size(720, 270);
|
||||||
this.progressPanel.TabIndex = 1;
|
this.progressPanel.TabIndex = 1;
|
||||||
//
|
//
|
||||||
// lbl_sub_message
|
// lbl_sub_message
|
||||||
//
|
//
|
||||||
this.lbl_sub_message.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.lbl_sub_message.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.lbl_sub_message.ForeColor = System.Drawing.Color.White;
|
this.lbl_sub_message.ForeColor = System.Drawing.Color.White;
|
||||||
this.lbl_sub_message.Location = new System.Drawing.Point(73, 67);
|
this.lbl_sub_message.Location = new System.Drawing.Point(110, 67);
|
||||||
this.lbl_sub_message.Name = "lbl_sub_message";
|
this.lbl_sub_message.Name = "lbl_sub_message";
|
||||||
this.lbl_sub_message.Size = new System.Drawing.Size(501, 30);
|
this.lbl_sub_message.Size = new System.Drawing.Size(501, 30);
|
||||||
this.lbl_sub_message.TabIndex = 2;
|
this.lbl_sub_message.TabIndex = 2;
|
||||||
@ -63,20 +63,20 @@
|
|||||||
//
|
//
|
||||||
this.progressBar.AnimationFunction = WinFormAnimation.KnownAnimationFunctions.Liner;
|
this.progressBar.AnimationFunction = WinFormAnimation.KnownAnimationFunctions.Liner;
|
||||||
this.progressBar.AnimationSpeed = 1000;
|
this.progressBar.AnimationSpeed = 1000;
|
||||||
this.progressBar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(50)))), ((int)(((byte)(50)))));
|
this.progressBar.BackColor = System.Drawing.Color.Transparent;
|
||||||
this.progressBar.Font = new System.Drawing.Font("Microsoft Sans Serif", 39.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.progressBar.Font = new System.Drawing.Font("Microsoft Sans Serif", 39.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.progressBar.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
this.progressBar.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
||||||
this.progressBar.InnerColor = System.Drawing.Color.Ivory;
|
this.progressBar.InnerColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(50)))), ((int)(((byte)(50)))));
|
||||||
this.progressBar.InnerMargin = 0;
|
this.progressBar.InnerMargin = 0;
|
||||||
this.progressBar.InnerWidth = 0;
|
this.progressBar.InnerWidth = 1;
|
||||||
this.progressBar.Location = new System.Drawing.Point(243, 125);
|
this.progressBar.Location = new System.Drawing.Point(293, 115);
|
||||||
this.progressBar.MarqueeAnimationSpeed = 2000;
|
this.progressBar.MarqueeAnimationSpeed = 2000;
|
||||||
this.progressBar.Name = "progressBar";
|
this.progressBar.Name = "progressBar";
|
||||||
this.progressBar.OuterColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
this.progressBar.OuterColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||||
this.progressBar.OuterMargin = -15;
|
this.progressBar.OuterMargin = 0;
|
||||||
this.progressBar.OuterWidth = 15;
|
this.progressBar.OuterWidth = 0;
|
||||||
this.progressBar.ProgressColor = System.Drawing.Color.DodgerBlue;
|
this.progressBar.ProgressColor = System.Drawing.Color.DodgerBlue;
|
||||||
this.progressBar.ProgressWidth = 15;
|
this.progressBar.ProgressWidth = 23;
|
||||||
this.progressBar.SecondaryFont = new System.Drawing.Font("Microsoft Sans Serif", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.progressBar.SecondaryFont = new System.Drawing.Font("Microsoft Sans Serif", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.progressBar.Size = new System.Drawing.Size(135, 135);
|
this.progressBar.Size = new System.Drawing.Size(135, 135);
|
||||||
this.progressBar.StartAngle = 270;
|
this.progressBar.StartAngle = 270;
|
||||||
@ -87,7 +87,7 @@
|
|||||||
this.progressBar.SuperscriptMargin = new System.Windows.Forms.Padding(0, 30, 0, 0);
|
this.progressBar.SuperscriptMargin = new System.Windows.Forms.Padding(0, 30, 0, 0);
|
||||||
this.progressBar.SuperscriptText = "";
|
this.progressBar.SuperscriptText = "";
|
||||||
this.progressBar.TabIndex = 0;
|
this.progressBar.TabIndex = 0;
|
||||||
this.progressBar.TextMargin = new System.Windows.Forms.Padding(2, 5, 0, 0);
|
this.progressBar.TextMargin = new System.Windows.Forms.Padding(0, 4, 1, 0);
|
||||||
this.progressBar.Value = 68;
|
this.progressBar.Value = 68;
|
||||||
//
|
//
|
||||||
// lbl_message
|
// lbl_message
|
||||||
@ -96,7 +96,7 @@
|
|||||||
this.lbl_message.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
this.lbl_message.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
||||||
this.lbl_message.Location = new System.Drawing.Point(3, 0);
|
this.lbl_message.Location = new System.Drawing.Point(3, 0);
|
||||||
this.lbl_message.Name = "lbl_message";
|
this.lbl_message.Name = "lbl_message";
|
||||||
this.lbl_message.Size = new System.Drawing.Size(615, 61);
|
this.lbl_message.Size = new System.Drawing.Size(714, 61);
|
||||||
this.lbl_message.TabIndex = 1;
|
this.lbl_message.TabIndex = 1;
|
||||||
this.lbl_message.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
this.lbl_message.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
//
|
//
|
||||||
|
@ -41,7 +41,7 @@ namespace HeliosPlus.UIForms
|
|||||||
Cancellable = cancellable;
|
Cancellable = cancellable;
|
||||||
TaskToRun = taskToRun;
|
TaskToRun = taskToRun;
|
||||||
if (progressColor.Equals(default(Color)))
|
if (progressColor.Equals(default(Color)))
|
||||||
progressColor = Color.Red;
|
progressColor = Color.OrangeRed;
|
||||||
ProgressColor = progressColor;
|
ProgressColor = progressColor;
|
||||||
if (!string.IsNullOrEmpty(title)) Title = title;
|
if (!string.IsNullOrEmpty(title)) Title = title;
|
||||||
if (!string.IsNullOrEmpty(message)) Message = message;
|
if (!string.IsNullOrEmpty(message)) Message = message;
|
||||||
@ -113,7 +113,7 @@ namespace HeliosPlus.UIForms
|
|||||||
progressBar.ProgressColor = ProgressColor;
|
progressBar.ProgressColor = ProgressColor;
|
||||||
progressBar.Maximum = _countdownCounter;
|
progressBar.Maximum = _countdownCounter;
|
||||||
progressBar.Value = _countdownCounter;
|
progressBar.Value = _countdownCounter;
|
||||||
progressBar.Text = (_countdownCounter).ToString();
|
progressBar.Text = _countdownCounter.ToString();
|
||||||
t_countdown.Start();
|
t_countdown.Start();
|
||||||
if (TaskToRun is Task)
|
if (TaskToRun is Task)
|
||||||
TaskToRun.Start();
|
TaskToRun.Start();
|
||||||
@ -193,6 +193,7 @@ namespace HeliosPlus.UIForms
|
|||||||
|
|
||||||
private void ApplyingProfileForm_Shown(object sender, EventArgs e)
|
private void ApplyingProfileForm_Shown(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
Reposition();
|
||||||
new Animator(new Path((float)Opacity, 0.97f, 200))
|
new Animator(new Path((float)Opacity, 0.97f, 200))
|
||||||
.Play(new SafeInvoker<float>(f =>
|
.Play(new SafeInvoker<float>(f =>
|
||||||
{
|
{
|
||||||
@ -216,6 +217,7 @@ namespace HeliosPlus.UIForms
|
|||||||
|
|
||||||
if (_countdownCounter <= 0)
|
if (_countdownCounter <= 0)
|
||||||
{
|
{
|
||||||
|
_countdownCounter = 0;
|
||||||
t_countdown.Stop();
|
t_countdown.Stop();
|
||||||
DialogResult = DialogResult.OK;
|
DialogResult = DialogResult.OK;
|
||||||
Close();
|
Close();
|
||||||
|
Loading…
Reference in New Issue
Block a user