using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
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.Shapes;
namespace MultiLayout.MainEdit
{
///
/// Window_MainEditGraphTabItem.xaml 的交互逻辑
///
public partial class WdGageTabItemConfig : FLY.ControlLibrary.WindowBigClose
{
ObservableCollection Items;
int Idx;
public WdGageTabItemConfig()
{
InitializeComponent();
}
///
///
///
/// 全部设备
/// 设备序号
/// 服务容器列表
public void Init(ObservableCollection items, int idx, List serviceNames)
{
Items = items;
Idx = idx;
cbServiceNames.ItemsSource = serviceNames;
this.DataContext = Items[Idx];
}
private void button_pre_Click(object sender, RoutedEventArgs e)
{
if (Idx > 0)
{
Items.Move(Idx, Idx - 1);
Idx--;
}
}
private void button_next_Click(object sender, RoutedEventArgs e)
{
if (Idx < Items.Count()-1)
{
Items.Move(Idx, Idx + 1);
Idx++;
}
}
}
}