Esempio n. 1
0
        private void mExportButton_Click(object sender, EventArgs e)
        {
            SoundExportData data = new SoundExportData();

            data.PlayCommand      = _commands["Play"];
            data.PauseCommand     = _commands["Pause"];
            data.StopCommand      = _commands["Stop"];
            data.NextTrackCommand = _commands["NextTrack"];
            data.PrevTrackCommand = _commands["PrevTrack"];
            data.OnLoadCommand    = _commands["OnLoad"];
            data.LikeCommand      = _commands["Like"];
            data.DislikeCommand   = _commands["Dislike"];

            string jsonText     = Newtonsoft.Json.JsonConvert.SerializeObject(data);
            string tempFileName = System.IO.Path.GetTempFileName();

            System.IO.File.WriteAllText(tempFileName, jsonText);

            MessageBox.Show(this, "To share with the community, please e-mail to [email protected].", Constants.ProgramName);
            System.Diagnostics.Process.Start("notepad.exe", tempFileName);
        }
Esempio n. 2
0
        private void mExportButton_Click(object sender, EventArgs e)
        {
            SoundExportData data = new SoundExportData();

            data.PlayCommand = _commands["Play"];
            data.PauseCommand = _commands["Pause"];
            data.StopCommand = _commands["Stop"];
            data.NextTrackCommand = _commands["NextTrack"];
            data.PrevTrackCommand = _commands["PrevTrack"];
            data.OnLoadCommand = _commands["OnLoad"];
            data.LikeCommand = _commands["Like"];
            data.DislikeCommand = _commands["Dislike"];

            string jsonText = Newtonsoft.Json.JsonConvert.SerializeObject(data);
            string tempFileName = System.IO.Path.GetTempFileName();

            System.IO.File.WriteAllText(tempFileName, jsonText);

            MessageBox.Show(this, "To share with the community, please e-mail to [email protected].", Constants.ProgramName);
            System.Diagnostics.Process.Start("notepad.exe", tempFileName);
        }