using Muchinfo.MTPClient.Account.ViewModels;
using Muchinfo.MTPClient.Data.Model;
using Muchinfo.MTPClient.Infrastructure.Windows;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
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.Navigation;
using System.Windows.Shapes;
using Muchinfo.WPF.Controls.Windows;
namespace Muchinfo.MTPClient.Account.Views
{
///
/// SystemAnnouncement.xaml 的交互逻辑
///
public partial class SystemAnnouncementView : WindowBase
{
public SystemAnnouncementView(System.Collections.ObjectModel.ObservableCollection announcementList )
{
InitializeComponent();
this.DataContext = new SystemAnnouncementViewModel(announcementList);
this.Closing+=SystemAnnouncementView_Closing;
}
public SystemAnnouncementView()
{
InitializeComponent();
this.DataContext = new SystemAnnouncementViewModel();
this.Closing+=SystemAnnouncementView_Closing;
}
void SystemAnnouncementView_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
e.Cancel = false;
this.WindowState = WindowState.Minimized;
this.Opacity = 0;
}
public void Shows()
{
this.WindowState = WindowState.Normal;
this.Opacity = 1;
}
new public bool? ShowDialog()
{
Shows();
return true;
}
}
}