Sicherung

This commit is contained in:
maier_S
2022-03-23 10:04:29 +01:00
parent eb5c2fa502
commit f28abfee62
15 changed files with 253 additions and 87 deletions

View File

@@ -32,6 +32,15 @@ namespace FSI.BT.Tools
HotkeyManager.Current.AddOrReplace("TimeStampToClipboard", TimeStamp, TimeStampToClipboard);
Global.FrmRadialMenu = new();
Global.WinCC = new()
{
AutoStart = Global.Settings.SieTiaWinCCMsgMgtAutostart,
UpdateIntervall = Global.Settings.SieTiaWinCCMsgMgtUpdateIntervall,
WindowsName = Global.Settings.SieTiaWinCCMsgMgtWindowsName,
WindowsClassName = Global.Settings.SieTiaWinCCMsgMgtClassName,
ButtonName = Global.Settings.SieTiaWinCCMsgMgtBtnName,
};
}
private void ShowRadialMenu(object sender, HotkeyEventArgs e)

View File

@@ -55,5 +55,10 @@ namespace FSI.BT.Tools
public string? ErpUrl { get; set; }
public string? EplPdfPath { get; set; }
public string? EplPrjPath { get; set; }
public bool SieTiaWinCCMsgMgtAutostart { get; set; }
public int SieTiaWinCCMsgMgtUpdateIntervall { get; set; }
public string? SieTiaWinCCMsgMgtWindowsName { get; set; }
public string? SieTiaWinCCMsgMgtClassName { get; set; }
public string? SieTiaWinCCMsgMgtBtnName { get; set; }
}
}

View File

@@ -32,7 +32,7 @@ namespace FSI.BT.Tools.Commands
break;
case "TIAv15":
files = Global.Settings.SieTiaV13Exe;
files = Global.Settings.SieTiaV15Exe;
break;
case "TIAv16":

View File

@@ -0,0 +1,21 @@
using System.Windows;
namespace FSI.BT.Tools.Commands
{
/// <summary>
/// Shows the main window.
/// </summary>
public class ProcessCommand : CommandBase<ProcessCommand>
{
public override void Execute(object parameter)
{
Gui.FrmProcesses frm = new();
frm.ShowDialog();
}
public override bool CanExecute(object parameter)
{
return Global.AdminRights;
}
}
}

View File

@@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFrameworks>net6.0-windows</TargetFrameworks>
<TargetFrameworks>net6.0-windows;net472</TargetFrameworks>
<OutputType>WinExe</OutputType>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>

View File

@@ -41,4 +41,9 @@
<ErpUrl>https://mingle-portal.eu1.inforcloudsuite.com/FONDIUM_prd</ErpUrl>
<EplPdfPath>\\10.10.1.40\Betriebstechnik\Eplan</EplPdfPath>
<EplPrjPath>\\fondium.org\DESI$\AUG_Abteilung\Betriebstechnik\EPL\P8\Data\Projekte\FSI\</EplPrjPath>
<SieTiaWinCCMsgMgtAutostart>true</SieTiaWinCCMsgMgtAutostart>
<SieTiaWinCCMsgMgtUpdateIntervall>10</SieTiaWinCCMsgMgtUpdateIntervall>
<SieTiaWinCCMsgMgtWindowsName>#32770</SieTiaWinCCMsgMgtWindowsName>
<SieTiaWinCCMsgMgtClassName>10</SieTiaWinCCMsgMgtClassName>
<SieTiaWinCCMsgMgtBtnName>Zur Kenntnis genommen</SieTiaWinCCMsgMgtBtnName>
</Settings>

View File

@@ -110,22 +110,6 @@
</WrapPanel>
</RadialMenu:RadialMenuItem>
<RadialMenu:RadialMenuItem Command="{commands:OpenAppCommand}"
CommandParameter="Npp">
<WrapPanel Orientation="Vertical">
<Rectangle Width="30"
Height="30">
<Rectangle.Fill>
<ImageBrush ImageSource="../../Icons/NPP.png" />
</Rectangle.Fill>
</Rectangle>
<TextBlock FontSize="14"
TextAlignment="Center">
N++
</TextBlock>
</WrapPanel>
</RadialMenu:RadialMenuItem>
<RadialMenu:RadialMenuItem Command="{Binding OpenRadialMenuLinks}">
<WrapPanel Orientation="Vertical">
<Rectangle Width="30"
@@ -298,22 +282,6 @@
</WrapPanel>
</RadialMenu:RadialMenuItem>
<RadialMenu:RadialMenuItem Command="{commands:OpenAppCommand}"
CommandParameter="Rdp">
<WrapPanel Orientation="Vertical">
<Rectangle Width="30"
Height="30">
<Rectangle.Fill>
<ImageBrush ImageSource="../../Icons/Rdp.png" />
</Rectangle.Fill>
</Rectangle>
<TextBlock FontSize="14"
TextAlignment="Center">
Remote<LineBreak />Desktop
</TextBlock>
</WrapPanel>
</RadialMenu:RadialMenuItem>
<RadialMenu:RadialMenuItem Command="{commands:OpenAppCommand}"
CommandParameter="VS">
<WrapPanel Orientation="Vertical">
@@ -758,6 +726,22 @@
</RadialMenu:RadialMenuCentralItem>
</RadialMenu:RadialMenu.CentralItem>
<RadialMenu:RadialMenuItem Command="{commands:OpenAppCommand}"
CommandParameter="Npp">
<WrapPanel Orientation="Vertical">
<Rectangle Width="30"
Height="30">
<Rectangle.Fill>
<ImageBrush ImageSource="../../Icons/NPP.png" />
</Rectangle.Fill>
</Rectangle>
<TextBlock FontSize="14"
TextAlignment="Center">
N++
</TextBlock>
</WrapPanel>
</RadialMenu:RadialMenuItem>
<RadialMenu:RadialMenuItem Command="{commands:OpenAppCommand}"
CommandParameter="Excel">
<WrapPanel Orientation="Vertical">
@@ -822,6 +806,52 @@
</WrapPanel>
</RadialMenu:RadialMenuItem>
<RadialMenu:RadialMenuItem Command="{Binding OpenRadialMenuAppsVncRdp}">
<WrapPanel Orientation="Vertical">
<Rectangle Width="30"
Height="30">
<Rectangle.Fill>
<ImageBrush ImageSource="../../Icons/Rdp.png" />
</Rectangle.Fill>
</Rectangle>
<TextBlock FontSize="14"
TextAlignment="Center">
RDP/VNC
</TextBlock>
</WrapPanel>
</RadialMenu:RadialMenuItem>
</RadialMenu:RadialMenu>
<RadialMenu:RadialMenu IsOpen="{Binding IsOpenAppsVncRdp}">
<RadialMenu:RadialMenu.CentralItem>
<RadialMenu:RadialMenuCentralItem Command="{Binding OpenRadialMenuApps}">
<Rectangle Width="30"
Height="30">
<Rectangle.Fill>
<ImageBrush ImageSource="../../Icons/FondiumU.ico" />
</Rectangle.Fill>
</Rectangle>
</RadialMenu:RadialMenuCentralItem>
</RadialMenu:RadialMenu.CentralItem>
<RadialMenu:RadialMenuItem Command="{commands:OpenAppCommand}"
CommandParameter="Rdp">
<WrapPanel Orientation="Vertical">
<Rectangle Width="30"
Height="30">
<Rectangle.Fill>
<ImageBrush ImageSource="../../Icons/Rdp.png" />
</Rectangle.Fill>
</Rectangle>
<TextBlock FontSize="14"
TextAlignment="Center">
Remote<LineBreak />Desktop
</TextBlock>
</WrapPanel>
</RadialMenu:RadialMenuItem>
<RadialMenu:RadialMenuItem Command="{commands:OpenAppCommand}"
CommandParameter="Vnc">
<WrapPanel Orientation="Vertical">

View File

@@ -237,6 +237,7 @@ namespace FSI.BT.Tools
return new RelayCommand(() =>
{
IsOpenApps = true;
IsOpenAppsVncRdp =
IsOpenHome = false;
});
}
@@ -244,6 +245,36 @@ namespace FSI.BT.Tools
#endregion
#region Apps RDP VNC
private bool _isOpenAppsVncRdp = false;
public bool IsOpenAppsVncRdp
{
get
{
return _isOpenAppsVncRdp;
}
set
{
_isOpenAppsVncRdp = value;
RaisePropertyChanged();
}
}
public ICommand OpenRadialMenuAppsVncRdp
{
get
{
return new RelayCommand(() =>
{
IsOpenAppsVncRdp = true;
IsOpenApps = false;
});
}
}
#endregion
public event PropertyChangedEventHandler PropertyChanged;
void RaisePropertyChanged([CallerMemberName] string? propertyName = null)

View File

@@ -1,21 +1,17 @@
using FSI.Lib.WinSettings;
using FSI.Lib.Guis.SieTiaWinCCMsgMgt;
using FSI.Lib.WinSettings;
using Hardcodet.Wpf.TaskbarNotification;
namespace FSI.BT.Tools
{
internal static class Global
{
public static FrmRadialMenu? FrmRadialMenu { get; set; }
public static TaskbarIcon? TaskbarIcon { get; set; }
public static WinCC WinCC { get; set; }
public static AppSettings? Settings { get; set; }
public static bool UserRights { get; set; }
public static bool AdminRights { get; set; }
public static bool SuperAdminRights { get; set; }
}
}

View File

@@ -0,0 +1,39 @@
<Window x:Class="FSI.BT.Tools.Gui.FrmProcesses"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:FSI.BT.Tools.Gui"
mc:Ignorable="d"
Title="FrmProcesses"
Height="450"
Width="800">
<Grid>
<TabControl>
<TabItem Header="WinCC">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Fenster-Name:" Margin="5 5 5 5"/>
<TextBox x:Name="TbWindowName"
MinWidth="200"
Margin="5 5 5 5" />
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal">
<TextBlock Text="Class-Name:"
Margin="5 5 5 5" />
<TextBox x:Name="TbClassName"
MinWidth="200"
Margin="5 5 5 5" />
</StackPanel>
</Grid>
</TabItem>
</TabControl>
</Grid>
</Window>

View File

@@ -0,0 +1,27 @@
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.BT.Tools.Gui
{
/// <summary>
/// Interaktionslogik für FrmProcesses.xaml
/// </summary>
public partial class FrmProcesses : Window
{
public FrmProcesses()
{
InitializeComponent();
}
}
}

View File

@@ -23,6 +23,9 @@
<ContextMenu>
<MenuItem Header="Beenden"
Command="{commands:ExitCommand}"/>
<Separator />
<MenuItem Header="Dienste"
Command="{commands:ProcessCommand}" />
</ContextMenu>
</tb:TaskbarIcon.ContextMenu>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<TargetFramework>net472;net6.0-windows</TargetFramework>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<UseWPF>true</UseWPF>

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<TargetFrameworks>net40;net45;netcoreapp3.0;net6.0-windows</TargetFrameworks>
<TargetFrameworks>net40;net45;net472;netcoreapp3.0;net6.0-windows</TargetFrameworks>
<UseWPF>true</UseWPF>
</PropertyGroup>
<PropertyGroup Label="Package properties">

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<TargetFramework>net6.0-windows;net472</TargetFramework>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWPF>true</UseWPF>