修改pmroutine

This commit is contained in:
SIC1016\caipeilun
2026-08-21 09:24:18 +08:00
parent 8653fc01b0
commit 84c34147d3
15 changed files with 280 additions and 85 deletions
@@ -0,0 +1,47 @@
<UserControl x:Class="SicUI.Models.PMs.ExchangeMoSelectDialogView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:cal="http://www.caliburn.org"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
mc:Ignorable="d"
Width="350"
Height="200">
<UserControl.Resources>
</UserControl.Resources>
<Border BorderBrush="Gray" BorderThickness="0,1,0,0" Background="{DynamicResource Tab_BG}">
<Grid Margin="20,30">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Content_Highlight}">
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Horizontal">
<TextBlock VerticalAlignment="Center" FontFamily="Arial" Margin="10 0" FontSize="12" Foreground="{DynamicResource FG_Black}" Text="Select MO:" TextWrapping="Wrap" />
<ComboBox Width="150" Height="25" Margin="10 0" ItemsSource="{Binding MoList}" SelectedIndex="0" SelectedItem="{Binding SelectedMO}"/>
</StackPanel>
</Border>
<StackPanel Grid.Row="1" Margin="0,10,0,0" Orientation="Horizontal" HorizontalAlignment="Center">
<Button Content="OK" Width="90" Height="30">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<cal:ActionMessage MethodName="OK">
</cal:ActionMessage>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
<Button Content="Cancel" Margin="10,0,0,0" Width="90" Height="30">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<cal:ActionMessage MethodName="Cancel">
</cal:ActionMessage>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
</StackPanel>
</Grid>
</Border>
</UserControl>
@@ -0,0 +1,59 @@
using MECF.Framework.Common.DataCenter;
using OpenSEMI.ClientBase;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace SicUI.Models.PMs
{
/// <summary>
/// ExchangeMoSelectDialogView.xaml 的交互逻辑
/// </summary>
public partial class ExchangeMoSelectDialogView : UserControl
{
public ExchangeMoSelectDialogView()
{
InitializeComponent();
}
}
public class ExchangeMoSelectDialogViewModel : DialogViewModel<string>
{
public ExchangeMoSelectDialogViewModel()
{
MoList = new List<string>() { "CS2", "W(CO)6", "MOReserved", "MO(CO)6" };
}
public void OK()
{
if (!string.IsNullOrEmpty(SelectedMO))
{
this.DialogResult = SelectedMO;
IsCancel = false;
TryClose(true);
}
}
public void Cancel()
{
IsCancel = true;
TryClose(false);
}
public List<string> MoList { get; set; }
public string SelectedMO { get; set; }
}
}
@@ -125,7 +125,7 @@ namespace SicUI.Models.PMs
}
private List<string> _MFCGroup = new List<string>() { "MFC28", "MFC29", "MFC31","MFC40" };
private List<string> _MFCGroup = new List<string>() { "MFC27", "MFC28", "MFC29", "MFC31","MFC40" };
public List<string> MFCGroup
{
get { return _MFCGroup; }
+2 -3
View File
@@ -647,11 +647,10 @@
Margin="5"
Orientation="Horizontal">
<Button
x:Name="ID_BTN_Exchange_TCS_Content"
Width="100"
Height="30"
Padding="0"
Content="{lex:Loc}"
Content="ExchangeMo"
FontFamily="微软雅黑"
FontSize="12"
FontStretch="Normal"
@@ -661,7 +660,7 @@
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<cal:ActionMessage MethodName="PMOperation">
<cal:Parameter Value="ExchangeMOTCS" />
<cal:Parameter Value="MOExchange" />
</cal:ActionMessage>
</i:EventTrigger>
</i:Interaction.Triggers>
+14 -9
View File
@@ -1514,22 +1514,27 @@ namespace SicUI.Models.PMs
InvokeClient.Instance.Service.DoOperation($"{Module}.{strPMOP}");
return;
}
//去除strPMOP中To关键字
string strCleanTo = strPMOP.Replace("To", "");
var selection = DialogBox.ShowDialog(DialogButton.Yes | DialogButton.Cancel, DialogType.CONFIRM, $"Are you sure perform the operation {strCleanTo}");
if (selection == DialogButton.Yes)
if (strPMOP.Contains("MOExchange"))
{
if (strPMOP.Contains("ExchangeMO"))
var vm = new ExchangeMoSelectDialogViewModel();
var _windowmanager = new WindowManager();
_windowmanager.ShowDialog(vm);
if (!vm.IsCancel)
{
string strMOType = strPMOP.Replace("ExchangeMO", "");
InvokeClient.Instance.Service.DoOperation($"{Module}.ExchangeMO", $"{strMOType}");
InvokeClient.Instance.Service.DoOperation($"{Module}.ExchangeMO", vm.DialogResult);
}
else
}
else
{
//去除strPMOP中To关键字
string strCleanTo = strPMOP.Replace("To", "");
var selection = DialogBox.ShowDialog(DialogButton.Yes | DialogButton.Cancel, DialogType.CONFIRM, $"Are you sure perform the operation {strCleanTo}");
if (selection == DialogButton.Yes)
{
InvokeClient.Instance.Service.DoOperation($"{Module}.{strPMOP}");
}
}
}
}