コード例 #1
0
        public bool Save()
        {
            if (EncDec.DecryptData(_group.password, MainForm.Conf.EncryptCode) != txtPassword.Text)
            {
                var p = new Prompt(LocRm.GetString("ConfirmPassword") + ": " + _group.name, "", true);
                if (p.ShowDialog(this) == DialogResult.OK)
                {
                    var v = p.Val;
                    if (v != txtPassword.Text)
                    {
                        MessageBox.Show(this, LocRm.GetString("PasswordMismatch"));
                        p.Dispose();
                        return(false);
                    }
                }
                p.Dispose();
                _group.password = EncDec.EncryptData(txtPassword.Text, MainForm.Conf.EncryptCode);
            }

            var tot = (from CheckBox c in fpFeatures.Controls where c.Checked select(long) c.Tag).Sum();

            _group.featureset = tot;
            return(true);
        }