Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ChatService" /> class.
 /// </summary>
 public ChatService(
         IWindowService windowService,
         Preferences preferences)
     : base("chat")
 {
     this.ViewModels = new Dictionary<string, ChatViewModel>();
     this.WindowService = windowService;
     this.Preferences = preferences;
 }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PreferencesWindow" /> class.
        /// </summary>
        public PreferencesWindow(Preferences preferences)
        {
            this.InitializeComponent();
            this.Servers = new ViewModelCollection<Server>();
            this.lvServers.ItemsSource = this.Servers;
            this.Preferences = preferences;
            this.txtChatLogsDirectory.Text =
                        this.Preferences.ChatLogsDirectory;
            this.chkSaveChat.IsChecked = this.Preferences.SaveChatLogs;

            foreach (var server in this.Preferences.Servers)
            {
                this.Servers.Add(new Server(server));
            }
        }