Merge branch 'master' of http://192.168.0.12:13000/sc/Audit_APP
This commit is contained in:
commit
bf6b05b189
4 files changed
+16
-2
No files matched your search
@@ -10,6 +10,8 @@ namespace Audit
|
||||
{
|
||||
public class AuditData : ObservableObject
|
||||
{
|
||||
public static AuditData Instance = new Lazy<AuditData>(() => new AuditData()).Value;
|
||||
|
||||
private UserAccount useraccount = null;
|
||||
|
||||
public UserAccount UserAccount
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using GalaSoft.MvvmLight;
|
||||
using Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -6,7 +8,8 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Audit.ViewModel
|
||||
{
|
||||
internal class LogViewModel
|
||||
public class LogViewModel : ViewModelBase
|
||||
{
|
||||
public UserAccount UserAccount { get; set; } = AuditData.Instance.UserAccount;
|
||||
}
|
||||
}
|
||||
@@ -44,6 +44,7 @@ namespace Audit.ViewModel
|
||||
////}
|
||||
|
||||
SimpleIoc.Default.Register<MainViewModel>();
|
||||
SimpleIoc.Default.Register<LogViewModel>();
|
||||
}
|
||||
|
||||
public MainViewModel Main
|
||||
@@ -54,6 +55,13 @@ namespace Audit.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
public LogViewModel Login
|
||||
{
|
||||
get
|
||||
{
|
||||
return ServiceLocator.Current.GetInstance<LogViewModel>();
|
||||
}
|
||||
}
|
||||
public static void Cleanup()
|
||||
{
|
||||
// TODO Clear the ViewModels
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:Audit.Windows"
|
||||
mc:Ignorable="d"
|
||||
DataContext="{Binding Source ={StaticResource Locator},Path=Login}"
|
||||
Title="登录" Height="200" Width="300" WindowStartupLocation="CenterScreen" ResizeMode="NoResize">
|
||||
<Grid>
|
||||
<TextBlock HorizontalAlignment="Left" Height="35" Margin="40,5,0,0" TextWrapping="Wrap" Text="尚彩化学品审计终端" VerticalAlignment="Top" Width="220" FontSize="24"/>
|
||||
|
||||
Reference in new issue
Block a user