Пример #1
0
 private void BtnNew_Click(object sender, EventArgs e)
 {
     var form = new frmNew();
     form.btnCreate.Click += (ls, le) =>
     {
         if (string.IsNullOrEmpty(form.tbNewName.Text)) return;
         if (GetSaves().Contains(form.tbNewName.Text))
         {
             Utils.Alert("Error", "List name is already taken.");
             return;
         }
         variablesList.Save();
         tab.ChangeVariablesList(variablesList = new VariablesList(savesPath, form.tbNewName.Text));
         form.Close();
     };
     form.ShowDialog();
 }
Пример #2
0
        private void BtnNew_Click(object sender, EventArgs e)
        {
            var form = new frmNew();

            form.btnCreate.Click += (ls, le) =>
            {
                if (string.IsNullOrEmpty(form.tbNewName.Text))
                {
                    return;
                }
                if (GetSaves().Contains(form.tbNewName.Text))
                {
                    Utils.Alert("Error", "List name is already taken.");
                    return;
                }
                variablesList.Save();
                tab.ChangeVariablesList(variablesList = new VariablesList(savesPath, form.tbNewName.Text));
                form.Close();
            };
            form.ShowDialog();
        }