Du kan inte välja fler än 25 ämnen
Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
|
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using BPASmart.Model;
- using Microsoft.Toolkit.Mvvm.Input;
- using System.Collections.ObjectModel;
- using System.Windows.Forms;
- using System.IO;
- using BPA.Helper;
- using System.Diagnostics;
- using BeDesignerSCADA;
- using BeDesignerSCADA.Controls;
- using System.Windows;
- using System.Reflection;
- using System.Collections.Concurrent;
- using System.IO.Pipes;
- using BPA.Communication;
- using System.Threading;
- using BeDesignerSCADA.ViewModel;
-
- namespace BPASmart.ConfigurationSoftware
- {
- public class MainWindowViewModel : NoticeBase
- {
- public MainWindowViewModel()
- {
- NewProjectCommand = new RelayCommand(() => { ServiceCenter.GetInstance.OpenNewProjectWindow(); });
- NewPageCommand = new RelayCommand(() => { ServiceCenter.GetInstance.OpenNewPageWindow(); });
- OpenVarManagerCommand = new RelayCommand(() => { ServiceCenter.GetInstance.OpenVariableManagerTool(); });
- SelectedPageCommand = new RelayCommand<object>((o) => { ServiceCenter.GetInstance.SelectedPage(o); });
- SaveProjectCommand = new RelayCommand(() => { ServiceCenter.GetInstance.ProjectSave(); });
- GengrateCommand = new RelayCommand(async () => { await ServiceCenter.GetInstance.ApplicationBaleAsync(); });
- RemovePageCommand = new RelayCommand<object>((o) => { ServiceCenter.GetInstance.RemovePageCommand(o); });
- ReNameCommand = new RelayCommand<object>((o) => { ServiceCenter.GetInstance.ReNameCommand(o); });
- SetStartPageCommand = new RelayCommand<object>((o) => { ServiceCenter.GetInstance.SetStartPageCommand(o); });
- RunCommand = new RelayCommand(async () => { await ServiceCenter.GetInstance.RunProjectAsync(); });
- OpenProjectCommand = new RelayCommand(() => { ServiceCenter.GetInstance.OpenProject(); });
- ServiceCenter.GetInstance.PageChange = new Action<FrameworkElement>((f) => { MainContent = f; });
- ServiceCenter.GetInstance.ProjectNameChange = new Action<string>((s) => { Head = s; });
- mainCanvasPanels = ServiceCenter.GetInstance.mainCanvasPanels;
- Pages = ServiceCenter.GetInstance.Pages;
- Message = ServiceCenter.GetInstance.Message;
- ServiceCenter.GetInstance.Init();
- }
-
- public RelayCommand NewProjectCommand { get; set; }
-
- public RelayCommand OpenVarManagerCommand { get; set; }
-
- public RelayCommand<object> SelectedPageCommand { get; set; }
-
- public RelayCommand SaveProjectCommand { get; set; }
-
- public RelayCommand NewPageCommand { get; set; }
-
- public RelayCommand GengrateCommand { get; set; }
-
- public RelayCommand OpenProjectCommand { get; set; }
-
- public RelayCommand<object> RemovePageCommand { get; set; }
-
- public RelayCommand<object> SetStartPageCommand { get; set; }
-
- public RelayCommand<object> ReNameCommand { get; set; }
-
- public RelayCommand RunCommand { get; set; }
-
- public string Head { get { return _mHead; } set { _mHead = value; OnPropertyChanged(); } }
- private string _mHead;
-
- public FrameworkElement MainContent { get { return _mMainContent; } set { _mMainContent = value; OnPropertyChanged(); } }
- private FrameworkElement _mMainContent;
-
- public List<MainCanvasPageModel> mainCanvasPanels { get; set; }
-
- public ObservableCollection<string> Pages { get; set; }
-
- public ObservableCollection<string> Message { get; set; }
-
-
- }
- }
|