private void button9_Click_1(object sender, EventArgs e) { Fname.Items.Clear(); Fdescriptions.Text = ""; Fcontent.Text = ""; button6.Enabled = false; button7.Enabled = false; button8.Enabled = false; button2.Enabled = false; button3.Enabled = false; button4.Enabled = false; button11.Enabled = false; button10.Enabled = false; button13.Enabled = false; W3J = null; BJ = null; }
private void button9_Click_1(object sender, EventArgs e) { Functions_list.Items.Clear(); Descriptions.Text = ""; Code.Text = ""; Functions_count.Text = "0"; New_functions_count.Text = "0"; Edited_functions_count.Text = "0"; Add_function.Enabled = false; Add_comment.Enabled = false; Delete_function.Enabled = false; Save_changes.Enabled = false; Save_file.Enabled = false; Load_w3mwts.Enabled = false; Load_w3mj.Enabled = false; Load_w3mmisc.Enabled = false; W3J = null; BJ = null; }
public void button10_Click(object sender, EventArgs e) { ChangeLabel(1); EditItems.Clear(); AddItems.Clear(); Functions_count.Text = "0"; New_functions_count.Text = "0"; Edited_functions_count.Text = "0"; W3J = new w3j_structure(@"Input\war3map.j"); W3J.AddPreName("BJE_"); int InitFuncIndex = 0; BJ.global.Add(" // war3map.j additions"); for (int i = 0; i < W3J.globals.Length; i++) { BJ.global.Add(" " + W3J.globals[i]); } for (int i = 0; i < BJ.substance.Count; i++) { if (BJ.substance[i].GetType() == typeof(Bj_structure.function)) { if (((Bj_structure.function)BJ.substance[i]).name.Trim() == "InitBlizzard") { Bj_structure.function temp = (Bj_structure.function)BJ.substance[i]; temp.content = temp.content.Insert(temp.content.LastIndexOf("endfunction"), Environment.NewLine + " // BJE_InitFuncs" + Environment.NewLine + W3J.CallFuncs); BJ.substance[i] = temp; InitFuncIndex = i; break; } } } BJ.substance.Insert(InitFuncIndex, W3J.Func_RunInitializationTriggers); BJ.substance.Insert(InitFuncIndex, W3J.Func_InitCustomTriggers); BJ.substance.Insert(InitFuncIndex, W3J.CSCandTrig); BJ.substance.Insert(InitFuncIndex, W3J.Func_InitGlobals); ListBJNew(); ChangeLabel(0); ShowChanges(); }
public void button10_Click(object sender, EventArgs e) { ChangeLabel(1); EditItems.Clear(); AddItems.Clear(); //BJ = new Bj_structure(@"Input\Blizzard.j"); W3J = new w3j_structure(@"Input\war3map.j"); W3J.AddPreName("MC_"); int InitFuncIndex = 0; BJ.global.Add(" // war3map.j additions"); for (int i = 0; i < W3J.globals.Length; i++) { BJ.global.Add(" " + W3J.globals[i]); } for (int i = 0; i < BJ.substance.Count; i++) { if (BJ.substance[i].GetType() == typeof(Bj_structure.function)) { if (((Bj_structure.function)BJ.substance[i]).name.Trim() == "MeleeStartingVisibility") { Bj_structure.function temp = (Bj_structure.function)BJ.substance[i]; temp.content = temp.content.Insert(temp.content.LastIndexOf("endfunction"), Environment.NewLine+"//MC_InitFuncs"+Environment.NewLine + W3J.CallFuncs); BJ.substance[i] = temp; InitFuncIndex = i; break; } } } BJ.substance.Insert(InitFuncIndex, W3J.Func_RunInitializationTriggers); BJ.substance.Insert(InitFuncIndex, W3J.Func_InitCustomTriggers); BJ.substance.Insert(InitFuncIndex, W3J.CSCandTrig); BJ.substance.Insert(InitFuncIndex, W3J.Func_InitGlobals); ListBJNew(); ChangeLabel(0); }