Merge branch 'master' of http://www.scserverddns.top:13000/sc/SunlightCentralizedControlManagement
This commit is contained in:
commit
ac3d12b899
6 files changed
+155
-19
No files matched your search
@@ -10,6 +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:Timeline;assembly=Timeline"
|
||||
xmlns:wfi ="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
|
||||
d:DataContext="{d:DesignInstance Type=viewmodel:ProductionPlanningModel}"
|
||||
mc:Ignorable="d" Loaded="UserControl_Loaded"
|
||||
@@ -23,10 +24,10 @@
|
||||
<RowDefinition Height="60"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0">
|
||||
<lvc:CartesianChart x:Name="ch" XAxes="{Binding XAxes}" YAxes="{Binding YAxes}" Series="{Binding Series}" />
|
||||
<!-- <lvc:CartesianChart x:Name="ch" XAxes="{Binding XAxes}" YAxes="{Binding YAxes}" Series="{Binding Series}" />-->
|
||||
|
||||
<wfi:WindowsFormsHost>
|
||||
<wf:Label x:Name="wfLabel" Text="winForm控件在此" />
|
||||
<UserTimeline:Timeline Name="Q"/>
|
||||
</wfi:WindowsFormsHost>
|
||||
</Grid>
|
||||
<StackPanel x:Name="scr" Grid.Row="1" Height="60" Background="#FF00204E" Orientation="Horizontal">
|
||||
|
||||
@@ -26,12 +26,15 @@ using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Xml.Linq;
|
||||
using System.Drawing;
|
||||
using static SunlightCentralizedControlManagement_SCCM_.UserClass.SqliteHelper;
|
||||
using static SunlightCentralizedControlManagement_SCCM_.WindowsView.ViewStep;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||
using SunlightCentralizedControlManagement_SCCM_.ViewModel;
|
||||
using LiveChartsCore.SkiaSharpView.WPF;
|
||||
using System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder;
|
||||
using Timeline.Model;
|
||||
using Timeline;
|
||||
|
||||
namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
{
|
||||
@@ -44,7 +47,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = new ProductionPlanningModel();
|
||||
ch.ZoomMode = LiveChartsCore.Measure.ZoomAndPanMode.PanX | LiveChartsCore.Measure.ZoomAndPanMode.ZoomY;
|
||||
//ch.ZoomMode = LiveChartsCore.Measure.ZoomAndPanMode.PanX | LiveChartsCore.Measure.ZoomAndPanMode.ZoomY;
|
||||
}
|
||||
|
||||
private SQLiteHelper SQLiteHelpers = null; //定义数据库
|
||||
@@ -52,8 +55,31 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
|
||||
private void UserControl_Loaded(object sender, RoutedEventArgs e)//打开页面时的操作
|
||||
{
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
// timeline1.ShowBarChart(startDate, endDate, testList);
|
||||
}
|
||||
|
||||
private void ListViewItem_Quit(object sender, System.Windows.Input.MouseButtonEventArgs e)//退出事件
|
||||
|
||||
Reference in new issue
Block a user