Merge branch 'master' of http://www.scserverddns.top:13000/sc/DyeingComputer
This commit is contained in:
commit
1dfe10e93b
8 files changed
+186
-32
No files matched your search
@@ -6,7 +6,7 @@
|
||||
xmlns:local="clr-namespace:DyeingComputer.View"
|
||||
xmlns:lang="clr-namespace:DyeingComputer.Properties"
|
||||
xmlns:ConvertMoels="clr-namespace:DyeingComputer.ConvertMoels"
|
||||
mc:Ignorable="d"
|
||||
mc:Ignorable="d" Loaded="UserControl_Loaded"
|
||||
d:DesignHeight="630" d:DesignWidth="1280" HorizontalAlignment="Left">
|
||||
<UserControl.Resources>
|
||||
<ConvertMoels:RowToIndexConverter x:Key="RowToIndexConverter"/>
|
||||
|
||||
@@ -15,6 +15,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
@@ -97,6 +98,31 @@ namespace DyeingComputer.View
|
||||
}
|
||||
}
|
||||
|
||||
private void UserControl_Loaded(object sender, RoutedEventArgs e)//打开页面时的操作
|
||||
{
|
||||
if (ID == null) ID = sql.Tables[0].Rows.Count.ToString();
|
||||
Grid.SelectedIndex = StrToInt.To16Convert10(ID)-1;
|
||||
}
|
||||
public static T GetVisualChild<T>(Visual parent) where T : Visual
|
||||
{
|
||||
T child = default(T);
|
||||
int numVisuals = VisualTreeHelper.GetChildrenCount(parent);
|
||||
for (int i = 0; i < numVisuals; i++)
|
||||
{
|
||||
Visual v = (Visual)VisualTreeHelper.GetChild(parent, i);
|
||||
child = v as T;
|
||||
if (child == null)
|
||||
{
|
||||
child = GetVisualChild<T>(v);
|
||||
}
|
||||
if (child != null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
return child;
|
||||
}
|
||||
|
||||
private void ProgramgroupView_edit_Click(object sender, RoutedEventArgs e)//编辑
|
||||
{
|
||||
if(ID == null) ID = sql.Tables[0].Rows.Count.ToString();
|
||||
|
||||
Reference in new issue
Block a user