public NHibernateComponentModule() { _recreateDb = ConfigMethods.ReadConfigBoolean("NhibernateRecreateDb"); _dbType = ConfigMethods.ReadConfigString("NhibernateDatabaseType"); _showSql = ConfigMethods.ReadConfigBoolean("NhibernateShowSql"); _connectionString = ConfigMethods.GetConnectionString(); _nhibernateSchema = ConfigMethods.ReadConfigString("NhibernateSchema"); }
public Login() { InitializeComponent(); config = new ConfigMethods(); View = new ViewManagment(); win = Application.Current.Windows.OfType <MainWindow>().First(); NamePlayer.Text = config.GetPlayerName().Length > 0 ? config.GetPlayerName() : String.Empty; }
public Midlle() { InitializeComponent(); View = new ViewManagment(); config = new ConfigMethods(); win = Application.Current.Windows.OfType <MainWindow>().First(); Score.Text = win.Score.ToString(); if (config.GetLevel() == "3") { NextLevelBtn.Visibility = Visibility.Collapsed; } DataBase.SetData(Score.Text); }
public MainWindow() { InitializeComponent(); Audio(); spLabel.SoundLocation = ClickWav; spLabel.Load(); config = new ConfigMethods(); View = new ViewManagment(); Timer = new Timer().GameTimer(1000); Timer.Tick += new EventHandler(TimerTick); TimerText.Text = Seconds.ToString(); sp.MediaEnded += new EventHandler(sp_MediaEnded); Application.Current.Exit += new ExitEventHandler(Current_Exit); }
public FirstLevel() { InitializeComponent(); View = new ViewManagment(); config = new ConfigMethods(); config.SetLevel("1"); FirstLevelTimer = new FindAny.Helpers.Timer().GameTimer(1500); FirstLevelTimer.Tick += new EventHandler(Timer_Tick); win = Application.Current.Windows.OfType <MainWindow>().First(); win.MainMenu.Visibility = Visibility.Visible; if (win.EnableTimer) { win.Timer.Start(); win.TimerText.Visibility = Visibility.Visible; } else { win.Timer.Stop(); win.TimerText.Visibility = Visibility.Hidden; } DataBase.Restart(); }
// Settings UI public void OnSettingsUI(UIHelperBase helper) { // Load the configuration Configs config = Configuration <Configs> .Load(); // Setting Group UIHelperBase groupEnable = helper.AddGroup(translation.GetTranslation("AUTO-ROCKET-LAUNCH-modName")); UIHelperBase groupSettings = helper.AddGroup(translation.GetTranslation("AUTO-ROCKET-LAUNCH-settings")); // Mod Enabled Checkbox groupEnable.AddCheckbox(translation.GetTranslation("AUTO-ROCKET-LAUNCH-enable"), config.enabled, sel => { config.enabled = sel; ConfigMethods.Save(); ConfigMethods.Load(); }); // Refresh Interval Textfield groupSettings.AddTextfield(translation.GetTranslation("AUTO-ROCKET-LAUNCH-timeInterval"), config.timeInterval.ToString(), value => { try { config.timeInterval = int.Parse(value); ConfigMethods.Save(); ConfigMethods.Load(); } catch (Exception exception) { Debug.LogException(exception); } }); // Auto Focus Checkbox groupSettings.AddCheckbox(translation.GetTranslation("AUTO-ROCKET-LAUNCH-autoFocus"), config.autoFocus, sel => { config.autoFocus = sel; ConfigMethods.Save(); ConfigMethods.Load(); }); // Mode Dropdown string[] modeLabels = { translation.GetTranslation("AUTO-ROCKET-LAUNCH-immediateMode"), translation.GetTranslation("AUTO-ROCKET-LAUNCH-visitorMode") }; groupSettings.AddDropdown(translation.GetTranslation("AUTO-ROCKET-LAUNCH-modeSetting"), modeLabels, config.modMode, sel => { config.modMode = sel; ConfigMethods.Save(); ConfigMethods.Load(); }); // Mode Description string modeDescription = translation.GetTranslation("AUTO-ROCKET-LAUNCH-immediateModeDescription") + "\n" + translation.GetTranslation("AUTO-ROCKET-LAUNCH-visitorModeDescription") + "\n"; UITextField txtModeDescription = (UITextField)groupSettings.AddTextfield(modeDescription, " ", (s) => { }, (s) => { }); txtModeDescription.Disable(); // Space groupSettings.AddSpace(20); // Target Tourist Number Textfield groupSettings.AddTextfield(translation.GetTranslation("AUTO-ROCKET-LAUNCH-targetVisitorNum"), config.targetVisitorNum.ToString(), value => { try { config.targetVisitorNum = int.Parse(value); ConfigMethods.Save(); ConfigMethods.Load(); } catch (Exception exception) { Debug.LogException(exception); } }); }
public override void OnLevelLoaded(LoadMode mode) { base.OnLevelLoaded(mode); InGame = true; ConfigMethods.Load(); }