예제 #1
0
        private void GliderScoreMerge_Load(object sender, EventArgs e)
        {
            dgTimerNames.AutoGenerateColumns = false;

            string inZip = Path.Combine(System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "GliderScore6.zip");

            if (File.Exists(inZip))
            {
                tbInputZipFile.Text = inZip;
                zip = new GliderScoreZip(inZip);
                audioHashset.Clear();
            }
            else
            {
                tbInputZipFile.Text = "";
            }

            if (Directory.Exists("C:\\GliderScore6"))
            {
                tbOutputGliderScoreDirectory.Text = "C:\\GliderScore6";
                directory = new GliderScoreDirectory(tbOutputGliderScoreDirectory.Text);
            }
            else
            {
                tbOutputGliderScoreDirectory.Text = "";
            }

            if (tbInputZipFile.Text != "" && tbOutputGliderScoreDirectory.Text != "")
            {
                setDataSource();
            }
        }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            openFileDialog1.InitialDirectory = System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
            openFileDialog1.RestoreDirectory = true;
            DialogResult result = openFileDialog1.ShowDialog();

            if (result == DialogResult.OK) // Test result.
            {
                try
                {
                    // HACK HACK HACK - MICROSOFT BUG
                    // CHECK OUT https://www.telerik.com/forums/double-click-on-openfiledialog-is-raising-itemclick-event-on-radtreeview
                    //dgTimerNames.Enabled = false;
                    zip = new GliderScoreZip(openFileDialog1.FileName);
                    audioHashset.Clear();
                    tbInputZipFile.Text = openFileDialog1.FileName;
                }
                catch (Exception)
                {
                    MessageBox.Show("Unable to process input file: " + openFileDialog1.FileName);
                }

                // NOW WAIT FOR THE ERRANT MOUSE UP EVENT TO BE CONSUMED

                /*System.Threading.Timer _bugTimer = new System.Threading.Timer(delegate
                 * {
                 *  dgTimerNames.Invoke((MethodInvoker)delegate
                 * {
                 *     dgTimerNames.Enabled = true;
                 * });
                 * }, null, 500, Timeout.Infinite);
                 */
                setDataSource();
            }
        }