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>
IncogNet LLC是个由3个人运作的美国公司,主要特色是隐私保护,号称绝对保护用户的隐私安全。业务涵盖虚拟主机、VPS等,支持多种数字加密货币、PayPal付款。注册账号也很简单,输入一个姓名、一个邮箱、国家随便选,填写一个邮箱就搞定了,基本上不管资料的真假。当前促销的vps位于芬兰机房,全部都是AMD Ryzen系列的CPU,性能不会差的!5折优惠码:CRYPTOMONTH,支持:BTC,...
ProfitServer怎么样?ProfitServer好不好。ProfitServer是一家成立于2003的主机商家,是ITC控股的一个部门,主要经营的产品域名、SSL证书、虚拟主机、VPS和独立服务器,机房有俄罗斯、新加坡、荷兰、美国、保加利亚,VPS采用的是KVM虚拟架构,硬盘采用纯SSD,而且最大的优势是不限制流量,大公司运营,机器比较稳定,数据中心众多。此次ProfitServer正在对...
野草云服务商在前面的文章中也有多次提到,算是一个国内的小众服务商。促销活动也不是很多,比较专注个人云服务用户业务,之前和站长聊到不少网友选择他们家是用来做网站的。这不看到商家有提供香港云服务器的优惠促销,可选CN2、BGP线路、支持Linux与windows系统,支持故障自动迁移,使用NVMe优化的Ceph集群存储,比较适合建站用户选择使用,最低年付138元 。野草云(原野草主机),公司成立于20...
suspendlayout为你推荐
qq代挂代挂qq之后自己就上不去了chinapay银联在线 银联在线支付 什么区别vga接口定义主板VGA接口两排针脚的循序是怎么排列seo优化技术做seo需要懂什么技术?star413匡威jack star 的后标是不是真的?如图鄂n鄂A鄂B鄂C鄂D鄂E鄂F鄂G鄂H鄂J鄂K鄂L鄂M鄂N鄂P鄂Q鄂R鄂S鄂T鄂U分别代表湖北省的哪些城市微软操作系统下载怎么下载官方win10 64位镜像系统审计平台什么是审计工具单元测试规范如何做好小学数学单元测试工作河北云办税厅用小度怎么打开河北教育资讯云平台?
国外网站空间 域名交易 播放vps上的视频 日本软银 外贸主机 表格样式 回程路由 ssh帐号 牛人与腾讯客服对话 200g硬盘 老左正传 qq云端 广州服务器 789电视剧 申请网站 atom处理器 lamp怎么读 注册阿里云邮箱 创速 cdn服务 更多