mirror of
https://git.oceanpay.cc/danial/kami_itunes_june.git
synced 2025-12-18 22:31:24 +00:00
- 在.settings.local.json中添加dotnet clean命令权限 - 更新项目文件以启用不安全的二进制序列化和禁用平台兼容性警告 - 配置调试和发布模式的编译常量及优化选项 - 在解决方案文件中升级Visual Studio版本并添加多平台配置 - 移除FormLogin构造函数中的MessageBox调试代码 - 为过时的WebRequest、WebClient和ServicePointManager API添加编译警告抑制 - 简化异常处理逻辑并在Program.cs中改进启动流程 - 移除多个未使用的局部变量声明 - 添加launchSettings.json以支持开发环境配置 - 在表单构造函数中初始化components容器 - 优化网络请求超时设置并改善错误处理机制
38 lines
763 B
C#
38 lines
763 B
C#
using System.Collections;
|
|
using System.Windows.Forms;
|
|
|
|
namespace AppleBatch_June
|
|
{
|
|
public class ListViewItemComparer : IComparer
|
|
{
|
|
private int col;
|
|
|
|
private int _type;
|
|
|
|
public ListViewItemComparer(int countIndex, int type)
|
|
{
|
|
_type = type;
|
|
col = countIndex;
|
|
}
|
|
|
|
public int Compare(object x, object y)
|
|
{
|
|
string text = ((ListViewItem)x).SubItems[col].Text;
|
|
string text2 = ((ListViewItem)y).SubItems[col].Text;
|
|
if (int.TryParse(text, out var result) && int.TryParse(text2, out var result2))
|
|
{
|
|
if (_type == 1)
|
|
{
|
|
return (result >= result2) ? 1 : (-1);
|
|
}
|
|
return (result < result2) ? 1 : (-1);
|
|
}
|
|
if (_type == 1)
|
|
{
|
|
return string.Compare(text, text2);
|
|
}
|
|
return -string.Compare(text, text2);
|
|
}
|
|
}
|
|
}
|