Esempio n. 1
0
 private void BtnLoad_Click(object sender, EventArgs e)
 {
     var form = new frmLoad(GetSaves().ToArray());
     form.btnLoad.Click += (ls, le) =>
     {
         if (form.lbSaves.SelectedIndex < 0) return;
         var saveName = form.lbSaves.SelectedItem as string;
         if (string.IsNullOrEmpty(saveName)) return;
         tab.ChangeVariablesList(variablesList = new VariablesList(savesPath, saveName));
         form.Close();
     };
     form.ShowDialog();
 }
Esempio n. 2
0
        private void BtnLoad_Click(object sender, EventArgs e)
        {
            var form = new frmLoad(GetSaves().ToArray());

            form.btnLoad.Click += (ls, le) =>
            {
                if (form.lbSaves.SelectedIndex < 0)
                {
                    return;
                }
                var saveName = form.lbSaves.SelectedItem as string;
                if (string.IsNullOrEmpty(saveName))
                {
                    return;
                }
                tab.ChangeVariablesList(variablesList = new VariablesList(savesPath, saveName));
                form.Close();
            };
            form.ShowDialog();
        }