mirror of
https://github.com/HistacomUnity/Histacom2-old.git
synced 2025-01-22 09:02:01 -05:00
start of webchat1999 script
This commit is contained in:
parent
21eb98e352
commit
13db16e701
4 changed files with 100 additions and 13 deletions
|
@ -303,11 +303,9 @@ private void desktopicons_DoubleClick(object sender, EventArgs e)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// It is an actual file on the disk
|
// It is an actual file on the disk
|
||||||
|
|
||||||
WinClassicWindowsExplorer we = new WinClassicWindowsExplorer();
|
WinClassicWindowsExplorer we = new WinClassicWindowsExplorer();
|
||||||
|
|
||||||
// If it is a directory
|
// If it is a directory
|
||||||
|
|
||||||
if (Directory.Exists(objListViewItem.Tag.ToString()))
|
if (Directory.Exists(objListViewItem.Tag.ToString()))
|
||||||
{
|
{
|
||||||
we.CurrentDirectory = objListViewItem.Tag.ToString();
|
we.CurrentDirectory = objListViewItem.Tag.ToString();
|
||||||
|
@ -317,13 +315,7 @@ private void desktopicons_DoubleClick(object sender, EventArgs e)
|
||||||
app.BringToFront();
|
app.BringToFront();
|
||||||
startmenu.Hide();
|
startmenu.Hide();
|
||||||
}
|
}
|
||||||
else
|
else we.OpenFile(objListViewItem.Tag.ToString()); // Just open the file...
|
||||||
{
|
|
||||||
// Just open the file...
|
|
||||||
|
|
||||||
we.OpenFile(objListViewItem.Tag.ToString());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -338,10 +330,10 @@ private void infoboxTestToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
}
|
}
|
||||||
private void WebChatToolStripMenuItem_Click(object sender, EventArgs e)
|
private void WebChatToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
WebChat1998 wc = new WebChat1998();
|
WebChat1999 wc = new WebChat1999();
|
||||||
WinClassic app = wm.Init(wc, "Web Chat 1998", null, true, true);
|
WinClassic app = wm.Init(wc, "Web Chat 1999", null, true, true);
|
||||||
|
|
||||||
AddTaskBarItem(app, app.Tag.ToString(), "Web Chat 1998", null);
|
AddTaskBarItem(app, app.Tag.ToString(), "Web Chat 1999", null);
|
||||||
|
|
||||||
app.BringToFront();
|
app.BringToFront();
|
||||||
startmenu.Hide();
|
startmenu.Hide();
|
||||||
|
|
|
@ -66,6 +66,7 @@ private void InitializeComponent()
|
||||||
this.button2.Size = new System.Drawing.Size(71, 20);
|
this.button2.Size = new System.Drawing.Size(71, 20);
|
||||||
this.button2.TabIndex = 16;
|
this.button2.TabIndex = 16;
|
||||||
this.button2.Text = "Speak";
|
this.button2.Text = "Speak";
|
||||||
|
this.button2.Click += new System.EventHandler(this.button2_Click);
|
||||||
//
|
//
|
||||||
// label7
|
// label7
|
||||||
//
|
//
|
||||||
|
@ -210,6 +211,7 @@ private void InitializeComponent()
|
||||||
this.button1.Size = new System.Drawing.Size(151, 23);
|
this.button1.Size = new System.Drawing.Size(151, 23);
|
||||||
this.button1.TabIndex = 4;
|
this.button1.TabIndex = 4;
|
||||||
this.button1.Text = "Login";
|
this.button1.Text = "Login";
|
||||||
|
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||||
//
|
//
|
||||||
// label3
|
// label3
|
||||||
//
|
//
|
||||||
|
@ -270,6 +272,7 @@ private void InitializeComponent()
|
||||||
this.Controls.Add(this.listBox1);
|
this.Controls.Add(this.listBox1);
|
||||||
this.Name = "WebChat1999";
|
this.Name = "WebChat1999";
|
||||||
this.Size = new System.Drawing.Size(724, 462);
|
this.Size = new System.Drawing.Size(724, 462);
|
||||||
|
this.Load += new System.EventHandler(this.WebChat1999_Load);
|
||||||
this.panel1.ResumeLayout(false);
|
this.panel1.ResumeLayout(false);
|
||||||
this.login.ResumeLayout(false);
|
this.login.ResumeLayout(false);
|
||||||
this.login.PerformLayout();
|
this.login.PerformLayout();
|
||||||
|
|
|
@ -7,14 +7,105 @@
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using System.Media;
|
||||||
|
using Histacom2.Engine;
|
||||||
|
using Histacom2.Engine.Template;
|
||||||
|
|
||||||
namespace Histacom2.OS.Win98.Win98Apps
|
namespace Histacom2.OS.Win98.Win98Apps
|
||||||
{
|
{
|
||||||
public partial class WebChat1999 : UserControl
|
public partial class WebChat1999 : UserControl
|
||||||
{
|
{
|
||||||
|
WindowManager wm = new WindowManager();
|
||||||
|
|
||||||
|
SoundPlayer join = new SoundPlayer(Properties.Resources.AIMbuddyjoin);
|
||||||
|
SoundPlayer leave = new SoundPlayer(Properties.Resources.AIMbuddyleave);
|
||||||
|
SoundPlayer send = new SoundPlayer(Properties.Resources.AIMmessagesent);
|
||||||
|
SoundPlayer receive = new SoundPlayer(Properties.Resources.AIMmessagereceived);
|
||||||
|
SoundPlayer file = new SoundPlayer(Properties.Resources.AIMfile);
|
||||||
|
|
||||||
|
int chatStage = 0;
|
||||||
|
|
||||||
public WebChat1999()
|
public WebChat1999()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void WebChat1999_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
button5.Hide();
|
||||||
|
label5.Hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (txtscreenname.Text == "") { wm.StartInfobox95("Invalid Username", "Your username cannot be blank.", InfoboxType.Warning, InfoboxButtons.OK); return; }
|
||||||
|
if (txtscreenname.Text.Length > 12) { wm.StartInfobox95("Invalid Username", "Your username needs to be less than 12 characters.", InfoboxType.Warning, InfoboxButtons.OK); return; }
|
||||||
|
if (txtscreenname.Text.Contains(" ")) { wm.StartInfobox95("Invalid Username", "Your username cannot contain spaces.", InfoboxType.Warning, InfoboxButtons.OK); return; }
|
||||||
|
if (txtscreenname.Text == "SkyHigh" | txtscreenname.Text == "rain49" | txtscreenname.Text == "12padams") { wm.StartInfobox95("Invalid Username", "That username is already taken.", InfoboxType.Warning, InfoboxButtons.OK); return; }
|
||||||
|
ParentForm.AcceptButton = button2;
|
||||||
|
TitleScreen.username = txtscreenname.Text;
|
||||||
|
login.Hide();
|
||||||
|
listBox1.Items.Add(TitleScreen.username);
|
||||||
|
listBox1.Items.Add("ThatDude");
|
||||||
|
history.AppendText("System: " + TitleScreen.username + " has joined the chat." + Environment.NewLine); join.Play();
|
||||||
|
chatScript1();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void chatScript1()
|
||||||
|
{
|
||||||
|
await Task.Delay(2000);
|
||||||
|
history.AppendText("ThatDude: oh hello!" + Environment.NewLine); receive.Play();
|
||||||
|
await Task.Delay(5500);
|
||||||
|
history.AppendText("ThatDude: just wondering, are you that guy who travelled thru time with nothing but a computer?" + Environment.NewLine); receive.Play();
|
||||||
|
await Task.Delay(250);
|
||||||
|
chatStage = 1;
|
||||||
|
await Task.Delay(7000);
|
||||||
|
if (chatStage == 1) { chatStage = 4; chatScript2(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void chatScript2()
|
||||||
|
{
|
||||||
|
if (chatStage == 2)
|
||||||
|
{
|
||||||
|
await Task.Delay(3000);
|
||||||
|
history.AppendText("ThatDude: omg really??" + Environment.NewLine); receive.Play();
|
||||||
|
await Task.Delay(4000);
|
||||||
|
history.AppendText("ThatDude: hold on, let me check your ip to make sure" + Environment.NewLine); receive.Play();
|
||||||
|
}
|
||||||
|
else if (chatStage == 3)
|
||||||
|
{
|
||||||
|
await Task.Delay(2800);
|
||||||
|
history.AppendText("ThatDude: oh.." + Environment.NewLine); receive.Play();
|
||||||
|
await Task.Delay(5500);
|
||||||
|
history.AppendText("ThatDude: lemme just check your ip quick to find out who ya are tho" + Environment.NewLine); receive.Play();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
await Task.Delay(3300);
|
||||||
|
history.AppendText("ThatDude: hold on, let me just check your ip real quick" + Environment.NewLine); receive.Play();
|
||||||
|
}
|
||||||
|
await Task.Delay(5000);
|
||||||
|
history.AppendText("ThatDude: YES! ITS YOU!" + Environment.NewLine); receive.Play();
|
||||||
|
await Task.Delay(3500);
|
||||||
|
history.AppendText("ThatDude: hey just wait a sec here" + Environment.NewLine); receive.Play();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button2_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string msg = typechat.Text;
|
||||||
|
if (typechat.Text != "") history.AppendText(TitleScreen.username + ": " + typechat.Text + Environment.NewLine);
|
||||||
|
typechat.Text = ""; send.Play();
|
||||||
|
|
||||||
|
switch (chatStage)
|
||||||
|
{
|
||||||
|
case 1: // td asks are you the time distorter guy
|
||||||
|
if (msg.Contains("yes") | msg.Contains("yea") | msg.Contains("yep") | msg.Contains("thats me") | msg.Contains("that's me")) chatStage = 2;
|
||||||
|
else if (msg.Contains("no") | msg.Contains("nope") | msg.Contains("not")) chatStage = 3;
|
||||||
|
else chatStage = 4;
|
||||||
|
|
||||||
|
chatScript2();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,7 +118,8 @@
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<data name="textBox1.Text" xml:space="preserve">
|
<data name="textBox1.Text" xml:space="preserve">
|
||||||
<value>If you do not agree to the following rules below DO NOT log into the chat:
|
<value>
|
||||||
|
If you do not agree to the following rules below DO NOT log into the chat:
|
||||||
|
|
||||||
No Bullying
|
No Bullying
|
||||||
No Swearing
|
No Swearing
|
||||||
|
|
Loading…
Reference in a new issue