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>
hostwinds怎么样?2021年7月最新 hostwinds 优惠码整理,Hostwinds 优惠套餐整理,Hostwinds 西雅图机房直连线路 VPS 推荐,目前最低仅需 $4.99 月付,并且可以免费更换 IP 地址。本文分享整理一下最新的 Hostwinds 优惠套餐,包括托管型 VPS、无托管型 VPS、Linux VPS、Windows VPS 等多种套餐。目前 Hostwinds...
hostkvm怎么样?hostkvm是一家国内老牌主机商家,商家主要销售KVM架构的VPS,目前有美国、日本、韩国、中国香港等地的服务,站长目前还持有他家香港CN2线路的套餐,已经用了一年多了,除了前段时间香港被整段攻击以外,一直非常稳定,是做站的不二选择,目前商家针对香港云地和韩国机房的套餐进行7折优惠,其他套餐为8折,商家支持paypal和支付宝付款。点击进入:hostkvm官方网站地址hos...
快云科技怎么样?快云科技是一家成立于2020年的新起国内主机商,资质齐全 持有IDC ICP ISP等正规商家。我们秉承着服务于客户服务于大众的理念运营,机器线路优价格低。目前已注册用户达到5000+!主营产品有:香港弹性云服务器,美国vps和日本vps,香港物理机,国内高防物理机以及美国日本高防物理机!产品特色:全配置均20M带宽,架构采用KVM虚拟化技术,全盘SSD硬盘,RAID10阵列, 国...
suspendlayout为你推荐
企业资源管理系统企业人力资源管理系统的重要性?自定义表情QQ自定义表情天翼校园宽带天翼校园宽带 是怎么算时间的 一个月 是指从办理那天开始 往后 30天是一个月吗 还是 办理的那天所在的那个labelforhtml中label是什么意思啊?超级播放器推荐个好的视频播放器移动硬盘文件或目录损坏且无法读取移动硬盘提示文件或目录损坏且无法读取!点心os什么是点心os?手机操作系统和手机区别么?一个是硬件一个是软件?听说炒的好火?监控插件常见的监控软件有哪些yy号注册怎么申请yy号smo优化aso优化是什么意思?
俄罗斯vps bluehost 美国主机论坛 美国php空间 国外网站代理服务器 卡巴斯基官方免费版 支付宝扫码领红包 linux使用教程 上海联通宽带测速 789电视剧 raid10 google台湾 东莞idc 网购分享 国外的代理服务器 德讯 SmartAXMT800 windowsserver2012r2 alexa世界排名 什么是dns 更多