Beispiel #1
0
        private void PlaySoundButton_Click(object sender, RoutedEventArgs e)
        {
            Button           playButton = sender as Button;
            SoundSettingData data       = playButton.DataContext as SoundSettingData;

            Debug.WriteLine(data.soundName);
        }
Beispiel #2
0
    private void LoadSettingSounds()
    {
        SoundSettingData data = DataManager.LoadSoundSetting();

        if (data == null)
        {
            gameVolume  = 0.25f;
            musicVolume = 0.25f;
        }
        else
        {
            gameVolume  = data.gameVolume;
            musicVolume = data.musicVolume;
        }
    }
Beispiel #3
0
    public static void SaveSoundSetting(SoundManager soundManager)
    {
        try
        {
            BinaryFormatter binaryFormetter = new BinaryFormatter();
            FileStream      fs = new FileStream(soundSettingPath, FileMode.Create);

            SoundSettingData data = new SoundSettingData(soundManager);
            binaryFormetter.Serialize(fs, data);
            fs.Close();
            WebGLSyncFile();
        }
        catch
        {
            LogSaveFileError(soundSettingPath);
        }
    }
Beispiel #4
0
 private void ListingItems(string directoryPath)
 {
     if (!File.Exists(directoryPath + "/" + BOUYOMI_EXE))
     {
         return;
     }
     if (Directory.Exists(directoryPath + "/" + SOUND_DIR))
     {
         List <string> seFileList = GetSoundFilePaths(directoryPath + "/" + SOUND_DIR);
     }
     string[] dicLines = ReadDictionary(directoryPath + "/" + DICTIONARY_NAME);
     foreach (string dicLine in dicLines)
     {
         SoundSettingData soundSetting = new SoundSettingData();
         soundSetting.SetSettingString(dicLine);
         listView.Items.Add(soundSetting);
     }
 }
Beispiel #5
0
 public SaveData()
 {
     clientsData   = new List <ContactData>();
     lastSession   = new SessionData();
     soundSettings = new SoundSettingData();
 }