在我的控制器中,我有以下代码在update方法中触发websockets事件:
WebsocketRails[recipient.id].trigger "new_activity", "Shared" if recipient.online?
如何测试我的控制器是否正在触发此事件?
答案 0 :(得分:1)
Stream scriptelfen;
OpenFileDialog openFileDialog1 = new OpenFileDialog();
if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
if((scriptelfen = openFileDialog1.OpenFile())!= null)
{
string strfilename = openFileDialog1.FileName;
string filetext = File.ReadAllText(strfilename);
script_box.Text = filetext;