本文整理汇总了C#中System.Windows.Forms.Panel.notNull方法的典型用法代码示例。如果您正苦于以下问题:C# Panel.notNull方法的具体用法?C# Panel.notNull怎么用?C# Panel.notNull使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.Panel
的用法示例。
在下文中一共展示了Panel.notNull方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: hijack_Chrome
public static API_Chrome_Hijack hijack_Chrome(this API_Chrome_Hijack chromeHijack, Panel targetPanel, bool hijackJustViewer)
{
if (chromeHijack.notNull() && chromeHijack.ChromeProcess.notNull() && targetPanel.notNull())
{
chromeHijack.Panel_Chrome = targetPanel;
var hijackGui = chromeHijack.Panel_Chrome.add_Handle_HijackGui(false);
if (hijackJustViewer)
{
hijackGui.hijackProcessWindow(chromeHijack.ChromeProcess,
(mainWindowHandle)=>
{
// this doesn't work well now since the main chrome window (with the address bar) still gains focus)
// need to look at how to capture and filter events from the child to the parent (and vice versa)
//
var targetWindow = mainWindowHandle.child_Windows().second();
return targetWindow;
//return mainWindowHandle; // for now hijack the whole thing
});
}
else
hijackGui.hijackProcessMainWindow(chromeHijack.ChromeProcess);
}
return chromeHijack;
}
示例2: hijack_ChromeDriver
public static API_Chrome_Hijack hijack_ChromeDriver(this API_Chrome_Hijack chromeHijack, Panel targetPanel)
{
if (chromeHijack.notNull() && chromeHijack.ChromeDriverProcess.notNull() && targetPanel.notNull())
{
chromeHijack.Panel_ChromeDriver = targetPanel;
chromeHijack.Panel_ChromeDriver.add_Handle_HijackGui(false)
.hijackProcessMainWindow(chromeHijack.ChromeDriverProcess);
}
return chromeHijack;
}