mirror of
https://github.com/BluePointLilac/ContextMenuManager.git
synced 2026-01-14 03:04:02 +08:00
优化部分代码
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
using System.Text;
|
||||
using System.Net;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
|
||||
namespace BluePointLilac.Methods
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
|
||||
@@ -23,8 +23,9 @@ namespace ContextMenuManager.Controls.Interfaces
|
||||
{
|
||||
MyList list = (MyList)listItem.Parent;
|
||||
int index = list.GetItemIndex(listItem);
|
||||
index -= (index < list.Controls.Count) ? 0 : 1;
|
||||
item.DeleteMe();
|
||||
list.HoveredItem = (MyListItem)list.Controls[index - 1];
|
||||
list.HoveredItem = (MyListItem)list.Controls[index];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -40,8 +40,9 @@ namespace ContextMenuManager.Controls.Interfaces
|
||||
MyListItem listItem = (MyListItem)item;
|
||||
MyList list = (MyList)listItem.Parent;
|
||||
int index = list.GetItemIndex(listItem);
|
||||
index -= (index < list.Controls.Count) ? 0 : 1;
|
||||
item.DeleteMe();
|
||||
list.HoveredItem = (MyListItem)list.Controls[index - 1];
|
||||
list.HoveredItem = (MyListItem)list.Controls[index];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user