Esempio n. 1
0
        //Start Registry Thing
        /// <summary>
        /// Save the application settings to the registry
        /// </summary>
        private void Save()
        {
            this.SetSettings();
            RegistryKey key = Registry.CurrentUser.CreateSubKey("Software\\GreenMaggot\\TsemachPod");

            Savior.Save(settings, key);
        }
Esempio n. 2
0
 private void ReadFileBtn_Click(object sender, EventArgs e)
 {
     if (OpenDialog.ShowDialog() == DialogResult.OK)
     {
         settings = (Settings)Savior.ReadFromFile(OpenDialog.FileName);
         this.GetSettings();
     }
 }
Esempio n. 3
0
 private void SaveFileBtn_Click(object sender, EventArgs e)
 {
     if (SaveDialog.ShowDialog() == DialogResult.OK)
     {
         this.SetSettings();
         Savior.SaveToFile(settings, SaveDialog.FileName);
     }
 }
Esempio n. 4
0
    private void DoInit()
    {
        this.isPaused  = false;
        this.knownCats = Optional <Cat[]> .Empty();

        this.identityLookup = new Dictionary <string, IIdentifiable>();
        this.MyChild        = GetComponentInChildren <Savior>();
        this.stats          = new Statistics();
    }
Esempio n. 5
0
        /// <summary>
        /// Read all the application settings from the registry and then change the appropriate
        /// elements to display the new settings.
        /// </summary>
        private void Read()
        {
            // Open or create the registry key in which to save application settings
            RegistryKey key = Registry.CurrentUser.CreateSubKey("Software\\GreenMaggot\\TsemachPod");

            // Read all of the settings from the registry
            Savior.Read(settings, key);

            // Update all the application information with values in the Settings class
            this.GetSettings();
        }
Esempio n. 6
0
        private void AddSavior()
        {
            Animation saviorAnimation = new Animation();

            saviorAnimation.Initialize(_saviorIcon, Vector2.Zero, 47, 40, 9, 30, Color.White, 1f, true);

            Vector2 postion = new Vector2(GraphicsDevice.Viewport.Width + _saviorIcon.Width / 2,
                                          _random.Next(50, GraphicsDevice.Viewport.Height - 50));

            Savior save = new Savior();

            save.Initialize(saviorAnimation, postion);
            _saveMe.Add(save);
        }
Esempio n. 7
0
 public void Initialize()
 {
     Singleton.Add(ClientsFactory = new ServiceClientFactory());
     Singleton.Add(new PluginsDataManager());
     Singleton.Add(UsersRepository = new UsersRepository());
     UsersRepository.Initialize();
     Singleton.Add(ScenariosRepository = new ScenariosRepository());
     Singleton.Add(PluginsManager      = new PluginsManager());
     ScenariosRepository.Initialize();
     Singleton.Add(VisualSettingsRepository = new VisualSettingsRepository());
     Singleton.Add(new StatisticsManager());
     Singleton.Add(Server = new LazuriteServer());
     if (Savior.Has(SettingsKey))
     {
         SetSettings(Savior.Get <CoreSettings>(SettingsKey));
     }
     else
     {
         SetSettings(new CoreSettings());
     }
 }