private void LoadSettings() { this.Load += new EventHandler(OnLoad); foreach (IceChatSounds.SoundEntry x in this.iceChatSounds.soundList) { listBoxSounds.Items.Add(x.Description); } this.listViewEmot.MouseDown += new MouseEventHandler(ListViewEmot_MouseDown); this.listViewEmot.MouseUp += new MouseEventHandler(ListViewEmot_MouseUp); this.textNickComplete.KeyDown += new KeyEventHandler(OnKeyDown); //populate the font settings textConsoleFont.Font = new Font(iceChatFonts.FontSettings[0].FontName, 10); textConsoleFont.Text = iceChatFonts.FontSettings[0].FontName; textConsoleFontSize.Text = iceChatFonts.FontSettings[0].FontSize.ToString(); textChannelFont.Font = new Font(iceChatFonts.FontSettings[1].FontName, 10); textChannelFont.Text = iceChatFonts.FontSettings[1].FontName; textChannelFontSize.Text = iceChatFonts.FontSettings[1].FontSize.ToString(); textQueryFont.Font = new Font(iceChatFonts.FontSettings[2].FontName, 10); textQueryFont.Text = iceChatFonts.FontSettings[2].FontName; textQueryFontSize.Text = iceChatFonts.FontSettings[2].FontSize.ToString(); textNickListFont.Font = new Font(iceChatFonts.FontSettings[3].FontName, 10); textNickListFont.Text = iceChatFonts.FontSettings[3].FontName; textNickListFontSize.Text = iceChatFonts.FontSettings[3].FontSize.ToString(); textServerListFont.Font = new Font(iceChatFonts.FontSettings[4].FontName, 10); textServerListFont.Text = iceChatFonts.FontSettings[4].FontName; textServerListFontSize.Text = iceChatFonts.FontSettings[4].FontSize.ToString(); textInputFont.Font = new Font(iceChatFonts.FontSettings[5].FontName, 10); textInputFont.Text = iceChatFonts.FontSettings[5].FontName; textInputFontSize.Text = iceChatFonts.FontSettings[5].FontSize.ToString(); textDockTabFont.Font = new Font(iceChatFonts.FontSettings[6].FontName, 10); textDockTabFont.Text = iceChatFonts.FontSettings[6].FontName; textDockTabSize.Text = iceChatFonts.FontSettings[6].FontSize.ToString(); textMenuBarFont.Font = new Font(iceChatFonts.FontSettings[7].FontName, 10); textMenuBarFont.Text = iceChatFonts.FontSettings[7].FontName; textMenuBarSize.Text = iceChatFonts.FontSettings[7].FontSize.ToString(); textChannelBarFont.Font = new Font(iceChatFonts.FontSettings[8].FontName, 10); textChannelBarFont.Text = iceChatFonts.FontSettings[8].FontName; textChannelBarSize.Text = iceChatFonts.FontSettings[8].FontSize.ToString(); //populate the settings textTimeStamp.Text = iceChatOptions.TimeStamp.Replace("", ((char)3).ToString()).Replace("", ((char)2).ToString());; checkTimeStamp.Checked = iceChatOptions.ShowTimeStamp; checkSaveWindowPosition.Checked = iceChatOptions.SaveWindowPosition; checkWindowedMode.Checked = iceChatOptions.WindowedMode; checkFlashChannelMessage.Checked = iceChatOptions.FlashTaskBarChannel; checkFlashChannelAction.Checked = iceChatOptions.FlashTaskBarChannelAction; checkFlashPrivateMessage.Checked = iceChatOptions.FlashTaskBarPrivate; checkFlashPrivateAction.Checked = iceChatOptions.FlashTaskBarPrivateAction; checkFlashChannel.Checked = iceChatOptions.FlashServerTreeIcons; checkFlashPrivate.Checked = iceChatOptions.FlashServerTreeIconsPrivate; textFlashTaskbarNumber.Text = iceChatOptions.FlashTaskBarNumber.ToString(); checkJoinInvite.Checked = iceChatOptions.AutoJoinInvite; checkLogConsole.Checked = iceChatOptions.LogConsole; checkLogChannel.Checked = iceChatOptions.LogChannel; checkLogQuery.Checked = iceChatOptions.LogQuery; checkLogWindow.Checked = iceChatOptions.LogWindow; checkSeperateLogs.Checked = iceChatOptions.SeperateLogs; comboLogFormat.Text = iceChatOptions.LogFormat; labelCurrentLogFolder.Text = iceChatOptions.LogFolder; checkReloadLogs.Checked = iceChatOptions.LogReload; checkExternalPlayCommand.Checked = iceChatOptions.SoundUseExternalCommand; textExternalPlayCommand.Text = iceChatOptions.SoundExternalCommand; checkPlayActive.Checked = iceChatOptions.SoundPlayActive; checkSortNickList.Checked = iceChatOptions.NickListSort; //comboLineSpacing.Text = iceChatOptions.LineSpacing.ToString(); if (iceChatEmoticons != null) { //load in the emoticons foreach (EmoticonItem emot in iceChatEmoticons.listEmoticons) { Bitmap bm = new Bitmap(FormMain.Instance.EmoticonsFolder + System.IO.Path.DirectorySeparatorChar + emot.EmoticonImage); int i = imageListEmoticons.Images.Add(bm, Color.Fuchsia); ListViewItem lvi = new ListViewItem(emot.Trigger, i); lvi.SubItems.Add(emot.EmoticonImage); listViewEmot.Items.Add(lvi); } } checkEmoticons.Checked = iceChatOptions.ShowEmoticons; checkEmoticonPicker.Checked = iceChatOptions.ShowEmoticonPicker; checkColorPicker.Checked = iceChatOptions.ShowColorPicker; checkBasicCommands.Checked = iceChatOptions.ShowBasicCommands; checkStatusBar.Checked = iceChatOptions.ShowStatusBar; checkDisableQueries.Checked = iceChatOptions.DisableQueries; checkNewQueryForegound.Checked = iceChatOptions.NewQueryForegound; checkWhoisNewQuery.Checked = iceChatOptions.WhoisNewQuery; checkShowUnreadLine.Checked = iceChatOptions.ShowUnreadLine; checkMinimizeTray.Checked = iceChatOptions.MinimizeToTray; checkShowTrayIcon.Checked = iceChatOptions.ShowSytemTrayIcon; checkShowTrayNotifications.Checked = iceChatOptions.ShowSytemTrayNotifications; checkTrayServerMessage.Checked = iceChatOptions.SystemTrayServerMessage; checkTrayBuddyOnline.Checked = iceChatOptions.SystemTrayBuddyOnline; textSystemTrayText.Text = iceChatOptions.SystemTrayText; textSystemTrayIcon.Text = iceChatOptions.SystemTrayIcon; checkShowSend.Checked = iceChatOptions.ShowSendButton; checkAskQuit.Checked = iceChatOptions.AskQuit; textMaximumLines.Text = iceChatOptions.MaximumTextLines.ToString(); textNickComplete.Text = iceChatOptions.NickCompleteAfter.Replace("", ((char)3).ToString()).Replace("", ((char)2).ToString()); checkShowNickHost.Checked = iceChatOptions.ShowNickHost; checkNickShowButtons.Checked = iceChatOptions.ShowNickButtons; checkServerShowButtons.Checked = iceChatOptions.ShowServerButtons; checkKickChannelOpen.Checked = iceChatOptions.ChannelOpenKick; checkTopicBar.Checked = iceChatOptions.ShowTopic; checkSingleRowCB.Checked = iceChatOptions.SingleRowTabBar; //dcc settings checkAutoDCCChat.Checked = iceChatOptions.DCCChatAutoAccept; checkAutoDCCFile.Checked = iceChatOptions.DCCFileAutoAccept; checkAutoDCCChatBuddy.Checked = iceChatOptions.DCCChatAutoAcceptBuddyOnly; checkAutoDCCFileBuddy.Checked = iceChatOptions.DCCFileAutoAcceptBuddyOnly; checkIgnoreDCCChat.Checked = iceChatOptions.DCCChatIgnore; checkIgnoreDCCFile.Checked = iceChatOptions.DCCFileIgnore; textDCCChatTimeout.Text = iceChatOptions.DCCChatTimeOut.ToString(); textDCCPortLow.Text = iceChatOptions.DCCPortLower.ToString(); textDCCPortHigh.Text = iceChatOptions.DCCPortUpper.ToString(); textDCCReceiveFolder.Text = iceChatOptions.DCCReceiveFolder; textDCCSendFolder.Text = iceChatOptions.DCCSendFolder; textDCCLocalIP.Text = iceChatOptions.DCCLocalIP; comboBufferSize.Text = iceChatOptions.DCCBufferSize.ToString(); checkAutoGetLocalIP.Checked = iceChatOptions.DCCAutogetRouterIP; comboBoxLanguage.DataSource = FormMain.Instance.IceChatLanguageFiles; comboBoxLanguage.SelectedItem = FormMain.Instance.IceChatCurrentLanguageFile; //Event Settings comboJoinEvent.SelectedIndex = iceChatOptions.JoinEventLocation; comboPartEvent.SelectedIndex = iceChatOptions.PartEventLocation; comboQuitEvent.SelectedIndex = iceChatOptions.QuitEventLocation; comboModeEvent.SelectedIndex = iceChatOptions.ModeEventLocation; comboKickEvent.SelectedIndex = iceChatOptions.KickEventLocation; comboTopicEvent.SelectedIndex = iceChatOptions.TopicEventLocation; comboChannelMessageEvent.SelectedIndex = iceChatOptions.ChannelMessageEventLocation; comboChannelActionEvent.SelectedIndex = iceChatOptions.ChannelActionEventLocation; comboChannelNoticeEvent.SelectedIndex = iceChatOptions.ChannelNoticeEventLocation; comboWhoisEvent.SelectedIndex = iceChatOptions.WhoisEventLocation; comboNickEvent.SelectedIndex = iceChatOptions.NickChangeEventLocation; comboServerMessageEvent.SelectedIndex = iceChatOptions.ServerMessageEventLocation; comboServerNoticeEvent.SelectedIndex = iceChatOptions.ServerNoticeEventLocation; comboServerErrorEvent.SelectedIndex = iceChatOptions.ServerErrorEventLocation; comboUserNoticeEvent.SelectedIndex = iceChatOptions.UserNoticeEventLocation; //away settings textAwayCommand.Text = iceChatOptions.AwayCommand; textReturnCommand.Text = iceChatOptions.ReturnCommand; checkSendAwayReturn.Checked = iceChatOptions.SendAwayCommands; checkAwayMessagePrivate.Checked = iceChatOptions.SendAwayPrivateMessage; textAwayPrivateMessage.Text = iceChatOptions.PrivateAwayMessage; checkAutoAway.Checked = iceChatOptions.AutoAway; checkAutoReturn.Checked = iceChatOptions.AutoReturn; textAutoAwayMinutes.Text = iceChatOptions.AutoAwayTime.ToString(); checkAutoAwayTray.Checked = iceChatOptions.AutoAwaySystemTray; textAutoAwayMessage.Text = iceChatOptions.AutoAwayMessage; checkAutoPerformStartup.Checked = iceChatOptions.AutoPerformStartupEnable; if (iceChatOptions.AutoPerformStartup != null) { foreach (string command in iceChatOptions.AutoPerformStartup) { textAutoPerformStartup.AppendText(command + Environment.NewLine); } } trackTransparency.Value = Convert.ToInt32(FormMain.Instance.Opacity * 100); ApplyLanguage(); if (!StaticMethods.IsRunningOnMono()) { mp3Player = new MP3Player(); } else { player = new System.Media.SoundPlayer(); } }