using GeekDesk.Control.UserControls.Backlog;
using GeekDesk.ViewModel;
using HandyControl.Controls;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
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 GeekDesk.Control.Windows
{
///
/// BacklogWindow.xaml 的交互逻辑
///
public partial class BacklogWindow
{
private static BacklogControl backlog = new BacklogControl();
private AppData appData = MainWindow.appData;
private BacklogWindow()
{
InitializeComponent();
RightCard.Content = backlog;
backlog.BacklogList.ItemsSource = appData.ExeBacklogList;
this.Topmost = true;
}
///
/// 移动窗口
///
///
///
private void DragMove(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
if (e.LeftButton == MouseButtonState.Pressed)
{
DragMove();
}
}
///
/// 点击关闭按钮
///
///
///
private void Close_Button_Click(object sender, RoutedEventArgs e)
{
this.Close();
}
private void MemuClick(object sender, RoutedEventArgs e)
{
SideMenuItem smi = sender as SideMenuItem;
switch (smi.Tag.ToString())
{
case "History":
backlog.BacklogList.ItemsSource = appData.HiBacklogList;
break;
default:
backlog.BacklogList.ItemsSource = appData.ExeBacklogList;
break;
}
}
///
/// 新建待办
///
///
///
private void CreateBacklog_BtnClick(object sender, RoutedEventArgs e)
{
BacklogInfoWindow.ShowNone();
}
private static System.Windows.Window window = null;
public static void Show()
{
if (window == null || !window.Activate())
{
window = new BacklogWindow();
}
window.Show();
}
}
}