Ejemplo n.º 1
0
 private void btnShowPreview_Click(object sender, EventArgs e)
 {
     //When more than one frame, create duplicate action and view action
     if (Package.PackageState != AMTUtil.State.READY)
     {
         return;
     }
     if (lbFrames.SelectedIndex == -1)
     {
         MessageBox.Show("You need to select a frame!");
         return;
     }
     if (lbFrames.SelectedItems.Count > 1)
     {
         MessageBox.Show("You cannot view more than one frame.");
         return;
     }
     if (Package.Animation.Actions[lbActions.SelectedIndex].Frames[lbFrames.SelectedIndex].ActionRef == null)
     {
         AMTResource  PreviewResource = AMTUtil.GetResourceFromName(Package, Package.Animation.Actions[lbActions.SelectedIndex].Frames[lbFrames.SelectedIndex].Resource);
         FramePreview PreviewWindow   = new FramePreview(AMTUtil.BytesToImage(PreviewResource.Frames[Package.Animation.Actions[lbActions.SelectedIndex].Frames[lbFrames.SelectedIndex].FrameRef]));
         PreviewWindow.Show();
     }
     else
     {
         ActionPreview PreviewWindow = new ActionPreview(Package,
                                                         AMTUtil.GetActionFromName(Package.Animation, Package.Animation.Actions[lbActions.SelectedIndex].Frames[lbFrames.SelectedIndex].ActionRef));
         PreviewWindow.Show();
     }
 }
Ejemplo n.º 2
0
        private void btnPlayAction_Click(object sender, EventArgs e)
        {
            if (Package.PackageState != AMTUtil.State.READY)
            {
                return;
            }
            if (lbActions.SelectedIndex == -1)
            {
                MessageBox.Show("You need to select a action!");
                return;
            }
            ActionPreview PreviewWindow = new ActionPreview(Package, Package.Animation.Actions[lbActions.SelectedIndex]);

            PreviewWindow.Show();
        }
Ejemplo n.º 3
0
 private void btnShowPreview_Click(object sender, EventArgs e)
 {
     //When more than one frame, create duplicate action and view action
     if (Package.PackageState != AMTUtil.State.READY)
         return;
     if (lbFrames.SelectedIndex == -1)
     {
         MessageBox.Show("You need to select a frame!");
         return;
     }
     if (lbFrames.SelectedItems.Count > 1)
     {
         MessageBox.Show("You cannot view more than one frame.");
         return;
     }
     if (Package.Animation.Actions[lbActions.SelectedIndex].Frames[lbFrames.SelectedIndex].ActionRef == null)
     {
         AMTResource PreviewResource = AMTUtil.GetResourceFromName(Package, Package.Animation.Actions[lbActions.SelectedIndex].Frames[lbFrames.SelectedIndex].Resource);
         FramePreview PreviewWindow = new FramePreview(AMTUtil.BytesToImage(PreviewResource.Frames[Package.Animation.Actions[lbActions.SelectedIndex].Frames[lbFrames.SelectedIndex].FrameRef]));
         PreviewWindow.Show();
     }
     else
     {
         ActionPreview PreviewWindow = new ActionPreview(Package,
         AMTUtil.GetActionFromName(Package.Animation, Package.Animation.Actions[lbActions.SelectedIndex].Frames[lbFrames.SelectedIndex].ActionRef));
         PreviewWindow.Show();
     }
 }
Ejemplo n.º 4
0
 private void btnPlayAction_Click(object sender, EventArgs e)
 {
     if (Package.PackageState != AMTUtil.State.READY)
         return;
     if (lbActions.SelectedIndex == -1)
     {
         MessageBox.Show("You need to select a action!");
         return;
     }
     ActionPreview PreviewWindow = new ActionPreview(Package, Package.Animation.Actions[lbActions.SelectedIndex]);
     PreviewWindow.Show();
 }