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;
using XHZB.Model;
using Common.ZB;
using XHZB.Desktop.Utils;
using Common.system;
using System.Windows.Media.Animation;
using System.Threading;
namespace XHZB.Desktop
{
///
/// ToolbarWindow.xaml 的交互逻辑
///
public partial class ToolbarWindow : Window
{
#region 字段
///
/// 屏幕宽
///
internal double pwidth = SystemParameters.PrimaryScreenWidth;
///
/// 屏幕高
///
internal double pHeight = SystemParameters.PrimaryScreenHeight;
///
/// 工具栏数据
///
internal ToolbarModel pageData = new ToolbarModel();
///
/// 是否已打开课堂工具二级列表
///
private bool heibanshow = false;
#endregion
#region 初始化
public ToolbarWindow()
{
InitializeComponent();
if (!APP.CheckScreenCapturerRecorder())
{
MessageWindow.Show("首次运行需安装环境,请在确定后依次点击“English-OK-Next>-Next>Install”完成安装!");
APP.InstallScreenCapturerRecorder();
}
txbName.Text = APP.LoginUser.username;
heiban_btn.Click += Heiban_btn_Click;
pizhu_btn.Click += Pizhu_btn_Click;
Topmost = true;
Left = pwidth - 300;
Top = (pHeight - 568) / 2;
pageData.menuList.Add(new ToolbarMenu()
{
Name = "个人空间",
Pic = "../Images/ToolBar/我的备课@2x.png"
});
pageData.menuList.Add(new ToolbarMenu()
{
Name = "直播",
Pic = "../Images/ToolBar/直播@2x.png"
});
pageData.menuList.Add(new ToolbarMenu()
{
Name = "抢答点名",
Pic = "../Images/ToolBar/抢答@2x.png"
});
pageData.menuList.Add(new ToolbarMenu()
{
Name = "课堂工具",
Pic = "../Images/ToolBar/黑板01@2x.png"
});
pageData.menuList.Add(new ToolbarMenu()
{
Name = "本节考勤",
Pic = "../Images/ToolBar/本节考勤01@2x.png"
});
pageData.menuList.Add(new ToolbarMenu()
{
Name = "结束课堂",
Pic = "../Images/ToolBar/下课@2x.png"
});
DataContext = pageData;
Thread t = new Thread(new ThreadStart(startSocket))
{
IsBackground = true
};
t.Start();
}
#endregion
#region 事件
///
/// 模块点击
///
///
///
private void toolbar_item_Click(object sender, RoutedEventArgs e)
{
int clickindex = 0;
List