sc 10 months ago
parent
commit
2192be7434
  1. 4
      SunlightCentralizedControlManagement_SCCM_.csproj
  2. 6
      View/ProductionPlanningView.xaml
  3. 5
      View/ProductionPlanningView.xaml.cs
  4. 37
      ViewModel/ProductionPlanningModel.cs
  5. 11
      ViewModel/ViewModelLocator.cs

4
SunlightCentralizedControlManagement_SCCM_.csproj

@ -98,6 +98,7 @@
<Compile Include="UserClass\StrToInt.cs" />
<Compile Include="UserClass\SubItem.cs" />
<Compile Include="UserClass\UserControlMenuItem.cs" />
<Compile Include="ViewModel\ProductionPlanningModel.cs" />
<Compile Include="ViewModel\CurveDiagramViewModel.cs" />
<Compile Include="ViewModel\MainWindowViewModel.cs" />
<Compile Include="ViewModel\ViewModelLocator.cs" />
@ -315,9 +316,6 @@
<PackageReference Include="Microsoft.Web.WebView2">
<Version>1.0.2903.40</Version>
</PackageReference>
<PackageReference Include="MindFusion.Scheduling.Wpf">
<Version>3.5.3</Version>
</PackageReference>
<PackageReference Include="NModbus">
<Version>3.0.81</Version>
</PackageReference>

6
View/ProductionPlanningView.xaml

@ -6,7 +6,8 @@
xmlns:local="clr-namespace:SunlightCentralizedControlManagement_SCCM_.View"
xmlns:lang="clr-namespace:SunlightCentralizedControlManagement_SCCM_.Properties"
xmlns:ConvertMoels="clr-namespace:SunlightCentralizedControlManagement_SCCM_.ConvertMoels"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:planner="http://mindfusion.eu/scheduling/wpf"
mc:Ignorable="d" Loaded="UserControl_Loaded"
d:DesignHeight="630" d:DesignWidth="1280">
<UserControl.Resources>
@ -17,7 +18,8 @@
<RowDefinition/>
<RowDefinition Height="60"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid Grid.Row="0">
</Grid>
<StackPanel x:Name="scr" Grid.Row="1" Height="60" Background="#FF00204E" Orientation="Horizontal">

5
View/ProductionPlanningView.xaml.cs

@ -46,7 +46,10 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
private void UserControl_Loaded(object sender, RoutedEventArgs e)//打开页面时的操作
{
}
}
private void ListViewItem_Quit(object sender, System.Windows.Input.MouseButtonEventArgs e)//退出事件
{

37
ViewModel/ProductionPlanningModel.cs

@ -0,0 +1,37 @@
using LiveChartsCore.SkiaSharpView;
using LiveChartsCore;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.ComponentModel;
using LiveChartsCore.Kernel.Sketches;
using LiveChartsCore.SkiaSharpView.Painting;
using ScottPlot.Colormaps;
using System.Drawing;
using System.Windows.Media.TextFormatting;
using System.Xml.Linq;
using SkiaSharp;
using LiveChartsCore.Defaults;
using static System.Net.WebRequestMethods;
using System.Collections.ObjectModel;
using DyeingComputer.Properties;
using LiveChartsCore.Measure;
using LiveChartsCore.Motion;
using SunlightCentralizedControlManagement_SCCM_.Properties;
using static SunlightCentralizedControlManagement_SCCM_.UserClass.SqliteHelper;
using TouchSocket.Core;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Windows;
using SunlightCentralizedControlManagement_SCCM_.View;
namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
{
public partial class ProductionPlanningModel : ObservableObject//ViewModelBase
{
}
}

11
ViewModel/ViewModelLocator.cs

@ -13,8 +13,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
public ViewModelLocator()
{
}
}
public MainWindowViewModel Main
{
@ -30,6 +29,12 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
return ServiceLocator.Current.GetInstance<CurveDiagramViewModel>();
}
}
public ProductionPlanningModel Production
{
get
{
return ServiceLocator.Current.GetInstance<ProductionPlanningModel>();
}
}
}
}

Loading…
Cancel
Save