You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

365 lines
11 KiB

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Threading;
using System.Windows;
using System.Windows.Forms;
using System.Windows.Input;
using GummingCommon;
using GummingEntity;
using GummingSupport;
using GummingControl;
using System.Text;
using GummingBusiness;
using Newtonsoft.Json;
using GummingLine;
namespace Gumming
{
public class ManualViewModule : ViewModelBase
{
#region base parameters
private int rows = 20;
private int pagenumber = 1;
public ManualView View { get; set; }
private bool IsConfirm;
private bool isLoading;
#endregion
#region constructor
public ManualViewModule()
{
View = new ManualView();
View.DataContext = this;
InitializeCommands();
InitializeParameters();
}
private void InitializeCommands()
{
}
public override void InitializeParameters(object content = null)
{
IsConfirm = false;
WindowTitle = "";
ControlCOTManualViewModule cot1 = new ControlCOTManualViewModule();
cot1.StationCode = Constant.COT1;
cot1.LoadDefaultValue();
ManualEditorCOT1 = cot1;
ControlCOTManualViewModule cot2 = new ControlCOTManualViewModule();
cot2.StationCode = Constant.COT2;
cot2.LoadDefaultValue();
ManualEditorCOT2 = cot2;
ControlCOTManualViewModule cot3 = new ControlCOTManualViewModule();
cot3.StationCode = Constant.COT1;
cot3.LoadDefaultValue();
ManualEditorCOT3 = cot3;
ControlCOTManualViewModule cot4 = new ControlCOTManualViewModule();
cot4.StationCode = Constant.COT2;
cot4.LoadDefaultValue();
ManualEditorCOT4 = cot4;
ControlDEVManualViewModule dev1 = new ControlDEVManualViewModule();
dev1.StationCode = Constant.DEV1;
dev1.LoadDefaultValue();
ManualEditorDEV1 = dev1;
ControlDEVManualViewModule dev2 = new ControlDEVManualViewModule();
dev2.StationCode = Constant.DEV2;
dev2.LoadDefaultValue();
ManualEditorDEV2 = dev2;
ControlDEVManualViewModule dev3 = new ControlDEVManualViewModule();
dev3.StationCode = Constant.DEV1;
dev3.LoadDefaultValue();
ManualEditorDEV3 = dev3;
ControlDEVManualViewModule dev4 = new ControlDEVManualViewModule();
dev4.StationCode = Constant.DEV2;
dev4.LoadDefaultValue();
ManualEditorDEV4 = dev4;
ControlHPManualViewModule hp1 = new ControlHPManualViewModule();
hp1.StationCode = Constant.HP1;
hp1.LoadDefaultValue();
ManualEditorHP1 = hp1;
ControlHPManualViewModule hp2 = new ControlHPManualViewModule();
hp2.StationCode = Constant.HP2;
hp2.LoadDefaultValue();
ManualEditorHP2 = hp2;
ControlHPManualViewModule hp3 = new ControlHPManualViewModule();
hp3.StationCode = Constant.HP3;
hp3.LoadDefaultValue();
ManualEditorHP3 = hp3;
ControlHPManualViewModule hp4 = new ControlHPManualViewModule();
hp4.StationCode = Constant.HP4;
hp4.LoadDefaultValue();
ManualEditorHP4 = hp4;
ControlCPManualViewModule cp1 = new ControlCPManualViewModule();
cp1.StationCode = Constant.CP1;
cp1.LoadDefaultValue();
ManualEditorCP1 = cp1;
ControlCPManualViewModule cp2 = new ControlCPManualViewModule();
cp2.StationCode = Constant.CP2;
cp2.LoadDefaultValue();
ManualEditorCP2 = cp2;
ControlCPManualViewModule cp3 = new ControlCPManualViewModule();
cp3.StationCode = Constant.CP1;
cp3.LoadDefaultValue();
ManualEditorCP3 = cp3;
ControlCPManualViewModule cp4 = new ControlCPManualViewModule();
cp4.StationCode = Constant.CP2;
cp4.LoadDefaultValue();
ManualEditorCP4 = cp4;
ControlCPManualViewModule cp5 = new ControlCPManualViewModule();
cp5.StationCode = Constant.CP1;
cp5.LoadDefaultValue();
ManualEditorCP5 = cp5;
ControlCPManualViewModule cp6 = new ControlCPManualViewModule();
cp6.StationCode = Constant.CP2;
cp6.LoadDefaultValue();
ManualEditorCP6 = cp6;
ControlCAManualViewModule ca = new ControlCAManualViewModule();
ca.StationCode = Constant.CA;
ca.LoadDefaultValue();
ManualEditorCA = ca;
}
public void SetActivePage()
{
View.SetActivePage();
}
~ManualViewModule()
{
}
#endregion
#region Binding Properties
public string WindowTitle { get; private set; }
private ViewModelBase _ManualEditorCOT1;
public ViewModelBase ManualEditorCOT1
{
get { return _ManualEditorCOT1; }
set
{
_ManualEditorCOT1 = value;
OnPropertyChanged("ManualEditorCOT1");
}
}
private ViewModelBase _ManualEditorCOT2;
public ViewModelBase ManualEditorCOT2
{
get { return _ManualEditorCOT2; }
set
{
_ManualEditorCOT2 = value;
OnPropertyChanged("ManualEditorCOT2");
}
}
private ViewModelBase _ManualEditorCOT3;
public ViewModelBase ManualEditorCOT3
{
get { return _ManualEditorCOT3; }
set
{
_ManualEditorCOT3 = value;
OnPropertyChanged("ManualEditorCOT3");
}
}
private ViewModelBase _ManualEditorCOT4;
public ViewModelBase ManualEditorCOT4
{
get { return _ManualEditorCOT4; }
set
{
_ManualEditorCOT4 = value;
OnPropertyChanged("ManualEditorCOT4");
}
}
private ViewModelBase _ManualEditorDEV1;
public ViewModelBase ManualEditorDEV1
{
get { return _ManualEditorDEV1; }
set
{
_ManualEditorDEV1 = value;
OnPropertyChanged("ManualEditorDEV1");
}
}
private ViewModelBase _ManualEditorDEV2;
public ViewModelBase ManualEditorDEV2
{
get { return _ManualEditorDEV2; }
set
{
_ManualEditorDEV2 = value;
OnPropertyChanged("ManualEditorDEV2");
}
}
private ViewModelBase _ManualEditorDEV3;
public ViewModelBase ManualEditorDEV3
{
get { return _ManualEditorDEV3; }
set
{
_ManualEditorDEV3 = value;
OnPropertyChanged("ManualEditorDEV3");
}
}
private ViewModelBase _ManualEditorDEV4;
public ViewModelBase ManualEditorDEV4
{
get { return _ManualEditorDEV4; }
set
{
_ManualEditorDEV4 = value;
OnPropertyChanged("ManualEditorDEV4");
}
}
private ViewModelBase _ManualEditorHP1;
public ViewModelBase ManualEditorHP1
{
get { return _ManualEditorHP1; }
set
{
_ManualEditorHP1 = value;
OnPropertyChanged("ManualEditorHP1");
}
}
private ViewModelBase _ManualEditorHP2;
public ViewModelBase ManualEditorHP2
{
get { return _ManualEditorHP2; }
set
{
_ManualEditorHP2 = value;
OnPropertyChanged("ManualEditorHP2");
}
}
private ViewModelBase _ManualEditorHP3;
public ViewModelBase ManualEditorHP3
{
get { return _ManualEditorHP3; }
set
{
_ManualEditorHP3 = value;
OnPropertyChanged("ManualEditorHP3");
}
}
private ViewModelBase _ManualEditorHP4;
public ViewModelBase ManualEditorHP4
{
get { return _ManualEditorHP4; }
set
{
_ManualEditorHP4 = value;
OnPropertyChanged("ManualEditorHP4");
}
}
private ViewModelBase _ManualEditorCP1;
public ViewModelBase ManualEditorCP1
{
get { return _ManualEditorCP1; }
set
{
_ManualEditorCP1 = value;
OnPropertyChanged("ManualEditorCP1");
}
}
private ViewModelBase _ManualEditorCP2;
public ViewModelBase ManualEditorCP2
{
get { return _ManualEditorCP2; }
set
{
_ManualEditorCP2 = value;
OnPropertyChanged("ManualEditorCP2");
}
}
private ViewModelBase _ManualEditorCP3;
public ViewModelBase ManualEditorCP3
{
get { return _ManualEditorCP3; }
set
{
_ManualEditorCP3 = value;
OnPropertyChanged("ManualEditorCP3");
}
}
private ViewModelBase _ManualEditorCP4;
public ViewModelBase ManualEditorCP4
{
get { return _ManualEditorCP4; }
set
{
_ManualEditorCP4 = value;
OnPropertyChanged("ManualEditorCP4");
}
}
private ViewModelBase _ManualEditorCP5;
public ViewModelBase ManualEditorCP5
{
get { return _ManualEditorCP5; }
set
{
_ManualEditorCP5 = value;
OnPropertyChanged("ManualEditorCP5");
}
}
private ViewModelBase _ManualEditorCP6;
public ViewModelBase ManualEditorCP6
{
get { return _ManualEditorCP6; }
set
{
_ManualEditorCP2 = value;
OnPropertyChanged("ManualEditorCP6");
}
}
private ViewModelBase _ManualEditorCA;
public ViewModelBase ManualEditorCA
{
get { return _ManualEditorCA; }
set
{
_ManualEditorCA = value;
OnPropertyChanged("ManualEditorCA");
}
}
#endregion
#region Binding Commands
#endregion
#region Private Methods
#endregion
}
}