예제 #1
0
        private void B_Add_Click(object sender, EventArgs e)
        {
            if (CB_Property.SelectedIndex < 0)
            {
                Util.Alert("Invalid property selected."); return;
            }

            char[] prefix = { '.', '=', '!' };
            string s      = prefix[CB_Require.SelectedIndex] + CB_Property.Items[CB_Property.SelectedIndex].ToString() + "=";

            if (RTB_Instructions.Lines.Length != 0 && RTB_Instructions.Lines.Last().Length > 0)
            {
                s = Environment.NewLine + s;
            }

            RTB_Instructions.AppendText(s);
        }
예제 #2
0
        private void B_Add_Click(object sender, EventArgs e)
        {
            if (CB_Property.SelectedIndex < 0)
            {
                WinFormsUtil.Alert(MsgBEPropertyInvalid); return;
            }

            var    prefix = StringInstruction.Prefixes;
            string s      = prefix[CB_Require.SelectedIndex] + CB_Property.Items[CB_Property.SelectedIndex].ToString() + StringInstruction.SplitInstruction;

            if (RTB_Instructions.Lines.Length != 0 && RTB_Instructions.Lines.Last().Length > 0)
            {
                s = Environment.NewLine + s;
            }

            RTB_Instructions.AppendText(s);
        }