Преглед на файлове

模拟运行功能

样式分支
pry преди 2 години
родител
ревизия
32d1c92c07
променени са 5 файла, в които са добавени 25 реда и са изтрити 27 реда
  1. +1
    -0
      BPASmart.ConfigurationSoftware/MainWindow.xaml
  2. +4
    -1
      BPASmart.ConfigurationSoftware/MainWindowViewModel.cs
  3. +18
    -0
      BPASmart.ConfigurationSoftware/ServiceCenter.cs
  4. +0
    -1
      BPASmart.Server/BPASmart.Server.csproj
  5. +2
    -25
      SmartClient.sln

+ 1
- 0
BPASmart.ConfigurationSoftware/MainWindow.xaml Целия файл

@@ -134,6 +134,7 @@
<Button
Width="60"
Margin="5"
Command="{Binding RunCommand}"
Content="运行" />

<Button


+ 4
- 1
BPASmart.ConfigurationSoftware/MainWindowViewModel.cs Целия файл

@@ -31,10 +31,11 @@ namespace BPASmart.ConfigurationSoftware
OpenVarManagerCommand = new RelayCommand(() => { ServiceCenter.GetInstance.OpenVariableManagerTool(); });
SelectedPageCommand = new RelayCommand<object>((o) => { ServiceCenter.GetInstance.SelectedPage(o); });
SaveProjectCommand = new RelayCommand(() => { ServiceCenter.GetInstance.ProjectSave(); });
GengrateCommand = new RelayCommand(() => { ServiceCenter.GetInstance.ApplicationBaleAsync(); });
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(); });
ServiceCenter.GetInstance.PageChange = new Action<FrameworkElement>((f) => { MainContent = f; });
ServiceCenter.GetInstance.ProjectNameChange = new Action<string>((s) => { Head = s; });
mainCanvasPanels = ServiceCenter.GetInstance.mainCanvasPanels;
@@ -61,6 +62,8 @@ namespace BPASmart.ConfigurationSoftware

public RelayCommand<object> ReNameCommand { get; set; }

public RelayCommand RunCommand { get; set; }

public string Head { get { return _mHead; } set { _mHead = value; OnPropertyChanged(); } }
private string _mHead;



+ 18
- 0
BPASmart.ConfigurationSoftware/ServiceCenter.cs Целия файл

@@ -279,6 +279,24 @@ namespace BPASmart.ConfigurationSoftware
MessageLog.GetInstance.Show("项目保存成功");
}

public async Task RunProjectAsync()
{
MessageLog.GetInstance.Show("启动中....");
await ApplicationBaleAsync();
string publishPath = $"{FileConfigModel.ConstPath}\\Publish\\{Json<ProjectModel>.Data.ProjectName}\\";
string name = $" {publishPath}{ Json<ProjectModel>.Data.ProjectName}.exe";
if (File.Exists(name))
{
Process[] pro = Process.GetProcesses();
if (pro?.ToList().FirstOrDefault(p => p.ProcessName.Contains("BPASmart.PageLoad")) == null)
{
Process.Start(name);
}
}
MessageLog.GetInstance.Show("启动完成");

}

/// <summary>
/// 应用程序打包程序
/// </summary>


+ 0
- 1
BPASmart.Server/BPASmart.Server.csproj Целия файл

@@ -15,7 +15,6 @@
<ItemGroup>
<ProjectReference Include="..\BPASmart.Model\BPASmart.Model.csproj" />
<ProjectReference Include="..\BPASmartClient.Message\BPASmartClient.Message.csproj" />
<ProjectReference Include="..\Communication\Communication.csproj" />
</ItemGroup>

</Project>

+ 2
- 25
SmartClient.sln Целия файл

@@ -158,8 +158,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmart.Model", "BPASmart.
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmart.Server", "BPASmart.Server\BPASmart.Server.csproj", "{F67FBFAC-6C80-466D-A596-1B9B10E885FC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Communication", "Communication\Communication.csproj", "{1062F7C7-0117-413C-A45E-8F9B525FC036}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputerTestDemo", "ComputerTestDemo\ComputerTestDemo.csproj", "{8940F1E2-693D-407E-AD03-722718860609}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "4.可视化配置工具", "4.可视化配置工具", "{06F0B369-0483-46DD-82D2-70431FB505C1}"
@@ -168,13 +166,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BeDesignerSCADA", "BeDesign
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmart.RecipeManagement", "BPASmart.RecipeManagement\BPASmart.RecipeManagement.csproj", "{28EBFC11-184A-4B88-A7B3-84F3FD768520}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PermissionManagement", "PermissionManagement\PermissionManagement.csproj", "{BE6E7BC1-F250-4D11-8051-1B0F93AD2401}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PermissionManagement", "PermissionManagement\PermissionManagement.csproj", "{BE6E7BC1-F250-4D11-8051-1B0F93AD2401}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmart.SmallBatchingSystem", "BPASmart.SmallBatchingSystem\BPASmart.SmallBatchingSystem.csproj", "{DB6DC970-859C-4C63-AE9B-BA415D56CECD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmart.ConfigurationSoftware", "BPASmart.ConfigurationSoftware\BPASmart.ConfigurationSoftware.csproj", "{897F8379-3301-4CBE-9BCA-AF7FD2F963A9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BPASmart.PageLoad", "BPASmart.PageLoad\BPASmart.PageLoad.csproj", "{2DB084E8-B951-4D71-A203-FD0902EBA2C6}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmart.PageLoad", "BPASmart.PageLoad\BPASmart.PageLoad.csproj", "{2DB084E8-B951-4D71-A203-FD0902EBA2C6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -1470,26 +1468,6 @@ Global
{F67FBFAC-6C80-466D-A596-1B9B10E885FC}.Release|x64.Build.0 = Release|Any CPU
{F67FBFAC-6C80-466D-A596-1B9B10E885FC}.Release|x86.ActiveCfg = Release|Any CPU
{F67FBFAC-6C80-466D-A596-1B9B10E885FC}.Release|x86.Build.0 = Release|Any CPU
{1062F7C7-0117-413C-A45E-8F9B525FC036}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1062F7C7-0117-413C-A45E-8F9B525FC036}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1062F7C7-0117-413C-A45E-8F9B525FC036}.Debug|ARM.ActiveCfg = Debug|Any CPU
{1062F7C7-0117-413C-A45E-8F9B525FC036}.Debug|ARM.Build.0 = Debug|Any CPU
{1062F7C7-0117-413C-A45E-8F9B525FC036}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{1062F7C7-0117-413C-A45E-8F9B525FC036}.Debug|ARM64.Build.0 = Debug|Any CPU
{1062F7C7-0117-413C-A45E-8F9B525FC036}.Debug|x64.ActiveCfg = Debug|Any CPU
{1062F7C7-0117-413C-A45E-8F9B525FC036}.Debug|x64.Build.0 = Debug|Any CPU
{1062F7C7-0117-413C-A45E-8F9B525FC036}.Debug|x86.ActiveCfg = Debug|Any CPU
{1062F7C7-0117-413C-A45E-8F9B525FC036}.Debug|x86.Build.0 = Debug|Any CPU
{1062F7C7-0117-413C-A45E-8F9B525FC036}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1062F7C7-0117-413C-A45E-8F9B525FC036}.Release|Any CPU.Build.0 = Release|Any CPU
{1062F7C7-0117-413C-A45E-8F9B525FC036}.Release|ARM.ActiveCfg = Release|Any CPU
{1062F7C7-0117-413C-A45E-8F9B525FC036}.Release|ARM.Build.0 = Release|Any CPU
{1062F7C7-0117-413C-A45E-8F9B525FC036}.Release|ARM64.ActiveCfg = Release|Any CPU
{1062F7C7-0117-413C-A45E-8F9B525FC036}.Release|ARM64.Build.0 = Release|Any CPU
{1062F7C7-0117-413C-A45E-8F9B525FC036}.Release|x64.ActiveCfg = Release|Any CPU
{1062F7C7-0117-413C-A45E-8F9B525FC036}.Release|x64.Build.0 = Release|Any CPU
{1062F7C7-0117-413C-A45E-8F9B525FC036}.Release|x86.ActiveCfg = Release|Any CPU
{1062F7C7-0117-413C-A45E-8F9B525FC036}.Release|x86.Build.0 = Release|Any CPU
{8940F1E2-693D-407E-AD03-722718860609}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8940F1E2-693D-407E-AD03-722718860609}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8940F1E2-693D-407E-AD03-722718860609}.Debug|ARM.ActiveCfg = Debug|Any CPU
@@ -1702,7 +1680,6 @@ Global
{00C5B45D-9799-43F1-B07B-9F638AA9FF72} = {CDC1E762-5E1D-4AE1-9DF2-B85761539086}
{5083C91F-B23E-445D-8B7F-AF87E636E847} = {CDC1E762-5E1D-4AE1-9DF2-B85761539086}
{F67FBFAC-6C80-466D-A596-1B9B10E885FC} = {CDC1E762-5E1D-4AE1-9DF2-B85761539086}
{1062F7C7-0117-413C-A45E-8F9B525FC036} = {CDC1E762-5E1D-4AE1-9DF2-B85761539086}
{8940F1E2-693D-407E-AD03-722718860609} = {CDC1E762-5E1D-4AE1-9DF2-B85761539086}
{06F0B369-0483-46DD-82D2-70431FB505C1} = {7B0175AD-BB74-4A98-B9A7-1E289032485E}
{DF8B4C38-39DE-4220-AB60-885CAE6D1E47} = {06F0B369-0483-46DD-82D2-70431FB505C1}


Зареждане…
Отказ
Запис