コード例 #1
0
        private void cmdCloneReq_Click(object sender, EventArgs e)
        {
            if (CurrentReq != null)
            {
                FileChanged = true;
                iLootRule lr = (iLootRule)CurrentReq.Clone();

                CurrentRule.IntRules.Add(lr);
                lstRequirements.Items.Add(lr.DisplayString());
                SetCurrentReq(lr, CurrentRule.IntRules.Count - 1);
            }
        }
コード例 #2
0
        private void cmdCloneReq_Click(object sender, EventArgs e)
        {
            if (CurrentReq != null)
            {
                FileChanged = true;
                iLootRule lr = (iLootRule)CurrentReq.Clone();

                if (CtrlPressed && lstRequirements.SelectedIndex != -1)
                {
                    CurrentRule.IntRules.Insert(lstRequirements.SelectedIndex + 1, lr);
                    lstRequirements.Items.Insert(lstRequirements.SelectedIndex + 1, lr.DisplayString());
                    SetCurrentReq(lr, lstRequirements.SelectedIndex + 1);
                }
                else
                {
                    CurrentRule.IntRules.Add(lr);
                    lstRequirements.Items.Add(lr.DisplayString());
                    SetCurrentReq(lr, CurrentRule.IntRules.Count - 1);
                }
            }
        }