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>

rfchost:洛杉矶vps/双向CN2 GIA,1核/1G/10G SSD/500G流量/100Mbps/季付$23.9

rfchost怎么样?rfchost是一家开办了近六年的国人主机商,一般能挺过三年的国人商家,还是值得入手的,商家主要销售VPS,机房有美国洛杉矶/堪萨斯、中国香港,三年前本站分享过他家堪萨斯机房的套餐。目前rfchost商家的洛杉矶机房还是非常不错的,采用CN2优化线路,电信双程CN2 GIA,联通去程CN2 GIA,回程AS4837,移动走自己的直连线路,目前季付套餐还是比较划算的,有需要的可...

美国云服务器 1核 1G 100M 10G防御 39元/月 物语云计算

物语云计算(MonogatariCloud)是一家成立于2016年的老牌国人商家,主营国内游戏高防独服业务,拥有多家机房资源,产品质量过硬,颇有一定口碑。本次带来的是美国圣何塞 Equinix 机房的高性能I9-10980XE大带宽VPS,去程CN2GIA回程AS9929,美国原生IP,支持解锁奈飞等应用,支持免费安装Windows系统。值得注意的是,物语云采用的虚拟化技术为Hyper-V,资源全...

Contabo美国独立日促销,独立服7月€3.99/月

Contabo自4月份在新加坡增设数据中心以后,这才短短的过去不到3个月,现在同时新增了美国纽约和西雅图数据中心。可见Contabo加速了全球布局,目前可选的数据中心包括:德国本土、美国东部(纽约)、美国西部(西雅图)、美国中部(圣路易斯)和亚洲的新加坡数据中心。为了庆祝美国独立日和新增数据中心,自7月4日开始,购买美国地区的VPS、VDS和独立服务器均免设置费。Contabo是德国的老牌服务商,...

suspendlayout为你推荐
waze马来西亚中文导航waze地图cpu监控电脑硬件监控软件有哪些?知识分享平台全国知识共享的平台有哪些?知识分享平台微信看到一些文章,可以分享到知识付费的平台吗?怎么操作呀?oa办公系统下载完全免费的oa办公系统自定义表情手机qq添加的自定义表情怎么分组awv请问awv是什么样的格式啊?部署工具如何使用office2016部署软件asp大马黑帽seo的webshell中,什么是大马和小马币众筹收益权众筹为什么有吸引力
cn域名 免费二级域名申请 主机点评 百度云100as 免费ftp空间 sockscap godaddy 申请空间 大容量存储 html空间 国外免费asp空间 爱奇艺vip免费领取 阿里云官方网站 qq金券 防cc攻击 攻击服务器 架设代理服务器 cdn加速技术 免费网站加速 cc加速器 更多