private void rSTMToolStripMenuItem_Click(object sender, EventArgs e) { using (OpenFileDialog ofd = new OpenFileDialog() { Filter = SupportedFilesHandler.GetCompleteFilter("wav") }) if (ofd.ShowDialog() == DialogResult.OK) { RSTMNode r = new RSTMNode() { _fileIndex = _targetNode.Files.Count }; using (BrstmConverterDialog dlg = new BrstmConverterDialog()) { dlg.AudioSource = ofd.FileName; if (dlg.ShowDialog(this) == DialogResult.OK) { r.Name = String.Format("[{0}] {1}", _targetNode.Files.Count, Path.GetFileNameWithoutExtension(dlg.AudioSource)); r.ReplaceRaw(dlg.AudioData); } } r._parent = _targetNode; _targetNode.Files.Add(r); r.SignalPropertyChange(); Update(lstSets); } }
private void mnuReplace_Click(object sender, EventArgs e) { using (OpenFileDialog dlg = new OpenFileDialog()) { dlg.Filter = SupportedFilesHandler.GetCompleteFilter("brwsd", "brbnk", "brseq", "brstm"); if (dlg.ShowDialog() == DialogResult.OK) { _selectedItem._node.Replace(dlg.FileName); } } }
private void sndNew_Click(object sender, EventArgs e) { WAVESoundNode s = new WAVESoundNode(); s.Name = String.Format("[{0}]Audio", _targetNode.Children[1].Children.Count); s.Parent = _targetNode.Children[1]; using (OpenFileDialog ofd = new OpenFileDialog()) { ofd.Filter = SupportedFilesHandler.GetCompleteFilter("wav"); if (ofd.ShowDialog() != DialogResult.Cancel) { s.Replace(ofd.FileName); TargetChanged(); ReselectBaseEntry(); } } }
public void ReimportMeshes() { OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = SupportedFilesHandler.GetCompleteFilter("mdl0", "dae"); ofd.Title = "Please select a model to reimport meshes from."; if (ofd.ShowDialog() == DialogResult.OK) { MDL0Node replacement = MDL0Node.FromFile(ofd.FileName); if (replacement != null) { ((MDL0Node)_resource).ReplaceMeshes(replacement, true, true, true); replacement.Dispose(); _resource.UpdateCurrentControl(); } } }
public bool LoadExternal(bool models = true, bool animations = true, bool etc = true) { _mainWindow._dlgOpen.Filter = SupportedFilesHandler.GetCompleteFilter( "pac", "pcs", "brres", "mrg", "mrgc", "arc", "szs", "chr0", "srt0", "pat0", "vis0", "shp0", "clr0", "scn0"); if (_mainWindow._dlgOpen.ShowDialog() == DialogResult.OK) { foreach (string file in _mainWindow._dlgOpen.FileNames) { _mainWindow.OpenFile(file, models, animations, etc); } } return(false); }