Eabei.UI/XMyMusic.xaml.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using Eabei.UIControls;
using System;
using System.Collections.Generic;
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.Navigation;
using System.Windows.Shapes;

namespace Eabei.UI
{
    /// <summary>
    /// XMyMusic.xaml 的交互逻辑
    /// </summary>
    public partial class XMyMusic : UserControl
    {
        public XMyMusic()
        {
            InitializeComponent();

            int index = 0;
            foreach (var item in menuPanel.Children)
            {
                if (item is XMenuButton)
                {
                    (item as XMenuButton).Index = index;
                    //(item as XMenuButton).IsClick = false;
                    (item as XMenuButton).SelectionChanged += XMyMusic_SelectionChanged;
                    index++;
                }
            }
            btnComputer.IsClick = true;
            addMain(btnComputer);
        }

        public event EventHandler SelectionChanged;

        private void XMyMusic_SelectionChanged(object sender, Events.EventParam.SelectionChangedEventArgs e)
        {
            foreach (var item in menuPanel.Children)
            {
                if (item is XMenuButton)
                {
                    if (e.SelectIndex == (item as XMenuButton).Index)
                    {
                        (item as XMenuButton).IsClick = true;
                        addMain((item as XMenuButton));
                        SelectionChanged?.Invoke(sender, new EventArgs());
                    }
                    else
                        (item as XMenuButton).IsClick = false;
                }
            }
后面还有 18 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。