Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. <Button x:Name="btnLocalOpc" Content="..."
  2. Grid.Column="1" HorizontalAlignment="Left"
  3. Command="{Binding PesquisarLocalServerCommand}"
  4. Margin="547,98,0,0" VerticalAlignment="Top"
  5. Width="43" RenderTransformOrigin="0.5,0.5"/>
  6.  
  7. public ColectorsViewModel()
  8. {
  9. try
  10. {
  11.  
  12. PesquisarLocalServerCommand = new Command(SearchLocalOpc);
  13. IsEditing = false;
  14. SelectedIndex = -1;
  15. }
  16.  
  17. private void SearchLocalOpc()
  18. {
  19. using(OpcServerDialog serverDialog = new OpcServerDialog())
  20. {
  21. if(serverDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
  22. {
  23. //capturo os dados aqui e preciso notificar a view
  24. }
  25. }
  26. }
  27. catch (Exception e)
  28. {
  29. throw e;
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement