Exemplo n.º 1
0
        public MainForm(string[] args)
        {
            InitializeComponent();

            ConfigReader.Instance.ParseArgs(args);
            webBrowserVisibleChangeTimer.Interval = ConfigReader.Instance.MsgBoxCloseTimeSec;

            contentBuilder = new ContentBuilder();
            System.Diagnostics.Debug.Print(contentBuilder.OutputDirectory);
            contentManager = new ContentManager(packterDisplayControl.Services, contentBuilder.OutputDirectory);
            packterDisplayControl.RegisterData(contentBuilder, contentManager, ConfigReader.Instance.DefaultScale);
            if (ConfigReader.Instance.TickKeyInputAcceptMicrosecond != null)
            {
                packterDisplayControl.OverrideKeyInputAcceptGapTimeMicrosecond(ConfigReader.Instance.TickKeyInputAcceptMicrosecond.GetValueOrDefault());
            }

            intervalTimer.Tick    += new System.EventHandler(intervalTimer_Tick);
            intervalTimer.Interval = 100;
            intervalTimer.Start();

            webBrowserVisibleChangeTimer.Tick += new System.EventHandler(webBrowserVisibleChangeTimer_Tick);
            bgmTimer.Tick += new System.EventHandler(bgmTimer_Tick);

            webBrowser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(webBrowser_DocumentCompleted);
            webBrowser.Navigate("about:blank");

            seThread = new System.Threading.Thread(new System.Threading.ThreadStart(SeThreadMain));
            seThread.Start();

            if (ConfigReader.Instance.XACTEnabled)
            {
                audioEngine = new Microsoft.Xna.Framework.Audio.AudioEngine(ConfigReader.Instance.XACTFileForAudioEngine);
                waveBank    = new Microsoft.Xna.Framework.Audio.WaveBank(audioEngine, ConfigReader.Instance.XACTFileForWaveBank);
                soundBank   = new Microsoft.Xna.Framework.Audio.SoundBank(audioEngine, ConfigReader.Instance.XACTFileForSoundBank);
            }

            System.Windows.Forms.Application.Idle += delegate
            {
                Invalidate();
                if (audioEngine != null)
                {
                    audioEngine.Update();
                }
            };
        }
Exemplo n.º 2
0
 public SoundBank()
     : base()
 {
     Name = "";
     InnerSoundBank = null;
 }