예제 #1
0
        private void mInternalFilesListBox_DragDrop(object sender, DragEventArgs e)
        {
            Control tb = sender as Control;

            string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
            if (files != null && files.Length == 1 && tb != null)
            {
                string        targetFile = ".\\mySave.max";
                PS2FileHelper helper     = new PS2FileHelper(mSaveFileNameTextBox.Text);
                helper.AddFileToSave(files[0]);
                helper.SaveMaxFileAs(targetFile);
                mSaveFileNameTextBox.Text = targetFile;
                ShowContants(mSaveFileNameTextBox.Text);
                helper.Dispose();
            }
        }
예제 #2
0
        private void mAddFileButton_Click(object sender, EventArgs e)
        {
            OpenFileDialog dlg = new OpenFileDialog();

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                string        targetFile = "mySave.max";
                PS2FileHelper helper     = new PS2FileHelper(mSaveFileNameTextBox.Text);
                helper.AddFileToSave(dlg.FileName);
                helper.SaveMaxFileAs(targetFile);
                mSaveFileNameTextBox.Text = targetFile;
                ShowContants(mSaveFileNameTextBox.Text);
                helper.Dispose();
            }
            dlg.Dispose();
        }