コード例 #1
0
        private void ActionList_DragDrop(object sender, DragEventArgs e)
        {
            var test = e.Data.GetData("Fiddler.Session[]") as Fiddler.Session[];

            if (test != null && test.Length == 1)
            {
                var positionInForm = this.GetPositionInForm(this.ActionList);
                var listViewItem   = this.ActionList.GetItemAt(e.X + positionInForm.X, e.Y - positionInForm.Y)?.Tag as ActionItem;

                e.Effect = DragDropEffects.Link;

                var actionItem = Factory.ActionItem();
                actionItem.Seek = test.First().fullUrl;
                if (listViewItem != null)
                {
                    actionItem.Group = listViewItem.Group;
                }

                var editUrlReplace = new EditUrlReplace
                {
                    ActionItems = this.ActionItems, ActionItem = actionItem, Mode = EditMode.Add
                };
                editUrlReplace.Show();
                editUrlReplace.Closing += this.EditUrlReplaceClosing;
            }
        }
コード例 #2
0
        private void AddNewActionItem()
        {
            var editUrlReplace = new EditUrlReplace
            {
                ActionItems = this.ActionItems, ActionItem = Factory.ActionItem(), Mode = EditMode.Add
            };

            editUrlReplace.Show();
            editUrlReplace.Closing += this.EditUrlReplaceClosing;
        }
コード例 #3
0
 private void EditActionItem(ActionItem item)
 {
     if (this.activeEdits.ContainsKey(item.Key))
     {
         this.activeEdits[item.Key].Focus();
     }
     else
     {
         var editUrlReplace = new EditUrlReplace
         {
             ActionItems = this.ActionItems, ActionItem = item
         };
         this.activeEdits.Add(item.Key, editUrlReplace);
         editUrlReplace.Closing += this.EditUrlReplaceClosing;
         editUrlReplace.Show();
     }
 }