MessageDialogView.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. using System;
  2. using System.CodeDom.Compiler;
  3. using System.ComponentModel;
  4. using System.Diagnostics;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Markup;
  8. namespace OpenSEMI.ClientBase
  9. {
  10. public class MessageDialogView : UserControl, IComponentConnector
  11. {
  12. internal Border DialogWindow;
  13. internal Grid Warning;
  14. internal Grid Information;
  15. internal Grid Error;
  16. internal Grid Confirm;
  17. private bool _contentLoaded;
  18. public MessageDialogView()
  19. {
  20. InitializeComponent();
  21. }
  22. [DebuggerNonUserCode]
  23. [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
  24. public void InitializeComponent()
  25. {
  26. if (!_contentLoaded)
  27. {
  28. _contentLoaded = true;
  29. Uri resourceLocator = new Uri("/OpenSEMI.ClientBase;component/dialog/messagedialogview.xaml", UriKind.Relative);
  30. Application.LoadComponent(this, resourceLocator);
  31. }
  32. }
  33. [DebuggerNonUserCode]
  34. [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
  35. [EditorBrowsable(EditorBrowsableState.Never)]
  36. void IComponentConnector.Connect(int connectionId, object target)
  37. {
  38. switch (connectionId)
  39. {
  40. case 1:
  41. DialogWindow = (Border)target;
  42. break;
  43. case 2:
  44. Warning = (Grid)target;
  45. break;
  46. case 3:
  47. Information = (Grid)target;
  48. break;
  49. case 4:
  50. Error = (Grid)target;
  51. break;
  52. case 5:
  53. Confirm = (Grid)target;
  54. break;
  55. default:
  56. _contentLoaded = true;
  57. break;
  58. }
  59. }
  60. }
  61. }