Sicherung
This commit is contained in:
@@ -105,7 +105,6 @@ namespace FSI.BT.Tools.Commands
|
||||
files = Global.AppSettings.Apps.VsCode;
|
||||
break;
|
||||
|
||||
|
||||
case "Rdp":
|
||||
files = Global.AppSettings.Apps.Rdp;
|
||||
break;
|
||||
@@ -149,14 +148,14 @@ namespace FSI.BT.Tools.Commands
|
||||
frmFolderMgtMain.Show();
|
||||
return;
|
||||
|
||||
//case "TxtToClip":
|
||||
// Lib.Guis.TxtToClip.Mgt.FrmMain frmTxtToClipMain = new Lib.Guis.TxtToClip.Mgt.FrmMain()
|
||||
// {
|
||||
// CloseAtLostFocus = false,
|
||||
// Data = Global.AppSettings.TxtToClip
|
||||
// };
|
||||
// frmTxtToClipMain.Show();
|
||||
// return;
|
||||
case "TxtToClip":
|
||||
Lib.Guis.TxtToClip.Mgt.FrmMain frmTxtToClipMain = new Lib.Guis.TxtToClip.Mgt.FrmMain()
|
||||
{
|
||||
CloseAtLostFocus = true,
|
||||
InputData = Global.AppSettings.TxtToClip
|
||||
};
|
||||
frmTxtToClipMain.Show();
|
||||
return;
|
||||
|
||||
case "Outlook":
|
||||
files = Global.AppSettings.Apps.Outlook;
|
||||
@@ -314,8 +313,8 @@ namespace FSI.BT.Tools.Commands
|
||||
case "Folder":
|
||||
return Global.AppSettings.Folders != null;
|
||||
|
||||
//case "TxtToClip":
|
||||
// return Global.AppSettings.TxtToClip != null;
|
||||
case "TxtToClip":
|
||||
return Global.AppSettings.TxtToClip != null;
|
||||
|
||||
case "Outlook":
|
||||
files = Global.AppSettings.Apps.Outlook;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<ItemGroup>
|
||||
<None Remove="Icons\Folders.png" />
|
||||
<None Remove="Icons\Iba.jpg" />
|
||||
<None Remove="Icons\txt.png" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -57,6 +58,10 @@
|
||||
<Resource Remove="Icons\Word.png" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Resource Include="Icons\txt.png" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NLog.Extensions.Logging" Version="5.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -385,12 +385,12 @@
|
||||
<Rectangle Width="40"
|
||||
Height="40">
|
||||
<Rectangle.Fill>
|
||||
<ImageBrush ImageSource="../../Icons/Folders.png" />
|
||||
<ImageBrush ImageSource="../../Icons/txt.png" />
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
<TextBlock FontSize="14"
|
||||
TextAlignment="Center">
|
||||
Verzeichnisse
|
||||
Txt-Vorlagen
|
||||
</TextBlock>
|
||||
</WrapPanel>
|
||||
</RadialMenu:RadialMenuItem>
|
||||
|
||||
BIN
FSI.BT.Tools/Icons/txt.png
Normal file
BIN
FSI.BT.Tools/Icons/txt.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
@@ -18,12 +18,10 @@ namespace FSI.BT.Tools.Settings
|
||||
|
||||
IEnumerable<Folder.IFolder> Folders { get; }
|
||||
|
||||
// IEnumerable<TxtToClip.ITxtToClip> TxtToClip { get; }
|
||||
|
||||
[Option(Alias = "Folders")]
|
||||
string GetFolderByName(string fodlerName, string keyName);
|
||||
|
||||
IEnumerable<TxtToClip.ITxtToClip> TxtToClip { get; }
|
||||
|
||||
//[Option(Alias = "Folders")]
|
||||
//string GetFolderByName(string fodlerName, string keyName);
|
||||
}
|
||||
|
||||
public static (string path, string description) GetFolderByName(IEnumerable<Folder.IFolder> folders, string name)
|
||||
|
||||
@@ -8,6 +8,6 @@ namespace FSI.BT.Tools.Settings
|
||||
{
|
||||
public class TxtToClip
|
||||
{
|
||||
// public interface ITxtToClip : Lib.Guis.TxtToClip.Mgt.Model.IInterface { }
|
||||
public interface ITxtToClip : Lib.Guis.TxtToClip.Mgt.IInterface { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,6 +170,13 @@
|
||||
"Erp": "https://mingle-portal.eu1.inforcloudsuite.com/FONDIUM_prd"
|
||||
},
|
||||
"Folders": [
|
||||
{
|
||||
"Plant": "Alg",
|
||||
"SubPlant": "Alg",
|
||||
"Name": "Wrkdir",
|
||||
"Description": "Arbeitsverzeichnis",
|
||||
"Path": "d:\\WrkDir"
|
||||
},
|
||||
{
|
||||
"Plant": "Alg",
|
||||
"SubPlant": "Alg",
|
||||
|
||||
@@ -14,13 +14,6 @@
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Guis\TxtToClip.Mgt\**" />
|
||||
<EmbeddedResource Remove="Guis\TxtToClip.Mgt\**" />
|
||||
<None Remove="Guis\TxtToClip.Mgt\**" />
|
||||
<Page Remove="Guis\TxtToClip.Mgt\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="Icons\Cross.png" />
|
||||
<None Remove="Icons\FondiumU.ico" />
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace FSI.Lib.Guis.Folder.Mgt//.Model
|
||||
namespace FSI.Lib.Guis.Folder.Mgt
|
||||
{
|
||||
public interface IInterface
|
||||
{
|
||||
@@ -33,6 +33,6 @@ namespace FSI.Lib.Guis.Folder.Mgt//.Model
|
||||
|
||||
public interface IDataProvider
|
||||
{
|
||||
IEnumerable<Model> Load(IEnumerable<IInterface> folders);
|
||||
IEnumerable<Model> Load(IEnumerable<IInterface> datas);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,9 +5,8 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:FSI.Lib.Guis.TxtToClip.Mgt"
|
||||
xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBase"
|
||||
xmlns:control="clr-namespace:FSI.Lib.Wpf.Ctrls.FilterDataGrid"
|
||||
xmlns:viewmodel="clr-namespace:FSI.Lib.Guis.Folder.Mgt.ViewModel"
|
||||
d:DataContext="{d:DesignInstance Type=viewmodel:ViewModel}"
|
||||
xmlns:control="clr-namespace:FSI.Lib.Wpf.Ctrls.FilterDataGrid"
|
||||
d:DataContext="{d:DesignInstance Type=local:ViewModel}"
|
||||
mc:Ignorable="d"
|
||||
SizeToContent="Width"
|
||||
Height="800"
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
using FSI.Lib.Guis.TxtToClip.Mgt.ViewModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
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.TxtToClip.Mgt
|
||||
{
|
||||
@@ -21,9 +10,9 @@ namespace FSI.Lib.Guis.TxtToClip.Mgt
|
||||
/// </summary>
|
||||
public partial class FrmMain : Window
|
||||
{
|
||||
public ViewModelTxtToClip Folder { get; set; }
|
||||
public ViewModel Folder { get; set; }
|
||||
public bool CloseAtLostFocus { get; set; }
|
||||
public IEnumerable<Model.IInterface> Data { get; set; }
|
||||
public IEnumerable<IInterface> InputData { get; set; }
|
||||
|
||||
public FrmMain()
|
||||
{
|
||||
@@ -44,9 +33,9 @@ namespace FSI.Lib.Guis.TxtToClip.Mgt
|
||||
Title = "FSI Text in die Zwischenablage kopieren";
|
||||
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;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FSI.Lib.Guis.TxtToClip.Mgt.Model
|
||||
namespace FSI.Lib.Guis.TxtToClip.Mgt
|
||||
{
|
||||
public interface IInterface
|
||||
{
|
||||
@@ -14,7 +14,7 @@ namespace FSI.Lib.Guis.TxtToClip.Mgt.Model
|
||||
string Txt { get; set; }
|
||||
}
|
||||
|
||||
public struct Interface : IInterface
|
||||
public struct Model : IInterface
|
||||
{
|
||||
private string _plant;
|
||||
private string _subPlant;
|
||||
@@ -29,6 +29,6 @@ namespace FSI.Lib.Guis.TxtToClip.Mgt.Model
|
||||
|
||||
public interface IDataProvider
|
||||
{
|
||||
IEnumerable<Interface> Load(IEnumerable<IInterface> folders);
|
||||
IEnumerable<Model> Load(IEnumerable<IInterface> datas);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using FSI.Lib.Guis.TxtToClip.Mgt.Model;
|
||||
using FSI.Lib.MVVM;
|
||||
using FSI.Lib.MVVM;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
@@ -8,33 +7,33 @@ using System.Linq;
|
||||
using System.Windows.Data;
|
||||
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;
|
||||
private string _search;
|
||||
private ICollectionView _collView;
|
||||
|
||||
public ICommand RefreshCommand => new DelegateCommand(RefreshData);
|
||||
private ICommand _cmdQuickSearch;
|
||||
private ICommand _cmdQuickSearch;
|
||||
private ICommand _cmdCopyToClip;
|
||||
|
||||
public ViewModelTxtToClip(IDataProvider dataProvider)
|
||||
public ViewModel(IDataProvider dataProvider)
|
||||
{
|
||||
Datas = new ObservableCollection<Model.Interface>();
|
||||
Datas = new ObservableCollection<Model>();
|
||||
_dataProvider = dataProvider;
|
||||
|
||||
_cmdQuickSearch = new RelayCommand<object>(ExecuteQuickSearch, CanExecuteQuickSearch);
|
||||
_cmdQuickSearch = new RelayCommand<object>(ExecuteQuickSearch, CanExecuteQuickSearch);
|
||||
_cmdCopyToClip = new RelayCommand<object>(ExecuteCopyToClip, CanExecuteCopyToClip);
|
||||
}
|
||||
|
||||
public ObservableCollection<Model.Interface> Datas { get; }
|
||||
public ObservableCollection<Model.Interface> FilteredData { get; set; }
|
||||
public ObservableCollection<Model> Datas { get; }
|
||||
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()
|
||||
{
|
||||
@@ -43,13 +42,13 @@ namespace FSI.Lib.Guis.TxtToClip.Mgt.ViewModel
|
||||
|
||||
if (datas != null)
|
||||
{
|
||||
foreach (Model.Interface data in datas)
|
||||
foreach (Model data in datas)
|
||||
{
|
||||
Datas.Add(data);
|
||||
}
|
||||
}
|
||||
|
||||
FilteredData = new ObservableCollection<Model.Interface>(Datas);
|
||||
FilteredData = new ObservableCollection<Model>(Datas);
|
||||
_collView = CollectionViewSource.GetDefaultView(FilteredData);
|
||||
}
|
||||
|
||||
@@ -62,7 +61,7 @@ namespace FSI.Lib.Guis.TxtToClip.Mgt.ViewModel
|
||||
|
||||
_collView.Filter = e =>
|
||||
{
|
||||
var item = (Model.Interface)e;
|
||||
var item = (Model)e;
|
||||
|
||||
return ((item.Plant?.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();
|
||||
FilteredData = new ObservableCollection<Model.Interface>(_collView.OfType<Model.Interface>().ToList());
|
||||
FilteredData = new ObservableCollection<Model>(_collView.OfType<Model>().ToList());
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
@@ -130,15 +129,15 @@ namespace FSI.Lib.Guis.TxtToClip.Mgt.ViewModel
|
||||
|
||||
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)
|
||||
{
|
||||
Model.Interface newData = new();
|
||||
Model newData = new();
|
||||
newData.Plant = data.Plant;
|
||||
newData.SubPlant = data.SubPlant;
|
||||
newData.SubPlant = data.SubPlant;
|
||||
newData.Description = data.Description;
|
||||
newData.Txt = data.Txt;
|
||||
|
||||
Reference in New Issue
Block a user