Merge branch 'master' of http://www.scserverddns.top:13000/sc/SunlightCentralizedControlManagement
This commit is contained in:
commit
3a3e2abd34
18 files changed
+21
-1250
No files matched your search
@@ -10,7 +10,7 @@
|
||||
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:UserTimeline="clr-namespace:Timelines;assembly=Timelines"
|
||||
|
||||
xmlns:wfi ="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
|
||||
d:DataContext="{d:DesignInstance Type=viewmodel:ProductionPlanningModel}"
|
||||
mc:Ignorable="d" Loaded="UserControl_Loaded"
|
||||
@@ -25,8 +25,7 @@
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0">
|
||||
<!-- <lvc:CartesianChart x:Name="ch" XAxes="{Binding XAxes}" YAxes="{Binding YAxes}" Series="{Binding Series}" />-->
|
||||
<wfi:WindowsFormsHost>
|
||||
<UserTimeline:Timeline x:Name="qwe"/>
|
||||
<wfi:WindowsFormsHost >
|
||||
</wfi:WindowsFormsHost>
|
||||
</Grid>
|
||||
<StackPanel x:Name="scr" Grid.Row="1" Height="60" Background="#FF00204E" Orientation="Horizontal">
|
||||
|
||||
@@ -33,8 +33,7 @@ using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||
using SunlightCentralizedControlManagement_SCCM_.ViewModel;
|
||||
using LiveChartsCore.SkiaSharpView.WPF;
|
||||
using System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder;
|
||||
using Timelines.Model;
|
||||
using Timelines;
|
||||
|
||||
|
||||
namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
{
|
||||
@@ -55,38 +54,16 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
|
||||
private void UserControl_Loaded(object sender, RoutedEventArgs e)//打开页面时的操作
|
||||
{
|
||||
List<string> qw = MainWindowViewModel.Machines.AsEnumerable().Select(row => row.Field<string>("name")).ToList();//转换列名为机台
|
||||
int asd = qw.Count();
|
||||
|
||||
var randomVar = new Random();
|
||||
|
||||
var testList = new List<ItemModel>();
|
||||
|
||||
var startDate = new DateTime(2024, 12, 30, 10, 9, 0);
|
||||
var endDate = new DateTime(2024, 12, 30, 22, 29, 0);
|
||||
|
||||
for (var i = 0; i < 10; i++)
|
||||
{
|
||||
for (var d = startDate; d < endDate; d = d.AddSeconds(randomVar.Next(13000, 14000)))
|
||||
{
|
||||
var item1 = new ItemModel
|
||||
{
|
||||
ItemName = "Item" + "" + i,
|
||||
Duration = TimeSpan.FromSeconds(randomVar.Next(8, 15000)),
|
||||
StartDate = d,
|
||||
ItemColor = System.Drawing.Color.PowderBlue
|
||||
};
|
||||
|
||||
testList.Add(item1);
|
||||
}
|
||||
}
|
||||
|
||||
qwe.ShowBarChart(startDate,endDate,testList);
|
||||
// var dfg = new TimelineChart();
|
||||
// qwe.Child = dfg.ShowBarChart(startDate, endDate, testList);
|
||||
// timeline1.ShowBarChart(startDate, endDate, testList);
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void ListViewItem_Quit(object sender, System.Windows.Input.MouseButtonEventArgs e)//退出事件
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void ListViewItem_edit(object sender, System.Windows.Input.MouseButtonEventArgs e)//编辑事件
|
||||
|
||||
Reference in new issue
Block a user