コード例 #1
0
ファイル: SoundPlayer.cs プロジェクト: Kruithne/W3DT
        public SoundPlayer(CASCFile file)
        {
            InitializeComponent();

            this.file = file;
            localPath = Path.Combine(Constants.TEMP_DIRECTORY, file.FullName);

            player = new ZPlay();
            if (!File.Exists(localPath))
            {
                EventManager.FileExtractComplete += OnFileExtractComplete;

                RunnerExtractItem extract = new RunnerExtractItem(file);
                runnerID = extract.runnerID;
                extract.Begin();

                SetState("Extracting file...");
            }
            else
            {
                ready = true;
                Play();
            }

            UI_TrackTitle.Text = file.Name;
            Text = file.Name + " - W3DT";

            UI_VolumeBar.Value = Program.Settings.SoundPlayerVolume;
            player.SetPlayerVolume(UI_VolumeBar.Value, UI_VolumeBar.Value);
        }