コード例 #1
0
ファイル: Kamiki.cs プロジェクト: Neotoxic-off/Kamiki
        private Task load_configuration()
        {
            if (File.Exists("Settings\\Configuration.json"))
            {
                _configuration_ = JsonConvert.DeserializeObject <configuration.Rootobject>(File.ReadAllText("Settings\\Configuration.json"));
            }
            else
            {
                MessageBox.Show("'Settings\\Configuration.json' not found");
                Application.Exit();
            }

            return(Task.CompletedTask);
        }
コード例 #2
0
ファイル: Items_editor.cs プロジェクト: Neotoxic-off/Kamiki
        private void Items_editor_Load(object sender, EventArgs e)
        {
            Cursor = Cursors.WaitCursor;

            _settings_      = JsonConvert.DeserializeObject <settings.Rootobject>(File.ReadAllText("Settings\\Settings.json"));
            _configuration_ = JsonConvert.DeserializeObject <configuration.Rootobject>(File.ReadAllText("Settings\\Configuration.json"));

            background.BackColor = Color.FromArgb(75, 0, 0, 0);

            if (Directory.Exists("Themes"))
            {
                BackgroundImage = Image.FromFile(_settings_.theme);
            }

            load_survivors().Wait();
            load_killers().Wait();

            Cursor = Cursors.Default;
        }