private void Open_Executed(object sender, ExecutedRoutedEventArgs e) { OpenFileDialog d = new OpenFileDialog(); d.Filter = "*.pcc|*.pcc"; if (d.ShowDialog() == true) { try { LoadMEPackage(d.FileName); if (pcc.Game == MEGame.ME1) { pcc?.Release(wpfWindow: this); pcc = null; throw new FormatException("FaceFXEditor does not work on ME1 files."); } selectedLine = null; FaceFX = null; treeView.Nodes.Clear(); linesListBox.ItemsSource = null; animationListBox.ItemsSource = null; graph.Clear(); RefreshComboBox(); } catch (Exception ex) { pcc?.Release(wpfWindow: this); pcc = null; MessageBox.Show("Error:\n" + ex.Message); } } }
public void LoadFile(string fileName) { try { LoadMEPackage(fileName); /*if (pcc.Game == MEGame.ME1) * { * pcc?.Release(wpfWindow: this); * pcc = null; * throw new FormatException("FaceFXEditor does not work on ME1 files."); * }*/ selectedLine = null; FaceFX = null; treeView.Nodes.Clear(); linesListBox.ItemsSource = null; animationListBox.ItemsSource = null; graph.Clear(); RefreshComboBox(); } catch (Exception ex) { pcc?.Release(wpfWindow: this); pcc = null; MessageBox.Show("Error:\n" + ex.Message); } }
private void Open_Executed(object sender, ExecutedRoutedEventArgs e) { OpenFileDialog d = new OpenFileDialog(); d.Filter = "*.pcc|*.pcc"; if (d.ShowDialog() == true) { try { LoadMEPackage(d.FileName); if (pcc.Game == MEGame.ME1) { pcc?.Release(wpfWindow: this); pcc = null; throw new FormatException("FaceFXEditor does not work on ME1 files."); } selectedLine = null; FaceFX = null; treeView.Nodes.Clear(); linesListBox.ItemsSource = null; animationListBox.ItemsSource = null; graph.Clear(); RefreshComboBox(); } catch (Exception ex) { pcc?.Release(wpfWindow: this); pcc = null; MessageBox.Show("Error:\n" + ex.Message); } } }
private void loadFaceFXAnimset() { if (pcc.Game == MEGame.ME3) { FaceFX = new ME3FaceFXAnimSet(pcc, FaceFXAnimSetComboBox.SelectedItem as IExportEntry); linesListBox.ItemsSource = FaceFX.Data.Data; } else { FaceFX = new ME2FaceFXAnimSet(pcc, FaceFXAnimSetComboBox.SelectedItem as IExportEntry); linesListBox.ItemsSource = (FaceFX.Data as ME2DataAnimSetStruct).Data; } treeView.Nodes.Clear(); graph.Clear(); }
public void LoadFile(string fileName) { try { LoadMEPackage(fileName); selectedLine = null; FaceFX = null; treeView.Nodes.Clear(); linesListBox.ItemsSource = null; animationListBox.ItemsSource = null; graph.Clear(); RefreshComboBox(); } catch (Exception ex) { UnLoadMEPackage(); MessageBox.Show("Error:\n" + ex.Message); } }
public override void handleUpdate(List <PackageUpdate> updates) { IEnumerable <PackageUpdate> relevantUpdates = updates.Where(x => x.change != PackageChange.Import && x.change != PackageChange.ImportAdd && x.change != PackageChange.Names); List <int> updatedExports = relevantUpdates.Select(x => x.index).ToList(); if (FaceFX != null && updatedExports.Contains(FaceFX.Export.Index)) { int index = FaceFX.Export.Index; //loaded FaceFXAnimset is no longer a FaceFXAnimset if (FaceFX.Export.ClassName != "FaceFXAnimSet") { selectedLine = null; FaceFX = null; treeView.Nodes.Clear(); linesListBox.ItemsSource = null; animationListBox.ItemsSource = null; graph.Clear(); } else if (!this.IsForegroundWindow()) { loadFaceFXAnimset(); } updatedExports.Remove(index); } if (updatedExports.Intersect(animSets.Select(x => x.Index)).Any()) { RefreshComboBox(); } else { foreach (var i in updatedExports) { if (pcc.getExport(i).ClassName == "FaceFXAnimSet") { RefreshComboBox(); break; } } } }
private void loadFaceFXAnimset() { switch (pcc.Game) { case MEGame.ME1: FaceFX = new ME1FaceFXAnimSet(pcc, FaceFXAnimSetComboBox.SelectedItem as IExportEntry); linesListBox.ItemsSource = (FaceFX.Data as ME3DataAnimSetStruct).Data; break; case MEGame.ME2: FaceFX = new ME2FaceFXAnimSet(pcc, FaceFXAnimSetComboBox.SelectedItem as IExportEntry); linesListBox.ItemsSource = (FaceFX.Data as ME2DataAnimSetStruct).Data; break; case MEGame.ME3: FaceFX = new ME3FaceFXAnimSet(pcc, FaceFXAnimSetComboBox.SelectedItem as IExportEntry); linesListBox.ItemsSource = FaceFX.Data.Data; break; } treeView.Nodes.Clear(); graph.Clear(); }
public override void handleUpdate(List<PackageUpdate> updates) { IEnumerable<PackageUpdate> relevantUpdates = updates.Where(x => x.change != PackageChange.Import && x.change != PackageChange.ImportAdd && x.change != PackageChange.Names); List<int> updatedExports = relevantUpdates.Select(x => x.index).ToList(); if (FaceFX != null && updatedExports.Contains(FaceFX.Export.Index)) { int index = FaceFX.Export.Index; //loaded FaceFXAnimset is no longer a FaceFXAnimset if (FaceFX.Export.ClassName != "FaceFXAnimSet") { selectedLine = null; FaceFX = null; treeView.Nodes.Clear(); linesListBox.ItemsSource = null; animationListBox.ItemsSource = null; graph.Clear(); } else if (!this.IsForegroundWindow()) { loadFaceFXAnimset(); } updatedExports.Remove(index); } if (updatedExports.Intersect(animSets.Select(x => x.Index)).Count() > 0) { RefreshComboBox(); } else { foreach (var i in updatedExports) { if (pcc.getExport(i).ClassName == "FaceFXAnimSet") { RefreshComboBox(); break; } } } }
private void loadFaceFXAnimset() { if (pcc.Game == MEGame.ME3) { FaceFX = new ME3FaceFXAnimSet(pcc, FaceFXAnimSetComboBox.SelectedItem as IExportEntry); linesListBox.ItemsSource = FaceFX.Data.Data; } else { FaceFX = new ME2FaceFXAnimSet(pcc, FaceFXAnimSetComboBox.SelectedItem as IExportEntry); linesListBox.ItemsSource = (FaceFX.Data as ME2DataAnimSetStruct).Data; } treeView.Nodes.Clear(); graph.Clear(); }