コード例 #1
0
ファイル: LOCEditor.cs プロジェクト: Pib0/WhineCraft
        public LOCEditor(LOC loc)
        {
            InitializeComponent();

            currentLoc = loc;
            tbl        = new DataTable();
            tbl.Columns.Add(new DataColumn("Language")
            {
                ReadOnly = true
            });
            tbl.Columns.Add("Display Name");
            dataGridView1.DataSource = tbl;
        }
コード例 #2
0
        private void editAsLocToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (treeView1.SelectedNode.Tag is PCK.MineFile)
            {
                LOC          l;
                PCK.MineFile mf = (PCK.MineFile)treeView1.SelectedNode.Tag;

                //l = new LOC(mf.data);

                try
                {
                    l = new LOC(mf.data);
                }
                catch
                {
                    MessageBox.Show("No localization data found.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                (new LOCEditor(l)).ShowDialog();
                mf.data = l.Rebuild();
            }
        }