using Sunny.UI;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace SunnyMusic.LrcEditor
{
    public partial class MusicDialog : UIForm
    {
        public MusicDialog()
        {
            InitializeComponent();
        }
        private void btnDir_Click(object sender, EventArgs e)
        {
            if(open.ShowDialog()==DialogResult.OK)
            { txtUrl.Text = open.FileName; }
        }
        private void btnPlay_Click(object sender, EventArgs e)
        {
            player.URL = txtUrl.Text;
        }
        private void btnOk_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            this.Close();
        }
        private void MusicDialog_FormClosing(object sender, FormClosingEventArgs e)
        {
            player.URL = null;
        }
    }
}
