Ejemplo n.º 1
0
        private void FormMainWindow_Shown(object sender, EventArgs e)
        {
            //窗口显示
            IsWindowShow = true;

            //udp测试
            //SendServerUdpData(0, "显示了窗体");

            //是否显示更新日志,显示前进行判断该版本是否已经显示过了
            if (UserClient.JsonSettings.IsNewVersionRunning)
            {
                UserClient.JsonSettings.IsNewVersionRunning = false;
                UserClient.JsonSettings.SaveToFile();
                更新日志ToolStripMenuItem_Click(null, new EventArgs());
            }

            //根据权限使能菜单
            if (UserClient.UserAccount.Grade < AccountGrade.SuperAdministrator)
            {
                日志查看ToolStripMenuItem.Enabled = false;
                账户管理ToolStripMenuItem.Enabled = false;
                远程更新ToolStripMenuItem.Enabled = false;
                注册账号ToolStripMenuItem.Enabled = false;
                消息发送ToolStripMenuItem.Enabled = false;
                开发中心ToolStripMenuItem.Enabled = false;
            }
            //启动定时器
            TimeTickInitilization();
            //显示头像
            SoftUserPortrait.DownloadUserPortraint();
        }
Ejemplo n.º 2
0
        private void Window_ContentRendered(object sender, EventArgs e)
        {
            //窗口呈现完成触发,已经显示了
            //窗口显示
            IsWindowShow = true;

            //udp测试
            //SendServerUdpData(0, "显示了窗体");

            //是否显示更新日志,显示前进行判断该版本是否已经显示过了
            if (!UserClient.JsonSettings.IsNewVersionRunning)
            {
                UserClient.JsonSettings.IsNewVersionRunning = false;
                UserClient.JsonSettings.SaveToFile();
                MenuItem更新日志_Click(null, new RoutedEventArgs());
            }



            //根据权限使能菜单
            if (UserClient.UserAccount.Grade < AccountGrade.Admin)
            {
                MenuItem公告管理.IsEnabled = false;
                MenuItem账户管理.IsEnabled = false;
                MenuItem注册账户.IsEnabled = false;
                MenuItem消息发送.IsEnabled = false;
            }


            if (UserClient.UserAccount.Grade < AccountGrade.SuperAdministrator)
            {
                MenuItem日志查看.IsEnabled = false;
                MenuItem远程更新.IsEnabled = false;
                MenuItem开发中心.IsEnabled = false;
                MenuItem系统配置.IsEnabled = false;
            }


            //启动网络服务
            Net_Socket_Client_Initialization();
            //启动定时器
            TimeTickInitilization();
            //显示头像
            SoftUserPortraitInitialization();
            SoftUserPortrait.LoadUserSmallPortraint();

            AccountChip.Content = UserClient.UserAccount.UserName;

            SetShowRenderControl(UIControl_Home);
        }
Ejemplo n.º 3
0
 private void 更换头像ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     SoftUserPortrait.ChangePortrait();
 }
Ejemplo n.º 4
0
 private void MenuItem头像更改_Click(object sender, RoutedEventArgs e)
 {
     SoftUserPortrait.ChangePortrait();
 }