old_flsystem/FLSystem/Forms/plugin_debug.cs

55 lines
1.5 KiB
C#

using Api.Framework;
using Api.Framework.Events;
using Api.Framework.SDK;
using Api.Framework.Tools;
using System;
namespace FLSystem.Forms
{
public partial class plugin_debug : DevExpress.XtraEditors.XtraUserControl
{
public plugin_debug()
{
InitializeComponent();
foreach (ChatType t in Enum.GetValues(typeof(ChatType)))
{
this.comboBoxEdit1.Properties.Items.Add(t);
}
this.comboBoxEdit1.SelectedIndex = 0;
}
private void simpleButton1_Click(object sender, EventArgs e)
{
try
{
DebugEvent debug = new DebugEvent(sendmsg, this.maskedTextBox1.Text, this.maskedTextBox2.Text, this.richEditControl1.Text, Util.ConvertEnum<ChatType>(this.comboBoxEdit1.Text));
EventClient.OnEvent(this, debug);
}
catch (Exception ex)
{
UI.Framework.Forms.BaseForm.ShowError(ex);
}
}
private void sendmsg(string username, string message)
{
this.Invoke(new Action(delegate
{
try
{
this.richEditControl2.Text += message + "\r\n";
}
catch (Exception)
{
}
}));
}
private void simpleButton2_Click(object sender, EventArgs e)
{
this.richEditControl2.ResetText();
}
}
}