コード例 #1
0
        protected override async void HandleDocumentLoaded(object sender, WebViewLoadedEventArgs e)
        {
            if (Channel != null && Server.IsConnected)
            {
                BeginLoad();
                try
                {
                    var channel = await Channel.GetChannelInfo();

                    if (channel != null)
                    {
                        SetTopic(channel.Topic);
                        UserList.SetUsers(channel.Users);
                        var history = await channel.GetHistory(LastHistoryMessageId);

                        if (history != null)
                        {
                            StartLive();
                            AddHistory(history, true);
                            AddNotification(new NotificationMessage(DateTimeOffset.Now, string.Format("You just entered {0}", Channel.Name)));
                            SetMarker();
                            ReplayDelayedCommands();
                        }
                    }
                }
                catch (Exception ex)
                {
                    LoadError(ex, "Error getting channel info");
                }
                FinishLoad();
            }
            else
            {
                StartLive();
                ReplayDelayedCommands();
                AddNotification(new NotificationMessage(DateTimeOffset.Now, "Disconnected"));
            }
        }
コード例 #2
0
 protected override void CreateLayout(Container container)
 {
     var split = new Splitter{
         Size = new Size(200, 200),
         Position = 50,
         FixedPanel = SplitterFixedPanel.Panel2
     };
     
     split.Panel1 = new Panel();
     split.Panel2 = UserList = new UserList(this.Channel);
     
     base.CreateLayout(split.Panel1 as Panel);
     
     container.AddDockedControl(split);
 }
コード例 #3
0
 protected override Control CreateLayout()
 {
     var split = new Splitter
     {
         FixedPanel = SplitterFixedPanel.Panel2
     };
     
     split.Panel1 = base.CreateLayout();
     split.Panel2 = UserList = new UserList(Channel);
     
     return split;
 }