コード例 #1
0
        private void toolStripMenuItem_ViewScript_Click(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();

            if (openFileDialog.ShowDialog() == DialogResult.OK)
            {
                BaseFile           baseFile           = new BaseFile(openFileDialog.FileName);
                ScriptViewerWindow scriptViewerWindow = new ScriptViewerWindow(baseFile);
                scriptViewerWindow.Show();
            }
        }
コード例 #2
0
        private void OnShowCurrentFileClick(object sender, EventArgs eventArgs)
        {
            if (listBox_ScriptFiles.SelectedIndex == -1)
            {
                return;
            }
            Enabled = false;
            ScriptDocument file = ScriptFile.Scripts[listBox_ScriptFiles.SelectedIndex];

            file.WriteToOriginalFile();
            if (file.BaseFile.GetType() == typeof(LZBFile))
            {
                LZBFile            lzbFile            = (LZBFile)file.BaseFile;
                ScriptViewerWindow scriptViewerWindow = new ScriptViewerWindow(lzbFile.DecompressedFile);
                scriptViewerWindow.Show();
            }
            Enabled = true;
        }