public ConverstationWindow(Contact c, JustTalk mainWind) { InitializeComponent(); this.contact = c; mainWindow = mainWind; this.Text = contact.Name + " - JustTalk"; username = Properties.Settings.Default.Username; // Initialize font, colors and size stringBuilder = new StringBuilder(@"{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}{\colortbl ;\red75\green100\blue165;\red155\green155\blue155;}\fs16"); if(!contact.StatusMessage.Equals("Chat")) this.ReceiveMessage(contact.Name, contact.StatusMessage, 2); if(contact.Status != Status.chat) this.ReceiveMessage(contact.Name, messages[(int)contact.Status - 1], 2); }
public GroupchatWindow(String groupName, String nick, JustTalk gui) { InitializeComponent(); this.groupName = groupName; this.Text = groupName + " - Group Chat as " + nick; this.nick = nick; this.gui = gui; members = new Dictionary<string, Member>(); this.ReceivePresence(nick, Goodware.Jabber.GUI.Show.chat, ""); stringBuilder = new StringBuilder(@"{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}{\colortbl ;"); foreach(Color c in colors) { stringBuilder.Append(@"\red" + c.R + @"\green" + c.G + @"\blue" + c.B + ";"); } stringBuilder.Append(@"}\fs16"); }
public GroupchatWindow(String groupName, String nick, JustTalk gui) { InitializeComponent(); this.groupName = groupName; this.Text = groupName + " - Group Chat as " + nick; this.nick = nick; this.gui = gui; members = new Dictionary <string, Member>(); this.ReceivePresence(nick, Goodware.Jabber.GUI.Show.chat, ""); stringBuilder = new StringBuilder(@"{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}{\colortbl ;"); foreach (Color c in colors) { stringBuilder.Append(@"\red" + c.R + @"\green" + c.G + @"\blue" + c.B + ";"); } stringBuilder.Append(@"}\fs16"); }
public ConverstationWindow(Contact c, JustTalk mainWind) { InitializeComponent(); this.contact = c; mainWindow = mainWind; this.Text = contact.Name + " - JustTalk"; username = Properties.Settings.Default.Username; // Initialize font, colors and size stringBuilder = new StringBuilder(@"{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}{\colortbl ;\red75\green100\blue165;\red155\green155\blue155;}\fs16"); if (!contact.StatusMessage.Equals("Chat")) { this.ReceiveMessage(contact.Name, contact.StatusMessage, 2); } if (contact.Status != Status.chat) { this.ReceiveMessage(contact.Name, messages[(int)contact.Status - 1], 2); } }
public JabberModel(JustTalk gui) { this.gui = gui; packetQueue = new PacketQueue(); queueThread = new QueueThread(packetQueue); queueThread.addPacketListener(new OpenStreamHandler(), "stream:stream"); queueThread.addPacketListener(new CloseStreamHandler(this), "/stream:stream"); queueThread.addPacketListener(new MessageHandler(this), "message"); //Додадено од Милош/Васко queueThread.addPacketListener(new AuthHandler(this), "jabber:iq:auth"); queueThread.addPacketListener(new IQHandler(this), "iq"); //Крај додадено //marko queueThread.addPacketListener(new RosterHandler(this), "jabber:iq:roster"); //kraj marko queueThread.addPacketListener(new PresenceHandler(this), "presence"); queueThread.addPacketListener(new RegisterHandler(this), "jabber:iq:register"); queueThread.setDaemon(true); queueThread.start(); }