using System;
using System.Collections.Generic;
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;
using System.Data;
namespace SiaSun.LMS.WPFClient.Dialog
{
///
/// EditPanelDialog.xaml 的交互逻辑
///
public partial class EditPanelDialog : Window
{
string strTableName = null;
string windowName = null;
///
/// 关联XML表名
///
public string U_XmlTableName
{
get { return strTableName; }
set { strTableName = value; }
}
///
/// 关联窗体名称
///
public string U_WindowName
{
get { return windowName; }
set { windowName = value; }
}
public EditPanelDialog()
{
InitializeComponent();
this.ucWinHeader.DataContext = this;
}
///
/// 初始化窗体
///
public void U_InitWindow(DataGrid gridApp,DataRow rowSource)
{
this.editPanel.U_InitControl(false,gridApp,rowSource);
//this.Height = SystemParameters.PrimaryScreenHeight > this.editPanel.Height + 50 ? this.editPanel.Height + 50 : SystemParameters.PrimaryScreenHeight;
}
///
/// 操作按钮
///
private void WrapPanel_Click(object sender, RoutedEventArgs e)
{
Button btn = e.OriginalSource as Button;
switch (btn.Name)
{
case "btnOK":
this.DialogResult = true;
break;
case "btnClose":
this.DialogResult = false;
break;
}
this.Close();
return;
}
}
}