| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- using System.Drawing;
- using System.Windows.Controls;
- using TeamAAS_VP.ViewModels.Product;
- namespace TeamAAS_VP.Views.Product
- {
- /// <summary>
- /// Interaction logic for CalculateOffsetU
- /// </summary>
- public partial class CalculateOffsetU : UserControl
- {
- CalculateOffsetUViewModel VM;
- public CalculateOffsetU()
- {
- InitializeComponent();
- VM=DataContext as CalculateOffsetUViewModel;
- VM.PropertyChanged += VM_PropertyChanged;
- this.display.HorizontalScrollBar = false;
- this.display.VerticalScrollBar = false;
- this.display.AutoFit = true;
- this.display.BackColor = System.Drawing.SystemColors.ActiveCaption;
- }
- private void VM_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
- {
- try
- {
- if (e.PropertyName == "Robot")
- {
- this.robotManual.Robot = VM.Robot;
- }
- else if (e.PropertyName == "Image")
- {
- this.display.Image = VM.Image;
- }
- else if (e.PropertyName == "Graphic")
- {
- this.display.StaticGraphics.Clear();
- if (VM.Graphic!=null)
- {
- this.display.StaticGraphics.AddList(VM.Graphic, "");
- }
- }
- }
- catch (System.Exception)
- {
- }
-
- }
- }
- }
|