Smuxi.Frontend.Gnome.ChatViewManager.ApplyConfig C# (CSharp) Method

ApplyConfig() public method

public ApplyConfig ( Smuxi.Engine.UserConfig config ) : void
config Smuxi.Engine.UserConfig
return void
        public virtual void ApplyConfig(UserConfig config)
        {
            Trace.Call(config);

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

            var prefix = "Interface/Notebook/";
            AutoSwitchPersonChats =
                config[prefix + "AutoSwitchPersonChats"] as bool? ?? false;
            AutoSwitchGroupChats =
                config[prefix + "AutoSwitchGroupChats"] as bool? ?? true;

            f_Config = config;
            foreach (ChatView chat in f_Chats) {
                chat.ApplyConfig(f_Config);
            }
        }

Usage Example

コード例 #1
0
        public void ApplyConfig(UserConfig userConfig)
        {
            Trace.Call(userConfig);

            if (userConfig == null)
            {
                throw new ArgumentNullException("userConfig");
            }

            string modeStr = (string)userConfig["Interface/Notification/NotificationAreaIconMode"];
            NotificationAreaIconMode mode = (NotificationAreaIconMode)Enum.Parse(
                typeof(NotificationAreaIconMode),
                modeStr
                );

            NotificationAreaIconMode = mode;

            MenuWidget.OpenLogAction.Visible     = Frontend.IsLocalEngine;
            MenuWidget.OpenLogToolAction.Visible = Frontend.IsLocalEngine;

#if GTK_SHARP_2_10
            StatusIconManager.ApplyConfig(userConfig);
#endif
#if INDICATE_SHARP || MESSAGING_MENU_SHARP
            IndicateManager.ApplyConfig(userConfig);
#endif
#if NOTIFY_SHARP
            NotifyManager.ApplyConfig(userConfig);
#endif
            Entry.ApplyConfig(userConfig);
            Notebook.ApplyConfig(userConfig);
            ChatTreeView.ApplyConfig(userConfig);
            ChatViewManager.ApplyConfig(userConfig);
            MenuWidget.JoinWidget.ApplyConfig(userConfig);
        }
All Usage Examples Of Smuxi.Frontend.Gnome.ChatViewManager::ApplyConfig