示例#1
0
        private void btAddFolder_Click(object sender, EventArgs e)
        {
            var Form = new SelectFolderForm();

            Form.SelectedFolder = Environment.GetFolderPath(Environment.SpecialFolder.MyMusic);

            if (Form.ShowDialog() == DialogResult.OK)
            {
                Core.ScanInBackground(new string[] { Form.SelectedFolder });
            }
        }
示例#2
0
        private void Init()
        {
            //called from ModelForm_Load

            if (!initedOk)
            {
                Close();
                return;
            }


            MouseWheel += ModelForm_MouseWheel;

            string fldr = Settings.Default.GTAFolder;

            if (string.IsNullOrEmpty(fldr) || !Directory.Exists(fldr))
            {
                SelectFolderForm f = new SelectFolderForm();
                f.ShowDialog();
                if (f.Result == DialogResult.OK)
                {
                    fldr = f.SelectedFolder;
                }
                else
                {
                    Close();
                    return;
                }
            }
            if (!Directory.Exists(fldr))
            {
                MessageBox.Show("The specified folder does not exist:\n" + fldr);
                Close();
                return;
            }
            if (!File.Exists(fldr + "\\gta5.exe"))
            {
                MessageBox.Show("GTA5.exe not found in folder:\n" + fldr);
                Close();
                return;
            }

            Settings.Default.GTAFolder = fldr; //seems ok, save it for later



            MetaName[] texsamplers = RenderableGeometry.GetTextureSamplerList();
            foreach (var texsampler in texsamplers)
            {
                TextureSamplerComboBox.Items.Add(texsampler);
            }
            //TextureSamplerComboBox.SelectedIndex = 0;//LoadSettings will do this..


            UpdateGridVerts();
            GridSizeComboBox.SelectedIndex  = 1;
            GridCountComboBox.SelectedIndex = 1;



            Input.Init();


            Renderer.Start();
        }