示例#1
0
        public FilterListWidget(Gtk.Window parent, UserConfig userConfig)
        {
            if (parent == null) {
                throw new ArgumentNullException("parent");
            }
            if (userConfig == null) {
                throw new ArgumentNullException("userConfig");
            }

            Build();
            Init();

            f_Parent = parent;
            f_Controller = new FilterListController(userConfig);
        }
示例#2
0
文件: Session.cs 项目: tuukka/smuxi
        public Session(Config config, ProtocolManagerFactory protocolManagerFactory,
                       string username)
        {
            Trace.Call(config, protocolManagerFactory, username);

            if (config == null) {
                throw new ArgumentNullException("config");
            }
            if (protocolManagerFactory == null) {
                throw new ArgumentNullException("protocolManagerFactory");
            }
            if (username == null) {
                throw new ArgumentNullException("username");
            }

            _Config = config;
            _ProtocolManagerFactory = protocolManagerFactory;
            _Username = username;

            _FrontendManagers = new Dictionary<string, FrontendManager>();
            _ProtocolManagers = new List<IProtocolManager>();
            _UserConfig = new UserConfig(config, username);
            _UserConfig.Changed += OnUserConfigChanged;
            _FilterListController = new FilterListController(_UserConfig);
            _Filters = _FilterListController.GetFilterList().Values;
            _Chats = new List<ChatModel>();

            _SessionChat = new SessionChatModel("smuxi", "Smuxi");
            _Chats.Add(_SessionChat);
        }