Exemplo n.º 1
0
 private void OnSavePreset(object sender, EventArgs e)
 {
     TextInputScreen savescreen = Global.GetTextInputScreen(CurrentSkin);
       DialogResult r = savescreen.ShowDialog();
       if(r == DialogResult.OK) {
     Preset p = new Preset();
     p.Master = this;
     p.Save(AppPath + "\\Presets\\" + savescreen.String + ".xml");
       }
 }
Exemplo n.º 2
0
 private void OnLoadPreset(object sender, EventArgs e)
 {
     SelectionScreen loadscreen = Global.GetSelectionScreen(CurrentSkin);
       loadscreen.Items.Clear();
       foreach(string file in Directory.GetFiles(AppPath + "\\Presets")) {
     if(file.ToLower().EndsWith(".xml")) {
       string name = Path.GetFileNameWithoutExtension(file);
       loadscreen.Items.Add(name);
     }
       }
       loadscreen.ShowPage();
       DialogResult r = loadscreen.ShowDialog();
       if(r == DialogResult.OK) {
     Preset p = new Preset();
     p.Master = this;
     string name = loadscreen.Items[loadscreen.SelectedIndex].ToString();
     p.Load(AppPath + "\\Presets\\" + name + ".xml");
       }
 }