本文整理汇总了C#中System.Windows.Forms.Control.GetHashCode方法的典型用法代码示例。如果您正苦于以下问题:C# Control.GetHashCode方法的具体用法?C# Control.GetHashCode怎么用?C# Control.GetHashCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.Control
的用法示例。
在下文中一共展示了Control.GetHashCode方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: add
public static void add(Control container, Control control, object constraints)
{
container.Controls.Add(control);
LayoutManager layoutManager = (LayoutManager) layoutManagers[container.GetHashCode()];
if (layoutManager is LayoutManager2)
((LayoutManager2) layoutManager).AddLayoutComponent(control, constraints);
}
示例2: CallObjectGetHashCode
public static object CallObjectGetHashCode(Control c, object[] obj)
{
return c.GetHashCode();
}
示例3: doLayout
public static void doLayout(Control panel)
{
LayoutManager layoutManager = (LayoutManager) layoutManagers[panel.GetHashCode()];
layoutManager.LayoutContainer(panel);
}
示例4: setLayout
public static void setLayout(Control container, LayoutManager2 layoutManager)
{
layoutManagers[container.GetHashCode()] = layoutManager;
}
示例5: GetKeyFor
private static string GetKeyFor(Form form, Control control){
return string.Format("{0}_{1}", form.GetHashCode(), control.GetHashCode());
}
示例6: MakeControlAndSubControlsSensitiveToKey
public static void MakeControlAndSubControlsSensitiveToKey(Control control, Keys[] keys, Func<Keys, int> method)
{
control.KeyDown += (object sender, KeyEventArgs e) =>
{
Control control_sent = (Control)sender;
if (_sensibleKeys.ContainsKey(control.GetHashCode()))
{
foreach (var key in _sensibleKeys[control.GetHashCode()].key)
{
if (key == e.KeyCode)
{
_sensibleKeys[control_sent.GetHashCode()].method(e.KeyCode);
}
}
}
};
_sensibleKeys.Add(control.GetHashCode(), new ControlDetails(keys, method));
foreach (Control child_control in control.Controls)
{
MakeControlAndSubControlsSensitiveToKey(child_control, keys, method);
}
}