示例#1
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     Ident ident2 = new Ident();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
     this.sb = new System.Windows.Forms.StatusBar();
     this.pnlCon = new System.Windows.Forms.StatusBarPanel();
     this.pnlSSL = new System.Windows.Forms.StatusBarPanel();
     this.pnlPresence = new System.Windows.Forms.StatusBarPanel();
     this.tabControl1 = new System.Windows.Forms.TabControl();
     this.tpRoster = new System.Windows.Forms.TabPage();
     this.roster = new muzzle.RosterTree();
     this.jc = new JabberClient(this.components);
     this.pm = new PresenceManager(this.components);
     this.cm = new CapsManager(this.components);
     this.dm = new DiscoManager(this.components);
     this.rm = new RosterManager(this.components);
     this.tpServices = new System.Windows.Forms.TabPage();
     this.services = new Example.ServiceDisplay();
     this.tpBookmarks = new System.Windows.Forms.TabPage();
     this.lvBookmarks = new System.Windows.Forms.ListView();
     this.chName = new System.Windows.Forms.ColumnHeader();
     this.chNick = new System.Windows.Forms.ColumnHeader();
     this.chAutoJoin = new System.Windows.Forms.ColumnHeader();
     this.tpDebug = new System.Windows.Forms.TabPage();
     this.debug = new muzzle.XmppDebugger();
     this.mnuPresence = new System.Windows.Forms.ContextMenu();
     this.mnuAvailable = new System.Windows.Forms.MenuItem();
     this.mnuAway = new System.Windows.Forms.MenuItem();
     this.menuStrip1 = new System.Windows.Forms.MenuStrip();
     this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.connectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.joinConferenceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
     this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.servicesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.debugToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.rosterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.addContactToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.removeContactToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.addGroupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.bookmarkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.removeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.windowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.closeTabToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.pubSubToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.subscribePubSubToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.deletePubSubToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.psm = new PubSubManager(this.components);
     this.idler = new IdleTime();
     this.muc = new ConferenceManager(this.components);
     this.bmm = new BookmarkManager(this.components);
     ((System.ComponentModel.ISupportInitialize)(this.pnlCon)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pnlSSL)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pnlPresence)).BeginInit();
     this.tabControl1.SuspendLayout();
     this.tpRoster.SuspendLayout();
     this.tpServices.SuspendLayout();
     this.tpBookmarks.SuspendLayout();
     this.tpDebug.SuspendLayout();
     this.menuStrip1.SuspendLayout();
     this.SuspendLayout();
     //
     // sb
     //
     this.sb.Location = new System.Drawing.Point(0, 416);
     this.sb.Name = "sb";
     this.sb.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] {
     this.pnlCon,
     this.pnlSSL,
     this.pnlPresence});
     this.sb.ShowPanels = true;
     this.sb.Size = new System.Drawing.Size(632, 22);
     this.sb.TabIndex = 0;
     this.sb.PanelClick += new System.Windows.Forms.StatusBarPanelClickEventHandler(this.sb_PanelClick);
     //
     // pnlCon
     //
     this.pnlCon.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring;
     this.pnlCon.Name = "pnlCon";
     this.pnlCon.Text = "Click on \"Offline\", and select a presence to log in.";
     this.pnlCon.Width = 538;
     //
     // pnlSSL
     //
     this.pnlSSL.Alignment = System.Windows.Forms.HorizontalAlignment.Center;
     this.pnlSSL.Name = "pnlSSL";
     this.pnlSSL.Width = 30;
     //
     // pnlPresence
     //
     this.pnlPresence.Alignment = System.Windows.Forms.HorizontalAlignment.Right;
     this.pnlPresence.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Contents;
     this.pnlPresence.Name = "pnlPresence";
     this.pnlPresence.Text = "Offline";
     this.pnlPresence.Width = 47;
     //
     // tabControl1
     //
     this.tabControl1.Controls.Add(this.tpRoster);
     this.tabControl1.Controls.Add(this.tpServices);
     this.tabControl1.Controls.Add(this.tpBookmarks);
     this.tabControl1.Controls.Add(this.tpDebug);
     this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
     this.tabControl1.Location = new System.Drawing.Point(0, 24);
     this.tabControl1.Name = "tabControl1";
     this.tabControl1.SelectedIndex = 0;
     this.tabControl1.Size = new System.Drawing.Size(632, 392);
     this.tabControl1.TabIndex = 2;
     //
     // tpRoster
     //
     this.tpRoster.Controls.Add(this.roster);
     this.tpRoster.Location = new System.Drawing.Point(4, 22);
     this.tpRoster.Name = "tpRoster";
     this.tpRoster.Size = new System.Drawing.Size(624, 366);
     this.tpRoster.TabIndex = 1;
     this.tpRoster.Text = "Roster";
     this.tpRoster.UseVisualStyleBackColor = true;
     //
     // roster
     //
     this.roster.AllowDrop = true;
     this.roster.Client = this.jc;
     this.roster.Dock = System.Windows.Forms.DockStyle.Fill;
     this.roster.DrawMode = System.Windows.Forms.TreeViewDrawMode.OwnerDrawText;
     this.roster.ImageIndex = 1;
     this.roster.Location = new System.Drawing.Point(0, 0);
     this.roster.Name = "roster";
     this.roster.PresenceManager = this.pm;
     this.roster.RosterManager = this.rm;
     this.roster.SelectedImageIndex = 0;
     this.roster.ShowLines = false;
     this.roster.ShowRootLines = false;
     this.roster.Size = new System.Drawing.Size(624, 366);
     this.roster.Sorted = true;
     this.roster.StatusColor = System.Drawing.Color.Teal;
     this.roster.TabIndex = 0;
     this.roster.DoubleClick += new System.EventHandler(this.roster_DoubleClick);
     //
     // jc
     //
     this.jc.AutoReconnect = 3F;
     this.jc.AutoStartCompression = true;
     this.jc.AutoStartTLS = true;
     this.jc.InvokeControl = this;
     this.jc.KeepAlive = 30F;
     this.jc.LocalCertificate = null;
     this.jc.Password = null;
     this.jc.User = null;
     this.jc.OnRegisterInfo += new RegisterInfoHandler(this.jc_OnRegisterInfo);
     this.jc.OnError += new ExceptionHandler(this.jc_OnError);
     this.jc.OnIQ += new IQHandler(this.jc_OnIQ);
     this.jc.OnAuthenticate += new ObjectHandler(this.jc_OnAuthenticate);
     this.jc.OnStreamError += new ProtocolHandler(this.jc_OnStreamError);
     this.jc.OnConnect += new StanzaStreamHandler(this.jc_OnConnect);
     this.jc.OnDisconnect += new ObjectHandler(this.jc_OnDisconnect);
     this.jc.OnAuthError += new ProtocolHandler(this.jc_OnAuthError);
     this.jc.OnRegistered += new IQHandler(this.jc_OnRegistered);
     this.jc.OnMessage += new MessageHandler(this.jc_OnMessage);
     //
     // pm
     //
     this.pm.CapsManager = this.cm;
     this.pm.OverrideFrom = null;
     this.pm.Stream = this.jc;
     //
     // cm
     //
     this.cm.DiscoManager = this.dm;
     this.cm.Features = new string[0];
     this.cm.FileName = "caps.xml";
     ident2.Category = "client";
     ident2.Lang = "en";
     ident2.Name = "Jabber-Net Test Client";
     ident2.Type = "pc";
     this.cm.Identities = new Ident[] {
     ident2};
     this.cm.Node = "http://cursive.net/clients/csharp-example";
     this.cm.OverrideFrom = null;
     this.cm.Stream = this.jc;
     //
     // dm
     //
     this.dm.OverrideFrom = null;
     this.dm.Stream = this.jc;
     //
     // rm
     //
     this.rm.AutoAllow = AutoSubscriptionHanding.AllowIfSubscribed;
     this.rm.AutoSubscribe = true;
     this.rm.OverrideFrom = null;
     this.rm.Stream = this.jc;
     this.rm.OnRosterEnd += new ObjectHandler(this.rm_OnRosterEnd);
     this.rm.OnSubscription += new SubscriptionHandler(this.rm_OnSubscription);
     this.rm.OnUnsubscription += new UnsubscriptionHandler(this.rm_OnUnsubscription);
     //
     // tpServices
     //
     this.tpServices.Controls.Add(this.services);
     this.tpServices.Location = new System.Drawing.Point(4, 22);
     this.tpServices.Name = "tpServices";
     this.tpServices.Size = new System.Drawing.Size(624, 366);
     this.tpServices.TabIndex = 2;
     this.tpServices.Text = "Services";
     this.tpServices.UseVisualStyleBackColor = true;
     //
     // services
     //
     this.services.DiscoManager = this.dm;
     this.services.Dock = System.Windows.Forms.DockStyle.Fill;
     this.services.ImageList = null;
     this.services.Location = new System.Drawing.Point(0, 0);
     this.services.Name = "services";
     this.services.Size = new System.Drawing.Size(624, 366);
     this.services.Stream = this.jc;
     this.services.TabIndex = 0;
     //
     // tpBookmarks
     //
     this.tpBookmarks.Controls.Add(this.lvBookmarks);
     this.tpBookmarks.Location = new System.Drawing.Point(4, 22);
     this.tpBookmarks.Name = "tpBookmarks";
     this.tpBookmarks.Size = new System.Drawing.Size(624, 366);
     this.tpBookmarks.TabIndex = 3;
     this.tpBookmarks.Text = "Bookmarks";
     this.tpBookmarks.UseVisualStyleBackColor = true;
     //
     // lvBookmarks
     //
     this.lvBookmarks.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
     this.chName,
     this.chNick,
     this.chAutoJoin});
     this.lvBookmarks.Dock = System.Windows.Forms.DockStyle.Fill;
     this.lvBookmarks.Location = new System.Drawing.Point(0, 0);
     this.lvBookmarks.Name = "lvBookmarks";
     this.lvBookmarks.Size = new System.Drawing.Size(624, 366);
     this.lvBookmarks.Sorting = System.Windows.Forms.SortOrder.Ascending;
     this.lvBookmarks.TabIndex = 0;
     this.lvBookmarks.UseCompatibleStateImageBehavior = false;
     this.lvBookmarks.View = System.Windows.Forms.View.Details;
     this.lvBookmarks.DoubleClick += new System.EventHandler(this.lvBookmarks_DoubleClick);
     this.lvBookmarks.KeyUp += new System.Windows.Forms.KeyEventHandler(this.lvBookmarks_KeyUp);
     //
     // chName
     //
     this.chName.Text = "Room";
     this.chName.Width = 198;
     //
     // chNick
     //
     this.chNick.Text = "Nick";
     this.chNick.Width = 88;
     //
     // chAutoJoin
     //
     this.chAutoJoin.Text = "AutoJoin";
     //
     // tpDebug
     //
     this.tpDebug.Controls.Add(this.debug);
     this.tpDebug.Location = new System.Drawing.Point(4, 22);
     this.tpDebug.Name = "tpDebug";
     this.tpDebug.Size = new System.Drawing.Size(624, 366);
     this.tpDebug.TabIndex = 0;
     this.tpDebug.Text = "Debug";
     this.tpDebug.UseVisualStyleBackColor = true;
     //
     // debug
     //
     this.debug.Dock = System.Windows.Forms.DockStyle.Fill;
     this.debug.ErrorColor = System.Drawing.Color.Red;
     this.debug.Location = new System.Drawing.Point(0, 0);
     this.debug.Name = "debug";
     this.debug.OtherColor = System.Drawing.Color.Green;
     this.debug.OverrideFrom = null;
     this.debug.ReceiveColor = System.Drawing.Color.Orange;
     this.debug.SendColor = System.Drawing.Color.Blue;
     this.debug.Size = new System.Drawing.Size(624, 366);
     this.debug.Stream = this.jc;
     this.debug.TabIndex = 0;
     this.debug.TextColor = System.Drawing.Color.Black;
     //
     // mnuPresence
     //
     this.mnuPresence.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
     this.mnuAvailable,
     this.mnuAway});
     //
     // mnuAvailable
     //
     this.mnuAvailable.Enabled = false;
     this.mnuAvailable.Index = 0;
     this.mnuAvailable.Shortcut = System.Windows.Forms.Shortcut.CtrlO;
     this.mnuAvailable.Text = "&Available";
     this.mnuAvailable.Click += new System.EventHandler(this.mnuAvailable_Click);
     //
     // mnuAway
     //
     this.mnuAway.Enabled = false;
     this.mnuAway.Index = 1;
     this.mnuAway.Shortcut = System.Windows.Forms.Shortcut.CtrlA;
     this.mnuAway.Text = "A&way";
     this.mnuAway.Click += new System.EventHandler(this.mnuAway_Click);
     //
     // menuStrip1
     //
     this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
     this.fileToolStripMenuItem,
     this.viewToolStripMenuItem,
     this.rosterToolStripMenuItem,
     this.bookmarkToolStripMenuItem,
     this.windowToolStripMenuItem,
     this.pubSubToolStripMenuItem});
     this.menuStrip1.Location = new System.Drawing.Point(0, 0);
     this.menuStrip1.Name = "menuStrip1";
     this.menuStrip1.Size = new System.Drawing.Size(632, 24);
     this.menuStrip1.TabIndex = 3;
     this.menuStrip1.Text = "menuStrip1";
     //
     // fileToolStripMenuItem
     //
     this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
     this.connectToolStripMenuItem,
     this.joinConferenceToolStripMenuItem,
     this.toolStripMenuItem1,
     this.exitToolStripMenuItem});
     this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
     this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20);
     this.fileToolStripMenuItem.Text = "&File";
     //
     // connectToolStripMenuItem
     //
     this.connectToolStripMenuItem.Name = "connectToolStripMenuItem";
     this.connectToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F9;
     this.connectToolStripMenuItem.Size = new System.Drawing.Size(200, 22);
     this.connectToolStripMenuItem.Text = "&Connect";
     this.connectToolStripMenuItem.Click += new System.EventHandler(this.connectToolStripMenuItem_Click);
     //
     // joinConferenceToolStripMenuItem
     //
     this.joinConferenceToolStripMenuItem.Name = "joinConferenceToolStripMenuItem";
     this.joinConferenceToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.J)));
     this.joinConferenceToolStripMenuItem.Size = new System.Drawing.Size(200, 22);
     this.joinConferenceToolStripMenuItem.Text = "&Join Conference";
     this.joinConferenceToolStripMenuItem.Click += new System.EventHandler(this.joinConferenceToolStripMenuItem_Click);
     //
     // toolStripMenuItem1
     //
     this.toolStripMenuItem1.Name = "toolStripMenuItem1";
     this.toolStripMenuItem1.Size = new System.Drawing.Size(197, 6);
     //
     // exitToolStripMenuItem
     //
     this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
     this.exitToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Q)));
     this.exitToolStripMenuItem.Size = new System.Drawing.Size(200, 22);
     this.exitToolStripMenuItem.Text = "E&xit";
     this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
     //
     // viewToolStripMenuItem
     //
     this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
     this.servicesToolStripMenuItem,
     this.debugToolStripMenuItem});
     this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
     this.viewToolStripMenuItem.Size = new System.Drawing.Size(41, 20);
     this.viewToolStripMenuItem.Text = "&View";
     //
     // servicesToolStripMenuItem
     //
     this.servicesToolStripMenuItem.Name = "servicesToolStripMenuItem";
     this.servicesToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F8;
     this.servicesToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
     this.servicesToolStripMenuItem.Text = "&Services";
     this.servicesToolStripMenuItem.Click += new System.EventHandler(this.servicesToolStripMenuItem_Click);
     //
     // debugToolStripMenuItem
     //
     this.debugToolStripMenuItem.Name = "debugToolStripMenuItem";
     this.debugToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F12;
     this.debugToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
     this.debugToolStripMenuItem.Text = "&Debug";
     this.debugToolStripMenuItem.Click += new System.EventHandler(this.debugToolStripMenuItem_Click);
     //
     // rosterToolStripMenuItem
     //
     this.rosterToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
     this.addContactToolStripMenuItem,
     this.removeContactToolStripMenuItem,
     this.addGroupToolStripMenuItem});
     this.rosterToolStripMenuItem.Name = "rosterToolStripMenuItem";
     this.rosterToolStripMenuItem.Size = new System.Drawing.Size(51, 20);
     this.rosterToolStripMenuItem.Text = "&Roster";
     //
     // addContactToolStripMenuItem
     //
     this.addContactToolStripMenuItem.Name = "addContactToolStripMenuItem";
     this.addContactToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Insert;
     this.addContactToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
     this.addContactToolStripMenuItem.Text = "&Add Contact";
     this.addContactToolStripMenuItem.Click += new System.EventHandler(this.menuItem3_Click);
     //
     // removeContactToolStripMenuItem
     //
     this.removeContactToolStripMenuItem.Name = "removeContactToolStripMenuItem";
     this.removeContactToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Delete;
     this.removeContactToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
     this.removeContactToolStripMenuItem.Text = "&Remove Contact";
     this.removeContactToolStripMenuItem.Click += new System.EventHandler(this.menuItem5_Click);
     //
     // addGroupToolStripMenuItem
     //
     this.addGroupToolStripMenuItem.Name = "addGroupToolStripMenuItem";
     this.addGroupToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.G)));
     this.addGroupToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
     this.addGroupToolStripMenuItem.Text = "&Add Group";
     this.addGroupToolStripMenuItem.Click += new System.EventHandler(this.addGroupToolStripMenuItem_Click);
     //
     // bookmarkToolStripMenuItem
     //
     this.bookmarkToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
     this.addToolStripMenuItem,
     this.removeToolStripMenuItem});
     this.bookmarkToolStripMenuItem.Name = "bookmarkToolStripMenuItem";
     this.bookmarkToolStripMenuItem.Size = new System.Drawing.Size(65, 20);
     this.bookmarkToolStripMenuItem.Text = "Bookmark";
     //
     // addToolStripMenuItem
     //
     this.addToolStripMenuItem.Name = "addToolStripMenuItem";
     this.addToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.B)));
     this.addToolStripMenuItem.Size = new System.Drawing.Size(192, 22);
     this.addToolStripMenuItem.Text = "Add";
     this.addToolStripMenuItem.Click += new System.EventHandler(this.addToolStripMenuItem_Click);
     //
     // removeToolStripMenuItem
     //
     this.removeToolStripMenuItem.Name = "removeToolStripMenuItem";
     this.removeToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
                 | System.Windows.Forms.Keys.B)));
     this.removeToolStripMenuItem.Size = new System.Drawing.Size(192, 22);
     this.removeToolStripMenuItem.Text = "Remove";
     this.removeToolStripMenuItem.Click += new System.EventHandler(this.removeToolStripMenuItem_Click);
     //
     // windowToolStripMenuItem
     //
     this.windowToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
     this.closeTabToolStripMenuItem});
     this.windowToolStripMenuItem.Name = "windowToolStripMenuItem";
     this.windowToolStripMenuItem.Size = new System.Drawing.Size(57, 20);
     this.windowToolStripMenuItem.Text = "&Window";
     //
     // closeTabToolStripMenuItem
     //
     this.closeTabToolStripMenuItem.Name = "closeTabToolStripMenuItem";
     this.closeTabToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W)));
     this.closeTabToolStripMenuItem.Size = new System.Drawing.Size(174, 22);
     this.closeTabToolStripMenuItem.Text = "&Close Tab";
     this.closeTabToolStripMenuItem.Click += new System.EventHandler(this.closeTabToolStripMenuItem_Click);
     //
     // pubSubToolStripMenuItem
     //
     this.pubSubToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
     this.subscribePubSubToolStripMenuItem,
     this.deletePubSubToolStripMenuItem});
     this.pubSubToolStripMenuItem.Name = "pubSubToolStripMenuItem";
     this.pubSubToolStripMenuItem.Size = new System.Drawing.Size(55, 20);
     this.pubSubToolStripMenuItem.Text = "PubSub";
     //
     // subscribePubSubToolStripMenuItem
     //
     this.subscribePubSubToolStripMenuItem.Name = "subscribePubSubToolStripMenuItem";
     this.subscribePubSubToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F10;
     this.subscribePubSubToolStripMenuItem.Size = new System.Drawing.Size(156, 22);
     this.subscribePubSubToolStripMenuItem.Text = "&Subscribe";
     this.subscribePubSubToolStripMenuItem.Click += new System.EventHandler(this.subscribeToPubSubToolStripMenuItem_Click);
     //
     // deletePubSubToolStripMenuItem
     //
     this.deletePubSubToolStripMenuItem.Name = "deletePubSubToolStripMenuItem";
     this.deletePubSubToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F11;
     this.deletePubSubToolStripMenuItem.Size = new System.Drawing.Size(156, 22);
     this.deletePubSubToolStripMenuItem.Text = "&Delete";
     this.deletePubSubToolStripMenuItem.Click += new System.EventHandler(this.deletePubSubToolStripMenuItem_Click);
     //
     // psm
     //
     this.psm.OverrideFrom = null;
     this.psm.Stream = this.jc;
     //
     // idler
     //
     this.idler.InvokeControl = this;
     this.idler.OnIdle += new SpanEventHandler(this.idler_OnIdle);
     this.idler.OnUnIdle += new SpanEventHandler(this.idler_OnUnIdle);
     //
     // muc
     //
     this.muc.OverrideFrom = null;
     this.muc.Stream = this.jc;
     //
     // bmm
     //
     this.bmm.ConferenceManager = this.muc;
     this.bmm.OverrideFrom = null;
     this.bmm.Stream = this.jc;
     this.bmm.OnConferenceAdd += new BookmarkConferenceDelegate(this.bmm_OnConferenceAdd);
     this.bmm.OnConferenceRemove += new BookmarkConferenceDelegate(this.bmm_OnConferenceRemove);
     //
     // MainForm
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize = new System.Drawing.Size(632, 438);
     this.ContextMenu = this.mnuPresence;
     this.Controls.Add(this.tabControl1);
     this.Controls.Add(this.sb);
     this.Controls.Add(this.menuStrip1);
     this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.MainMenuStrip = this.menuStrip1;
     this.Name = "MainForm";
     this.Text = "MainForm";
     this.Closing += new System.ComponentModel.CancelEventHandler(this.MainForm_Closing);
     ((System.ComponentModel.ISupportInitialize)(this.pnlCon)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pnlSSL)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pnlPresence)).EndInit();
     this.tabControl1.ResumeLayout(false);
     this.tpRoster.ResumeLayout(false);
     this.tpServices.ResumeLayout(false);
     this.tpBookmarks.ResumeLayout(false);
     this.tpDebug.ResumeLayout(false);
     this.menuStrip1.ResumeLayout(false);
     this.menuStrip1.PerformLayout();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
示例#2
0
        private void GotCaps(DiscoManager m, DiscoNode node, object state)
        {
            // timeout
            if (node == null)
                return;

            string ver = (string)state;
            string calc = CalculateVer(node);
            if (ver != calc)
            {
                Debug.WriteLine("WARNING: invalid caps ver hash: '" + ver + "' != '" + calc + "'");
                if (node.Info != null)
                    Debug.WriteLine(node.Info.OuterXml);
                return;
            }
            m_cache[ver] = node.Info;
        }
示例#3
0
 private void GotRoot(DiscoManager sender, DiscoNode node, object state)
 {
     if (node.Children != null)
     {
         foreach (DiscoNode component in node.Children)
         {
             if (component.HasFeature(URI.MUC))
                 cmbJID.Items.Add(component.JID);
         }
         if (cmbJID.Items.Count > 0)
             cmbJID.SelectedIndex = 0;
     }
     cmbJID.EndUpdate();
 }
示例#4
0
 private void GotInitialFeatures(DiscoManager sender, DiscoNode node, object state)
 {
     m_disco.BeginGetItems(node, new DiscoNodeHandler(GotItems), state);
 }
示例#5
0
 private void GotItems(DiscoManager sender, DiscoNode node, object state)
 {
     // TODO: some of this will break in 2003.
     TreeNode[] nodes = tvServices.Nodes.Find(node.Key, true);
     foreach (TreeNode n in nodes)
     {
         n.ImageIndex = 7;
         n.SelectedImageIndex = 7;
         foreach (DiscoNode dn in node.Children)
         {
             TreeNode tn = n.Nodes.Add(dn.Key, dn.Name);
             tn.ToolTipText = dn.Key.Replace('\u0000', '\n');
             tn.Tag = dn;
             tn.ImageIndex = 8;
             tn.SelectedImageIndex = 8;
         }
     }
     pgServices.Refresh();
 }
示例#6
0
        /// <summary>
        /// Adds the given items to the cache.
        /// </summary>
        /// <param name="manager">The DiscoManager used to create/cache nodes</param>
        /// <param name="items">Items to add.</param>
        public void AddItems(DiscoManager manager, DiscoItem[] items)
        {
            if (Children == null)
                Children = new Set();

            // items may be null when used from outside.
            if (items != null)
            {
                foreach (DiscoItem di in items)
                    AddItem(manager, di);
            }

            DoCallbacks(m_itemCallbacks);
        }
示例#7
0
 private void GotInfo(DiscoManager sender, DiscoNode node, object state)
 {
     pgServices.SelectedObject = node;
 }
示例#8
0
 /// <summary>
 /// Add a callback for when identities are received.
 /// 
 /// Calls the callback immediately if the features have already been retrieved.
 /// </summary>
 /// <param name="manager"></param>
 /// <param name="callback"></param>
 /// <param name="state"></param>
 /// <returns>True if there were no identities yet, and the callback was queued.</returns>
 public bool AddIdentityCallback(DiscoManager manager, DiscoNodeHandler callback, object state)
 {
     lock (this)
     {
         if (Identities != null)
         {
             if (callback != null)
                 callback(manager, this, state);
             return false;
         }
         else
         {
             m_identCallbacks.Add(new NodeCallback(manager, callback, state));
             return true;
         }
     }
 }
示例#9
0
 internal DiscoNode AddItem(DiscoManager manager, DiscoItem di)
 {
     DiscoNode dn = manager.GetNode(di.Jid, di.Node);
     if ((di.Named != null) && (di.Named != ""))
         dn.Name = di.Named;
     Children.Add(dn);
     return dn;
 }
示例#10
0
 /// <summary>
 /// Add a callback for when items are received.
 /// 
 /// Calls the callback immediately if the items have already been retrieved.
 /// </summary>
 /// <param name="manager"></param>
 /// <param name="callback"></param>
 /// <param name="state"></param>
 /// <returns>True if there were no items yet, and the callback was queued.</returns>
 public bool AddItemsCallback(DiscoManager manager, DiscoNodeHandler callback, object state)
 {
     lock (this)
     {
         if (Children != null)
         {
             if (callback != null)
                 callback(manager, this, state);
             return false;
         }
         else
         {
             if (callback != null)
                 m_itemCallbacks.Add(new NodeCallback(manager, callback, state));
             return true;
         }
     }
 }
示例#11
0
 /// <summary>
 /// Add a callback for when features are received.
 /// 
 /// Calls the callback immediately if the features have already been retrieved.
 /// </summary>
 /// <param name="manager"></param>
 /// <param name="callback"></param>
 /// <param name="state"></param>
 /// <returns>True if there were no features yet, and the callback was queued.</returns>
 public bool AddFeatureCallback(DiscoManager manager, DiscoNodeHandler callback, object state)
 {
     lock (this)
     {
         if (Features != null)
         {
             if (callback != null)
                 callback(manager, this, state);
             return false;
         }
         else
         {
             if (callback != null)
                 m_featureCallbacks.Add(new NodeCallback(manager, callback, state));
             return true;
         }
     }
 }
示例#12
0
 public NodeCallback(DiscoManager m, DiscoNodeHandler h, object s)
 {
     manager = m;
     callback = h;
     state = s;
 }
示例#13
0
 public void GotRootItems(DiscoManager manager, DiscoNode node, object state)
 {
     m_outstanding = node.Children.Count;
     foreach (DiscoNode n in node.Children)
         manager.BeginGetFeatures(n, new DiscoNodeHandler(GotFeatures), state);
 }
示例#14
0
            public void GotFeatures(DiscoManager manager, DiscoNode node, object state)
            {

                // yes, yes, this may call the handler more than once in multi-threaded world.  Punt for now.
                if (m_handler != null)
                {
                    if (node.HasFeature(m_URI))
                    {
                        m_handler(manager, node, state);
                        m_handler = null;
                    }
                }

                if (Interlocked.Decrement(ref m_outstanding) == 0)
                {
                    if (m_handler != null)
                        m_handler(manager, null, state);
                }
            }