Sicherung
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
using Config.Net;
|
||||
using AutoUpdaterDotNET;
|
||||
using Config.Net;
|
||||
using Config.Net.Stores;
|
||||
using Hardcodet.Wpf.TaskbarNotification;
|
||||
using NHotkey;
|
||||
using NHotkey.Wpf;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Reflection;
|
||||
@@ -21,11 +23,13 @@ namespace FSI.BT.Tools
|
||||
|
||||
|
||||
public void Application_Startup(object sender, StartupEventArgs e)
|
||||
{
|
||||
{
|
||||
|
||||
Global.Log.Info("Anwendung wurde gestartet!");
|
||||
|
||||
ExtractEmbeddedZip("FSI.BT.Tools.ExtTools.kalk.zip", Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\ExtTools\\");
|
||||
ExtractEmbeddedZip("FSI.BT.Tools.ExtTools.AudioSwitch.zip", Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\ExtTools\\");
|
||||
ExtractEmbeddedZip("FSI.BT.Tools.ExtTools.SmartSystemMenu_v2.21.2.zip", Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\ExtTools\\");
|
||||
|
||||
// App-Settings
|
||||
JsonConfigStore _store = new(System.IO.Path.Combine(Directory.GetCurrentDirectory(), "config.json"), true);
|
||||
@@ -55,6 +59,7 @@ namespace FSI.BT.Tools
|
||||
Data = Global.AppSettings.IbaDirSync
|
||||
};
|
||||
Global.Iba.Init();
|
||||
|
||||
}
|
||||
|
||||
private void ShowRadialMenu(object sender, HotkeyEventArgs e)
|
||||
|
||||
@@ -101,14 +101,24 @@ namespace FSI.BT.Tools.Commands
|
||||
CloseAtLostFocus = true,
|
||||
InputData = Global.AppSettings.Rdps,
|
||||
Exe = GetExeByCmdName("Rdp").ExePath,
|
||||
FrmTitle = "Remotedesktopverbindungen",
|
||||
};
|
||||
frmRdpMain.Show();
|
||||
break;
|
||||
|
||||
case "WebRadio":
|
||||
//Lib.Guis.WebRadio.FrmMain frmWebRadio = new()
|
||||
//{
|
||||
// CloseAtLostFocus = false,
|
||||
// InputData = Global.AppSettings.WebRadioUrls,
|
||||
//};
|
||||
//frmWebRadio.Show();
|
||||
break;
|
||||
|
||||
default:
|
||||
foreach (ICmd cmd in cmds)
|
||||
{
|
||||
if (String.Equals(parameter.ToString(), cmd.Cmd))
|
||||
if (String.Equals(parameter.ToString(), cmd.Cmd))
|
||||
selectedCmd = cmd;
|
||||
}
|
||||
break;
|
||||
@@ -123,6 +133,9 @@ namespace FSI.BT.Tools.Commands
|
||||
|
||||
public override bool CanExecute(object parameter)
|
||||
{
|
||||
if (parameter == null)
|
||||
return false;
|
||||
|
||||
var cmds = Global.AppSettings.Cmds.ToList();
|
||||
ICmd selectedCmd = null;
|
||||
|
||||
@@ -152,6 +165,9 @@ namespace FSI.BT.Tools.Commands
|
||||
case "Rdp.Mgt":
|
||||
return Global.AppSettings.Rdps != null;
|
||||
|
||||
case "WebRadio":
|
||||
return false;// Global.AppSettings.WebRadioUrls != null;
|
||||
|
||||
default:
|
||||
foreach (ICmd cmd in cmds)
|
||||
{
|
||||
@@ -199,10 +215,17 @@ namespace FSI.BT.Tools.Commands
|
||||
}
|
||||
else
|
||||
{
|
||||
var selectedFileExePath = string.Empty;
|
||||
if (File.Exists(Environment.ExpandEnvironmentVariables(selectedFile.ExePath.Trim())))
|
||||
selectedFileExePath = Environment.ExpandEnvironmentVariables(selectedFile.ExePath.Trim());
|
||||
if (File.Exists(Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), selectedFile.ExePath.Trim())))
|
||||
selectedFileExePath = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), selectedFile.ExePath.Trim());
|
||||
|
||||
var abc = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), selectedFileExePath.Trim());
|
||||
Process process = new();
|
||||
process.StartInfo.FileName = Environment.ExpandEnvironmentVariables(selectedFile.ExePath);
|
||||
process.StartInfo.WorkingDirectory = selectedFile.Path ?? Path.GetDirectoryName(Environment.ExpandEnvironmentVariables(selectedFile.ExePath));
|
||||
process.StartInfo.Arguments = selectedFile.Arguments;
|
||||
process.StartInfo.FileName = selectedFileExePath;
|
||||
process.StartInfo.WorkingDirectory = selectedFile.Path ?? Path.GetDirectoryName(selectedFileExePath);
|
||||
process.StartInfo.Arguments = selectedFile.Arguments ?? string.Empty;
|
||||
|
||||
try
|
||||
{
|
||||
@@ -247,9 +270,7 @@ namespace FSI.BT.Tools.Commands
|
||||
foreach (var cmd in Global.AppSettings.Cmds)
|
||||
{
|
||||
if (string.Equals(cmd.Cmd, cmdName, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
return GetApp(cmd.Exe);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -313,9 +334,8 @@ namespace FSI.BT.Tools.Commands
|
||||
{
|
||||
IntPtr handle = p.MainWindowHandle;
|
||||
if (IsIconic(handle))
|
||||
{
|
||||
ShowWindow(handle, 9);
|
||||
}
|
||||
|
||||
SetForegroundWindow(handle);
|
||||
break;
|
||||
}
|
||||
|
||||
BIN
FSI.BT.Tools/ExtTools/AudioSwitch.zip
Normal file
BIN
FSI.BT.Tools/ExtTools/AudioSwitch.zip
Normal file
Binary file not shown.
BIN
FSI.BT.Tools/ExtTools/SmartSystemMenu_v2.21.2.zip
Normal file
BIN
FSI.BT.Tools/ExtTools/SmartSystemMenu_v2.21.2.zip
Normal file
Binary file not shown.
@@ -22,7 +22,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="ExtTools\AudioSwitch.zip" />
|
||||
<None Remove="ExtTools\kalk.zip" />
|
||||
<None Remove="ExtTools\SmartSystemMenu_v2.21.2.zip" />
|
||||
<None Remove="Icons\Folders.png" />
|
||||
<None Remove="Icons\Iba.jpg" />
|
||||
<None Remove="Icons\txt.png" />
|
||||
@@ -72,7 +74,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="ExtTools\AudioSwitch.zip" />
|
||||
<EmbeddedResource Include="ExtTools\kalk.zip" />
|
||||
<EmbeddedResource Include="ExtTools\SmartSystemMenu_v2.21.2.zip" />
|
||||
<Resource Include="Icons\VolDown.png" />
|
||||
<Resource Include="Icons\VolOff.png" />
|
||||
<Resource Include="Icons\VolOn.png" />
|
||||
@@ -147,6 +151,9 @@
|
||||
<None Update="config.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="LatestUpdateInfo.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="nlog.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using AutoCompleteTextBox.Editors;
|
||||
using FSI.BT.Tools.Commands;
|
||||
using FSI.BT.Tools.RadialMenu;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
@@ -23,7 +24,8 @@ namespace FSI.BT.Tools
|
||||
public partial class FrmRadialMenu : Window//, INotifyPropertyChanged
|
||||
{
|
||||
private CmdCommand _cmd;
|
||||
|
||||
private MainViewModel _radialMenu;
|
||||
|
||||
public FrmRadialMenu()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -33,7 +35,11 @@ namespace FSI.BT.Tools
|
||||
{
|
||||
cmds.Add(cmd.Cmd);
|
||||
}
|
||||
DataContext = new RadialMenu.MainViewModel(this, cmds);
|
||||
cmds = cmds.Distinct().ToList(); // Duplikate entfernen
|
||||
cmds.Sort(); // Liste sortieren
|
||||
|
||||
_radialMenu = new RadialMenu.MainViewModel(this, cmds);
|
||||
DataContext = _radialMenu;
|
||||
|
||||
tbversion.Text = "v" + Assembly.GetExecutingAssembly().GetName().Version.Major + "." + Assembly.GetExecutingAssembly().GetName().Version.Minor + "b";
|
||||
_cmd = new();
|
||||
@@ -61,20 +67,17 @@ namespace FSI.BT.Tools
|
||||
|
||||
private void tbCmd_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (_cmd.CanExecute(tbCmd.Text))
|
||||
tbCmd.Background = new SolidColorBrush(Colors.Green);
|
||||
else
|
||||
tbCmd.Background = new SolidColorBrush(Colors.White);
|
||||
|
||||
if (e.Key == Key.Enter && _cmd.CanExecute(tbCmd.Text))
|
||||
{
|
||||
_cmd.Execute(tbCmd.Text);
|
||||
}
|
||||
}
|
||||
|
||||
private void tbCmd_TextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
if (_cmd.CanExecute(((TextBox)sender).Text))
|
||||
((TextBox)sender).Background = new SolidColorBrush(Colors.Green);
|
||||
else
|
||||
((TextBox)sender).Background = new SolidColorBrush(Colors.White);
|
||||
}
|
||||
|
||||
|
||||
private void btnMute_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Lib.Audio.AudioManager.SetMasterVolumeMute(!Lib.Audio.AudioManager.GetMasterVolumeMute());
|
||||
|
||||
6
FSI.BT.Tools/LatestUpdateInfo.xml
Normal file
6
FSI.BT.Tools/LatestUpdateInfo.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>2.0.0.0</version>
|
||||
<url>https://github.com/G-Stas/Volumey/releases/download/v1.5.3.0/Volumey_1.5.3.0_x64.zip</url>
|
||||
<mandatory>false</mandatory>
|
||||
</item>
|
||||
@@ -17,13 +17,12 @@ namespace FSI.BT.Tools.RadialMenu
|
||||
|
||||
Cmds = new();
|
||||
|
||||
if (cmds != null)
|
||||
if (cmds != null)
|
||||
{
|
||||
foreach (string cmd in cmds)
|
||||
Cmds.Add(cmd);
|
||||
}
|
||||
|
||||
Cmds.Add("Rdp.Mgt");
|
||||
|
||||
Provider = new(ref _cmds);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace FSI.BT.Tools.Settings
|
||||
|
||||
IEnumerable<TxtToClip.ITxtToClip> TxtToClip { get; }
|
||||
IEnumerable<RdpMgt.IRdp> Rdps { get; }
|
||||
//IEnumerable<Lib.Guis.WebRadio.IInterface> WebRadioUrls { get; }
|
||||
|
||||
Lib.Guis.SieTiaWinCCMsgMgt.IInterface WinCC { get; set; }
|
||||
|
||||
|
||||
@@ -327,13 +327,13 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"Cmd": "Pl3Pls",
|
||||
"Cmd": "Pl3.Pls",
|
||||
"Urls": [
|
||||
"http://10.10.202.10/SKPL3Web/index.asp"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Cmd": "Pl3Lst",
|
||||
"Cmd": "Pl3.Lst",
|
||||
"Urls": [
|
||||
"http://desiaugetwf.fondium.org/web/Seiten/Leistungsdaten_FuG.aspx?Fkt=PL3"
|
||||
]
|
||||
@@ -368,6 +368,9 @@
|
||||
{
|
||||
"Cmd": "Epl.PdfMgt"
|
||||
},
|
||||
{
|
||||
"Cmd": "WebRadio"
|
||||
},
|
||||
{
|
||||
"Cmd": "Calc",
|
||||
"Exe": [
|
||||
@@ -383,6 +386,22 @@
|
||||
"ExePath": "C:\\Program Files (x86)\\iba\\ibaPDA\\Client\\ibaPda.exe"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Cmd": "Trilium",
|
||||
"Exe": [
|
||||
{
|
||||
"ExePath": "c:\\Users\\maier_s\\OneDrive - Fondium Group GmbH\\Documents\\Apps\\trilium-windows-x64\\trilium-portable.bat"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Cmd": "SmartSystemMenu",
|
||||
"Exe": [
|
||||
{
|
||||
"ExePath": "ExtTools\\SmartSystemMenu_v2.21.2\\SmartSystemMenu.exe"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"Folders": [
|
||||
@@ -457,7 +476,37 @@
|
||||
"Plant": "PL1",
|
||||
"SubPlant": "Alg",
|
||||
"Description": "Programmier PC",
|
||||
"Host": "10.10.200.28"
|
||||
"Host": "DESIAUGETC8-028"
|
||||
},
|
||||
{
|
||||
"Plant": "PL2",
|
||||
"SubPlant": "Alg",
|
||||
"Description": "Programmier PC",
|
||||
"Host": "DESIAUGETD5-029"
|
||||
},
|
||||
{
|
||||
"Plant": "PL2",
|
||||
"SubPlant": "FA",
|
||||
"Description": "Programmier PC (HWS)",
|
||||
"Host": "DESIAUGETD5-030"
|
||||
},
|
||||
{
|
||||
"Plant": "PL2",
|
||||
"SubPlant": "ENS",
|
||||
"Description": "Programmier PC",
|
||||
"Host": "DESIAUGETD5-020"
|
||||
},
|
||||
{
|
||||
"Plant": "Alg",
|
||||
"SubPlant": "Alg",
|
||||
"Description": "IBA PC PL1",
|
||||
"Host": "DESIAUGETC7-046"
|
||||
},
|
||||
{
|
||||
"Plant": "Alg",
|
||||
"SubPlant": "Alg",
|
||||
"Description": "IBA PC PL2",
|
||||
"Host": "DESIAUGETC7-047"
|
||||
},
|
||||
{
|
||||
"Plant": "Alg",
|
||||
@@ -466,6 +515,12 @@
|
||||
"Host": "10.10.199.92"
|
||||
}
|
||||
],
|
||||
"WebRadioUrls": [
|
||||
{
|
||||
"Name": "Rock Antenne 80ger",
|
||||
"Url": "http://stream.rockantenne.de/70er-rock/stream/mp3"
|
||||
}
|
||||
],
|
||||
"WinCC": {
|
||||
"AutoStart": false,
|
||||
"UpdateIntervall": 10,
|
||||
|
||||
Reference in New Issue
Block a user