public override void LoadTheme(string xmlPath) { base.LoadTheme(xmlPath); _Texts[_TextRelease].Text = CSettings.GetFullVersionText(); _Texts[_TextRelease].Visible = true; _Statics[_StaticWarningProfiles].Visible = false; _Texts[_TextWarningProfiles].Visible = false; _SelectElement(_Buttons[_ButtonSing]); }
public override bool Init() { if (!base.Init()) { return(false); } _Form.Icon = new Icon(Path.Combine(CSettings.ProgramFolder, CSettings.FileNameIcon)); _Form.Text = CSettings.GetFullVersionText(); ((IFormHook)_Form).OnMessage = _OnMessageAvoidScreenOff; _Form.Closing += _OnClose; _Form.Resize += _OnResize; _Form.Load += _OnLoad; _SizeBeforeMinimize = _Form.ClientSize; _CenterToScreen(); return(true); }
public override bool Draw() { base.DrawBG(); //if (Snowflakes == null) // Snowflakes = new CParticleEffect(300, new SColorF(1, 1, 1, 1), new SRectF(0, 0, CSettings.iRenderW, 0, 0.5f), "Snowflake", 25, EParticeType.Snow); //Snowflakes.Update(); //Snowflakes.Draw(); base.DrawFG(); if (CSettings.VersionRevision != ERevision.Release) { CFonts.SetFont("Normal"); CFonts.Style = EStyle.Normal; CDraw.DrawText(CSettings.GetFullVersionText(), 10, 680, 40); } return(true); }
public bool Init() { Text = CSettings.GetFullVersionText(); return(true); }
private static void _Run(string[] args) { Application.DoEvents(); try { // Create data folder Directory.CreateDirectory(CSettings.DataFolder); // Init Log CLog.Init(CSettings.FolderNameLogs, CSettings.FileNameMainLog, CSettings.FileNameSongLog, CSettings.FileNameCrashMarker, CSettings.GetFullVersionText(), CReporter.ShowReporterFunc, ELogLevel.Information); if (!CProgrammHelper.CheckRequirements()) { return; } CProgrammHelper.Init(); using (CBenchmark.Time("Init Program")) { CMain.Init(); Application.DoEvents(); // Init Language using (CBenchmark.Time("Init Language")) { if (!CLanguage.Init()) { throw new CLoadingException("Language"); } } Application.DoEvents(); // load config using (CBenchmark.Time("Init Config")) { CConfig.LoadCommandLineParams(args); CConfig.UseCommandLineParamsBefore(); CConfig.Init(); CConfig.UseCommandLineParamsAfter(); } // Create folders CSettings.CreateFolders(); _SplashScreen = new CSplashScreen(); Application.DoEvents(); // Init Draw using (CBenchmark.Time("Init Draw")) { if (!CDraw.Init()) { throw new CLoadingException("drawing"); } } Application.DoEvents(); // Init Playback using (CBenchmark.Time("Init Playback")) { if (!CSound.Init()) { throw new CLoadingException("playback"); } } Application.DoEvents(); // Init Record using (CBenchmark.Time("Init Record")) { if (!CRecord.Init()) { throw new CLoadingException("record"); } } Application.DoEvents(); // Init VideoDecoder using (CBenchmark.Time("Init Videodecoder")) { if (!CVideo.Init()) { throw new CLoadingException("video"); } } Application.DoEvents(); // Init Database using (CBenchmark.Time("Init Database")) { if (!CDataBase.Init()) { throw new CLoadingException("database"); } } Application.DoEvents(); //Init Webcam using (CBenchmark.Time("Init Webcam")) { if (!CWebcam.Init()) { throw new CLoadingException("webcam"); } } Application.DoEvents(); // Init Background Music using (CBenchmark.Time("Init Background Music")) { CBackgroundMusic.Init(); } Application.DoEvents(); // Init Profiles using (CBenchmark.Time("Init Profiles")) { CProfiles.Init(); } Application.DoEvents(); // Init Fonts using (CBenchmark.Time("Init Fonts")) { if (!CFonts.Init()) { throw new CLoadingException("fonts"); } } Application.DoEvents(); // Theme System using (CBenchmark.Time("Init Theme")) { if (!CThemes.Init()) { throw new CLoadingException("theme"); } } using (CBenchmark.Time("Load Theme")) { CThemes.Load(); } Application.DoEvents(); // Load Cover using (CBenchmark.Time("Init Cover")) { if (!CCover.Init()) { throw new CLoadingException("covertheme"); } } Application.DoEvents(); // Init Screens using (CBenchmark.Time("Init Screens")) { CGraphics.Init(); } Application.DoEvents(); // Init Server using (CBenchmark.Time("Init Server")) { CVocaluxeServer.Init(); } Application.DoEvents(); // Init Input using (CBenchmark.Time("Init Input")) { CController.Init(); CController.Connect(); } Application.DoEvents(); // Init Game using (CBenchmark.Time("Init Game")) { CGame.Init(); CProfiles.Update(); CConfig.UsePlayers(); } Application.DoEvents(); // Init Party Modes using (CBenchmark.Time("Init Party Modes")) { if (!CParty.Init()) { throw new CLoadingException("Party Modes"); } } Application.DoEvents(); //Only reasonable point to call GC.Collect() because initialization may cause lots of garbage //Rely on GC doing its job afterwards and call Dispose methods where appropriate GC.Collect(); } } catch (Exception e) { CLog.Error(e, "Error on start up: {ExceptionMessage}", CLog.Params(e.Message), show: true); if (_SplashScreen != null) { _SplashScreen.Close(); } _CloseProgram(); return; } Application.DoEvents(); // Start Main Loop if (_SplashScreen != null) { _SplashScreen.Close(); } CDraw.MainLoop(); }