40 lines
1.6 KiB
C#
40 lines
1.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
using System.ComponentModel;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using System.Windows.Shapes;
|
|
using System.IO;
|
|
using Wpf_AiSportsMicrospace.MyUserControl;
|
|
|
|
namespace Wpf_AiSportsMicrospace
|
|
{
|
|
/// <summary>
|
|
/// Home.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class Home : Window
|
|
{
|
|
public Home()
|
|
{
|
|
InitializeComponent();
|
|
|
|
string projectRoot = System.IO.Path.Combine(AppContext.BaseDirectory, @"..\..\..");
|
|
string albumPath = System.IO.Path.Combine(projectRoot, "Resources", "Img", "Album");
|
|
|
|
ObservableCollection<CoverImage> images = new ObservableCollection<CoverImage>()
|
|
{
|
|
new CoverImage( System.IO.Path.Combine(albumPath, "1.jpg"), System.IO.Path.Combine(projectRoot, "Resources/Img/Badge/1.jpg")),
|
|
new CoverImage( System.IO.Path.Combine(albumPath, "2.jpg"), System.IO.Path.Combine(projectRoot, "Resources/Img/Badge/2.jpg")),
|
|
new CoverImage( System.IO.Path.Combine(albumPath, "3.jpg"), System.IO.Path.Combine(projectRoot, "Resources/Img/Badge/3.jpg")),
|
|
new CoverImage( System.IO.Path.Combine(albumPath, "4.jpg"), System.IO.Path.Combine(projectRoot, "Resources/Img/Badge/4.jpg")),
|
|
new CoverImage( System.IO.Path.Combine(albumPath, "5.jpg"), System.IO.Path.Combine(projectRoot, "Resources/Img/Badge/5.jpg")),
|
|
};
|
|
|
|
// 设置 CoverFlow 图片s
|
|
//coverFlow.SetImages(images, defaultSelectedIndex: 2);
|
|
}
|
|
}
|
|
} |