Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        public void Load()
        {
            SoundOnFriendOnline = storage.ReadString("SoundOnFriendOnline",
                                                     Config.Constants.SoundPath + System.IO.Path.DirectorySeparatorChar + "friendonline.wav");
            SoundOnMessageReceived = storage.ReadString("SoundOnMessageReceived",
                                                        Config.Constants.SoundPath + System.IO.Path.DirectorySeparatorChar + "messagereceived.wav");

            this.AlwaysOnTop         = storage.ReadBool("AlwaysOnTop", false);
            this.ConnectAllOnStartup = storage.ReadBool("ConnectAllOnStartup", false);
            this.HideOfflineContacts = storage.ReadBool("HideOfflineContacts", false);
            this.DisplayTaskBar      = storage.ReadBool("DisplayTaskBar", true);
            this.PromptOnExit        = storage.ReadBool("PromptOnExit", true);
            this.InternetConnection  = (InternetConnection)storage.ReadInt32("InternetConnection", (int)InternetConnection.Direct);
            this.ExitOnX             = storage.ReadBool("ExitOnX", false);

            this.ProxyUsername          = storage.ReadString("ProxyUsername", "");
            this.ProxyPassword          = storage.ReadString("ProxyPassword", "");
            this.RememberProxyPassword  = storage.ReadBool("RememberProxyPassword", false);
            this.ProxyServerHost        = storage.ReadString("ProxyServerHost", "");
            this.ProxyServerPort        = storage.ReadInt32("ProxyServerPort", 0);
            this.UseProxyAuthentication = storage.ReadBool("UseProxyAuthentication", false);

            this.TimeStampConversations  = storage.ReadBool("TimeStampConversations", true);
            this.SendTypingNotifications = storage.ReadBool("SendTypingNotifications", true);
            this.TimeStampFormat         = storage.ReadString("TimeStampFormat", "[%h:%m]");
            this.ShowEmoticons           = storage.ReadBool("ShowEmoticons", true);

            this.ContactListSize.Width  = storage.ReadInt32("ContactListWidth", 100);
            this.ContactListSize.Height = storage.ReadInt32("ContactListHeight", 300);
            this.ContactListLocation.X  = storage.ReadInt32("ContactListX", 200);
            this.ContactListLocation.Y  = storage.ReadInt32("ContactListY", 200);


            this.FriendOnlineEvent  = (FriendOnlineEvent)storage.ReadInt32("FriendOnlineEvent", (int)FriendOnlineEvent.BalloonToolTip);
            this.FriendMessageEvent = (FriendMessageEvent)storage.ReadInt32("FriendMessageEvent", (int)FriendMessageEvent.FlashWindow);
            this.NumTimesToFlashOnMessageReceived = storage.ReadInt32("NumTimesToFlashOnMessageReceived", 5);

            this.PlaySoundOnFriendOnline    = storage.ReadBool("PlaySoundOnFriendOnline", true);
            this.PlaySoundOnMessageReceived = storage.ReadBool("PlaySoundOnMessageReceived", true);

            this.LogType = (LogType)storage.ReadInt32("LogType", (int)LogType.Text);


            Win32.RegistryKey startupKey = Config.Constants.StartupRegistryRoot.OpenSubKey(Config.Constants.StartupRegistryPath, true);
            this.LoadOnStartup = startupKey.GetValue("NBM") != null;
            startupKey.Close();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 
        /// </summary>
        public void Load()
        {
            SoundOnFriendOnline = storage.ReadString("SoundOnFriendOnline",
                Config.Constants.SoundPath + System.IO.Path.DirectorySeparatorChar + "friendonline.wav");
            SoundOnMessageReceived = storage.ReadString("SoundOnMessageReceived",
                Config.Constants.SoundPath + System.IO.Path.DirectorySeparatorChar + "messagereceived.wav");

            this.AlwaysOnTop = storage.ReadBool("AlwaysOnTop", false);
            this.ConnectAllOnStartup = storage.ReadBool("ConnectAllOnStartup", false);
            this.HideOfflineContacts = storage.ReadBool("HideOfflineContacts", false);
            this.DisplayTaskBar = storage.ReadBool("DisplayTaskBar", true);
            this.PromptOnExit = storage.ReadBool("PromptOnExit", true);
            this.InternetConnection = (InternetConnection)storage.ReadInt32("InternetConnection", (int)InternetConnection.Direct);
            this.ExitOnX = storage.ReadBool("ExitOnX", false);

            this.ProxyUsername = storage.ReadString("ProxyUsername", "");
            this.ProxyPassword = storage.ReadString("ProxyPassword", "");
            this.RememberProxyPassword = storage.ReadBool("RememberProxyPassword", false);
            this.ProxyServerHost = storage.ReadString("ProxyServerHost", "");
            this.ProxyServerPort = storage.ReadInt32("ProxyServerPort", 0);
            this.UseProxyAuthentication = storage.ReadBool("UseProxyAuthentication", false);

            this.TimeStampConversations = storage.ReadBool("TimeStampConversations", true);
            this.SendTypingNotifications = storage.ReadBool("SendTypingNotifications", true);
            this.TimeStampFormat = storage.ReadString("TimeStampFormat", "[%h:%m]");
            this.ShowEmoticons = storage.ReadBool("ShowEmoticons", true);

            this.ContactListSize.Width = storage.ReadInt32("ContactListWidth", 100);
            this.ContactListSize.Height = storage.ReadInt32("ContactListHeight", 300);
            this.ContactListLocation.X = storage.ReadInt32("ContactListX", 200);
            this.ContactListLocation.Y = storage.ReadInt32("ContactListY", 200);

            this.FriendOnlineEvent = (FriendOnlineEvent)storage.ReadInt32("FriendOnlineEvent", (int)FriendOnlineEvent.BalloonToolTip);
            this.FriendMessageEvent = (FriendMessageEvent)storage.ReadInt32("FriendMessageEvent", (int)FriendMessageEvent.FlashWindow);
            this.NumTimesToFlashOnMessageReceived = storage.ReadInt32("NumTimesToFlashOnMessageReceived", 5);

            this.PlaySoundOnFriendOnline = storage.ReadBool("PlaySoundOnFriendOnline", true);
            this.PlaySoundOnMessageReceived = storage.ReadBool("PlaySoundOnMessageReceived", true);

            this.LogType = (LogType)storage.ReadInt32("LogType", (int)LogType.Text);

            Win32.RegistryKey startupKey = Config.Constants.StartupRegistryRoot.OpenSubKey(Config.Constants.StartupRegistryPath, true);
            this.LoadOnStartup = startupKey.GetValue("NBM") != null;
            startupKey.Close();
        }