This commit is contained in:
sc committed 2024-11-11 00:20:36 +08:00
commit 008933c19d
3 files changed
+13 -20

No files matched your search

+3 -2
View File
@@ -54,7 +54,6 @@
<DataGridTextColumn Header="{x:Static lang:Resources.Remark}" Width="*" Binding="{Binding Notes}" IsReadOnly="True"/>
</DataGrid.Columns>
</DataGrid>
<ContentControl x:Name="container"/>
<StackPanel x:Name="scr" VerticalAlignment="Bottom" Height="60" Background="#FF00204E" Orientation="Horizontal" Margin="0,0,0,0">
<ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD">
@@ -106,7 +105,9 @@
</StackPanel>
</ListViewItem>
</ListView>
</StackPanel>
<ContentControl x:Name="container"/>
</Grid>
</UserControl>
+9 -17
View File
@@ -40,22 +40,6 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
SQLiteHelpers.Close(); //关闭连接
}
private void ProgramgroupView_edit_Click(object sender, RoutedEventArgs e)
{
/*if (Programgroup_ID == null) return;
container.Content = new ProgramstepsView();*/
}
public static string Programgroup_Numder { get; set; }
public static string Programgroup_ID { get; set; }
@@ -75,7 +59,13 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
private void Grid_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)//双击表格编辑事件
{
int rownum = Grid.SelectedIndex;//获取鼠标选中行并定义变量
if (rownum != -1)//判断鼠标定位是否有效
{
Programgroup_ID = (Grid.Columns[0].GetCellContent(Grid.Items[rownum]) as TextBlock).Text;//定位第0列,
Programgroup_Numder = (Grid.Columns[1].GetCellContent(Grid.Items[rownum]) as TextBlock).Text;//定位第1列,
container.Content = new ProgramstepsView();//打开步设置
}
}
private void ListViewItem_New(object sender, System.Windows.Input.MouseButtonEventArgs e)
@@ -116,6 +106,8 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
Rename.IsEnabled = false;
Remark.IsEnabled = false;
Delete.IsEnabled = false;
if (Programgroup_ID == null) return;
container.Content = new ProgramstepsView();
}
private void ListViewItem_Rename(object sender, System.Windows.Input.MouseButtonEventArgs e)//重命名
+1 -1
View File
@@ -44,7 +44,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
}
private SQLiteHelper SQLiteHelpers = null; //定义数据库
private readonly string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
private readonly string DBAddress = Environment.CurrentDirectory + "\\DataBase\\SCCM.db"; //数据库路径
DataSet sql; //内存数据缓存
string ProgramID;