static void DeviceProperty_Changed(DependencyObject sender, DependencyPropertyChangedEventArgs e) { // Get the sender CapPlayer typedSender = sender as CapPlayer; if ((typedSender != null) && (e.NewValue != null)) { // Make sure that we are not in design mode if (System.ComponentModel.DesignerProperties.GetIsInDesignMode(typedSender)) { return; } // Unsubscribe from previous device CapDevice oldDevice = e.OldValue as CapDevice; if (oldDevice != null) { // Clean up typedSender.CleanUpDevice(oldDevice); } // Subscribe to new one CapDevice newDevice = e.NewValue as CapDevice; if (newDevice != null) { // Subscribe newDevice.NewBitmapReady += typedSender.device_OnNewBitmapReady; // Start newDevice.Start(); } } }
static void RotationProperty_Changed(DependencyObject sender, DependencyPropertyChangedEventArgs e) { // Get the sender CapPlayer typedSender = sender as CapPlayer; if (typedSender != null) { // Rotate typedSender.LayoutTransform = new RotateTransform((double)e.NewValue); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.wnd = ((AvCapWPF.Window1)(target)); return; case 2: this.player = ((WpfCap.CapPlayer)(target)); return; } this._contentLoaded = true; }
public BarcodeReader(ref TextBox txtDecoderContentBox, ref CapPlayer player) { _txtDecoderContentBox = txtDecoderContentBox; _player = player; }
public BarcodeReader(ref Label txtDecoderContent, ref CapPlayer player) { _txtDecoderContent = txtDecoderContent; _player = player; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.stack = ((System.Windows.Controls.StackPanel)(target)); return; case 2: this.displayOA = ((System.Windows.Controls.Image)(target)); #line 63 "..\..\..\..\UI\PicFrame.xaml" this.displayOA.MouseRightButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.display_MouseRightButtonUp); #line default #line hidden #line 63 "..\..\..\..\UI\PicFrame.xaml" this.displayOA.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.display_MouseLeftButtonUp); #line default #line hidden return; case 3: this.display1 = ((System.Windows.Controls.Image)(target)); #line 65 "..\..\..\..\UI\PicFrame.xaml" this.display1.MouseRightButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.display_MouseRightButtonUp); #line default #line hidden #line 65 "..\..\..\..\UI\PicFrame.xaml" this.display1.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.display_MouseLeftButtonUp); #line default #line hidden return; case 4: this.display2 = ((System.Windows.Controls.Image)(target)); #line 66 "..\..\..\..\UI\PicFrame.xaml" this.display2.MouseRightButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.display_MouseRightButtonUp); #line default #line hidden #line 66 "..\..\..\..\UI\PicFrame.xaml" this.display2.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.display_MouseLeftButtonUp); #line default #line hidden return; case 5: this.player = ((WpfCap.CapPlayer)(target)); return; case 6: #line 77 "..\..\..\..\UI\PicFrame.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_1); #line default #line hidden return; case 7: this.webcamText = ((System.Windows.Controls.TextBox)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.wnd = ((SmartHyperMarket.DataEntryManager.Views.AddProduct)(target)); return; case 2: this.textBoxName = ((System.Windows.Controls.TextBox)(target)); return; case 3: this.comboBoxcategory = ((System.Windows.Controls.ComboBox)(target)); return; case 4: this.textBoxPrice = ((System.Windows.Controls.TextBox)(target)); return; case 5: this.textboxWeight = ((System.Windows.Controls.TextBox)(target)); return; case 6: this.textboxDescription = ((System.Windows.Controls.TextBox)(target)); return; case 7: this.textBoxBarcode = ((System.Windows.Controls.TextBox)(target)); return; case 8: this.player = ((WpfCap.CapPlayer)(target)); return; case 9: this.buttonAddProduct = ((System.Windows.Controls.Button)(target)); #line 54 "..\..\..\..\DataEntryManager\Views\AddProduct.xaml" this.buttonAddProduct.Click += new System.Windows.RoutedEventHandler(this.buttonAddProduct_Click); #line default #line hidden return; } this._contentLoaded = true; }