Merge pull request #20 from lempamo/master

webchat things
This commit is contained in:
lempamo 2017-03-31 17:50:35 -04:00 committed by GitHub
commit 9de6d029cc
6 changed files with 53 additions and 3 deletions

Binary file not shown.

View file

@ -13,12 +13,18 @@ public string ParseMessage(string json, int index, string user)
{
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<bool>()) 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<int>();
}
public string GetSpecial(string json, int index)
{
JObject message = JObject.Parse(JObject.Parse(json)["messages"][index].ToString());
return message["special"].ToString();
}
}
}

View file

@ -9,6 +9,7 @@ public class WindowManager
{
public static System.Drawing.Text.PrivateFontCollection pfc = new System.Drawing.Text.PrivateFontCollection();
public WinClassic startWin95(UserControl content, String title, PictureBox icon, Boolean MaxButton, Boolean MinButton)
{
// Setup Window

View file

@ -269,6 +269,7 @@ private void InitializeComponent()
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);

View file

@ -16,5 +16,12 @@ public WebChat1998()
{
InitializeComponent();
}
private void WebChat1998_Load(object sender, EventArgs e)
{
button5.Hide();
button4.Hide();
button3.Hide();
label5.Hide();
}
}
}

View file

@ -117,9 +117,44 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="Chat.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="Chat.TrayLocation" type="System.Drawing.Point, System.Drawing">
<value>17, 17</value>
</metadata>
</data>
<data name="convo" xml:space="preserve">
<value>{
"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
}
]
}</value>
</data>
<data name="textBox1.Text" xml:space="preserve">
<value>If you do not agree to the following rules below DO NOT log into the chat: