Пример #1
0
        private void replaceToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (selectedItem == null)
            {
                return;
            }
            int    i  = int.Parse(selectedItem.SubItems[2].Text);
            string fn = files[i].name;

            using (OpenFileDialog a = new OpenFileDialog()
            {
                DefaultExt = "wav",
                Filter = "WAV Files|*.wav|ADX Files|*.adx|All Files|*.*",
                FileName = fn
            })
                if (a.ShowDialog() == DialogResult.OK)
                {
                    files[i] = new FENTRY(a.FileName);
                    if (files[i].name != fn)
                    {
                        DialogResult mb = MessageBox.Show("Keep original filename " + fn + "?", "Keep filename?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                        if (mb == DialogResult.Yes)
                        {
                            files[i].name = fn;
                        }
                    }
                    selectedItem.ForeColor = Compress.isFileCompressed(files[i].file) ? Color.Blue : Color.Black;
                    unsaved = true;
                    RefreshListView(mainView);
                }
        }
Пример #2
0
        private void replaceToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (selectedItem == null)
            {
                return;
            }
            int    i  = listView1.Items.IndexOf(selectedItem);
            string fn = files[i].name;

            using (OpenFileDialog a = new OpenFileDialog()
            {
                DefaultExt = "wav",
                Filter = "WAV Files|*.wav|ADX Files|*.adx|All Files|*.*",
                FileName = fn
            })
                if (a.ShowDialog() == DialogResult.OK)
                {
                    files[i]               = new FENTRY(a.FileName);
                    files[i].name          = fn;
                    selectedItem.ForeColor = Compress.isFileCompressed(files[i].file) ? Color.Blue : Color.Black;
                }
        }
Пример #3
0
 private void replaceToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (selectedItem == null) return;
     int i = listView1.Items.IndexOf(selectedItem);
     string fn = files[i].name;
     using (OpenFileDialog a = new OpenFileDialog()
     {
         DefaultExt = "wav",
         Filter = "WAV Files|*.wav|ADX Files|*.adx|All Files|*.*",
         FileName = fn
     })
         if (a.ShowDialog() == DialogResult.OK)
         {
             files[i] = new FENTRY(a.FileName);
             files[i].name = fn;
             selectedItem.ForeColor = Compress.isFileCompressed(files[i].file) ? Color.Blue : Color.Black;
         }
 }