Send chat with old session
This commit is contained in:
@@ -50,7 +50,7 @@ namespace ErgometerDoctorApplication
|
|||||||
window.Invoke(window.updateMetingen, new Object[] { command.Meting });
|
window.Invoke(window.updateMetingen, new Object[] { command.Meting });
|
||||||
break;
|
break;
|
||||||
case NetCommand.CommandType.CHAT:
|
case NetCommand.CommandType.CHAT:
|
||||||
ChatMessage chat = new ChatMessage(command.DisplayName, command.ChatMessage, false);
|
ChatMessage chat = new ChatMessage(command.DisplayName, command.ChatMessage, command.IsDoctor);
|
||||||
Chat.Add(chat);
|
Chat.Add(chat);
|
||||||
window.panelClientChat.Invoke(window.panelClientChat.passChatMessage, new Object[] { chat });
|
window.panelClientChat.Invoke(window.panelClientChat.passChatMessage, new Object[] { chat });
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ namespace ErgometerDoctorApplication
|
|||||||
private System.Windows.Forms.Panel panel2;
|
private System.Windows.Forms.Panel panel2;
|
||||||
private System.Windows.Forms.Label label1;
|
private System.Windows.Forms.Label label1;
|
||||||
private System.Windows.Forms.Panel panel1;
|
private System.Windows.Forms.Panel panel1;
|
||||||
private System.Windows.Forms.Button button1;
|
public System.Windows.Forms.Button button1;
|
||||||
private System.Windows.Forms.RichTextBox richTextBox1;
|
public System.Windows.Forms.RichTextBox richTextBox1;
|
||||||
private System.Windows.Forms.Label label2;
|
private System.Windows.Forms.Label label2;
|
||||||
private System.Windows.Forms.Panel panel3;
|
private System.Windows.Forms.Panel panel3;
|
||||||
private System.Windows.Forms.Label connectionLabel;
|
private System.Windows.Forms.Label connectionLabel;
|
||||||
@@ -153,7 +153,7 @@ namespace ErgometerDoctorApplication
|
|||||||
if (richTextBox1.TextLength > 1)
|
if (richTextBox1.TextLength > 1)
|
||||||
{
|
{
|
||||||
AddChatItem(new ChatMessage("Doctor", richTextBox1.Text, true));
|
AddChatItem(new ChatMessage("Doctor", richTextBox1.Text, true));
|
||||||
MainClient.SendNetCommand(new NetCommand(richTextBox1.Text, Session));
|
MainClient.SendNetCommand(new NetCommand(richTextBox1.Text, true, Session));
|
||||||
richTextBox1.ResetText();
|
richTextBox1.ResetText();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,8 +42,11 @@ namespace ErgometerDoctorApplication
|
|||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
if (!ActiveSession)
|
if(! ActiveSession)
|
||||||
panelClientChat.Visible = false;
|
{
|
||||||
|
panelClientChat.richTextBox1.Enabled = false;
|
||||||
|
panelClientChat.button1.Enabled = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ClientApplicatie_Resize(object sender, EventArgs e)
|
public void ClientApplicatie_Resize(object sender, EventArgs e)
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ namespace ErgometerDoctorApplication
|
|||||||
loggedin = true;
|
loggedin = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
SendNetCommand(new NetCommand(NetCommand.RequestType.USERS, Session));
|
//SendNetCommand(new NetCommand(NetCommand.RequestType.USERS, Session));
|
||||||
SendNetCommand(new NetCommand(NetCommand.RequestType.SESSIONDATA, Session));
|
SendNetCommand(new NetCommand(NetCommand.RequestType.SESSIONDATA, Session));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -256,6 +256,7 @@ namespace ErgometerDoctorApplication
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
SendNetCommand(new NetCommand(NetCommand.RequestType.OLDDATA, session));
|
SendNetCommand(new NetCommand(NetCommand.RequestType.OLDDATA, session));
|
||||||
|
SendNetCommand(new NetCommand(NetCommand.RequestType.CHAT, session));
|
||||||
|
|
||||||
//Start new client
|
//Start new client
|
||||||
ClientThread cl = new ClientThread(name, session, true);
|
ClientThread cl = new ClientThread(name, session, true);
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ namespace ErgometerDoctorApplication
|
|||||||
this.HeaderLabel.Text = "Sessie geschiedenis";
|
this.HeaderLabel.Text = "Sessie geschiedenis";
|
||||||
conSessionHistory.BringToFront();
|
conSessionHistory.BringToFront();
|
||||||
|
|
||||||
MainClient.StartOldCLient("Test", 1148735907);
|
MainClient.StartOldCLient("Test", 1907047993);
|
||||||
}
|
}
|
||||||
public void validateLogin()
|
public void validateLogin()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user