Esempio n. 1
0
 private void lbPresetPaths_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     if (KRP.ReadKRP((lbPresetPaths.SelectedItem as FileInfo).OpenRead()))
     {
         MessageBox.Show(Properties.Resources.MsgPresetLoaded);
     }
 }
Esempio n. 2
0
 private void bload_Click(object sender, EventArgs e)
 {
     if (ofdPresets.ShowDialog() == DialogResult.OK)
     {
         if (!Properties.Settings.Default.PresetPaths.Contains(ofdPresets.FileName))
         {
             Properties.Settings.Default.PresetPaths.Add(ofdPresets.FileName);
         }
         update_listBox();
         if (KRP.ReadKRP(ofdPresets.OpenFile()))
         {
             MessageBox.Show(Properties.Resources.MsgPresetLoaded);
         }
     }
 }
Esempio n. 3
0
        public PresetForm(string fn = "")
        {
            InitializeComponent();

            foreach (string s in Properties.Settings.Default.PresetPaths)
            {
                if (!File.Exists(s))
                {
                    Properties.Settings.Default.PresetPaths.Remove(s);
                    continue;
                }
                PresetPaths.Add(new FileInfo(s));
            }
            lbPresetPaths.DataSource    = PresetPaths;
            lbPresetPaths.DisplayMember = "Name";

            if (fn != "" && File.Exists(fn))
            {
                if (!Properties.Settings.Default.PresetPaths.Contains(fn))
                {
                    Properties.Settings.Default.PresetPaths.Add(fn);
                }
                update_listBox();
                if (KRP.ReadKRP(File.OpenRead(fn)))
                {
                    MessageBox.Show(Properties.Resources.MsgPresetLoaded);
                }
            }

            cbIncModu.Checked    = Properties.Settings.Default.DoRandomization_Module;
            cbIncItem.Checked    = Properties.Settings.Default.DoRandomization_Item;
            cbIncSound.Checked   = Properties.Settings.Default.DoRandomization_Sound;
            cbIncModel.Checked   = Properties.Settings.Default.DoRandomization_Model;
            cbIncTexture.Checked = Properties.Settings.Default.DoRandomization_Texture;
            cbInc2da.Checked     = Properties.Settings.Default.DoRandomization_TwoDA;
            cbIncText.Checked    = Properties.Settings.Default.DoRandomization_Text;
            cbIncOther.Checked   = Properties.Settings.Default.DoRandomization_Other;
        }