Example #1
0
 public void Execute(string input, Server server, Channel channel)
 {
     ClientCommandParser parser = new ClientCommandParser();
     ClientCommand command = parser.Parse(input);
     CommandTarget target = (channel != null) ? new CommandTarget(server, channel) : new CommandTarget(server);
     this.clientCommander.Execute(command, target);
 }
 private ServerChannelViewModel(Server server, Channel channel)
     : this()
 {
     this.Server = server;
     this.Channel = channel;
     this.Channel.PropertyChanged += Channel_PropertyChanged;
     this.UserList = new UserListViewModel(channel);
 }
Example #3
0
 public Channel CreateChannel(string name)
 {
     Channel channel = this.GetChannel(name);
     
     if(channel != null)
     {
         return channel;
     }
     else
     {
         if (name != this.User.Nick)
         {
             channel = new Channel(name, this);
             this.Channels.Add(channel);
             return channel;
         }
         return null;
     }
 }
Example #4
0
 public void RemoveChannel(Channel channel)
 {
     this.Channels.Remove(channel);
 }
 public UserListViewModel(Channel channel)
 {
     this.Data = new ObservableCollectionEx<UserViewModel>();
     channel.Users.CollectionChanged += Users_CollectionChanged;
 }
Example #6
0
 public LogEventArgs(string message, Server server, Channel channel)
     : this(message, server)
 {
     this.Channel = channel;
 }
Example #7
0
 public CommandTarget(Server server, Channel channel)
     : this(server)
 {
     this.Channel = channel;
 }
 private void RemoveChannel(Channel channel)
 {
     foreach (ServerChannelViewModel scvm in this.Children)
     {
         if (scvm.Channel == channel)
         {
             this.Children.Remove(scvm);
             break;
         }
     }
 }
 private void AddChannel(Channel channel)
 {
     ServerChannelViewModel scvm = new ServerChannelViewModel(this.Server, channel);
     scvm.PropertyChanged += Scvm_PropertyChanged;
     this.Children.Add(scvm);
     scvm.IsSelected = true;
 }