From 27419aa0dce06f9af5ee28f64aace365dcb7d816 Mon Sep 17 00:00:00 2001 From: lempamo Date: Fri, 31 Mar 2017 17:44:01 -0400 Subject: webchat things --- .vs/TimeHACK/v14/.suo | Bin 122368 -> 122368 bytes TimeHACK.Engine/WCMessageParser.cs | 8 ++++- TimeHACK.Engine/WindowManager.cs | 2 +- .../OS/Win95/Win95Apps/WebChat1998.Designer.cs | 1 + TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs | 7 ++++ TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.resx | 39 +++++++++++++++++++-- 6 files changed, 53 insertions(+), 4 deletions(-) diff --git a/.vs/TimeHACK/v14/.suo b/.vs/TimeHACK/v14/.suo index 363d666..c679976 100644 Binary files a/.vs/TimeHACK/v14/.suo and b/.vs/TimeHACK/v14/.suo differ diff --git a/TimeHACK.Engine/WCMessageParser.cs b/TimeHACK.Engine/WCMessageParser.cs index ed16afd..44c9002 100644 --- a/TimeHACK.Engine/WCMessageParser.cs +++ b/TimeHACK.Engine/WCMessageParser.cs @@ -13,12 +13,18 @@ namespace TimeHACK.Engine { JObject message = JObject.Parse(JObject.Parse(json)["messages"][index].ToString()); string newmsg = message["message"].ToString().Replace("@user", user); - return message["user"].ToString() + ": " + newmsg; + if (message["userchat"].ToObject()) return message["user"].ToString() + ": " + newmsg; + else return newmsg; } public int GetMessageDelay(string json, int index) { JObject message = JObject.Parse(JObject.Parse(json)["messages"][index].ToString()); return message["delay"].ToObject(); } + public string GetSpecial(string json, int index) + { + JObject message = JObject.Parse(JObject.Parse(json)["messages"][index].ToString()); + return message["special"].ToString(); + } } } diff --git a/TimeHACK.Engine/WindowManager.cs b/TimeHACK.Engine/WindowManager.cs index 193985a..4a1cf4e 100644 --- a/TimeHACK.Engine/WindowManager.cs +++ b/TimeHACK.Engine/WindowManager.cs @@ -9,7 +9,7 @@ namespace TimeHACK.Engine { public static System.Drawing.Text.PrivateFontCollection pfc = new System.Drawing.Text.PrivateFontCollection(); - public WinClassic startWinClassic(UserControl content, String title, PictureBox icon, Boolean MaxButton, Boolean MinButton) + public WinClassic startWinClassic(UserControl content, string title, PictureBox icon, bool MaxButton, bool MinButton) { // Setup Window WinClassic app = new WinClassic(); diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.Designer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.Designer.cs index c3a5964..80aab11 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.Designer.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.Designer.cs @@ -269,6 +269,7 @@ this.Controls.Add(this.listBox1); this.Name = "WebChat1998"; this.Size = new System.Drawing.Size(724, 462); + this.Load += new System.EventHandler(this.WebChat1998_Load); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); this.login.ResumeLayout(false); diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs index ce87665..3f4810e 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs @@ -16,5 +16,12 @@ namespace TimeHACK.OS.Win95.Win95Apps { InitializeComponent(); } + private void WebChat1998_Load(object sender, EventArgs e) + { + button5.Hide(); + button4.Hide(); + button3.Hide(); + label5.Hide(); + } } } diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.resx b/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.resx index 61225ed..cb2c52a 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.resx +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.resx @@ -117,9 +117,44 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + 17, 17 - + + + { + "messages": [ + { + "user": "System", + "delay": 5000, + "message": "SkyHigh has joined the chat.", + "special": "addsh", + "userchat": true + }, + { + "user": "SkyHigh", + "delay": 6000, + "message": "damn", + "special": null, + "userchat": true + }, + { + "user": "SkyHigh", + "delay": 6000, + "message": "I thought my friend rain49 was going to be on...", + "special": null, + "userchat": true + }, + { + "user": "SkyHigh", + "delay": 6000, + "message": "hmm... how about we play a game while we wait for my friend to come", + "special": null, + "userchat": true + } + ] +} + If you do not agree to the following rules below DO NOT log into the chat: -- cgit v1.2.3