示例#1
0
        public static void OnExit(object sender, ExecutedRoutedEventArgs e)
        {
            TagThresholdsGrid control      = sender as TagThresholdsGrid;
            Window            parentWindow = Window.GetWindow(control);

            parentWindow.Close();
        }
示例#2
0
        public static void OnShowTresholds(object sender, ExecutedRoutedEventArgs e)
        {
            TagsDataGrid control = sender as TagsDataGrid;

            if (control == null)
            {
                return;
            }

            if (control.SelectedQuery != null)
            {
                CustomWindow wnd = new CustomWindow();
                wnd.Title     = "Thresholds";
                wnd.MinHeight = 260;
                wnd.MaxHeight = 380;
                TagThresholdsGrid cl = new TagThresholdsGrid(control.SelectedQuery.Tresholds);
                //TagSettingsControl cl = new TagSettingsControl(SelectedQuery, false);
                //cl.SelectedQuery = new Objects.Modbus.SCADA.ScadaDeviceUpdateQuery();
                wnd.Content = cl;
                wnd.WindowStartupLocation = WindowStartupLocation.CenterOwner;
                wnd.Owner = Window.GetWindow(control);
                wnd.ShowDialog();
            }
        }