suspendlayout如何提高Js方法SetValue的速度

suspendlayout  时间:2021-06-05  阅读:()

1173是什么钢材

材料牌号: 1.1173 标准: DIN 国家与地区: Germany 钢组: 结构钢 次级类别: Carbon heat-treatable steel

如何連接至遠端電腦

下列程式碼範例會連接至與該使用者位於相同網域的遠端電腦,並顯示遠端電腦上作業系統的相關資訊。

使用者必須是遠端電腦的系統管理員,連接才能成功。

C#VBusing System; using System.Management; lass RemoteConnect { publicstaticvoid Main() { /*// Build an options object for the remote connection // if you plan to connect to the remote //puter with a different user name // and password than the one you are currently using ConnectionOptions options = new ConnectionOptions(); // and then set the options.Username and // options.Password properties to the correct values // and also set // options.Authority = "ntdlmdomain:DOMAIN"; // and replace DOMAIN with the puter's // domain. You can also use kerberose instead // of ntdlmdomain. */// Make a connection to a puter.// Replace the "FullComputerName" section of the// string "\\FullComputerName\root\cimv2" with// the puter name or IP address of the// puter. ManagementScope scope = new ManagementScope( "\\FullComputerName\root\cimv2"); scope.Connect(); // Use this code if you are connecting with a // different user name and password://// ManagementScope scope = // new ManagementScope(// "\\FullComputerName\root\cimv2", options);// scope.Connect();//Query system for Operating System information ObjectQuery query = new ObjectQuery( "SELECT * FROM Win32_OperatingSystem"); ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope,query); ManagementObjectCollection queryCollection = searcher.Get(); foreach ( ManagementObject m in queryCollection) { // Display the puter information Console.WriteLine("Computer Name : {0}", m["csname"]); Console.WriteLine("Windows Directory : {0}", m["WindowsDirectory"]); Console.WriteLine("Operating System: {0}", m["Caption"]); Console.WriteLine("Version: {0}", m["Version"]); Console.WriteLine("Manufacturer : {0}", m["Manufacturer"]); } } } ConnectionOptions 物件還控制遠端 DCOM 作業中 WMI 所使用的模擬和驗證層級。

這些參數的預設值分別為 Impersonate 和Unchanged。

Unchanged 值表示用戶端使用標準 DCOM 交涉處理序,預設為伺服器的驗證需求。

在 Windows 2000、Windows NT 4.0 和 Windows 98 上,WMI 服務會要求「連接」層級驗證,而在 Windows XP Home Edition, Windows XP Professional, Windows Server 2003 和 Windows Server 2003 上,它會要求「封包」層級驗證。

如果用戶端需要特定的驗證設定,則 ConnectionOptions 物件上的 Authentication 屬性可用於控制這個特定連接上的驗證層級。

Impersonate 值表示用戶端允許 WMI 資料提供者在蒐集所要求的資訊時模擬它的識別。

當提供者是信任的應用程式或服務時,這個預設值有許多優點,因為它不需要提供者在為這個用戶端擷取資訊時執行明確的識別和存取檢查。

不過,如果處理的提供者或副稽核應用程式由於某種原因而無法受到信任,則允許它模擬用戶端可能會構成安全性威脅。

在這種狀況下,建議您透過用戶端應用程式將模擬層級變更為較小的值,例如 Identify。

請注意,如果提供者未執行存取檢查,或在它自己的執行內容中沒有足夠的使用權限以擷取所要求的資訊,則會導致無法存取某些提供者的資訊。

下列程式碼範例會連接至遠端電腦並顯示遠端電腦上作業系統的相關資訊。

程式碼也會建立表單,以蒐集該連接的使用者名稱和密碼資訊。

C#VBusing System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.Management; namespace WMISample { lass MyQuerySample : System.Windows.Forms.Form { private System.Windows.Forms.Label userNameLabel; private System.Windows.Forms.TextBox userNameBox; private System.Windows.Forms.TextBox passwordBox; private System.Windows.Forms.Label passwordLabel; private System.Windows.Forms.Button OKButton; private System.Windows.Forms.Button cancelButton; private ponents = null; public MyQuerySample() { InitializeComponent(); } protectedoverridevoid Dispose( bool disposing ) { if( disposing ) { if ponents != null) {ponents.Dispose(); } } base.Dispose( disposing ); } privatevoid InitializeComponent() { this.userNameLabel = new System.Windows.Forms.Label(); this.userNameBox = new System.Windows.Forms.TextBox(); this.passwordBox = new System.Windows.Forms.TextBox(); this.passwordLabel = new System.Windows.Forms.Label(); this.OKButton = new System.Windows.Forms.Button(); this.cancelButton = new System.Windows.Forms.Button(); this.SuspendLayout(); // // userNameLabel// this.userNameLabel.Location = new System.Drawing.Point(16, 8); this.userNameLabel.Name = "userNameLabel"; this.userNameLabel.Size = new System.Drawing.Size(160, 32); this.userNameLabel.TabIndex = 0; this.userNameLabel.Text = "Enter the user name for the puter:"; // // userNameBox// this.userNameBox.Location = new System.Drawing.Point(160, 16); this.userNameBox.Name = "userNameBox"; this.userNameBox.Size = new System.Drawing.Size(192, 20); this.userNameBox.TabIndex = 1; this.userNameBox.Text = ""; // // passwordBox// this.passwordBox.Location = new System.Drawing.Point(160, 48); this.passwordBox.Name = "passwordBox"; this.passwordBox.PasswordChar = '*'; this.passwordBox.Size = new System.Drawing.Size(192, 20); this.passwordBox.TabIndex = 3; this.passwordBox.Text = ""; // // passwordLabel// this.passwordLabel.Location = new System.Drawing.Point(16, 48); this.passwordLabel.Name = "passwordLabel"; this.passwordLabel.Size = new System.Drawing.Size(160, 32); this.passwordLabel.TabIndex = 2; this.passwordLabel.Text = "Enter the password for the puter:"; // // OKButton// this.OKButton.Location = new System.Drawing.Point(40, 88); this.OKButton.Name = "OKButton"; this.OKButton.Size = new System.Drawing.Size(128, 23); this.OKButton.TabIndex = 4; this.OKButton.Text = "OK"; this.OKButton.Click += new System.EventHandler(this.OKButton_Click); // // cancelButton// this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.cancelButton.Location = new System.Drawing.Point(200, 88); this.cancelButton.Name = "cancelButton"; this.cancelButton.Size = new System.Drawing.Size(128, 23); this.cancelButton.TabIndex = 5; this.cancelButton.Text = "Cancel"; this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); // // MyQuerySample// eptButton = this.OKButton; this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.CancelButton = this.cancelButton; this.ClientSize = new System.Drawing.Size(368, 130); this.ControlBox = false; this.Controls.Add(this.cancelButton); this.Controls.Add(this.OKButton); this.Controls.Add(this.passwordBox); this.Controls.Add(this.passwordLabel); this.Controls.Add(this.userNameBox); this.Controls.Add(this.userNameLabel); this.Name = "MyQuerySample"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Remote Connection"; this.ResumeLayout(false); } [STAThread] staticvoid Main() { Application.Run(new MyQuerySample()); } privatevoid OKButton_Click(object sender, System.EventArgs e) { try { ConnectionOptions connection = new ConnectionOptions(); connection.Username = userNameBox.Text; connection.Password = passwordBox.Text; connection.Authority = "ntlmdomain:DOMAIN"; ManagementScope scope = new ManagementScope( "\\FullComputerName\root\CIMV2", connection); scope.Connect(); ObjectQuery query= new ObjectQuery( "SELECT * FROM Win32_Service"); ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query); foreach (ManagementObject queryObj in searcher.Get()) { Console.WriteLine("-----------------------------------"); Console.WriteLine("Win32_Service instance"); Console.WriteLine("-----------------------------------"); Console.WriteLine("Caption: {0}", queryObj["Caption"]); Console.WriteLine("Description: {0}", queryObj["Description"]); Console.WriteLine("Name: {0}", queryObj["Name"]); Console.WriteLine("PathName: {0}", queryObj["PathName"]); Console.WriteLine("State: {0}", queryObj["State"]); Console.WriteLine("Status: {0}", queryObj["Status"]); } Close(); } catch(ManagementException err) { MessageBox.Show("An error ured while querying for WMI data: " + err.Message); } catch(essException unauthorizedErr) { MessageBox.Show("Connection error " + "(user name or password might be incorrect): " + unauthorizedErr.Message); } } privatevoid cancelButton_Click(object sender, System.EventArgs e) { Close(); } } } 如需遠端連接中的 WMI 所使用之模擬和驗證層級的詳細資訊,請參閱上述程式碼範例中的 Comment 區段。

如何提高Js方法SetValue的速度

在客户端通过代码操作Spread时,将Spread暂时挂起,不进行UI重绘: <script type="text/javascript" language="javascript"> function ProfileSpread() { fpSpread1.SuspendLayout(); for (var i = 0; i < 10; i++) { fpSpread1.SetValue(); } fpSpread1.ResumeLayout(true); } </script>

wordpress外贸企业主题 wordpress高级全行业大气外贸主题

wordpress高级全行业大气外贸主题,wordpress通用全行业高级外贸企业在线询单自适应主题建站程序,完善的外贸企业建站功能模块 + 高效通用的后台自定义设置,更实用的移动设备特色功能模块 + 更适于欧美国外用户操作体验 大气简洁的网站风格设计 + 高效优化的网站程序结构,更利于Goolge等SEO搜索优化和站点收录排名。点击进入:wordpress高级全行业大气外贸主题主题价格:¥398...

LOCVPS全场8折,香港云地/邦联VPS带宽升级不加价

LOCVPS发布了7月份促销信息,全场VPS主机8折优惠码,续费同价,同时香港云地/邦联机房带宽免费升级不加价,原来3M升级至6M,2GB内存套餐优惠后每月44元起。这是成立较久的一家国人VPS服务商,提供美国洛杉矶(MC/C3)、和中国香港(邦联、沙田电信、大埔)、日本(东京、大阪)、新加坡、德国和荷兰等机房VPS主机,基于XEN或者KVM虚拟架构,均选择国内访问线路不错的机房,适合建站和远程办...

创梦网络-四川大带宽、镇江电信服务器云服务器低至56元

达州创梦网络怎么样,达州创梦网络公司位于四川省达州市,属于四川本地企业,资质齐全,IDC/ISP均有,从创梦网络这边租的服务器均可以备案,属于一手资源,高防机柜、大带宽、高防IP业务,一手整C IP段,四川电信,一手四川托管服务商,成都优化线路,机柜租用、服务器云服务器租用,适合建站做游戏,不须要在套CDN,全国访问快,直连省骨干,大网封UDP,无视UDP攻击,机房集群高达1.2TB,单机可提供1...

suspendlayout为你推荐
GoldenDBGolden Hind中文什么意思 好像是一个人名或地点之类的词李智慧李智慧和李东健的电影有哪些?企业资源管理系统企业内部管理系统有哪些网络审计网经科技1820听说是网络审计路由器,大家知道怎么样吗?设备支持多少用户啊腾讯年终奖腾讯qq一年盈利多少?印度尼西亚国家代码手机上的国家代码是什么qq网络硬盘我QQ的网络硬盘怎么啦?数据统计分析表怎样建立数据透视表和数据分析表?assemblyinfoCSE和CS有什么区别天翼校园宽带电信校园宽带手机怎么上网
com域名 burstnet oneasiahost tier linkcloud 表格样式 双11抢红包攻略 建站代码 100m空间 免费美国空间 电信虚拟主机 web服务器安全 免费网页空间 新世界服务器 海外空间 上海电信测速 中国linux 免费网络 新网dns 中美互联网论坛 更多