Form1.cs
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
// Created by Leestar54
// E-Mail:178078114@qq.com
using NativeWifi;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Wifi连接器
{
public partial class Form1 : Form
{
private List<Wlan.WlanAvailableNetwork> NetWorkList = new List<Wlan.WlanAvailableNetwork>();
private WlanClient.WlanInterface WlanIface;
public Form1()
{
InitializeComponent();
}
void WlanIface_WlanConnectionNotification(Wlan.WlanNotificationData notifyData, Wlan.WlanConnectionNotificationData connNotifyData)
{
if (notifyData.notificationSource == NativeWifi.Wlan.WlanNotificationSource.MSM)
{
//这里是完成连接
if ((NativeWifi.Wlan.WlanNotificationCodeMsm)notifyData.NotificationCode == NativeWifi.Wlan.WlanNotificationCodeMsm.Connected)
{
Invoke(new Action(() =>
{
label2.Text = connNotifyData.profileName;
}));
}
}
else if (notifyData.notificationSource == NativeWifi.Wlan.WlanNotificationSource.ACM)
{
//连接失败
if ((NativeWifi.Wlan.WlanNotificationCodeAcm)notifyData.NotificationCode == NativeWifi.Wlan.WlanNotificationCodeAcm.ConnectionAttemptFail)
{
Invoke(new Action(() =>
{
label2.Text = "未连接";
}));
MessageBox.Show("连接失败,请检查密码是否正确");
WlanIface.DeleteProfile(connNotifyData.profileName);
}
if ((NativeWifi.Wlan.WlanNotificationCodeAcm)notifyData.NotificationCode == NativeWifi.Wlan.WlanNotificationCodeAcm.Disconnected)
{
Invoke(new Action(() =>
{
label2.Text = "未连接";
}));
}
if ((NativeWifi.Wlan.WlanNotificationCodeAcm)notifyData.NotificationCode == NativeWifi.Wlan.WlanNotificationCodeAcm.Disconnecting)
{
Invoke(new Action(() =>
后面还有 90 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。