From 5b01c364e65616a41332f76e445a9dbd8e64a53f Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 22 Jan 2017 19:03:59 -0500 Subject: Implement save migration from client to server --- ShiftOS.WinForms/Oobe.cs | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'ShiftOS.WinForms/Oobe.cs') diff --git a/ShiftOS.WinForms/Oobe.cs b/ShiftOS.WinForms/Oobe.cs index 0a55602..0e249fa 100644 --- a/ShiftOS.WinForms/Oobe.cs +++ b/ShiftOS.WinForms/Oobe.cs @@ -215,7 +215,35 @@ namespace ShiftOS.WinForms public void ShowSaveTransfer(Save save) { - throw new NotImplementedException(); + var fSetup = new FakeSetupScreen(this, 7); + + var t = new Thread(() => + { + textgeninput = lblhackwords; + Clear(); + TextType("Welcome back to ShiftOS."); + Thread.Sleep(500); + TextType("Since your last time inside ShiftOS, the operating system has changed. Your user account is no longer stored on your local system."); + Thread.Sleep(500); + this.Invoke(new Action(() => + { + //UPS is drunky heaven over here... it's a liquor store, I think... - Drunk Michael + fSetup.UserReregistered += (u, p, s) => + { + save.Username = u; + save.Password = p; + save.SystemName = s; + SaveSystem.CurrentSave = save; + SaveSystem.SaveGame(); + if(Utils.FileExists(Paths.SaveFileInner)) + Utils.Delete(Paths.SaveFileInner); + this.Close(); + }; + fSetup.Show(); + })); + }); + t.IsBackground = true; + t.Start(); } public void PromptForLogin() -- cgit v1.2.3