首次上传
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<UserControl x:Class="MECF.Framework.UI.Client.CenterViews.Diagnosis.EventGeneratorView"
|
||||
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:local="clr-namespace:MECF.Framework.UI.Client.CenterViews.Diagnosis"
|
||||
xmlns:micro="clr-namespace:Caliburn.Micro"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" Margin="10,10,10,10">
|
||||
<StackPanel.Resources>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource ResourceKey={x:Type Button}}">
|
||||
<Setter Property="Height" Value="40"/>
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
<Setter Property="Margin" Value="5 0"/>
|
||||
<Setter Property="Padding" Value="15 0"/>
|
||||
</Style>
|
||||
</StackPanel.Resources>
|
||||
<Button Content="Warning Event" micro:Message.Attach="GenWarningEvent"/>
|
||||
<Button Content="Alarm Event" micro:Message.Attach="GenAlarmEvent"/>
|
||||
<Button Content="Job Done Event" micro:Message.Attach="GenProcessJobDoneEvent"/>
|
||||
<Button Content="LoginBySameUser Event" micro:Message.Attach="GenLoginBySameUserEvent"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
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 MECF.Framework.UI.Client.CenterViews.Diagnosis
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for EventGeneratorView.xaml
|
||||
/// </summary>
|
||||
public partial class EventGeneratorView : UserControl
|
||||
{
|
||||
public EventGeneratorView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
using Aitex.Core.Account;
|
||||
using MECF.Framework.UI.Client.ClientBase;
|
||||
using MECF.Framework.Common.OperationCenter;
|
||||
|
||||
namespace MECF.Framework.UI.Client.CenterViews.Diagnosis
|
||||
{
|
||||
public class EventGeneratorViewModel : UiViewModelBase
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
public EventGeneratorViewModel()
|
||||
{
|
||||
DisplayName = "Event Generator";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
public void GenWarningEvent()
|
||||
{
|
||||
InvokeClient.Instance.Service.DoOperation(
|
||||
"System.Diagnosis.GenWarningEvent",
|
||||
"This is a test Warning Event");
|
||||
}
|
||||
|
||||
public void GenAlarmEvent()
|
||||
{
|
||||
InvokeClient.Instance.Service.DoOperation(
|
||||
"System.Diagnosis.GenAlarmEvent",
|
||||
"This is a test Alarm Event");
|
||||
}
|
||||
|
||||
public void GenProcessJobDoneEvent()
|
||||
{
|
||||
InvokeClient.Instance.Service.DoOperation(
|
||||
"System.Diagnosis.GenPjDoneEvent",
|
||||
"This is a test PJ Done Event");
|
||||
}
|
||||
|
||||
public void GenLoginBySameUserEvent()
|
||||
{
|
||||
InvokeClient.Instance.Service.DoOperation(
|
||||
"System.Diagnosis.GenLoginBySameUserEvent",BaseApp.Instance.UserContext.Token);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user