This commit is contained in:
sc committed 2024-12-29 15:39:52 +08:00
commit 649b595936
3 files changed
+17 -8

No files matched your search

+2 -6
View File
@@ -9,9 +9,7 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:lvc="clr-namespace:LiveChartsCore.SkiaSharpView.WPF;assembly=LiveChartsCore.SkiaSharpView.WPF"
xmlns:viewmodel="clr-namespace:SunlightCentralizedControlManagement_SCCM_.ViewModel"
xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
xmlns:wfi ="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
xmlns:Ngantt="clr-namespace:nGantt;assembly=nGantt"
d:DataContext="{d:DesignInstance Type=viewmodel:ProductionPlanningModel}"
mc:Ignorable="d" Loaded="UserControl_Loaded"
d:DesignHeight="630" d:DesignWidth="1280">
@@ -24,9 +22,7 @@
<RowDefinition Height="60"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<!-- <lvc:CartesianChart x:Name="ch" XAxes="{Binding XAxes}" YAxes="{Binding YAxes}" Series="{Binding Series}" />-->
<wfi:WindowsFormsHost >
</wfi:WindowsFormsHost>
<Ngantt:GanttControl x:Name="GanttChart"/>
</Grid>
<StackPanel x:Name="scr" Grid.Row="1" Height="60" Background="#FF00204E" Orientation="Horizontal">
<ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD">
+9 -2
View File
@@ -33,6 +33,8 @@ using static System.Windows.Forms.VisualStyles.VisualStyleElement;
using SunlightCentralizedControlManagement_SCCM_.ViewModel;
using LiveChartsCore.SkiaSharpView.WPF;
using System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder;
using nGantt.GanttChart;
using nGantt;
namespace SunlightCentralizedControlManagement_SCCM_.View
@@ -57,10 +59,15 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
List<string> qw = MainWindowViewModel.Machines.AsEnumerable().Select(row => row.Field<string>("name")).ToList();//转换列名为机台
int asd = qw.Count();
var rowgroup1 = GanttChart.CreateGanttRowGroup("HeaderdGanttRowGroup");
var row1 = GanttChart.CreateGanttRow(rowgroup1, "GanttRow 1");
GanttChart.AddGanttTask(row1, new GanttTask() { Start = DateTime.Parse("2012-02-01"), End = DateTime.Parse("2012-03-01"), Name = "GanttRow 1:GanttTask 1", TaskProgressVisibility = System.Windows.Visibility.Hidden });
GanttChart.AddGanttTask(row1, new GanttTask() { Start = DateTime.Parse("2012-03-05"), End = DateTime.Parse("2012-05-01"), Name = "GanttRow 1:GanttTask 2" });
GanttChart.AddGanttTask(row1, new GanttTask() { Start = DateTime.Parse("2012-06-01"), End = DateTime.Parse("2012-06-15"), Name = "GanttRow 1:GanttTask 3" });
}
private void ListViewItem_Quit(object sender, System.Windows.Input.MouseButtonEventArgs e)//退出事件
{