Example #1
0
 private void aPNGToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (MainPanel.DataTree.SelectedNode == null)
     {
         return;
     }
     if (!ValidAnimation((WzObject)MainPanel.DataTree.SelectedNode.Tag))
     {
         Warning.Error(HaRepacker.Properties.Resources.MainAnimationFail);
     }
     else
     {
         SaveFileDialog dialog = new SaveFileDialog()
         {
             Title = HaRepacker.Properties.Resources.SelectOutApng, Filter = string.Format("{0}|*.png", HaRepacker.Properties.Resources.ApngFilter)
         };
         if (dialog.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         AnimationBuilder.ExtractAnimation((WzSubProperty)MainPanel.DataTree.SelectedNode.Tag, dialog.FileName, UserSettings.UseApngIncompatibilityFrame);
     }
 }