Infobox SHOULD play a sound.

This commit is contained in:
Michael 2017-04-15 11:35:38 -04:00
parent 1a3a9b4a4c
commit 761202b490
12 changed files with 34184 additions and 31 deletions

View file

@ -33,7 +33,7 @@ Public Class SkinConverter
End Sub
Public Sub OnLoad() Implements IShiftOSWindow.OnLoad
Public Sub OnSOSLoad() Implements IShiftOSWindow.OnLoad
End Sub

View file

@ -28,9 +28,11 @@ using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Media;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Microsoft.VisualBasic.Devices;
using ShiftOS.Engine;
namespace ShiftOS.WinForms.Applications
@ -42,13 +44,15 @@ namespace ShiftOS.WinForms.Applications
public Dialog()
{
InitializeComponent();
}
}
public string Title { get; private set; }
public void OnLoad()
{
AppearanceManager.SetWindowTitle(this, this.Title);
//NOT EVEn THIS WORKS
new Computer().Audio.Play(Properties.Resources.infobox, Microsoft.VisualBasic.AudioPlayMode.Background);
}
public void OnSkinLoad()
@ -67,8 +71,8 @@ namespace ShiftOS.WinForms.Applications
internal void OpenInternal(string title, string msg)
{
AppearanceManager.SetupWindow(this);
Title = title;
AppearanceManager.SetupWindow(this);
lbmessage.Text = msg;
txtinput.Hide();
flyesno.Hide();
@ -91,8 +95,8 @@ namespace ShiftOS.WinForms.Applications
public void PromptTextInternal(string title, string message, Action<string> callback)
{
AppearanceManager.SetupWindow(this);
Title = title;
AppearanceManager.SetupWindow(this);
lbmessage.Text = message;
txtinput.Show();
flyesno.Hide();
@ -127,8 +131,8 @@ namespace ShiftOS.WinForms.Applications
public void PromptYesNoInternal(string title, string message, Action<bool> callback)
{
AppearanceManager.SetupWindow(this);
Title = title;
AppearanceManager.SetupWindow(this);
lbmessage.Text = message;
txtinput.Hide();
flyesno.Show();

View file

@ -378,7 +378,6 @@ namespace ShiftOS.WinForms
{
string usr = args["user"].ToString();
string sys = args["sys"].ToString();
bool received = false;
ServerMessageReceived msgReceived = null;
Console.WriteLine("--hooking system thread...");
@ -404,14 +403,12 @@ namespace ShiftOS.WinForms
Console.WriteLine(sve.Password);
Console.WriteLine();
Console.WriteLine("--password breached. Operation took " + sw.ElapsedMilliseconds + " milliseconds.");
received = true;
ServerManager.MessageReceived -= msgReceived;
TerminalBackend.PrintPrompt();
}
else if(msg.Name == "user_data_not_found")
{
Console.WriteLine("--access denied.");
received = true;
ServerManager.MessageReceived -= msgReceived;
TerminalBackend.PrintPrompt();
}
@ -444,7 +441,6 @@ namespace ShiftOS.WinForms
string usr = args["user"].ToString();
string sys = args["sys"].ToString();
string pass = args["pass"].ToString();
bool received = false;
ServerMessageReceived msgReceived = null;
Console.WriteLine("--hooking multi-user domain response call...");
@ -467,7 +463,6 @@ namespace ShiftOS.WinForms
{
Console.WriteLine("--access denied.");
}
received = true;
ServerManager.MessageReceived -= msgReceived;
TerminalBackend.PrintPrompt();
@ -475,7 +470,6 @@ namespace ShiftOS.WinForms
else if (msg.Name == "user_data_not_found")
{
Console.WriteLine("--access denied.");
received = true;
ServerManager.MessageReceived -= msgReceived;
TerminalBackend.PrintPrompt();
}
@ -509,7 +503,6 @@ namespace ShiftOS.WinForms
string sys = args["sys"].ToString();
string pass = args["pass"].ToString();
long amount = (long)args["amount"];
bool received = false;
if(amount < 0)
{
Console.WriteLine("--invalid codepoint amount - halting...");
@ -544,14 +537,12 @@ namespace ShiftOS.WinForms
{
Console.WriteLine("--access denied.");
}
received = true;
ServerManager.MessageReceived -= msgReceived;
TerminalBackend.PrintPrompt();
}
else if (msg.Name == "user_data_not_found")
{
Console.WriteLine("--access denied.");
received = true;
ServerManager.MessageReceived -= msgReceived;
TerminalBackend.PrintPrompt();
}

View file

@ -60,6 +60,15 @@ namespace ShiftOS.WinForms.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary>
internal static System.IO.UnmanagedMemoryStream _3beepvirus {
get {
return ResourceManager.GetStream("_3beepvirus", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -260,6 +269,15 @@ namespace ShiftOS.WinForms.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary>
internal static System.IO.UnmanagedMemoryStream dial_up_modem_02 {
get {
return ResourceManager.GetStream("dial_up_modem_02", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -909,6 +927,15 @@ namespace ShiftOS.WinForms.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary>
internal static System.IO.UnmanagedMemoryStream infobox {
get {
return ResourceManager.GetStream("infobox", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -922,7 +949,7 @@ namespace ShiftOS.WinForms.Properties {
/// <summary>
/// Looks up a localized string similar to [
/// &quot;english&quot;
/// &quot;deutsch - in beta&quot;
/// &quot;deutsch&quot;
///].
/// </summary>
internal static string languages {
@ -957,7 +984,7 @@ namespace ShiftOS.WinForms.Properties {
/// Name: &quot;NetXtreme Hyper Edition&quot;,
/// CostPerMonth: 1500,
/// DownloadSpeed: 524288, //512 kb/s
/// Description: &quot;It&apos;s time to supercharge your Shiftnet experience [rest of string was truncated]&quot;;.
/// Description: &quot;It&apos;s time to supercharge your Shif [rest of string was truncated]&quot;;.
/// </summary>
internal static string ShiftnetServices {
get {
@ -972,20 +999,15 @@ namespace ShiftOS.WinForms.Properties {
/// Name: &quot;Screensavers&quot;,
/// Cost: 750,
/// Description: &quot;Like to leave your PC idle for long periods of time? Save some energy and keep your screen from being tired by hiding the desktop behind a black screen with an image on it.&quot;,
/// Dependencies: &quot;desktop&quot;
/// Dependencies: &quot;desktop&quot;,
/// Category: &quot;Enhancements&quot;,
/// },
/// {
/// Name: &quot;Shift Screensavers&quot;,
/// Cost: 100,
/// Description: &quot;This Shifter upgrade will allow you to customize the screensaver.&quot;,
/// Dependencies: &quot;screensavers;shifter&quot;
/// },
///
///
///// CALCULATOR UPGRADES
/// {
/// Name: &quot;Calculator&quot;,
/// Cost: 100 [rest of string was truncated]&quot;;.
/// Dependencies: &quot;screensavers;shifter&quot;,
/// Category: &quot;Customiz [rest of string was truncated]&quot;;.
/// </summary>
internal static string Shiftorium {
get {
@ -995,7 +1017,7 @@ namespace ShiftOS.WinForms.Properties {
/// <summary>
/// Looks up a localized string similar to {\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi0\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
///{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\f38\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0302020204030204}Calibri Light;}{\flo [rest of string was truncated]&quot;;.
///{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\f38\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0302020204030204}Calibri Light;}{\fl [rest of string was truncated]&quot;;.
/// </summary>
internal static string ShiftOS {
get {
@ -1134,8 +1156,7 @@ namespace ShiftOS.WinForms.Properties {
///Eine kurze Erklärung wie du das Terminal benutzt lautet wiefolgt. Du kannst das command &apos;sos.help&apos; benutzen um eine Liste aller commands aufzurufen. Schreib es
///einfach in das Terminal und drücke &lt;enter&gt; um alle commands anzuzeigen.
///
///Commands können mit argumenten versehen werden, indem du ein key-value Paar in einem {} Block hinter dem command angibst. Zum Beispiel:
/// [rest of string was truncated]&quot;;.
///Commands können mit argumenten versehen werden, indem du ein key-value Paar in einem {} Block hinter dem command angibst. Zum Be [rest of string was truncated]&quot;;.
/// </summary>
internal static string strings_de {
get {
@ -1154,8 +1175,7 @@ namespace ShiftOS.WinForms.Properties {
///Commands can be sent arguments by specifying a key-value pair inside a {} block at the end of the command. For example:
///
///some.command{print:\&quot;hello\&quot;}
///math.add{op1:1,op2:2}
/// [rest of string was truncated]&quot;;.
///math.add{op1 [rest of string was truncated]&quot;;.
/// </summary>
internal static string strings_en {
get {
@ -1333,12 +1353,30 @@ namespace ShiftOS.WinForms.Properties {
/// &quot;Before you can begin with ShiftOS, you&apos;ll need to know a few things about it.&quot;,
/// &quot;One: Terminal command syntax.&quot;,
/// &quot;Inside ShiftOS, the bulk of your time is going to be spent within the Terminal.&quot;,
/// &quot;The Terminal is an application that starts up when you turn on your computer. It allows you to execute system commands, open program [rest of string was truncated]&quot;;.
/// &quot;The Terminal is an application that starts up when you turn on your computer. It allows you to execute system commands, ope [rest of string was truncated]&quot;;.
/// </summary>
internal static string sys_shiftoriumstory {
get {
return ResourceManager.GetString("sys_shiftoriumstory", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary>
internal static System.IO.UnmanagedMemoryStream typesound {
get {
return ResourceManager.GetStream("typesound", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary>
internal static System.IO.UnmanagedMemoryStream writesound {
get {
return ResourceManager.GetStream("writesound", resourceCulture);
}
}
}
}

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -37,6 +37,7 @@
<HintPath>..\packages\CommonMark.NET.0.15.0\lib\net45\CommonMark.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
@ -291,6 +292,7 @@
<Compile Include="Tools\DitheringEngine.cs" />
<Compile Include="Tools\ShiftOSMenuRenderer.cs" />
<Compile Include="TrailerCommands.cs" />
<Compile Include="VisualBasicStuff.cs" />
<Compile Include="WFLanguageProvider.cs" />
<Compile Include="Window.cs">
<SubType>UserControl</SubType>
@ -614,7 +616,12 @@
<None Include="Resources\SnakeyHeadR.png" />
<None Include="Resources\SnakeyFruit.png" />
<None Include="Resources\ShiftnetServices.txt" />
<None Include="Resources\3beepvirus.wav" />
<None Include="Resources\dial-up-modem-02.wav" />
<Content Include="Resources\fileiconcf.bmp" />
<None Include="Resources\infobox.wav" />
<None Include="Resources\typesound.wav" />
<None Include="Resources\writesound.wav" />
<Content Include="SystemIcons\iconArtpad.png" />
<Content Include="SystemIcons\iconAudioPlayer.png" />
<Content Include="SystemIcons\iconBitnoteDigger.png" />

View file

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualBasic.Devices;
namespace ShiftOS.WinForms
{
public static class My
{
static My()
{
_computer = new Computer();
}
private static Computer _computer;
public static Computer Computer
{
get
{
return _computer;
}
}
}
}