示例#1
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog fd = new OpenFileDialog();

            fd.Filter = "All Script Files|*.bin";
            if (fd.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            byte[]   Script = File.ReadAllBytes(fd.FileName);
            string[] Strings;

            try {
                ScriptEditor = new CSTS(Script);
                Strings      = ScriptEditor.Import();
            } catch {
                DBMode   = true;
                DBEditor = new DBD(Script);
                Strings  = DBEditor.Import();
            }

            listBox1.Items.Clear();
            foreach (string str in Strings)
            {
                listBox1.Items.Add(str);
            }
        }
示例#2
0
        private void assertToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog fd = new OpenFileDialog();

            if (fd.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            string jap = fd.FileName;

            if (fd.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            string en = fd.FileName;

            CSTS open = new CSTS(File.ReadAllBytes(jap));
            var  rst  = open.Import();

            uint[] Offsets = open.OffPos.ToArray();
            open = new CSTS(File.ReadAllBytes(en));
            open.Import();
            uint[] NOffsets = open.OffPos.ToArray();
            uint[] Misssing = (from x in Offsets where !NOffsets.Contains(x) select x).ToArray();
        }