xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 60KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-05-16
  • 語(yǔ)言: 其他
  • 標(biāo)簽: 源碼??Mac修改??C#??.NET??

資源簡(jiǎn)介

根據(jù)注冊(cè)表修改Mac地址,然后將本地連接進(jìn)行停用和啟用來(lái)達(dá)到Mac地址的正確修改

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Windows.Forms;
using?Microsoft.Win32;
using?Shell32;
using?System.Threading;
using?System.IO;

namespace?WindowsFormsApplication2
{
????public?partial?class?MacModifyForm?:?Tokay.SystemUI.Dialogs.BasicDialog
????{
????????private?const?string?NETWORKADDRESS_KEY?=?@“SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\0007“;
????????private?const?string?NETWORKADDRESS_NAME?=?“NetworkAddress“;

????????private?const?string?discVerb?=?“禁用(&B)“;
????????private?const?string?connVerb?=?“啟用(&A)“;

????????private?readonly?string?bufferFile?=?Application.StartupPath?+?“\\buffer.dat“;
????????private?readonly?List?bufferIp?=?new?List();

????????public?MacModifyForm()
????????{
????????????InitializeComponent();

????????????if?(File.Exists(bufferFile))
????????????{
????????????????StreamReader?sr?=?new?StreamReader(bufferFile);
????????????????while?(!sr.EndOfStream)
????????????????{
????????????????????string?line?=?sr.ReadLine();
????????????????????if?(line.Length?>?0)
????????????????????{
????????????????????????bufferIp.Add(line.Trim());
????????????????????}
????????????????}
????????????}
????????}

????????private?void?MacModifyForm_Load(object?sender?EventArgs?e)
????????{
????????????this.textBox1.Text?=?ReadMac();
????????????this.btnOK.Enabled?=?false;
????????}

????????private?string?ReadMac()
????????{
????????????RegistryKey?HKLM?=?Registry.LocalMachine;
????????????try
????????????{
????????????????RegistryKey?Reg?=?HKLM.OpenSubKey(NETWORKADDRESS_KEY);
????????????????object?o?=?Reg.GetValue(NETWORKADDRESS_NAME);
????????????????return?o.ToString();
????????????}
????????????catch
????????????{
????????????????return?string.Empty;
????????????}
????????}

????????private?void?SetMac(string?mac)
????????{
????????????RegistryKey?HKLM?=?Registry.LocalMachine;
????????????RegistryKey?Reg?=?HKLM.OpenSubKey(NETWORKADDRESS_KEY?true);
????????????Reg.SetValue(NETWORKADDRESS_NAME?mac);
????????}

????????private?void?RestartMac()
????????{
????????????this.StopMac();
????????????Thread.Sleep(3000);
????????????this.StartMac();
????????}

????????private?void?StartMac()
????????{
????????????Shell?sh?=?new?Shell32.Shell();
????????????Folder?folder;
????????????Folder?fd;
????????????folder?=?sh.NameSpace(3);
????????????foreach?(FolderItem?myItem?in?folder.Items())
????????????{
????????????????if?(myItem.Name?==?“網(wǎng)絡(luò)連接“)
????????????????{
????????????????????fd?=?(Folder)myItem.GetFolder;
????????????????????//禁用網(wǎng)絡(luò)
????????????????????foreach?(FolderItem?fi?in?fd.Items())
????????????????????{
????????????????????????foreach?(FolderItemVerb?Fib?in?fi.Verbs())
????????????????????????{
????????????????????????????//啟用網(wǎng)絡(luò)
????????????????????????????if?(Fib.Nam

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件???????7158??2009-02-13?15:45??MacModifyForm.cs

?????文件???????7762??2009-02-13?15:38??MacModifyForm.Designer.cs

?????文件?????978199??2009-02-13?15:38??MacModifyForm.resx

-----------?---------??----------?-----??----

???????????????993119????????????????????3


評(píng)論

共有 條評(píng)論