示例#1
0
文件: Form1.cs 项目: r1cebank/AmiMat
 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();
     }
 }
示例#2
0
文件: Form1.cs 项目: r1cebank/AmiMat
        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();
        }
示例#3
0
文件: Form1.cs 项目: r1cebank/AmiMat
 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();
     }
 }
示例#4
0
文件: Form1.cs 项目: r1cebank/AmiMat
 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();
 }