• 大小: 9.07MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-06
  • 语言: 其他
  • 标签: 字符动画  

资源简介

BadApple源码,运行BadApple.exe显示BadApple的MV的字符动画

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using System.Runtime.InteropServices;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private static StreamReader reader;
        private void Form1_Load(object sender EventArgs e)
        {
            reader = new StreamReader(“AscPic.txt“);
            axWindowsMediaPlayer1.settings.volume = 100;
            axWindowsMediaPlayer1.URL = “ BadApple.mp3“;
            timer1.Enabled = true;
        }
        int num = 0;
        string xinde = “W“;
        string jiude = “W“;
        private void timer1_Tick_1(object sender EventArgs e)
        {
            num++;
            this.progressBar1.Value = num;
            label2.Text = “第“ + num.ToString()+“帧\r\n播放时间:“+axWindowsMediaPlayer1.Ctlcontrols.currentPositionString;
            if (num < 50)
            {
                return;
            }
            else if(num==800) 
            {
                timer1.Interval = 33;
            }else if(num==1000)
            {
                timer1.Interval = 32;
            }else if(num==1500)
            {
                timer1.Interval = 31;
            }
            StringBuilder data = new StringBuilder(2500);
            for (int i = 0; i < 61; i++)
            {
                data.Append(reader.ReadLine()+“\r\n“);
            }
            label1.Text = data.ToString().Replace(jiude xinde);
            if (checkBox1.Checked)
            {
                label1.ForeColor = GetRomColor();
            }
        }
        bool a = true;
        private void Form1_KeyPress(object sender KeyPressEventArgs e)
        {
            if (e.KeyChar.ToString()==“ “)
            {
                if (a)
                {
                    timer1.Enabled = false;
                    axWindowsMediaPlayer1.Ctlcontrols.pause();
                    a = false;
                }
                else 
                {
                    timer1.Enabled = true;
                    axWindowsMediaPlayer1.Ctlcontrols.play();
                    a = true;
                }

            }
        }
        private Color GetRomColor() 
        {
            Random suiji = new Random(Guid.NewGuid().GetHashCode());
            return  Color.FromArgb(suiji.Next(0 254) suiji.Next(0 254) suiji.Next(0 254));
        }

        private void checkBox2_CheckedChanged(object sender EventArgs e)
        {
            if (checkBox2.Checked)
            {
                this.BackColor = Color.Pink;
                this.label1.BackColor = Color.Pink;
                this.FormBorderstyle = System.Windows.Forms.FormBorderstyle.None;
                progres

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       7358  2014-12-01 15:04  WindowsFormsApplication1\1.ico

     文件        161  2014-12-02 22:29  WindowsFormsApplication1\app.config

     文件       6166  2014-12-02 22:29  WindowsFormsApplication1\BadApple.csproj

     文件        478  2014-12-01 15:03  WindowsFormsApplication1\BadApple.csproj.user

     文件   63008282  2012-07-23 21:34  WindowsFormsApplication1\bin\Debug\AscPic.txt

     文件      61440  2014-12-02 22:19  WindowsFormsApplication1\bin\Debug\AxInterop.WMPLib.dll

     文件        161  2014-12-01 15:05  WindowsFormsApplication1\bin\Debug\BadApp.vshost.exe.config

     文件      30208  2014-12-02 22:29  WindowsFormsApplication1\bin\Debug\BadApple.exe

     文件        161  2014-12-02 22:29  WindowsFormsApplication1\bin\Debug\BadApple.exe.config

     文件    5263938  2010-07-23 02:30  WindowsFormsApplication1\bin\Debug\BadApple.mp3

     文件      32256  2014-12-02 22:29  WindowsFormsApplication1\bin\Debug\BadApple.pdb

     文件      24224  2014-12-02 22:31  WindowsFormsApplication1\bin\Debug\BadApple.vshost.exe

     文件        161  2014-12-02 22:29  WindowsFormsApplication1\bin\Debug\BadApple.vshost.exe.config

     文件        490  2010-03-18 12:39  WindowsFormsApplication1\bin\Debug\BadApple.vshost.exe.manifest

     文件     331264  2014-12-02 22:29  WindowsFormsApplication1\bin\Debug\Interop.WMPLib.dll

     文件        161  2014-12-01 15:05  WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.config

     文件        490  2010-03-18 12:39  WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest

     文件       3949  2014-12-02 22:31  WindowsFormsApplication1\Form1.cs

     文件       9443  2014-12-02 22:20  WindowsFormsApplication1\Form1.Designer.cs

     文件      18049  2014-12-02 22:20  WindowsFormsApplication1\Form1.resx

     文件      61440  2014-12-02 22:19  WindowsFormsApplication1\obj\Debug\AxInterop.WMPLib.dll

     文件       1648  2014-12-02 22:31  WindowsFormsApplication1\obj\Debug\BadApple.csproj.FileListAbsolute.txt

     文件        904  2014-12-02 22:29  WindowsFormsApplication1\obj\Debug\BadApple.csproj.GenerateResource.Cache

     文件        735  2014-12-02 22:29  WindowsFormsApplication1\obj\Debug\BadApple.csproj.ResolveComReference.cache

     文件       1746  2014-12-02 22:29  WindowsFormsApplication1\obj\Debug\BadApple.csprojResolveAssemblyReference.cache

     文件      30208  2014-12-02 22:29  WindowsFormsApplication1\obj\Debug\BadApple.exe

     文件      32256  2014-12-02 22:29  WindowsFormsApplication1\obj\Debug\BadApple.pdb

     文件        180  2014-12-02 22:29  WindowsFormsApplication1\obj\Debug\BadApple.Properties.Resources.resources

     文件      13532  2014-12-02 22:29  WindowsFormsApplication1\obj\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       7011  2014-12-02 22:29  WindowsFormsApplication1\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

............此处省略25个文件信息

评论

共有 条评论