日期:2014-05-17 浏览次数:21121 次
<Window x:Class="Traffic.AP.FocusSet"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="调焦设置" FontSize="16" Height="500" Width="500" WindowStartupLocation="CenterScreen" ResizeMode="CanMinimize" Closing="Window_Closing" Loaded="Window_Loaded">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="370*" />
<RowDefinition Height="91*" />
</Grid.RowDefinitions>
<Canvas Name="canvas" Grid.Row="0">
</Canvas>
<Button Content="抓拍" Grid.Row="1" Height="28" HorizontalAlignment="Left" Margin="147,22,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" />
</Grid>
</Window>
namespace Traffic.AP
{
/// <summary>
/// Interaction logic for FocusSet.xaml
/// </summary>
public partial class FocusSet : Window
{
public FocusSet(delegateRecordFocus recordFocus,delegateGrabImg grabImg)
{
InitializeComponent();
this.m_recordFocus = recordFocus;
this.m_grabImg = grabImg;
}
public delegate void delegateRecordFocus(IntPtr hWndScreen, string tempDir, bool bStop);
private delegateRecordFocus m_recordFocus;
public delegate void delegateGrabImg();
private delegateGrabImg m_grabImg;
private void button1_Click(object sender, RoutedEventArgs e)
{
m_grabImg();
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
//var helper = new System.Windows.Interop.WindowInteropHelper(this);