Example #1
0
        public void Setup()
        {
            Blocks = new Dictionary <string, MBuildingBlock>();
            // AddDefaults();
            string sData = MFileSystem.GetFile(MFileSystem.RegistryPath);

            if (string.IsNullOrEmpty(sData))
            {
                return;
            }
            Blocks = JsonConvert.DeserializeObject <Dictionary <string, MBuildingBlock> >(sData);

            SetupMaterials();
        }
Example #2
0
        public void Load()
        {
            String sDetails = MFileSystem.GetFile("settings.json");

            try
            {
                MUserAccount acc = MUserAccount.Deserialize <MUserAccount>(sDetails);
                if (acc != null)
                {
                    Globals.UserAccount = acc;
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }
Example #3
0
        public void Setup()
        {
            string sPath = Path.Combine(MFileSystem.ProjectPath, "Terms.txt");

            if (!File.Exists(sPath))
            {
                Console.WriteLine("ERROR, could not find TOS");
                return;
            }
            string sData = MFileSystem.GetFile(sPath);

            TermsTextBox.Text = sData;

            sPath = Path.Combine(MFileSystem.ProjectPath, "Constitution.txt");
            if (!File.Exists(sPath))
            {
                Console.WriteLine("ERROR, could not find Constitution");
                return;
            }
            sData              = MFileSystem.GetFile(sPath);
            TermsTextBox.Text += "\r\n" + sData;
        }