private void tabControl1_MouseClick(object sender, MouseEventArgs e) { for (int i = 0; i < tabControl1.TabCount; i++) { TabPage p = tabControl1.TabPages[i]; TabControl tmp = (TabControl)p.Controls[0].Controls[0]; Rectangle r = tabControl1.GetTabRect(i); Rectangle closeButton = new Rectangle(r.Right - 18, r.Top + 3, 12, 10); if (closeButton.Contains(e.Location)) { for (int x = 0; x < tmp.TabCount; x++) { ITSCodeBox box = (ITSCodeBox)tmp.TabPages[x].Controls[0]; if (!isRoot) { _curFile.EventLists[box.CommandList.AnimationCRC] = box.ApplyChanges(); } else { _curFighter[box.CommandList._parent.Type].EventLists[box.CommandList.AnimationCRC] = box.ApplyChanges(); } } tabControl1.TabPages.Remove(p); return; } } }
private void saveToolStripMenuItem_Click(object sender, EventArgs e) { if (isRoot && _curFighter == null) { return; } else if (!isRoot && _curFile == null) { return; } for (int i = 0; i < tabControl1.TabCount; i++) { TabPage p = tabControl1.TabPages[i]; TabControl tmp = (TabControl)p.Controls[0].Controls[0]; for (int x = 0; x < tmp.TabCount; x++) { ITSCodeBox box = (ITSCodeBox)tmp.TabPages[x].Controls[0]; if (box.CommandList.Empty) { continue; } box.ApplyChanges(); if (!isRoot) { _curFile.EventLists[box.CommandList.AnimationCRC] = box.CommandList; } else { _curFighter[(ACMDType)x].EventLists[box.CommandList.AnimationCRC] = box.CommandList; } } } if (isRoot) { _curFighter.Main.Export(rootPath + "/game.bin"); _curFighter.GFX.Export(rootPath + "/effect.bin"); _curFighter.SFX.Export(rootPath + "/sound.bin"); _curFighter.Expression.Export(rootPath + "/expression.bin"); _curFighter.MotionTable.Export(rootPath + "/Motion.mtable"); } else { _curFile.Export(FileName); } }
public AutoCompleteBox(ITSCodeBox box) { this.Parent = Owner = box; this.tooltip = new eToolTip(); this.timer = new Timer(); this.timer.Interval = 300; this.timer.Tick += TtTimer_Tick; this.SelectedIndexChanged += AutoCompleteBox_SelectedIndexChanged; this.VisibleChanged += AutoCompleteBox_VisibleChanged; box.KeyDown += Box_KeyDown; this.KeyDown += AutoCompleteBox_KeyDown; this.DoubleClick += AutoCompleteBox_DoubleClick; SetStyle(ControlStyles.Selectable, false); }
private void saveAsToolStripMenuItem_Click(object sender, EventArgs e) { for (int i = 0; i < tabControl1.TabCount; i++) { TabPage p = tabControl1.TabPages[i]; TabControl tmp = (TabControl)p.Controls[0].Controls[0]; for (int x = 0; x < tmp.TabCount; x++) { ITSCodeBox box = (ITSCodeBox)tmp.TabPages[x].Controls[0]; if (box.CommandList.Empty) { continue; } box.ApplyChanges(); if (!isRoot) { _curFile.EventLists[box.CommandList.AnimationCRC] = box.CommandList; } else { _curFighter[(ACMDType)x].EventLists[box.CommandList.AnimationCRC] = box.CommandList; } } } if (isRoot) { using (FolderSelectDialog dlg = new FolderSelectDialog()) if (dlg.ShowDialog() == DialogResult.OK) { _curFighter.Export(dlg.SelectedPath); } } else { using (SaveFileDialog dlg = new SaveFileDialog { Filter = "ACMD Binary (*.bin)|*.bin|All Files (*.*)|*.*" }) if (dlg.ShowDialog() == DialogResult.OK) { _curFile.Export(dlg.FileName); } } }
private void saveAsToolStripMenuItem_Click(object sender, EventArgs e) { foreach (TabPage p in tabControl1.TabPages) { ITSCodeBox box = (ITSCodeBox)p.Controls[0]; if (!isRoot) { _curFile.EventLists[box.CommandList.AnimationCRC] = box.ApplyChanges(); } else { _curFighter[box.CommandList._parent.Type].EventLists[box.CommandList.AnimationCRC] = box.ApplyChanges(); } } if (isRoot) { FolderSelectDialog dlg = new FolderSelectDialog(); DialogResult result = dlg.ShowDialog(); if (result == DialogResult.OK) { _curFighter.Main.Export(dlg.SelectedPath + "/game.bin"); _curFighter.GFX.Export(dlg.SelectedPath + "/effect.bin"); _curFighter.SFX.Export(dlg.SelectedPath + "/sound.bin"); _curFighter.Expression.Export(dlg.SelectedPath + "/expression.bin"); _curFighter.MotionTable.Export(dlg.SelectedPath + "/Motion.mtable"); } dlg.Dispose(); } else { SaveFileDialog dlg = new SaveFileDialog { Filter = "ACMD Binary (*.bin)|*.bin|All Files (*.*)|*.*" }; DialogResult result = dlg.ShowDialog(); if (result == DialogResult.OK) { _curFile.Export(dlg.FileName); } dlg.Dispose(); } }
private void saveToolStripMenuItem_Click(object sender, EventArgs e) { if (isRoot && _curFighter == null) { return; } else if (_curFile == null) { return; } foreach (TabPage p in tabControl1.TabPages) { ITSCodeBox box = (ITSCodeBox)p.Controls[0]; if (!isRoot) { _curFile.EventLists[box.CommandList.AnimationCRC] = box.ApplyChanges(); } else { _curFighter[box.CommandList._parent.Type].EventLists[box.CommandList.AnimationCRC] = box.ApplyChanges(); } } if (isRoot) { _curFighter.Main.Export(rootPath + "/game.bin"); _curFighter.GFX.Export(rootPath + "/effect.bin"); _curFighter.SFX.Export(rootPath + "/sound.bin"); _curFighter.Expression.Export(rootPath + "/expression.bin"); _curFighter.MotionTable.Export(rootPath + "/Motion.mtable"); } else { _curFile.Export(FileName); } }
public Line(string val, ITSCodeBox owner) { CodeBox = owner; Text = val; }