Beispiel #1
0
  /** ChatIM constructor. 
   *  @param core the main application
   *  @param r_add the recipient address
   */
  public BrunetChatIM(User u, Buddy bud, BrunetChatMain bcm)
  {
    _user = u;
    _recipient_buddy = bud;
    _bcm = bcm;
    
    string fname = "BrunetChat.glade";
    string root = "windowBrunetChatIM";

    Glade.XML gxml = new Glade.XML (fname, root, null);
    //Glade.XML gxml = new Glade.XML (null,fname, root, null);
    gxml.Autoconnect(this);
    
    _text_buf_display = textviewDisplay.Buffer;
    _text_buf_input = textviewInput.Buffer;
    _text_buf_recipient = textviewRecipient.Buffer;
    _text_buf_recipient.Text = _recipient_buddy.Alias;
    Gdk.Color red_color = new Gdk.Color (0xff, 0, 0);
    Gdk.Color blue_color = new Gdk.Color (0, 0, 0xff);
    
    TextTag sendercolor = new TextTag("Sender Color");
    sendercolor.ForegroundGdk = blue_color;
    
    TextTag recipientcolor = new TextTag("Recipient Color");
    recipientcolor.ForegroundGdk = red_color;
    _text_buf_display.TagTable.Add(sendercolor);
    _text_buf_display.TagTable.Add(recipientcolor);
    
  }
Beispiel #2
0
 /** Main program. Logs in the user and creates the main window.
  */
 public static void Main (string[] args)
 {
   if (args.Length < 0){
     Console.WriteLine ("Usage:");
     return;
   }
   
   Threads.Init();
   Application.Init();
   
   ChatConfigSerialization chat_config = 
     new ChatConfigSerialization("Users.xml");
   
   chat_config.DeserializeUserList();  
   BrunetChatLogin dialog = new BrunetChatLogin(chat_config);
    
   dialog.dialogBrunetChatLogin.Run();
   
   if( false == dialog.userStrings.Contains(dialog.ComboEmail) )
   {
     chat_config.UserList.Prepend(new User("alias",dialog.ComboEmail,true) );
     chat_config.SerializeUserList();
   }
   
   BrunetChatMain app = new BrunetChatMain(dialog.CurrentUser(),chat_config);
   
   dialog.dialogBrunetChatLogin.Hide();
 
   Application.Run();
   app._store = null;
 }