Esempio n. 1
0
 public frmMain()
 {
     InitializeComponent ();
     chatForms = new Dictionary<string,frmChat> ();
     frmLogin frmLogin = new frmLogin ();
     if (frmLogin.ShowDialog () != System.Windows.Forms.DialogResult.OK) {
         this.Close ();
         Application.Exit ();
         return;
     }
     session = new LivecodingSession (LiveCodingChat.LoginFactory.Instance.CreateInstance(frmLogin.LoginMethod),frmLogin.Username);
     session.PasswordRequested += (object sender, ref string Password) => Password = frmLogin.Password;
     session.SessionAutenticated += Session_SessionAutenticated;;
     session.EnsureAuthenticated ();
 }
Esempio n. 2
0
        public static void Main(string[] args)
        {
            string dir = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly ().Location);
            try{
                player = new System.Media.SoundPlayer (System.IO.Path.Combine (dir, "sound.wav"));
                player.Load();
            }
            catch(Exception ex){player = null;}
            run = true;
            string username;
            Console.Write ("Username:");
            username = Console.ReadLine ();

            session = new LiveCodingChat.Livecoding.LivecodingSession (ReadLoginMethod(),username);
            session.PasswordRequested += Session_PasswordRequested;
            session.SessionAutenticated += Session_SessionAutenticated;
            session.EnsureAuthenticated ();
            while (run) {//TODO: wird eine gui anwendung :P
                System.Threading.Thread.Sleep (10);
            }
        }
Esempio n. 3
0
 public ChatRoom(LivecodingSession session,string id)
 {
     this.Session = session;
     this.ID = id;
 }