前伴唱
<UserControl xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" x:Class="ComputerDropDragControl.ComputerRack"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="White" >
<StackPanel x:Name="stackOne" Orientation="Horizontal" VerticalAlignment="Top" >
<StackPanel x:Name="stackTwo" Orientation="Horizontal" Margin="0,2,0,0">
<!--<StackPanel.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="Black" Offset="0"></GradientStop>
<GradientStop Color="LightGray" Offset="1"></GradientStop>
</LinearGradientBrush>
</StackPanel.Background>-->
</StackPanel>
</StackPanel>
</Grid>
</UserControl>
后半厂
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;
namespace ComputerDropDragControl
{
/// <summary>
/// “机架”界面
/// 创建人:吴兆娟
/// 创建时间:2011-10-25
/// </summary>
public partial class ComputerRack : UserControl
{
#region <<页面加载>>
public bool ExistPlace = false;
public bool FromList = false;
/// <summary>
/// 页面加载
/// </summary>
/// <param name="rackID"></param>
public ComputerRack(string rackID)
{
InitializeComponent();
RackID = rackID;
//加载数据
LoadData();
LoadDataOne();
//LoadDataFree();
//初始化界面
InitForm();
}
/// <summary>
/// 初始化界面
/// </summary>
private void InitForm()
{
foreach (RowFrameView item in rfCollection)
{
//观察者
RackUnit ru = new RackUnit(item);
stackTwo.Children.Add(ru);
//被观察者
LoadComputerUnit(ru.ReturnUI, item.FrameID);
}
}
#endregion
#region <<控件事件>>
#region <<拖拽相关事件>>
/// <summary>
/// “开始拖拽”
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void dropDragPanel_ItemDragStarting(object sender, ItemDragEventArgs e)
{
//FromList = false;
//DragPanel = (PanelDragDropTarget)sender;
//Dictionary<string, object> dic = GetDropDragPanelContentValues(DragPanel);
//StackPanel stackContent = (StackPanel)(DragPanel.Content);
//CU = (ComputerUnit)(stackContent.Children[3]);
//CU.ShowTip = false;
}
/// <summary>
/// “目标”即是“放”的对象Drop事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void dropDragPanel_Drop(object sender, Microsoft.Windows.DragEventArgs e)
{
//DropPanel = (PanelDragDropTarget)sender;
“放”
//Dictionary<string, object> dicDrop = GetDropDragPanelContentValues((PanelDragDropTarget)sender);
“放”对象的父对象
//Grid fatherDropGrid = ((Grid)((PanelDragDropTarget)sender).Parent);
//int tempDropCount = (fatherDropGrid.Children.Count() + 1) / 2;
//PanelDragDropTarget dropPanelEnd = (PanelDragDropTarget)fatherDropGrid.Children[(tempDropCount - (int)dicDrop["RackUNo"]) * 2];
//StackPanel stackDropEnd = (StackPanel)dropPanelEnd.Content;
//TextBlock tbDropFrame = (TextBlock)stackDropEnd.Children[0];
//if (!FromList)
//{
// bool normalCondition = true;
// //“拖”
// Dictionary<string, object> dicDrag = GetDropDragPanelContentValues(DragPanel);
// //“拖”
// Grid fatherDragGrid = (Grid)(DragPanel.Parent);
// int tempDragCount = (fatherDragGrid.Children.Count() + 1) / 2;
// StackPanel stackDragEnd = (StackPanel)DragPanel.Content;
// TextBlock tbDragFrame = (TextBlock)stackDragEnd.Children[0];
// TextBlock tbDragUNo = (TextBlock)stackDragEnd.Children[1];
// TextBlock tbExist = (TextBlock)stackDragEnd.Children[2];
// if (tbDropFrame.Text == tbDragFrame.Text)//同一个机器架内拖拽的业务逻辑
// {
// List<PanelDragDropTarget> listNeighborUp = new List<PanelDragDropTarget>();
// for (int i = 1; i < CU.ReturnNodeFrameView.NodeSize; i++)
// {
// if ((tempDropCount - (int)dicDrag["RackUNo"] - i) * 2 > 0)
// {
// PanelDragDropTarget panelTemp = (PanelDragDropTarget)fatherDragGrid.Children[(tempDropCount - (int)dicDrag["RackUNo"] - i) * 2];
// StackPanel stackTemp = (StackPanel)panelTemp.Content;
// TextBlock tbExistTemp = (TextBlock)stackTemp.Children[2];
// TextBlock tbRackUNo = (TextBlock)stackTemp.Children[1];
// if (tbExistTemp.Text == "false")
// {
// listNeighborUp.Add(panelTemp);
// }
// else
// {
// break;
// }
// }
// }
// foreach (PanelDragDropTarget panel in listNeighborUp)
// {
// if (panel == DropPanel)
// {
// normalCondition = false;
// //MessageBox.Show("特殊的拆分模式!");
// DepartUnit(DragPanel);
// MergeUnit(DragPanel, dicDrop);
// ExistPlace = true;
// #region <<数据库交互>>
// StackPanel stackDrop = (StackPanel)DropPanel.Content;
// CU.ReturnNodeFrameView.FrameID = ((TextBlock)stackDrop.Children[0]).Text;
// CU.ReturnNodeFrameView.NodeEndUNo = int.Parse(((TextBlock)stackDrop.Children[1]).Text);
// CU.ReturnNodeFrameView.NodeBeginUNo = int.Parse(((TextBlock)stackDrop.Children[1]).Text) - CU.ReturnNodeFrameView.NodeSize + 1;
// //建立“设备”和“机架”新关系
// //MessageBox.Show(CU.ReturnNodeFrameView.FrameID + "------" + CU.ReturnNodeFrameView.NodeBeginUNo.ToString() + "-------" + CU.ReturnNodeFrameView.NodeEndUNo.ToString());
// #endregion
// return;
// }
// }
// }
// if (normalCondition)
// {
// //是否存在存储空间以及操作
// WhetherExistPlace();
// }
//}
//else
//{
// //ListBox list = (ListBox)this.listDrag.Content;
// //ListBoxItem selectItem = (ListBoxItem)list.SelectedItem;
// //int index = (int)list.SelectedIndex;
// //SelectListItem = selectItem;
// //SelectIndex = index;
// //NodeFrameView entity = (NodeFrameView)selectItem.DataContext;
// //ComputerUnit cu = new ComputerUnit(entitdy);
// //cu.ShowTip = true;
// //CU = cu;
// 是否存在存储空间以及操作
// //WhetherExistPlace();
//}
}
/// <summary>
/// “拖对象放至目标对象后”发生的事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void dropDragPanel_ItemDroppedOnTarget(object sender, ItemDragEventArgs e)
{
//if (DropPanel != null)
//{
// if (DropPanel.AllowDrop)
// {
// if (!ExistPlace)
// {
// CancelBehavior();
// }
// }
//}
//CU.ShowTip = true;
}
#endregion
/// <summary>
/// “查询”按钮点击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnSearch_Click(object sender, RoutedEventArgs e)
{
//List<NodeFrameView> result = nFreeList.ToList<NodeFrameView>();
//if (!string.IsNullOrEmpty(this.txtNodeName.Text))
//{
// result = (from nodeFrameView in nFreeList
// where nodeFrameView.NodeName.IndexOf(this.txtNodeName.Text.Trim()) > 0
// select nodeFrameView).ToList<NodeFrameView>();
//}
//listComputer.Items.Clear();
//foreach (NodeFrameView item in result)
//{
// ListBoxItem li = new ListBoxItem();
// li.Content = item.NodeName;
// li.DataContext = item;
// listComputer.Items.Add(li);
//}
}
#endregion
#region <<辅助方法>>
/// <summary>
/// 更新数据库
/// </summary>
private void UpdateData()
{
//#region <<数据库交互>>
//StackPanel stackDrop = (StackPanel)DropPanel.Content;
//CU.ReturnNodeFrameView.FrameID = ((TextBlock)stackDrop.Children[0]).Text;
//CU.ReturnNodeFrameView.NodeEndUNo = int.Parse(((TextBlock)stackDrop.Children[1]).Text);
//CU.ReturnNodeFrameView.NodeBeginUNo = int.Parse(((TextBlock)stackDrop.Children[1]).Text) - CU.ReturnNodeFrameView.NodeSize + 1;
建立“设备”和“机架”新关系
MessageBox.Show(CU.ReturnNodeFrameView.FrameID + "------" + CU.ReturnNodeFrameView.NodeBeginUNo.ToString() + "-------" + CU.ReturnNodeFrameView.NodeEndUNo.ToString());
//#endregion
}
/// <summary>
/// 判断是否存在存储空间以及相关操作
/// </summary>
private void WhetherExistPlace()
{
“放”
//Dictionary<string, object> dicDrop = GetDropDragPanelContentValues(DropPanel);
//Grid fatherDropGrid = (Grid)(DropPanel.Parent);
//int tempDropCount = (fatherDropGrid.Children.Count() + 1) / 2;
//PanelDragDropTarget dropPanelEnd = (PanelDragDropTarget)fatherDropGrid.Children[(tempDropCount - (int)dicDrop["RackUNo"]) * 2];
//StackPanel stackDropEnd = (StackPanel)dropPanelEnd.Content;
//TextBlock tbDropFrame = (TextBlock)stackDropEnd.Children[0];
//#region <<判断是否有足够空间>>
//if (CU.ReturnNodeFrameView.NodeSize == 1)
//{
// if (((TextBlock)stackDropEnd.Children[2]).Text == "true")
// {
// MessageBox.Show("没有足够的空间!");
// ExistPlace = false;
// return;
// }
// else
// {
// ExistPlace = true;
// MergeUnit(DropPanel, dicDrop);
// if (!FromList)
// {
// DepartUnit(DragPanel);
// }
// else
// {
// stackDropEnd.Children.Add(CU);
// }
// FromList = false;
// //数据库操作
// UpdateData();
// }
//}
//else
//{
// for (int i = 1; i < CU.ReturnNodeFrameView.NodeSize; i++)
// {
// if ((tempDropCount - (int)dicDrop["RackUNo"] + i) * 2 <= tempDropCount * 2 - 1)
// {
// PanelDragDropTarget dropPanelTempOne = (PanelDragDropTarget)fatherDropGrid.Children[(tempDropCount - (int)dicDrop["RackUNo"] + i) * 2];
// StackPanel stackDropPanelOne = (StackPanel)dropPanelTempOne.Content;
// TextBlock tbExistComputer = (TextBlock)stackDropPanelOne.Children[2];
// if (tbExistComputer.Text == "true")
// {
// MessageBox.Show("没有足够的空间!");
// ExistPlace = false;
// return;
// }
// }
// if (i == CU.ReturnNodeFrameView.NodeSize - 1)
// {
// if ((tempDropCount - (int)dicDrop["RackUNo"] + i) * 2 > tempDropCount * 2 - 1)
// {
// MessageBox.Show("没有足够的空间!");
// ExistPlace = false;
// return;
// }
// else
// {
// ExistPlace = true;
// //合并单元格
// MergeUnit(DropPanel, dicDrop);
// if (!FromList)
// {
// //拆分单元格
// DepartUnit(DragPanel);
// }
// else
// {
// stackDropEnd.Children.Add(CU);
// }
// FromList = false;
// //数据库操作
// UpdateData();
// }
// }
// }
//}
//#endregion
}
/// <summary>
/// “合并单元格”
/// </summary>
/// <param name="panel"></param>
private void MergeUnit(PanelDragDropTarget panel, Dictionary<string, object> dicDrop)
{
//Grid fatherDropGrid = (Grid)(panel.Parent);
//int tempDropCount = (fatherDropGrid.Children.Count() + 1) / 2;
//PanelDragDropTarget dropPanelEnd = (PanelDragDropTarget)fatherDropGrid.Children[(tempDropCount - (int)dicDrop["RackUNo"]) * 2];
//dropPanelEnd.AllowDrop = false;
//dropPanelEnd.SetValue(Grid.RowSpanProperty, CU.ReturnNodeFrameView.NodeSize);
//StackPanel stackDropEnd = (StackPanel)dropPanelEnd.Content;
//stackDropEnd.Height = 40 * CU.ReturnNodeFrameView.NodeSize;
//TextBlock tbDropFrame = (TextBlock)stackDropEnd.Children[0];
//for (int j = 1; j < CU.ReturnNodeFrameView.NodeSize; j++)
//{
// PanelDragDropTarget dropPanelTemp = (PanelDragDropTarget)fatherDropGrid.Children[(tempDropCount - (int)dicDrop["RackUNo"] + j) * 2];
// dropPanelTemp.Visibility = Visibility.Collapsed;
// dropPanelTemp.AllowDrop = false;
// StackPanel stackTemp = (StackPanel)dropPanelTemp.Content;
// ((TextBlock)stackTemp.Children[2]).Text = "true";
//}
//#region <<修改偷藏值>>
//((TextBlock)stackDropEnd.Children[2]).Text = "true";
//#endregion
}
/// <summary>
/// “拆分单元格”
/// </summary>
/// <param name="panel"></param>
private void DepartUnit(PanelDragDropTarget panel)
{
“拖”的父对象
//Grid fatherDragGrid = (Grid)(panel.Parent);
//int tempCount = (fatherDragGrid.Children.Count() + 1) / 2;
//PanelDragDropTarget dragPanelEnd = (PanelDragDropTarget)fatherDragGrid.Children[(tempCount - CU.ReturnNodeFrameView.NodeEndUNo) * 2];
//dragPanelEnd.AllowDrop = true;
//dragPanelEnd.SetValue(Grid.RowSpanProperty, 1);
//StackPanel stackDragEnd = (StackPanel)dragPanelEnd.Content;
//stackDragEnd.Height = 40;//单位长度
//for (int i = 1; i < CU.ReturnNodeFrameView.NodeSize; i++)
//{
// PanelDragDropTarget dropDragPanelTemp =
// (PanelDragDropTarget)fatherDragGrid.Children[(tempCount - CU.ReturnNodeFrameView.NodeEndUNo + i) * 2];
// dropDragPanelTemp.Visibility = Visibility.Visible;
// dropDragPanelTemp.AllowDrop = true;
// StackPanel stackTemp = (StackPanel)dropDragPanelTemp.Content;
// ((TextBlock)stackTemp.Children[2]).Text = "false";
//}
//#region <<修改偷藏值>>
//((TextBlock)stackDragEnd.Children[2]).Text = "false";
//#endregion
}
/// <summary>
/// “取消拖拽操作”
/// </summary>
private void CancelBehavior()
{
//((StackPanel)DropPanel.Content).Children.RemoveAt(3);
//((StackPanel)DragPanel.Content).Children.Add(CU);
//DropPanel.AllowDrop = true;
//DragPanel.AllowDrop = false;
}
/// <summary>
/// 获取DropDragPanel中值信息
/// </summary>
/// <param name="panel"></param>
/// <returns></returns>
//private Dictionary<string, object> GetDropDragPanelContentValues(PanelDragDropTarget panel)
//{
// Dictionary<string, object> dic = new Dictionary<string, object>();
// StackPanel aimStack = (StackPanel)panel.Content;
// #region<<偷藏的一些设备以及机架信息赋值>>
// string computerFrame = ((TextBlock)aimStack.Children[0]).Text;
// int rackUNo = int.Parse(((TextBlock)aimStack.Children[1]).Text);
// string existComputer = ((TextBlock)aimStack.Children[2]).Text;
// #endregion
// dic.Add("FrameID", computerFrame);
// dic.Add("RackUNo", rackUNo);
// dic.Add("ExistComputer", existComputer);
// return dic;
//}
//#region <<加载界面相关>>
/ <summary>
/ 加载“机架”
/ </summary>
/ <param name="entity"></param>
//private void LoadRackUnit(RowFrameView entity)
//{
// Border border = new Border();
// border.BorderBrush = new SolidColorBrush(Colors.Black);
// border.BorderThickness = new Thickness(1);
// border.Width = 130;
// border.HorizontalAlignment = HorizontalAlignment.Left;
// border.VerticalAlignment = VerticalAlignment.Bottom;
// border.Margin = new Thickness(10, 0, 0, 0);
// Grid RackGrid = new Grid();
// RackGrid.Background = new SolidColorBrush(Colors.White);
// ColumnDefinition c1 = new ColumnDefinition();
// c1.Width = new GridLength(40);
// ColumnDefinition c2 = new ColumnDefinition();
// c2.Width = new GridLength(90);
// RackGrid.ColumnDefinitions.Add(c1);
// RackGrid.ColumnDefinitions.Add(c2);
// RackGrid.Width = 130;
// RackGrid.HorizontalAlignment = HorizontalAlignment.Left;
// RackGrid.ShowGridLines = false;
// RackGrid.Height = 40 * (entity.TotalUCount + 1);
// border.Height = 40 * (entity.TotalUCount + 1);
// for (int i = entity.TotalUCount + 1; i >= 1; i--)
// {
// RowDefinition rd = new RowDefinition();
// rd.Height = new GridLength(40);
// RackGrid.RowDefinitions.Add(rd);
// if (i == entity.TotalUCount + 1)
// {
// TextBlock tbHeader = new TextBlock();
// tbHeader.Text = entity.FrameName;
// tbHeader.TextAlignment = TextAlignment.Center;
// tbHeader.VerticalAlignment = VerticalAlignment.Center;
// tbHeader.SetValue(Grid.RowProperty, 0);
// tbHeader.SetValue(Grid.ColumnSpanProperty, 2);
// RackGrid.Children.Add(tbHeader);
// }
// else
// {
// TextBlock tbRackNum = new TextBlock();
// tbRackNum.Text = i.ToString();
// tbRackNum.TextAlignment = TextAlignment.Center;
// tbRackNum.VerticalAlignment = VerticalAlignment.Center;
// tbRackNum.SetValue(Grid.RowProperty, entity.TotalUCount - i + 1);
// tbRackNum.SetValue(Grid.ColumnProperty, 0);
// RackGrid.Children.Add(tbRackNum);
// PanelDragDropTarget dropDrapPanel = new PanelDragDropTarget();
// dropDrapPanel.AllowDrop = true;
// dropDrapPanel.SetValue(Grid.RowProperty, entity.TotalUCount - i + 1);
// dropDrapPanel.SetValue(Grid.ColumnProperty, 1);
// StackPanel stackTempOne = new StackPanel();
// stackTempOne.Height = 40;
// stackTempOne.Width = 90;
// if ((i - 1) % 2 == 0)
// {
// stackTempOne.Background = new SolidColorBrush(Colors.LightGray);
// }
// else
// {
// stackTempOne.Background = new SolidColorBrush(Colors.DarkGray);
// }
// #region<<偷藏的一些设备以及机架信息>>
// TextBlock hidFrameID = new TextBlock();//设备所在机架FrameID
// hidFrameID.Visibility = Visibility.Collapsed;
// hidFrameID.Text = entity.FrameName;
// TextBlock hidUNo = new TextBlock();//机架U单位编号
// hidUNo.Visibility = Visibility.Collapsed;
// hidUNo.Text = tbRackNum.Text;
// TextBlock hidExistComputer = new TextBlock();//机架U中是否存在设备
// hidExistComputer.Visibility = Visibility.Collapsed;
// hidExistComputer.Text = "false";
// stackTempOne.Children.Add(hidFrameID);
// stackTempOne.Children.Add(hidUNo);
// stackTempOne.Children.Add(hidExistComputer);
// #endregion
// dropDrapPanel.Content = stackTempOne;
// #region <<订阅拖拽事件>>
// dropDrapPanel.ItemDroppedOnTarget += new EventHandler<ItemDragEventArgs>(dropDragPanel_ItemDroppedOnTarget);
// dropDrapPanel.Drop += new Microsoft.Windows.DragEventHandler(dropDragPanel_Drop);
// dropDrapPanel.ItemDragStarting += new EventHandler<ItemDragEventArgs>(dropDragPanel_ItemDragStarting);
// #endregion
// RackGrid.Children.Add(dropDrapPanel);
// }
// }
// border.Child = RackGrid;
// stackTwo.Children.Add(border);
// ReturnUI = RackGrid;
//}
/// <summary>
/// 加载该机架“设备信息”
/// </summary>
private void LoadComputerUnit(UIElement ui, string frameID)
{
List<NodeFrameView> result = (from nodeFrameView in nfList
where nodeFrameView.FrameID == frameID
select nodeFrameView).ToList<NodeFrameView>();
Grid temp = (Grid)ui;
//添加被观察者
foreach (NodeFrameView item in result)
{
int tempCount = (temp.Children.Count() + 1) / 2;
PanelDragDropTarget dropDragPanelEnd = (PanelDragDropTarget)temp.Children[(tempCount - item.NodeEndUNo) * 2];
dropDragPanelEnd.SetValue(Grid.RowSpanProperty, item.NodeSize);
dropDragPanelEnd.AllowDrop = false;
for (int i = 1; i < item.NodeSize; i++)
{
PanelDragDropTarget dropDragPanelTemp = (PanelDragDropTarget)temp.Children[(tempCount - item.NodeEndUNo + i) * 2];
dropDragPanelTemp.Visibility = Visibility.Collapsed;
dropDragPanelTemp.AllowDrop = false;
StackPanel aimStackTemp = (StackPanel)dropDragPanelTemp.Content;
((TextBlock)aimStackTemp.Children[2]).Text = "true";
}
ComputerUnit cu = new ComputerUnit(item);
cu.ShowTip = true;
StackPanel aimStack = (StackPanel)dropDragPanelEnd.Content;
aimStack.Height = cu.ReturnHeight;
aimStack.Children.Add(cu);
#region<<偷藏一些设备以及机架信息赋值>>
((TextBlock)aimStack.Children[2]).Text = "true";
#endregion
}
}
//#endregion
#endregion
public ListBoxItem SelectListItem;
public int SelectIndex;
public string RackID { get; set; }
public PanelDragDropTarget DragPanel { get; set; }
public PanelDragDropTarget DropPanel { get; set; }
public ComputerUnit CU { get; set; }
public UIElement ReturnUI { get; set; }
public ObservableCollection<RowFrameView> rfCollection;
public ObservableCollection<NodeFrameView> nFreeList;
private ObservableCollection<NodeFrameView> LoadDataFree()
{
return nFreeList = new ObservableCollection<NodeFrameView>
{
new NodeFrameView("n1","List设备一",2),
new NodeFrameView("n2","List设备二",3),
new NodeFrameView("n3","List设备三",3),
new NodeFrameView("n4","List设备五",3),
new NodeFrameView("n5","List设备六",2),
new NodeFrameView("n6","List设备七",1),
new NodeFrameView("n7","List设备八",2)
};
}
/// <summary>
/// 观察者
/// </summary>
//public class RowFrameView
//{
// public RowFrameView(string roomID, string rowNo, int frameCount,
// string frameID, string frameName, int totalUCount, int orderIndex)
// {
// RoomID = roomID;
// RowNo = rowNo;
// FrameCount = frameCount;
// FrameID = frameID;
// FrameName = frameName;
// TotalUCount = totalUCount;
// OrderIndex = orderIndex;
// }
// public string RoomID { get; set; }
// public string RowNo { get; set; }
// public int FrameCount { get; set; }
// public string FrameID { get; set; }
// public string FrameName { get; set; }
// public int TotalUCount { get; set; }
// public int OrderIndex { get; set; }
//}
public ObservableCollection<RowFrameView> LoadData()
{
return rfCollection = new ObservableCollection<RowFrameView>()
{
new RowFrameView("1","r1_1",10,"f1_r1","A-1",42,1),
new RowFrameView("1","r1_1",10,"f2_r1","A-2",42,2),
new RowFrameView("1","r1_1",10,"f3_r1","A-3",42,3),
new RowFrameView("1","r1_1",10,"f4_r1","A-4",42,4),
new RowFrameView("1","r1_1",10,"f4_r1","A-5",42,5)
//new RowFrameView("1","r1_1",10,"f4_r1","A-6",42,6),
//new RowFrameView("1","r1_1",10,"f4_r1","A-7",42,7),
//new RowFrameView("1","r1_1",10,"f4_r1","A-8",42,8),
//new RowFrameView("1","r1_1",10,"f4_r1","A-9",42,9),
//new RowFrameView("1","r1_1",10,"f4_r1","A-10",42,10)
};
}
private ObservableCollection<NodeFrameView> LoadDataOne()
{
return nfList = new ObservableCollection<NodeFrameView>()
{
new NodeFrameView("n1","设备一",2,1,2,"f1_r1"),
new NodeFrameView("n2","设备二",3,3,5,"f1_r1"),
new NodeFrameView("n3","设备三",3,7,9,"f1_r1"),
new NodeFrameView("n3","设备四",4,10,13,"f1_r1"),
new NodeFrameView("n3","设备五",3,14,16,"f1_r1"),
new NodeFrameView("n3","设备六",5,17,21,"f1_r1"),
new NodeFrameView("n3","设备七",1,22,22,"f1_r1"),
new NodeFrameView("n3","设备八",1,23,23,"f1_r1"),
new NodeFrameView("n3","设备九",2,24,25,"f1_r1"),
new NodeFrameView("n3","设备十",5,30,34,"f1_r1"),
new NodeFrameView("n3","设备十一",3,35,37,"f1_r1"),
new NodeFrameView("n3","设备十二",3,38,40,"f1_r1"),
new NodeFrameView("n4","设备五",3,2,4,"f2_r1"),
new NodeFrameView("n5","设备六",2,5,7,"f2_r1"),
new NodeFrameView("n6","设备七",1,8,8,"f2_r1"),
new NodeFrameView("n7","设备八",3,20,22,"f2_r1"),
new NodeFrameView("n7","设备九",3,23,25,"f2_r1"),
new NodeFrameView("n7","设备十",5,30,34,"f2_r1"),
new NodeFrameView("n7","设备十一",4,35,38,"f2_r1"),
new NodeFrameView("n7","设备十二",3,39,41,"f2_r1"),
new NodeFrameView("n7","设备十三",1,42,42,"f2_r1")
};
}
public ObservableCollection<NodeFrameView> nfList;
}
}