mirror of
https://git.alee14.me/shiftos-archive/ShiftOS_TheReturn.git
synced 2025-01-22 18:02:16 +00:00
stuff
This commit is contained in:
parent
fde832b357
commit
e841b168e1
5 changed files with 35 additions and 37 deletions
|
@ -186,6 +186,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
SendMessage(ch, ch, "A little birdie tells me you know about the RTS exploits going around... Try using that on Aiden's server. You can find his systemname on Appscape under \"Contact Us.\" He has a mailserver on Appscape - and also has RTS on the same server.");
|
||||
Thread.Sleep(2500);
|
||||
SendMessage(ch, ch, "Good luck... My life depends on you!");
|
||||
complete = true;
|
||||
});
|
||||
t.IsBackground = true;
|
||||
t.Start();
|
||||
|
|
|
@ -63,15 +63,12 @@ namespace ShiftOS.WinForms.Controls
|
|||
|
||||
public void Write(string text)
|
||||
{
|
||||
Thread.Sleep(5);
|
||||
this.SuspendLayout();
|
||||
this.HideSelection = true;
|
||||
this.SelectionFont = ConstructFont();
|
||||
this.SelectionColor = ControlManager.ConvertColor(ConsoleEx.ForegroundColor);
|
||||
this.SelectionBackColor = ControlManager.ConvertColor(ConsoleEx.BackgroundColor);
|
||||
this.AppendText(Localization.Parse(text));
|
||||
this.HideSelection = false;
|
||||
this.ResumeLayout();
|
||||
}
|
||||
|
||||
private Font ConstructFont()
|
||||
|
@ -89,8 +86,6 @@ namespace ShiftOS.WinForms.Controls
|
|||
|
||||
public void WriteLine(string text)
|
||||
{
|
||||
Thread.Sleep(5);
|
||||
this.SuspendLayout();
|
||||
Engine.AudioManager.PlayStream(Properties.Resources.writesound);
|
||||
this.HideSelection = true;
|
||||
this.Select(this.TextLength, 0);
|
||||
|
@ -99,11 +94,12 @@ namespace ShiftOS.WinForms.Controls
|
|||
this.SelectionBackColor = ControlManager.ConvertColor(ConsoleEx.BackgroundColor);
|
||||
this.AppendText(Localization.Parse(text) + Environment.NewLine);
|
||||
this.HideSelection = false;
|
||||
this.ResumeLayout();
|
||||
}
|
||||
|
||||
bool quickCopying = false;
|
||||
|
||||
bool busy = false;
|
||||
|
||||
protected override void OnMouseDown(MouseEventArgs e)
|
||||
{
|
||||
//if right-clicking, then we initiate a quick-copy.
|
||||
|
@ -255,8 +251,11 @@ namespace ShiftOS.WinForms.Controls
|
|||
}
|
||||
}
|
||||
|
||||
public string ThreadId = "";
|
||||
|
||||
public TerminalBox() : base()
|
||||
{
|
||||
ThreadId = Thread.CurrentThread.ManagedThreadId.ToString();
|
||||
this.Tag = "keepbg keepfg keepfont";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,14 +92,7 @@ namespace ShiftOS.WinForms.Stories
|
|||
ConsoleEx.ForegroundColor = ConsoleColor.Gray;
|
||||
ConsoleEx.Bold = false;
|
||||
|
||||
foreach (var c in text)
|
||||
{
|
||||
Desktop.InvokeOnWorkerThread(() =>
|
||||
{
|
||||
Console.Write(c);
|
||||
});
|
||||
Thread.Sleep(75);
|
||||
}
|
||||
Console.WriteLine(text);
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
|
||||
|
|
|
@ -188,14 +188,40 @@ namespace ShiftOS.WinForms
|
|||
widget.OnSkinLoad();
|
||||
}
|
||||
|
||||
|
||||
SetupDesktop();
|
||||
};
|
||||
|
||||
long lastcp = 0;
|
||||
|
||||
var storythread = new Thread(() =>
|
||||
{
|
||||
do
|
||||
{
|
||||
if (SaveSystem.CurrentSave != null)
|
||||
{
|
||||
if (SaveSystem.CurrentSave.Codepoints != lastcp)
|
||||
lastcp = SaveSystem.CurrentSave.Codepoints;
|
||||
if (lastcp >= 10000)
|
||||
{
|
||||
if (!Shiftorium.UpgradeInstalled("victortran_shiftnet"))
|
||||
{
|
||||
Story.Start("victortran_shiftnet");
|
||||
}
|
||||
}
|
||||
}
|
||||
} while (!SaveSystem.ShuttingDown);
|
||||
});
|
||||
storythread.IsBackground = true;
|
||||
storythread.Start();
|
||||
|
||||
time.Tick += (o, a) =>
|
||||
{
|
||||
if (Shiftorium.IsInitiated == true)
|
||||
{
|
||||
if (SaveSystem.CurrentSave != null && TutorialManager.IsInTutorial == false)
|
||||
if (SaveSystem.CurrentSave != null)
|
||||
{
|
||||
|
||||
lbtime.Text = Applications.Terminal.GetTime();
|
||||
lbtime.Left = pnlnotifications.Width - lbtime.Width - LoadedSkin.DesktopPanelClockFromRight.X;
|
||||
lbtime.Top = LoadedSkin.DesktopPanelClockFromRight.Y;
|
||||
|
@ -230,27 +256,6 @@ namespace ShiftOS.WinForms
|
|||
};
|
||||
time.Start();
|
||||
|
||||
var ssThread = new Thread(() =>
|
||||
{
|
||||
while(this.Visible == true)
|
||||
{
|
||||
var mousePos = Cursor.Position;
|
||||
while(Cursor.Position == mousePos)
|
||||
{
|
||||
if(millisecondsUntilScreensaver <= 0)
|
||||
{
|
||||
ShowScreensaver();
|
||||
}
|
||||
millisecondsUntilScreensaver--;
|
||||
Thread.Sleep(1);
|
||||
}
|
||||
millisecondsUntilScreensaver = 300000;
|
||||
HideScreensaver();
|
||||
}
|
||||
});
|
||||
ssThread.IsBackground = true;
|
||||
ssThread.Start();
|
||||
|
||||
this.DoubleBuffered = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -190,7 +190,7 @@ namespace ShiftOS.Engine
|
|||
ServerManager.Disconnect();
|
||||
Desktop.InvokeOnWorkerThread(() =>
|
||||
{
|
||||
Environment.Exit(0); //bye bye
|
||||
Process.GetCurrentProcess().Kill(); //bye bye
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue