aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/ApplicationLogsView.xaml.cs
blob: 234fdfeabf9056bc29c3ab043ccd36e7bdf74b4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Tango.MachineStudio.Logging.Views
{
    /// <summary>
    /// Interaction logic for EventsView.xaml
    /// </summary>
    public partial class ApplicationLogsView : UserControl
    {
        public ApplicationLogsView()
        {
            InitializeComponent();
        }

        private void DataGrid_Selected(object sender, RoutedEventArgs e)
        {
           
        }

        private void grid_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
        {
            grid.SelectedIndex = -1;
        }
    }
}
span class="w"> private MainViewVM _vm; public DraggingSurface DraggingSurface { get { return (DraggingSurface)GetValue(DraggingSurfaceProperty); } set { SetValue(DraggingSurfaceProperty, value); } } public static readonly DependencyProperty DraggingSurfaceProperty = DependencyProperty.Register("DraggingSurface", typeof(DraggingSurface), typeof(MainView), new PropertyMetadata(null)); public MainView() { InitializeComponent(); DraggingSurface = dragSufrace; Loaded += (x, y) => _vm = DataContext as MainViewVM; } private void OnMotorsDrop(object sender, DropEventArgs e) { if (e.Draggable.DataContext is HardwareMotorType) { _vm.OnMotorDrop(e.Draggable.DataContext as HardwareMotorType); } } private void OnDancerDrop(object sender, DropEventArgs e) { if (e.Draggable.DataContext is HardwareDancerType) { _vm.OnDropDancer(e.Draggable.DataContext as HardwareDancerType); } } private void OnPidControlDrop(object sender, DropEventArgs e) { if (e.Draggable.DataContext is HardwarePidControlType) { _vm.OnDropPidControl(e.Draggable.DataContext as HardwarePidControlType); } } private void OnDropWinder(object sender, DropEventArgs e) { if (e.Draggable.DataContext is HardwareWinderType) { _vm.OnDropWinder(e.Draggable.DataContext as HardwareWinderType); } } private void OnTrashDrop(object sender, DropEventArgs e) { if (e.Draggable.DataContext is HardwareMotor) { _vm.OnRemoveMotor(e.Draggable.DataContext as HardwareMotor); } else if (e.Draggable.DataContext is HardwareDancer) { _vm.OnRemoveDancer(e.Draggable.DataContext as HardwareDancer); } else if (e.Draggable.DataContext is HardwarePidControl) { _vm.OnRemovePidControl(e.Draggable.DataContext as HardwarePidControl); } else if (e.Draggable.DataContext is HardwareWinder) { _vm.OnRemoveWinder(e.Draggable.DataContext as HardwareWinder); } } } }