Skip to content

Commit

Permalink
Small prerelease change
Browse files Browse the repository at this point in the history
  • Loading branch information
Brhsoftco committed Jul 3, 2020
1 parent 1e8e88e commit 17c7abe
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 9 deletions.
18 changes: 18 additions & 0 deletions PlexDL.PlexAPI.LoginHandler/LoginWindow.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions PlexDL.PlexAPI.LoginHandler/LoginWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,19 @@ private void TmrDotChange_Tick(object sender, EventArgs e)
pbMain.Text = dots;
}

private void LoginWindow_Load(object sender, EventArgs e)
private void LaunchBrowser()
{
tmrDotChange.Start();
var endp = PlexRequestPin.LoginInterfaceUrl;
//show in default browser
Process.Start(endp);
}

private void LoginWindow_Load(object sender, EventArgs e)
{
tmrDotChange.Start();
LaunchBrowser();
}

private void BtnOK_Click(object sender, EventArgs e)
{
try
Expand All @@ -74,5 +79,10 @@ private void BtnOK_Click(object sender, EventArgs e)
UIMessages.Error($"An error occured whilst logging into Plex.tv:\n\n{ex}");
}
}

private void LnkRelaunch_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
LaunchBrowser();
}
}
}
17 changes: 10 additions & 7 deletions PlexDL.WaitWindow/WaitWindowGUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ internal class WaitWindowGUI : Form
private readonly WaitWindow _Parent;
internal Exception _Error;

private int _dotCount = 0;

internal object _Result;

private IContainer components;

private int dotCount;
private string LabelText = "";

public Label MessageLabel;
Expand Down Expand Up @@ -62,8 +63,7 @@ internal object DoWork()
{
// Invoke the worker method and return any results.
var e = new WaitWindowEventArgs(_Parent, _Parent._Args);
if (_Parent._WorkerMethod != null)
_Parent._WorkerMethod(this, e);
_Parent._WorkerMethod?.Invoke(this, e);

return e.Result;
}
Expand Down Expand Up @@ -198,6 +198,7 @@ private void InitializeComponent()

private void WaitWindowGUI_Load(object sender, EventArgs e)
{
_dotCount = 0;
tmrDots.Start();
}

Expand All @@ -206,16 +207,18 @@ private void WaitWindowGUI_FormClosing(object sender, FormClosingEventArgs e)
tmrDots.Stop();
}



private void TmrDots_Tick(object sender, EventArgs e)
{
if (dotCount < 3)
if (_dotCount < 3)
{
dotCount++;
MessageLabel.Text += @".";
_dotCount++;
MessageLabel.Text += '.';
}
else
{
dotCount = 0;
_dotCount = 0;
MessageLabel.Text = LabelText;
}
}
Expand Down

0 comments on commit 17c7abe

Please sign in to comment.