Sicherung

This commit is contained in:
Maier Stephan SI
2023-01-02 06:39:20 +01:00
parent d01747f75a
commit 306f4824a8
13 changed files with 59 additions and 70 deletions

View File

@@ -105,7 +105,6 @@ namespace FSI.BT.Tools.Commands
files = Global.AppSettings.Apps.VsCode; files = Global.AppSettings.Apps.VsCode;
break; break;
case "Rdp": case "Rdp":
files = Global.AppSettings.Apps.Rdp; files = Global.AppSettings.Apps.Rdp;
break; break;
@@ -149,14 +148,14 @@ namespace FSI.BT.Tools.Commands
frmFolderMgtMain.Show(); frmFolderMgtMain.Show();
return; return;
//case "TxtToClip": case "TxtToClip":
// Lib.Guis.TxtToClip.Mgt.FrmMain frmTxtToClipMain = new Lib.Guis.TxtToClip.Mgt.FrmMain() Lib.Guis.TxtToClip.Mgt.FrmMain frmTxtToClipMain = new Lib.Guis.TxtToClip.Mgt.FrmMain()
// { {
// CloseAtLostFocus = false, CloseAtLostFocus = true,
// Data = Global.AppSettings.TxtToClip InputData = Global.AppSettings.TxtToClip
// }; };
// frmTxtToClipMain.Show(); frmTxtToClipMain.Show();
// return; return;
case "Outlook": case "Outlook":
files = Global.AppSettings.Apps.Outlook; files = Global.AppSettings.Apps.Outlook;
@@ -314,8 +313,8 @@ namespace FSI.BT.Tools.Commands
case "Folder": case "Folder":
return Global.AppSettings.Folders != null; return Global.AppSettings.Folders != null;
//case "TxtToClip": case "TxtToClip":
// return Global.AppSettings.TxtToClip != null; return Global.AppSettings.TxtToClip != null;
case "Outlook": case "Outlook":
files = Global.AppSettings.Apps.Outlook; files = Global.AppSettings.Apps.Outlook;

View File

@@ -16,6 +16,7 @@
<ItemGroup> <ItemGroup>
<None Remove="Icons\Folders.png" /> <None Remove="Icons\Folders.png" />
<None Remove="Icons\Iba.jpg" /> <None Remove="Icons\Iba.jpg" />
<None Remove="Icons\txt.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -57,6 +58,10 @@
<Resource Remove="Icons\Word.png" /> <Resource Remove="Icons\Word.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Icons\txt.png" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="NLog.Extensions.Logging" Version="5.2.0" /> <PackageReference Include="NLog.Extensions.Logging" Version="5.2.0" />
</ItemGroup> </ItemGroup>

View File

@@ -385,12 +385,12 @@
<Rectangle Width="40" <Rectangle Width="40"
Height="40"> Height="40">
<Rectangle.Fill> <Rectangle.Fill>
<ImageBrush ImageSource="../../Icons/Folders.png" /> <ImageBrush ImageSource="../../Icons/txt.png" />
</Rectangle.Fill> </Rectangle.Fill>
</Rectangle> </Rectangle>
<TextBlock FontSize="14" <TextBlock FontSize="14"
TextAlignment="Center"> TextAlignment="Center">
Verzeichnisse Txt-Vorlagen
</TextBlock> </TextBlock>
</WrapPanel> </WrapPanel>
</RadialMenu:RadialMenuItem> </RadialMenu:RadialMenuItem>

BIN
FSI.BT.Tools/Icons/txt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -18,12 +18,10 @@ namespace FSI.BT.Tools.Settings
IEnumerable<Folder.IFolder> Folders { get; } IEnumerable<Folder.IFolder> Folders { get; }
// IEnumerable<TxtToClip.ITxtToClip> TxtToClip { get; } IEnumerable<TxtToClip.ITxtToClip> TxtToClip { get; }
[Option(Alias = "Folders")]
string GetFolderByName(string fodlerName, string keyName);
//[Option(Alias = "Folders")]
//string GetFolderByName(string fodlerName, string keyName);
} }
public static (string path, string description) GetFolderByName(IEnumerable<Folder.IFolder> folders, string name) public static (string path, string description) GetFolderByName(IEnumerable<Folder.IFolder> folders, string name)

View File

@@ -8,6 +8,6 @@ namespace FSI.BT.Tools.Settings
{ {
public class TxtToClip public class TxtToClip
{ {
// public interface ITxtToClip : Lib.Guis.TxtToClip.Mgt.Model.IInterface { } public interface ITxtToClip : Lib.Guis.TxtToClip.Mgt.IInterface { }
} }
} }

View File

@@ -170,6 +170,13 @@
"Erp": "https://mingle-portal.eu1.inforcloudsuite.com/FONDIUM_prd" "Erp": "https://mingle-portal.eu1.inforcloudsuite.com/FONDIUM_prd"
}, },
"Folders": [ "Folders": [
{
"Plant": "Alg",
"SubPlant": "Alg",
"Name": "Wrkdir",
"Description": "Arbeitsverzeichnis",
"Path": "d:\\WrkDir"
},
{ {
"Plant": "Alg", "Plant": "Alg",
"SubPlant": "Alg", "SubPlant": "Alg",

View File

@@ -14,13 +14,6 @@
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Compile Remove="Guis\TxtToClip.Mgt\**" />
<EmbeddedResource Remove="Guis\TxtToClip.Mgt\**" />
<None Remove="Guis\TxtToClip.Mgt\**" />
<Page Remove="Guis\TxtToClip.Mgt\**" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<None Remove="Icons\Cross.png" /> <None Remove="Icons\Cross.png" />
<None Remove="Icons\FondiumU.ico" /> <None Remove="Icons\FondiumU.ico" />

View File

@@ -5,7 +5,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace FSI.Lib.Guis.Folder.Mgt//.Model namespace FSI.Lib.Guis.Folder.Mgt
{ {
public interface IInterface public interface IInterface
{ {
@@ -33,6 +33,6 @@ namespace FSI.Lib.Guis.Folder.Mgt//.Model
public interface IDataProvider public interface IDataProvider
{ {
IEnumerable<Model> Load(IEnumerable<IInterface> folders); IEnumerable<Model> Load(IEnumerable<IInterface> datas);
} }
} }

View File

@@ -6,8 +6,7 @@
xmlns:local="clr-namespace:FSI.Lib.Guis.TxtToClip.Mgt" xmlns:local="clr-namespace:FSI.Lib.Guis.TxtToClip.Mgt"
xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBase" xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBase"
xmlns:control="clr-namespace:FSI.Lib.Wpf.Ctrls.FilterDataGrid" xmlns:control="clr-namespace:FSI.Lib.Wpf.Ctrls.FilterDataGrid"
xmlns:viewmodel="clr-namespace:FSI.Lib.Guis.Folder.Mgt.ViewModel" d:DataContext="{d:DesignInstance Type=local:ViewModel}"
d:DataContext="{d:DesignInstance Type=viewmodel:ViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
SizeToContent="Width" SizeToContent="Width"
Height="800" Height="800"

View File

@@ -1,18 +1,7 @@
using FSI.Lib.Guis.TxtToClip.Mgt.ViewModel; using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection; using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows; using System.Windows;
using System.Windows.Controls; 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.TxtToClip.Mgt namespace FSI.Lib.Guis.TxtToClip.Mgt
{ {
@@ -21,9 +10,9 @@ namespace FSI.Lib.Guis.TxtToClip.Mgt
/// </summary> /// </summary>
public partial class FrmMain : Window public partial class FrmMain : Window
{ {
public ViewModelTxtToClip Folder { get; set; } public ViewModel Folder { get; set; }
public bool CloseAtLostFocus { get; set; } public bool CloseAtLostFocus { get; set; }
public IEnumerable<Model.IInterface> Data { get; set; } public IEnumerable<IInterface> InputData { get; set; }
public FrmMain() public FrmMain()
{ {
@@ -44,9 +33,9 @@ namespace FSI.Lib.Guis.TxtToClip.Mgt
Title = "FSI Text in die Zwischenablage kopieren"; Title = "FSI Text in die Zwischenablage kopieren";
Title += " v" + Assembly.GetExecutingAssembly().GetName().Version; // Version in Titel eintragen Title += " v" + Assembly.GetExecutingAssembly().GetName().Version; // Version in Titel eintragen
Folder = new ViewModelTxtToClip(new DataProvider()) Folder = new ViewModel(new DataProvider())
{ {
InputData = Data InputData = InputData
}; };
DataContext = Folder; DataContext = Folder;

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace FSI.Lib.Guis.TxtToClip.Mgt.Model namespace FSI.Lib.Guis.TxtToClip.Mgt
{ {
public interface IInterface public interface IInterface
{ {
@@ -14,7 +14,7 @@ namespace FSI.Lib.Guis.TxtToClip.Mgt.Model
string Txt { get; set; } string Txt { get; set; }
} }
public struct Interface : IInterface public struct Model : IInterface
{ {
private string _plant; private string _plant;
private string _subPlant; private string _subPlant;
@@ -29,6 +29,6 @@ namespace FSI.Lib.Guis.TxtToClip.Mgt.Model
public interface IDataProvider public interface IDataProvider
{ {
IEnumerable<Interface> Load(IEnumerable<IInterface> folders); IEnumerable<Model> Load(IEnumerable<IInterface> datas);
} }
} }

View File

@@ -1,5 +1,4 @@
using FSI.Lib.Guis.TxtToClip.Mgt.Model; using FSI.Lib.MVVM;
using FSI.Lib.MVVM;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
@@ -8,9 +7,9 @@ using System.Linq;
using System.Windows.Data; using System.Windows.Data;
using System.Windows.Input; using System.Windows.Input;
namespace FSI.Lib.Guis.TxtToClip.Mgt.ViewModel namespace FSI.Lib.Guis.TxtToClip.Mgt
{ {
public class ViewModelTxtToClip : MVVM.ViewModelBase public class ViewModel : MVVM.ViewModelBase
{ {
readonly IDataProvider _dataProvider; readonly IDataProvider _dataProvider;
private string _search; private string _search;
@@ -20,21 +19,21 @@ namespace FSI.Lib.Guis.TxtToClip.Mgt.ViewModel
private ICommand _cmdQuickSearch; private ICommand _cmdQuickSearch;
private ICommand _cmdCopyToClip; private ICommand _cmdCopyToClip;
public ViewModelTxtToClip(IDataProvider dataProvider) public ViewModel(IDataProvider dataProvider)
{ {
Datas = new ObservableCollection<Model.Interface>(); Datas = new ObservableCollection<Model>();
_dataProvider = dataProvider; _dataProvider = dataProvider;
_cmdQuickSearch = new RelayCommand<object>(ExecuteQuickSearch, CanExecuteQuickSearch); _cmdQuickSearch = new RelayCommand<object>(ExecuteQuickSearch, CanExecuteQuickSearch);
_cmdCopyToClip = new RelayCommand<object>(ExecuteCopyToClip, CanExecuteCopyToClip); _cmdCopyToClip = new RelayCommand<object>(ExecuteCopyToClip, CanExecuteCopyToClip);
} }
public ObservableCollection<Model.Interface> Datas { get; } public ObservableCollection<Model> Datas { get; }
public ObservableCollection<Model.Interface> FilteredData { get; set; } public ObservableCollection<Model> FilteredData { get; set; }
public Model.Interface SeletctedData { get; set; } public Model SeletctedData { get; set; }
public IEnumerable<Model.IInterface> InputData { get; set; } public IEnumerable<IInterface> InputData { get; set; }
public void Load() public void Load()
{ {
@@ -43,13 +42,13 @@ namespace FSI.Lib.Guis.TxtToClip.Mgt.ViewModel
if (datas != null) if (datas != null)
{ {
foreach (Model.Interface data in datas) foreach (Model data in datas)
{ {
Datas.Add(data); Datas.Add(data);
} }
} }
FilteredData = new ObservableCollection<Model.Interface>(Datas); FilteredData = new ObservableCollection<Model>(Datas);
_collView = CollectionViewSource.GetDefaultView(FilteredData); _collView = CollectionViewSource.GetDefaultView(FilteredData);
} }
@@ -62,7 +61,7 @@ namespace FSI.Lib.Guis.TxtToClip.Mgt.ViewModel
_collView.Filter = e => _collView.Filter = e =>
{ {
var item = (Model.Interface)e; var item = (Model)e;
return ((item.Plant?.StartsWith(_search, StringComparison.OrdinalIgnoreCase) ?? false) return ((item.Plant?.StartsWith(_search, StringComparison.OrdinalIgnoreCase) ?? false)
|| (item.SubPlant?.StartsWith(_search, StringComparison.OrdinalIgnoreCase) ?? false) || (item.SubPlant?.StartsWith(_search, StringComparison.OrdinalIgnoreCase) ?? false)
@@ -77,7 +76,7 @@ namespace FSI.Lib.Guis.TxtToClip.Mgt.ViewModel
}; };
_collView.Refresh(); _collView.Refresh();
FilteredData = new ObservableCollection<Model.Interface>(_collView.OfType<Model.Interface>().ToList()); FilteredData = new ObservableCollection<Model>(_collView.OfType<Model>().ToList());
OnPropertyChanged(); OnPropertyChanged();
} }
} }
@@ -130,13 +129,13 @@ namespace FSI.Lib.Guis.TxtToClip.Mgt.ViewModel
public class DataProvider : IDataProvider public class DataProvider : IDataProvider
{ {
public IEnumerable<Model.Interface> Load(IEnumerable<IInterface> datas) public IEnumerable<Model> Load(IEnumerable<IInterface> datas)
{ {
var newDatas = new ObservableCollection<Model.Interface>(); var newDatas = new ObservableCollection<Model>();
foreach (IInterface data in datas) foreach (IInterface data in datas)
{ {
Model.Interface newData = new(); Model newData = new();
newData.Plant = data.Plant; newData.Plant = data.Plant;
newData.SubPlant = data.SubPlant; newData.SubPlant = data.SubPlant;
newData.Description = data.Description; newData.Description = data.Description;