public MainForm(CosurfEngine engine) { m_engine = engine; InitializeComponent(); Application.ApplicationExit += new EventHandler(this.OnApplicationExit); }
public void OnConnectionAccepted(CosurfEngine engine) { Console.WriteLine("CosurferForm::OnConnectionAccepted()"); buttonConnect.Enabled = false; m_engine.LaunchBrowser(); this.Text = "Cosurfer - Connected"; }
public static void Main(string[] args) { ConnectionManager connectionManager = new ConnectionManager(); CosurfEngine engine = new CosurfEngine(connectionManager); MainForm mainForm = new MainForm(engine); connectionManager.AttachSink(engine); engine.AttachSink(mainForm); connectionManager.Listen(); Application.Run(mainForm); }
public void OnIncomingChatLine(CosurfEngine engine, String chatLine) { textBox_chatContents.AppendText(chatLine); textBox_chatContents.AppendText("\r\n"); }
public void OnDisconnect(CosurfEngine engine) { Console.WriteLine("CosurferForm::OnDisconnect()"); this.Text = "Cosurfer - Disonnected"; buttonConnect.Enabled = true; }
public void OnStartListening(CosurfEngine engine, int port) { Console.WriteLine("CosurferForm::OnStartListening()"); // set the caption dynamically this.Text = "Cosurfer - Listening on port :" + port; }