Ejemplo n.º 1
0
        private void setCar()
        {
            if (txtPath.Text.Length == 0)
            {
                btnOK.Enabled = false;
                return;
            }
            else
            {
                btnOK.Enabled = true;
            }

            flump = FlumpFile.Load(txtPath.Text + "car.flump");
            if (flump.Settings.ContainsKey("pretty.name"))
            {
                txtPrettyCarName.Text = flump.Settings["pretty.name"];
            }

            car             = Path.GetFileName(Path.GetDirectoryName(txtPath.Text));
            txtCarName.Text = car;
        }
Ejemplo n.º 2
0
        public static FlumpFile Load(string path)
        {
            FlumpFile flump = new FlumpFile();

            if (File.Exists(path))
            {
                using (var sr = new StreamReader(path))
                {
                    while (!sr.EndOfStream)
                    {
                        string line = sr.ReadLine();
                        int    i    = line.IndexOf(":=");

                        if (i > -1)
                        {
                            flump.settings[line.Substring(0, i)] = line.Substring(i + 2);
                        }
                    }
                }
            }

            return(flump);
        }
Ejemplo n.º 3
0
        public static FlumpFile Load(string path)
        {
            FlumpFile flump = new FlumpFile();

            if (File.Exists(path))
            {
                using (var sr = new StreamReader(path))
                {
                    while (!sr.EndOfStream)
                    {
                        string line = sr.ReadLine();
                        int i = line.IndexOf(":=");

                        if (i > -1)
                        {
                            flump.settings[line.Substring(0, i)] = line.Substring(i + 2);
                        }
                    }
                }
            }

            return flump;
        }
Ejemplo n.º 4
0
        private void setCar()
        {
            if (txtPath.Text.Length == 0)
            {
                btnOK.Enabled = false;
                return;
            }
            else
            {
                btnOK.Enabled = true;
            }

            flump = FlumpFile.Load(txtPath.Text + "car.flump");
            if (flump.Settings.ContainsKey("pretty.name")) { txtPrettyCarName.Text = flump.Settings["pretty.name"]; }

            car = Path.GetFileName(Path.GetDirectoryName(txtPath.Text));
            txtCarName.Text = car;
        }
Ejemplo n.º 5
0
        void setLevel()
        {
            if (txtPath.Text.Length == 0)
            {
                btnOK.Enabled = false;
                return;
            }
            else
            {
                btnOK.Enabled = true;
            }

            flump = FlumpFile.Load(txtPath.Text + "level.flump");
            txtPrettyLevelName.Text = (flump.Settings.ContainsKey("level.pretty.name") ? flump.Settings["level.pretty.name"] : "");
            txtRaceName.Text = (flump.Settings.ContainsKey("level.race.name") ? flump.Settings["level.race.name"] : "");

            level = Path.GetFileName(Path.GetDirectoryName(txtPath.Text));
            txtLevel.Text = level;
        }