Esempio n. 1
0
 protected override void OnActivated(EventArgs e)
 {
     base.OnActivated(e);
     var server = new JabbRServer { Name = "JabbR.net", Address = "https://jabbr.net", JanrainAppName = "jabbr" };
     using (var dialog = new ServerDialog(server, true, true))
     {
         dialog.DisplayMode = DialogDisplayMode.Attached;
         var ret = dialog.ShowDialog(Application.Instance.MainForm);
         if (ret == DialogResult.Ok)
         {
             Debug.WriteLine("Added Server, Name: {0}", server.Name);
             var config = JabbRApplication.Instance.Configuration;
             config.AddServer(server);
             JabbRApplication.Instance.SaveConfiguration();
             if (AutoConnect)
             {
                 Application.Instance.AsyncInvoke(delegate
                 {
                     server.Connect();
                 });
             }
         }
     }
     
 }
Esempio n. 2
0
		public JabbRChat (JabbRServer server, User user, string initialMessage)
			: base(server)
		{
			this.initialMessage = initialMessage;
			this.user = user;
			this.Name = user.Name;
			this.Id = "chat_" + user.Id;
			if (!string.IsNullOrEmpty (initialMessage))
				UnreadCount = 1;
		}
Esempio n. 3
0
 public JabbRUser(JabbRServer server, global::JabbR.Client.Models.User user)
     : base (server)
 {
     this.InnerUser = user;
     this.Id = user.Name;
     this.Name = user.Name;
     this.IsAfk = user.IsAfk;
     this.Active = user.Active;
     this.Gravatar = user.Hash;
 }
Esempio n. 4
0
 public JabbRServerEdit(JabbRServer server, DynamicLayout layout)
 {
     this.server = server;
     layout.AddRow(new Label { Text = "Address" }, EditAddress());
     layout.EndBeginVertical();
     layout.AddRow(UseSocialLogin());
     layout.Add(authSection = new Panel { MinimumSize = new Size(0, 100) });
     layout.EndBeginVertical();
     LoginSection();
     SocialSection();
     
     authSection.DataContextChanged += (sender, e) => {
         SetVisibility();
     };
 }
Esempio n. 5
0
 public JabbRRoom(JabbRServer server, jab.Models.Room room)
     : base(server)
 {
     Set(room);
 }
Esempio n. 6
0
 public JabbRUser(JabbRServer server, string userName)
     : base (server)
 {
     this.Id = userName;
     this.Name = userName;
 }
Esempio n. 7
0
 public JabbRChannel(JabbRServer server)
     : base(server)
 {
 }