我知道有很多关于我的问题的文章,但我找不到解决方案.我是WPF的新手 - MVVM,我尝试理解MVVM-Logic.所以我做了一个小项目来理解这一点.对于我以后的应用程序,我想动态地将UserControls加载到我的Window.
在我的StartView中,我有一个绑定到StartViewModel.(绑定在APP.xaml中)
StartView app = new StartView();
StartViewModel context = new StartViewModel();
Run Code Online (Sandbox Code Playgroud)
StartView
<Window x:Class="test.Views.StartView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:views="clr-namespace:test.ViewModel"
Title="Window1" Height="300" Width="516">
<Grid>
<Menu IsMainMenu="True" Margin="0,0,404,239">
<MenuItem Header="_Einstellungen">
<MenuItem Header="Server" />
</MenuItem>
</Menu>
<ContentControl Content="{Binding LoadedControl}" Margin="0,28,0,128" />
</Grid>
</Window>
Run Code Online (Sandbox Code Playgroud)
StartViewModel
namespace test.ViewModel
{
public class StartViewModel : ViewModelBase
{
#region Fields
private UCStastistikViewModel _loadedControl;
#endregion
public StartViewModel()
{
LoadedControl = new UCStastistikViewModel();
}
#region Properties / Commands
public UCStastistikViewModel LoadedControl
{
get { return _loadedControl; }
set
{ …Run Code Online (Sandbox Code Playgroud) 我有一个包含文件的目录.存档非常大,里面有150万个pdf文件.
该目录存储在带有OS V7R1的IBM i服务器上,并且该机器是新的且速度非常快.
这些文件的名称如下:
invoice_[custno]_[year']_[invoice_number].pdf
invoice_081500_2013_7534435564.pdf
Run Code Online (Sandbox Code Playgroud)
不,我尝试使用命令行使用find命令查找文件.
find . -name 'invoice_2013_*.pdf' -type f | ls -l > log.dat
Run Code Online (Sandbox Code Playgroud)
命令花了很长时间,所以我中止了操作而没有结果.
如果我尝试使用较小的目录,一切正常.
后来我希望有一份工作能够在过去的24小时内运行,并且我发现这些文件运行速度太慢,我可以忘记这一点.