⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sssoundcontrol.cs

📁 破解的飞信源代码
💻 CS
📖 第 1 页 / 共 2 页
字号:
namespace Imps.Client.Pc.Options
{
    using Imps.Client;
    using Imps.Client.Core;
    using Imps.Client.Pc;
    using Imps.Client.Pc.Controls;
    using Imps.Client.Resource;
    using Imps.Client.Utils;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Drawing;
    using System.IO;
    using System.Media;
    using System.Windows.Forms;

    public class SsSoundControl : OptionsControlBase
    {
        private IFrameworkWindow _iFrameworkWnd;
        private NotifyWinodwSetting _ns;
        private Image _playPic = ImpsResources.GetImage("Images.play.png");
        private Dictionary<int, SoundFile> _soundList;
        private XButton btnModify;
        private XButton btnPlay;
        private CheckBox chkMsgNotify;
        private ColumnHeader columnHeader1;
        private IContainer components;
        private GroupBox groupBox1;
        private GroupBox groupBox2;
        private XLabel label1;
        private ListView lvSound;
        private OpenFileDialog openFileDialogSound;
        private RadioButton rbAllNo;
        private RadioButton rbAllYes;
        private RadioButton rbByContact;
        private Imps.Client.Core.SoundSetting ss;
        private XTextBox xtbFilePath;

        public SsSoundControl(IFrameworkWindow iFrameworkWnd)
        {
            this._iFrameworkWnd = iFrameworkWnd;
            this.ss = this._user.Configuration.UserSetting.SoundSetting;
            this._ns = this._user.Configuration.UserSetting.NotifyWinodwSetting;
            this.InitializeComponent();
            this.initSoundList();
            this.initSoundUIList();
            this.handleUiEvent();
        }

        private void btnModify_Click(object sender, EventArgs e)
        {
            if (this.lvSound.SelectedIndices.Count > 0)
            {
                this.modifySound(this.lvSound.SelectedIndices[0]);
            }
            else
            {
                this._iFrameworkWnd.UnifiedMessageBox.ShowInfo("请选择一个需要修改的声音设置!");
            }
        }

        private void btnPlay_Click(object sender, EventArgs e)
        {
            if (this.lvSound.SelectedIndices.Count > 0)
            {
                this.playSound(this.lvSound.SelectedIndices[0]);
            }
        }

        public override bool CheckUserInput()
        {
            return true;
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void handleUiEvent()
        {
            this.rbAllNo.CheckedChanged += new EventHandler(this.uiData_Changed);
            this.rbAllYes.CheckedChanged += new EventHandler(this.uiData_Changed);
            this.rbByContact.CheckedChanged += new EventHandler(this.uiData_Changed);
            this.chkMsgNotify.CheckedChanged += new EventHandler(this.uiData_Changed);
            this.xtbFilePath.TextChanged += new EventHandler(this.uiData_Changed);
            this.lvSound.ItemCheck += new ItemCheckEventHandler(this.uiData_Changed);
        }

        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(SsSoundControl));
            this.chkMsgNotify = new CheckBox();
            this.xtbFilePath = new XTextBox();
            this.openFileDialogSound = new OpenFileDialog();
            this.rbAllYes = new RadioButton();
            this.rbAllNo = new RadioButton();
            this.rbByContact = new RadioButton();
            this.label1 = new XLabel();
            this.groupBox1 = new GroupBox();
            this.groupBox2 = new GroupBox();
            this.btnModify = new XButton();
            this.btnPlay = new XButton();
            this.lvSound = new ListView();
            this.columnHeader1 = new ColumnHeader();
            this.groupBox1.SuspendLayout();
            this.groupBox2.SuspendLayout();
            base.SuspendLayout();
            this.chkMsgNotify.set_AutoSize(true);
            this.chkMsgNotify.Location = new System.Drawing.Point(6, 0x67);
            this.chkMsgNotify.Name = "chkMsgNotify";
            this.chkMsgNotify.Size = new Size(0x90, 0x10);
            this.chkMsgNotify.TabIndex = 3;
            this.chkMsgNotify.Text = "新消息到达时显示通知";
            this.chkMsgNotify.set_UseVisualStyleBackColor(true);
            this.xtbFilePath.BackColor = Color.FromArgb(240, 240, 240);
            this.xtbFilePath.BorderStyle = BorderStyle.FixedSingle;
            this.xtbFilePath.EmptyTextTip = "";
            this.xtbFilePath.EmptyTextTipColor = Color.DarkGray;
            this.xtbFilePath.Location = new System.Drawing.Point(8, 0x7a);
            this.xtbFilePath.Name = "xtbFilePath";
            this.xtbFilePath.ReadOnly = true;
            this.xtbFilePath.Size = new Size(0x10a, 0x15);
            this.xtbFilePath.TabIndex = 4;
            this.xtbFilePath.TabStop = false;
            this.openFileDialogSound.Filter = "wave files (*.wav)|*.wav";
            this.rbAllYes.set_AutoSize(true);
            this.rbAllYes.Checked = true;
            this.rbAllYes.Location = new System.Drawing.Point(0x1a, 0x23);
            this.rbAllYes.Name = "rbAllYes";
            this.rbAllYes.Size = new Size(0x77, 0x10);
            this.rbAllYes.TabIndex = 0;
            this.rbAllYes.TabStop = true;
            this.rbAllYes.Text = "好友上线时通知我";
            this.rbAllYes.set_UseVisualStyleBackColor(true);
            this.rbAllYes.CheckedChanged += new EventHandler(this.rbAllYes_CheckedChanged);
            this.rbAllNo.set_AutoSize(true);
            this.rbAllNo.Location = new System.Drawing.Point(0x1a, 0x39);
            this.rbAllNo.Name = "rbAllNo";
            this.rbAllNo.Size = new Size(0x83, 0x10);
            this.rbAllNo.TabIndex = 1;
            this.rbAllNo.Text = "不显示好友上线通知";
            this.rbAllNo.set_UseVisualStyleBackColor(true);
            this.rbByContact.set_AutoSize(true);
            this.rbByContact.Location = new System.Drawing.Point(0x1a, 0x4e);
            this.rbByContact.Name = "rbByContact";
            this.rbByContact.Size = new Size(0x77, 0x10);
            this.rbByContact.TabIndex = 2;
            this.rbByContact.Text = "每个好友单独设置";
            this.rbByContact.set_UseVisualStyleBackColor(true);
            this.label1.set_AutoSize(true);
            this.label1.BorderColor = Color.Empty;
            this.label1.ButtonBorderStyle = ButtonBorderStyle.None;
            this.label1.Location = new System.Drawing.Point(6, 0x11);
            this.label1.Name = "label1";
            this.label1.Size = new Size(0x4d, 12);
            this.label1.TabIndex = 7;
            this.label1.Text = "好友上线通知";
            this.label1.UseMnemonic = false;
            this.groupBox1.Controls.Add(this.label1);
            this.groupBox1.Controls.Add(this.chkMsgNotify);
            this.groupBox1.Controls.Add(this.rbAllYes);
            this.groupBox1.Controls.Add(this.rbAllNo);
            this.groupBox1.Controls.Add(this.rbByContact);
            this.groupBox1.Location = new System.Drawing.Point(3, 3);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new Size(0x19e, 0x7f);
            this.groupBox1.TabIndex = 0;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "通知设置";
            this.groupBox2.Controls.Add(this.btnModify);
            this.groupBox2.Controls.Add(this.btnPlay);
            this.groupBox2.Controls.Add(this.lvSound);
            this.groupBox2.Controls.Add(this.xtbFilePath);
            this.groupBox2.Location = new System.Drawing.Point(3, 0x88);
            this.groupBox2.Name = "groupBox2";
            this.groupBox2.Size = new Size(0x19e, 0x95);
            this.groupBox2.TabIndex = 15;
            this.groupBox2.TabStop = false;
            this.groupBox2.Text = "声音设置";
            this.btnModify.AutoSizeToImage = false;
            this.btnModify.BackColor = Color.Transparent;
            this.btnModify.BackgroundImage = (Image) manager.GetObject("btnModify.BackgroundImage");
            this.btnModify.BackgroundImageDisable = (Image) manager.GetObject("btnModify.BackgroundImageDisable");
            this.btnModify.BackgroundImageDown = (Image) manager.GetObject("btnModify.BackgroundImageDown");
            this.btnModify.BackgroundImageHover = (Image) manager.GetObject("btnModify.BackgroundImageHover");
            this.btnModify.ChangeSkin = false;
            this.btnModify.Location = new System.Drawing.Point(0x15b, 0x7a);
            this.btnModify.Name = "btnModify";
            this.btnModify.Size = new Size(0x35, 0x15);
            this.btnModify.TabIndex = 2;
            this.btnModify.Text = "更改...";
            this.btnModify.set_UseVisualStyleBackColor(false);
            this.btnModify.Click += new EventHandler(this.btnModify_Click);
            this.btnPlay.AutoSizeToImage = false;
            this.btnPlay.BackColor = Color.Transparent;
            this.btnPlay.BackgroundImage = (Image) manager.GetObject("btnPlay.BackgroundImage");
            this.btnPlay.BackgroundImageDisable = (Image) manager.GetObject("btnPlay.BackgroundImageDisable");
            this.btnPlay.BackgroundImageDown = (Image) manager.GetObject("btnPlay.BackgroundImageDown");
            this.btnPlay.BackgroundImageHover = (Image) manager.GetObject("btnPlay.BackgroundImageHover");
            this.btnPlay.ChangeSkin = false;
            this.btnPlay.Location = new System.Drawing.Point(280, 0x7a);
            this.btnPlay.Name = "btnPlay";
            this.btnPlay.Size = new Size(0x35, 0x15);
            this.btnPlay.TabIndex = 1;
            this.btnPlay.Text = "播放";
            this.btnPlay.set_UseVisualStyleBackColor(false);
            this.btnPlay.Click += new EventHandler(this.btnPlay_Click);
            this.lvSound.CheckBoxes = true;
            this.lvSound.Columns.AddRange(new ColumnHeader[] { this.columnHeader1 });
            this.lvSound.FullRowSelect = true;
            this.lvSound.HeaderStyle = ColumnHeaderStyle.None;
            this.lvSound.HideSelection = false;
            this.lvSound.Location = new System.Drawing.Point(8, 20);
            this.lvSound.MultiSelect = false;
            this.lvSound.Name = "lvSound";
            this.lvSound.Size = new Size(400, 0x61);
            this.lvSound.TabIndex = 0;
            this.lvSound.set_UseCompatibleStateImageBehavior(false);
            this.lvSound.View = View.Details;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -