aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-05-08 11:31:20 -0400
committerMichael <[email protected]>2017-05-08 11:31:29 -0400
commit75ed7e9215ba88358d9b838dd82fa3841f78ae5a (patch)
treee976fbb38056e38fcd8393c3efcfe3db12f3c4b0 /ShiftOS.WinForms
parent4a5db39ea7c0b9be342261ab416dbb5edf50b2ce (diff)
downloadshiftos_thereturn-75ed7e9215ba88358d9b838dd82fa3841f78ae5a.tar.gz
shiftos_thereturn-75ed7e9215ba88358d9b838dd82fa3841f78ae5a.tar.bz2
shiftos_thereturn-75ed7e9215ba88358d9b838dd82fa3841f78ae5a.zip
Fix softlocks on pre-user OOBE.
Diffstat (limited to 'ShiftOS.WinForms')
-rw-r--r--ShiftOS.WinForms/OobeStory.cs10
-rw-r--r--ShiftOS.WinForms/UniteLoginDialog.cs3
-rw-r--r--ShiftOS.WinForms/UniteSignupDialog.cs3
3 files changed, 10 insertions, 6 deletions
diff --git a/ShiftOS.WinForms/OobeStory.cs b/ShiftOS.WinForms/OobeStory.cs
index bab4889..39ca5b5 100644
--- a/ShiftOS.WinForms/OobeStory.cs
+++ b/ShiftOS.WinForms/OobeStory.cs
@@ -120,7 +120,7 @@ namespace ShiftOS.WinForms
Console.Write(" ");
ConsoleEx.BackgroundColor = ConsoleColor.Black;
}
- Engine.AudioManager.PlayStream(Properties.Resources.typesound);
+ Desktop.InvokeOnWorkerThread(() => Engine.AudioManager.PlayStream(Properties.Resources.typesound));
formatProgress++;
Thread.Sleep(175);
}
@@ -135,14 +135,16 @@ namespace ShiftOS.WinForms
{
Console.WriteLine("Creating: " + dir);
Thread.Sleep(125);
- Engine.AudioManager.PlayStream(Properties.Resources.writesound);
+ Desktop.InvokeOnWorkerThread(() => Engine.AudioManager.PlayStream(Properties.Resources.writesound));
}
}
Console.WriteLine();
Console.WriteLine("Next, let's get user information.");
Console.WriteLine();
- ShiftOS.Engine.OutOfBoxExperience.PromptForLogin();
-
+ Desktop.InvokeOnWorkerThread(() =>
+ {
+ ShiftOS.Engine.OutOfBoxExperience.PromptForLogin();
+ });
}
private static bool isValid(string text, string chars)
{
diff --git a/ShiftOS.WinForms/UniteLoginDialog.cs b/ShiftOS.WinForms/UniteLoginDialog.cs
index 4c85005..c78e987 100644
--- a/ShiftOS.WinForms/UniteLoginDialog.cs
+++ b/ShiftOS.WinForms/UniteLoginDialog.cs
@@ -9,6 +9,7 @@ using System.Threading.Tasks;
using System.Windows.Forms;
using ShiftOS.Engine;
using System.Net;
+using ShiftOS.Objects;
namespace ShiftOS.WinForms
{
@@ -59,7 +60,7 @@ namespace ShiftOS.WinForms
try
{
- var webrequest = HttpWebRequest.Create("http://getshiftos.ml/Auth/Login?appname=ShiftOS&appdesc=ShiftOS+client&version=1_0_beta_2_4");
+ var webrequest = HttpWebRequest.Create(UserConfig.Get().UniteUrl + "/Auth/Login?appname=ShiftOS&appdesc=ShiftOS+client&version=1_0_beta_2_4");
string base64 = Convert.ToBase64String(Encoding.UTF8.GetBytes($"{u}:{p}"));
webrequest.Headers.Add("Authentication: Basic " + base64);
var response = webrequest.GetResponse();
diff --git a/ShiftOS.WinForms/UniteSignupDialog.cs b/ShiftOS.WinForms/UniteSignupDialog.cs
index a46a9b0..7d0fd33 100644
--- a/ShiftOS.WinForms/UniteSignupDialog.cs
+++ b/ShiftOS.WinForms/UniteSignupDialog.cs
@@ -10,6 +10,7 @@ using System.Windows.Forms;
using ShiftOS.Engine;
using Newtonsoft.Json;
using System.Net;
+using ShiftOS.Objects;
namespace ShiftOS.WinForms
{
@@ -99,7 +100,7 @@ namespace ShiftOS.WinForms
try
{
- var webrequest = HttpWebRequest.Create("http://getshiftos.ml/Auth/Register?appname=ShiftOS&appdesc=ShiftOS+client&version=1_0_beta_2_4&displayname=" + txtdisplay.Text + "&sysname=" + txtsysname.Text);
+ var webrequest = HttpWebRequest.Create(UserConfig.Get().UniteUrl + "/Auth/Register?appname=ShiftOS&appdesc=ShiftOS+client&version=1_0_beta_2_4&displayname=" + txtdisplay.Text + "&sysname=" + txtsysname.Text);
string base64 = Convert.ToBase64String(Encoding.UTF8.GetBytes($"{u}:{p}"));
webrequest.Headers.Add("Authentication: Basic " + base64);
var response = webrequest.GetResponse();