Beispiel #1
0
        public MainForm(CosurfEngine engine)
        {
            m_engine = engine;
            InitializeComponent();

            Application.ApplicationExit += new EventHandler(this.OnApplicationExit);
        }
Beispiel #2
0
 public void OnConnectionAccepted(CosurfEngine engine)
 {
     Console.WriteLine("CosurferForm::OnConnectionAccepted()");
     buttonConnect.Enabled = false;
     m_engine.LaunchBrowser();
     this.Text = "Cosurfer - Connected";
 }
Beispiel #3
0
        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);
        }
Beispiel #4
0
 public void OnIncomingChatLine(CosurfEngine engine, String chatLine)
 {
     textBox_chatContents.AppendText(chatLine);
     textBox_chatContents.AppendText("\r\n");
 }
Beispiel #5
0
 public void OnDisconnect(CosurfEngine engine)
 {
     Console.WriteLine("CosurferForm::OnDisconnect()");
     this.Text             = "Cosurfer - Disonnected";
     buttonConnect.Enabled = true;
 }
Beispiel #6
0
 public void OnStartListening(CosurfEngine engine, int port)
 {
     Console.WriteLine("CosurferForm::OnStartListening()");
     // set the caption dynamically
     this.Text = "Cosurfer - Listening on port :" + port;
 }