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>
趣米云怎么样?趣米云是创建于2021年的国人IDC商家,虽然刚刚成立,但站长早期为3家IDC提供技术服务,已从业2年之久,目前主要从事出售香港vps、香港独立服务器、香港站群服务器等,目前在售VPS线路有三网CN2、CN2 GIA,该公司旗下产品均采用KVM虚拟化架构。由于内存资源大部分已售,而IP大量闲置,因此我们本月新增1c1g优惠套餐。点击进入:趣米云官方网站地址香港三网CN2云服务器机型活...
主机参考最新消息:JustHost怎么样?JustHost服务器好不好?JustHost好不好?JustHost是一家成立于2006年的俄罗斯服务器提供商,支持支付宝付款,服务器价格便宜,200Mbps大带宽不限流量,支持免费更换5次IP,支持控制面板自由切换机房,目前JustHost有俄罗斯5个机房可以自由切换选择,最重要的还是价格真的特别便宜,最低只需要87卢布/月,约8.5元/月起!just...
昨天,有在"阿里云秋季促销活动 轻量云服务器2G5M配置新购年60元"文章中记录到阿里云轻量服务器2GB内存、5M带宽一年60元的活动,当然这个也是国内机房的。我们很多人都清楚备案是需要接入的,如果我们在其他服务商的域名备案的,那是不能解析的。除非我们不是用来建站,而是用来云端的,是可以用的。这不看到其对手腾讯云也有推出两款轻量服务器活动。其中一款是4GB内存、8M带宽,这个比阿里云还要狠。这个真...
suspendlayout为你推荐
tdetde在国际贸易中的用词代表什么意思匹配函数Excel中vlookup函数数据匹配怎么用cpu监控安卓手机有没有桌面悬浮窗的cpu监控软件视频压缩算法关于视频压缩的原理?知识分享平台关于分享职场技能的知识付费平台,大家有什么好推荐的吗?vga接口定义电脑显示屏VGA是什么意思awvawv转换器哪里下?腾讯技术腾讯简介----什么是生态系统生态系统的我主要特征是什么?activitygroupTabHost ActivityGroup里面activity里的webview是不是不支持一些JS比如 alert?
国外vps租用 荷兰vps 拜登买域名批特朗普 美国主机排名 服务器评测 technetcal linode代购 美元争夺战 sub-process 国外php空间 长沙服务器 韩国网名大全 什么是刀片服务器 100m空间 lol台服官网 佛山高防服务器 免费申请网站 100mbps 游戏服务器出租 xuni 更多