示例#1
0
        private void CalcProcFlagsClick(object sender, EventArgs e)
        {
            switch (((Button)sender).Name)
            {
            case "_bSqlSchool":
            {
                var val  = _tbSqlSchool.Text.ToUInt32();
                var form = new FormCalculateFlags(typeof(SpellSchools), val, string.Empty);
                form.ShowDialog(this);
                if (form.DialogResult == DialogResult.OK)
                {
                    _tbSqlSchool.Text = form.Flags.ToString();
                }
            }
            break;

            case "_bSqlProc":
            {
                var val  = _tbSqlProc.Text.ToUInt32();
                var form = new FormCalculateFlags(typeof(ProcFlags), val, "PROC_FLAG_");
                form.ShowDialog(this);
                if (form.DialogResult == DialogResult.OK)
                {
                    _tbSqlProc.Text = form.Flags.ToString();
                }
            }
            break;

            case "_bSqlProcEx":
            {
                var val  = _tbSqlProcEx.Text.ToUInt32();
                var form = new FormCalculateFlags(typeof(ProcFlagsEx), val, "PROC_EX_");
                form.ShowDialog(this);
                if (form.DialogResult == DialogResult.OK)
                {
                    _tbSqlProcEx.Text = form.Flags.ToString();
                }
            }
            break;
            }
        }
示例#2
0
 private void CalcProcFlagsClick(object sender, EventArgs e)
 {
     switch (((Button)sender).Name)
     {
         case "_bSqlSchool":
         {
             var val = _tbSqlSchool.Text.ToUInt32();
             var form = new FormCalculateFlags(typeof(SpellSchools), val, string.Empty);
             form.ShowDialog(this);
             if (form.DialogResult == DialogResult.OK)
                 _tbSqlSchool.Text = form.Flags.ToString();
         }
             break;
         case "_bSqlProc":
         {
             var val = _tbSqlProc.Text.ToUInt32();
             var form = new FormCalculateFlags(typeof(ProcFlags), val, "PROC_FLAG_");
             form.ShowDialog(this);
             if (form.DialogResult == DialogResult.OK)
                 _tbSqlProc.Text = form.Flags.ToString();
         }
             break;
         case "_bSqlProcEx":
         {
             var val = _tbSqlProcEx.Text.ToUInt32();
             var form = new FormCalculateFlags(typeof(ProcFlagsEx), val, "PROC_EX_");
             form.ShowDialog(this);
             if (form.DialogResult == DialogResult.OK)
                 _tbSqlProcEx.Text = form.Flags.ToString();
         }
             break;
     }
 }