Exemplo 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();
                 });
             }
         }
     }
     
 }
Exemplo 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;
 }
Exemplo 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;
 }
Exemplo n.º 4
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;
 }
Exemplo n.º 5
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;
     }
 }
Exemplo n.º 6
0
 public JabbRServerEdit(JabbRServer server, DynamicLayout layout)
 {
     this.server = server;
     layout.AddRow(new Label { Text = "Address" }, EditAddress());
     layout.EndBeginVertical(yscale: true);
     layout.AddRow(UseSocialLogin());
     layout.Add(authSection = new Panel {  }, yscale: true);
     layout.EndBeginVertical();
     loginSection = LoginSection();
     socialSection = SocialSection();
     
     authSection.DataContextChanged += (sender, e) => SetVisibility();
     SetVisibility();
 }
Exemplo n.º 7
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();
     };
 }
Exemplo n.º 8
0
 public JabbRUser(JabbRServer server, string userName)
     : base (server)
 {
     this.Id = userName;
     this.Name = userName;
 }
Exemplo n.º 9
0
 public JabbRChannel(JabbRServer server)
     : base(server)
 {
 }
Exemplo n.º 10
0
 public JabbRRoom(JabbRServer server, jab.Models.Room room)
     : base(server)
 {
     Set(room);
 }
Exemplo n.º 11
0
 public JabbRUser(JabbRServer server, string userName)
     : base(server)
 {
     this.Id   = userName;
     this.Name = userName;
 }
Exemplo n.º 12
0
 public JabbRRoom(JabbRServer server, jab.Models.Room room)
     : base(server)
 {
     Set(room);
 }
Exemplo n.º 13
0
 public JabbRChannel(JabbRServer server)
     : base(server)
 {
 }