58 lines
1.3 KiB
C#
58 lines
1.3 KiB
C#
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.Shapes;
|
|
|
|
namespace FSI.Lib.Guis.SieTiaWinCCMsgMgt
|
|
{
|
|
/// <summary>
|
|
/// Interaktionslogik für FrmMain.xaml
|
|
/// </summary>
|
|
public partial class FrmMain : Window
|
|
{
|
|
public WinCC WinCC { get; set; }
|
|
|
|
public FrmMain()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void btnStart_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
WinCC.Start();
|
|
CtrlMgt();
|
|
}
|
|
|
|
private void btnStop_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
WinCC.Stop();
|
|
CtrlMgt();
|
|
}
|
|
|
|
private void CtrlMgt()
|
|
{
|
|
if (WinCC.Status)
|
|
{
|
|
btnStart.IsEnabled = false;
|
|
btnStop.IsEnabled = true;
|
|
pgProgress.IsIndeterminate = true;
|
|
}
|
|
else
|
|
{
|
|
btnStart.IsEnabled = true;
|
|
btnStop.IsEnabled = false;
|
|
pgProgress.IsIndeterminate = false;
|
|
}
|
|
}
|
|
}
|
|
}
|