webchat98 things

This commit is contained in:
lempamo 2017-03-31 20:22:59 -04:00
parent 586f0f7408
commit 7841180fc0
10 changed files with 53 additions and 6 deletions

Binary file not shown.

View file

@ -7,7 +7,7 @@
namespace TimeHACK.Engine
{
class WCMessageParser
public class WCMessageParser
{
public string ParseMessage(string json, int index, string user)
{

View file

@ -322,6 +322,7 @@ private void InitializeComponent()
this.NetMeetingToolStripMenuItem.Name = "NetMeetingToolStripMenuItem";
this.NetMeetingToolStripMenuItem.Size = new System.Drawing.Size(229, 22);
this.NetMeetingToolStripMenuItem.Text = "NetMeeting";
this.NetMeetingToolStripMenuItem.Click += new System.EventHandler(this.WebChatToolStripMenuItem_Click);
//
// MultimediaToolStripMenuItem
//

View file

@ -4,6 +4,7 @@
using System.Media;
using System.Windows.Forms;
using TimeHACK.Engine;
using TimeHACK.OS.Win95.Win95Apps;
using TimeHACK.WinClassicForms;
namespace TimeHACK.OS.Win95
@ -185,6 +186,13 @@ private void infoboxTestToolStripMenuItem_Click(object sender, EventArgs e)
{
wm.startInfobox95("AShifter's Infobox", "This is the very first TimeHACK Infobox. It's really easy to call, too! \n Just use wm.startInfobox95(String title, String text)!");
}
private void WebChatToolStripMenuItem_Click(object sender, EventArgs e)
{
WebChat1998 wc = new WebChat1998();
Engine.Template.WinClassic app = wm.startWin95(wc, "Web Chat 1998", null, true, true);
app.BringToFront();
startmenu.Hide();
}
}
}

View file

@ -29,7 +29,7 @@ protected override void Dispose(bool disposing)
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WebChat1998));
this.resources = new System.ComponentModel.ComponentResourceManager(typeof(WebChat1998));
this.Chat = new System.Windows.Forms.Timer(this.components);
this.listBox1 = new System.Windows.Forms.ListBox();
this.label1 = new System.Windows.Forms.Label();
@ -302,5 +302,6 @@ private void InitializeComponent()
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.ComponentModel.ComponentResourceManager resources;
}
}

View file

@ -8,6 +8,7 @@
using System.Threading.Tasks;
using System.Windows.Forms;
using TimeHACK.Engine;
using System.Threading;
namespace TimeHACK.OS.Win95.Win95Apps
{
@ -29,7 +30,28 @@ private void Button1_Click(object sender, EventArgs e)
if (txtscreenname.Text == "")
{
WindowManager wm = new WindowManager();
wm.startInfobox95("test", "test");
wm.startInfobox95("Invalid Username", "Your username cannot be blank.");
return;
}
TitleScreen.username = txtscreenname.Text;
login.Hide();
listBox1.Items.Add(TitleScreen.username);
chatLoop();
}
private void chatLoop()
{
WCMessageParser wcmp = new WCMessageParser();
Thread.Sleep(15000);
for (int i = 0; i < 200; i++)
{
history.Text = wcmp.ParseMessage(resources.GetString("convo"), i, TitleScreen.username);
switch (wcmp.GetSpecial(resources.GetString("convo"), i))
{
default:
break;
}
Thread.Sleep(wcmp.GetMessageDelay(resources.GetString("convo"), i));
}
}
}

View file

@ -148,9 +148,23 @@
{
"user": "SkyHigh",
"delay": 6000,
"message": "hmm... how about we play a game while we wait for my friend to come",
"message": "hmm... how about we play a game while we wait for my friend to come?",
"special": null,
"userchat": true
},
{
"user": "SkyHigh",
"delay": 5000,
"message": "alright, go ahead and guess what my name is!",
"special": null,
"userchat": true
},
{
"user": "SkyHigh",
"delay": 500,
"message": "ill make 2 buttons pop up, you click the one you want to guess",
"special": "nameguess",
"userchat": true
}
]
}</value>

View file

@ -1,4 +1,4 @@
namespace TimeHACK.WinClassicForms
namespace TimeHACK.OS.Win95.Win95Apps
{
partial class WinClassicIE4
{

View file

@ -5,7 +5,7 @@
using System.Windows.Forms;
using TimeHACK.Engine;
namespace TimeHACK.WinClassicForms
namespace TimeHACK.OS.Win95.Win95Apps
{
public partial class WinClassicIE4 : UserControl
{

View file

@ -11,6 +11,7 @@ public partial class TitleScreen : Form
{
public static System.Drawing.Text.PrivateFontCollection pfc = new System.Drawing.Text.PrivateFontCollection();
public static Windows95 frm95;
public static string username;
public TitleScreen()
{