Correct misspelling in README.md
[marukotoolbox.git] / mp4box / StartUpClass.cs
blob52d0c47e4fc8a70d918ef8b607d900515bab4059
1 // ------------------------------------------------------------------
2 // Copyright (C) 2011-2016 Maruko Toolbox Project
3 //
4 // Authors: komaruchan <sandy_0308@hotmail.com>
5 //
6 // Licensed under the Apache License, Version 2.0 (the "License");
7 // you may not use this file except in compliance with the License.
8 // You may obtain a copy of the License at
9 //
10 // http://www.apache.org/licenses/LICENSE-2.0
12 // Unless required by applicable law or agreed to in writing, software
13 // distributed under the License is distributed on an "AS IS" BASIS,
14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
15 // express or implied.
16 // See the License for the specific language governing permissions
17 // and limitations under the License.
18 // -------------------------------------------------------------------
21 using System;
22 using System.Collections.Generic;
23 using System.Text;
24 using System.Windows.Forms;
26 namespace mp4box
28 //使用方法:定义一个启动类,应用程序从启动类启动,该类会使用继承自启动窗体虚基类的一个启动窗体类,在该类中定义启动窗体和主窗体。启动窗体和主窗体的代码略去,注意要删除机器生成的窗体代码的Main方法部分。
29 public class StartUpClass
31 [STAThread]
32 static void Main()
34 Application.Run(new mycontext());
38 //启动窗体类(继承自启动窗体虚基类),启动画面会停留一段时间,该时间是设定的时间和主窗体构造所需时间两个的最大值
39 public class mycontext : SplashScreenApplicationContext
41 protected override void OnCreateSplashScreenForm()
43 this.SplashScreenForm = new SplashForm();//启动窗体
45 protected override void OnCreateMainForm()
47 this.PrimaryForm = new MainForm();//主窗体
49 protected override void SetSeconds()
51 this.SecondsShow = 2;//启动窗体显示的时间(秒)