📄 form1.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace WindowsApplication1
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
this.ClientSize = new System.Drawing.Size(292, 260);
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void Form1_Load(object sender, System.EventArgs e)
{
SWFScout.FlashMovie Movie = new SWFScout.FlashMovie();
Movie.InitLibrary("demo", "demo");
Movie.BeginMovie(0, 0, 640, 480, SWFScout.SWFSystemCoord.sscPix, 12, 6);
int Font = Movie.AddFont("Arial", 18, true, false, false, false, 0); // add font
// create and place text
int Text = Movie.AddText("Hello, World!", 0, 0, 0, 255, Font, 0, 100, 250, 160);
Movie.PlaceText(Text, Movie.CurrentMaxDepth); // place text into current depth
Movie.PLACE_FadeOut(0.5F); // fade out text
int Shape = Movie.AddShape(); // add new shape
Movie.SHAPE_Rectangle(0, 140, 150, 285); // draw rectangle
Movie.SHAPE_SetSolidColor(50, 255, 50, true, 255); // set solid fill for shape
Movie.PlaceShape(Shape, Movie.CurrentMaxDepth); // place shape into current depth
Movie.ShowFrame(10); // show 10 frames
Movie.EndMovie(); // end movie generation
Movie.SaveToFile("c:\\Shapes.swf"); // save generated SWF into file
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -