├── .vs
├── ProjectEvaluation
│ ├── tuite.metadata.v7.bin
│ └── tuite.projects.v7.bin
└── Tuite
│ ├── DesignTimeBuild
│ └── .dtbcache.v2
│ ├── FileContentIndex
│ └── 58d1e337-ebd9-4517-a497-912d479d6223.vsidx
│ └── v17
│ ├── .futdcache.v2
│ ├── .suo
│ └── DocumentLayout.json
├── README.md
├── Tuite.sln
├── Tuite
├── App.xaml
├── App.xaml.cs
├── AppShell.xaml
├── AppShell.xaml.cs
├── GlobalModel.cs
├── MauiProgram.cs
├── Models
│ ├── ChatInfo.cs
│ ├── ClassifyModel.cs
│ ├── CommentModel.cs
│ ├── FirstModel.cs
│ ├── MessageModel.cs
│ ├── SearchModel.cs
│ └── UserModel.cs
├── Platforms
│ ├── Android
│ │ ├── AndroidManifest.xml
│ │ ├── MainActivity.cs
│ │ ├── MainApplication.cs
│ │ └── Resources
│ │ │ └── values
│ │ │ └── colors.xml
│ ├── MacCatalyst
│ │ ├── AppDelegate.cs
│ │ ├── Entitlements.plist
│ │ ├── Info.plist
│ │ └── Program.cs
│ ├── Tizen
│ │ ├── Main.cs
│ │ └── tizen-manifest.xml
│ ├── Windows
│ │ ├── App.xaml
│ │ ├── App.xaml.cs
│ │ ├── Package.appxmanifest
│ │ └── app.manifest
│ └── iOS
│ │ ├── AppDelegate.cs
│ │ ├── Info.plist
│ │ └── Program.cs
├── Properties
│ └── launchSettings.json
├── Resources
│ ├── AppIcon
│ │ ├── appicon.svg
│ │ └── appiconfg.svg
│ ├── Fonts
│ │ ├── DouyinSansBold.ttf
│ │ ├── OpenSans-Regular.ttf
│ │ ├── OpenSans-Semibold.ttf
│ │ ├── iconfont.ttf
│ │ └── iconfont1.ttf
│ ├── Images
│ │ ├── addpost_icon.png
│ │ ├── classify_icon.png
│ │ ├── first_icon.png
│ │ ├── home_collection.png
│ │ ├── home_comments.png
│ │ ├── home_history.png
│ │ ├── home_icon.png
│ │ ├── home_post.png
│ │ ├── home_set.png
│ │ ├── load.png
│ │ ├── message_icon.png
│ │ ├── more.png
│ │ ├── test.jpg
│ │ └── test2.jpg
│ ├── Raw
│ │ └── AboutAssets.txt
│ ├── Splash
│ │ └── oipc.jpg
│ └── Styles
│ │ ├── Colors.xaml
│ │ └── Styles.xaml
├── Tuite.csproj
├── Tuite.csproj.user
├── ViewModels
│ ├── AddPostPageModel.cs
│ ├── ChatPageModel.cs
│ ├── ClassifyPageModel.cs
│ ├── FirstPageModel.cs
│ ├── HomePageModel.cs
│ ├── ListPageModel.cs
│ ├── MessagePageModel.cs
│ ├── PostContentPageModel.cs
│ ├── SearchPageModel.cs
│ └── UserPageModel.cs
├── Views
│ ├── AddPostPage.xaml
│ ├── AddPostPage.xaml.cs
│ ├── AppInfoPage.xaml
│ ├── AppInfoPage.xaml.cs
│ ├── ChatPage.xaml
│ ├── ChatPage.xaml.cs
│ ├── ClassifyPage.xaml
│ ├── ClassifyPage.xaml.cs
│ ├── CommentViewDome.xaml
│ ├── CommentViewDome.xaml.cs
│ ├── EnrollPage.xaml
│ ├── EnrollPage.xaml.cs
│ ├── FirstPage.xaml
│ ├── FirstPage.xaml.cs
│ ├── HomePage.xaml
│ ├── HomePage.xaml.cs
│ ├── ListPage.xaml
│ ├── ListPage.xaml.cs
│ ├── LoadView.xaml
│ ├── LoadView.xaml.cs
│ ├── LoginPage.xaml
│ ├── LoginPage.xaml.cs
│ ├── MessagePage.xaml
│ ├── MessagePage.xaml.cs
│ ├── PostContentPage.xaml
│ ├── PostContentPage.xaml.cs
│ ├── PostInfoViewDome.xaml
│ ├── PostInfoViewDome.xaml.cs
│ ├── SearchPage.xaml
│ ├── SearchPage.xaml.cs
│ ├── SetPage.xaml
│ ├── SetPage.xaml.cs
│ ├── TextClassifyViewDome.xaml
│ ├── TextClassifyViewDome.xaml.cs
│ ├── UpdataUserInfoPage.xaml
│ ├── UpdataUserInfoPage.xaml.cs
│ ├── UserListViewDome.xaml
│ ├── UserListViewDome.xaml.cs
│ ├── UserPage.xaml
│ └── UserPage.xaml.cs
└── WebApi
│ └── WebApi.cs
├── domeUI_1.jpg
├── domeUI_2.jpg
├── domeUI_3.jpg
├── domeUI_4.jpg
├── domeUI_5.jpg
├── domeUI_6.jpg
├── domeUI_7.jpg
└── domeUI_8.jpg
/.vs/ProjectEvaluation/tuite.metadata.v7.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/.vs/ProjectEvaluation/tuite.metadata.v7.bin
--------------------------------------------------------------------------------
/.vs/ProjectEvaluation/tuite.projects.v7.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/.vs/ProjectEvaluation/tuite.projects.v7.bin
--------------------------------------------------------------------------------
/.vs/Tuite/DesignTimeBuild/.dtbcache.v2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/.vs/Tuite/DesignTimeBuild/.dtbcache.v2
--------------------------------------------------------------------------------
/.vs/Tuite/FileContentIndex/58d1e337-ebd9-4517-a497-912d479d6223.vsidx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/.vs/Tuite/FileContentIndex/58d1e337-ebd9-4517-a497-912d479d6223.vsidx
--------------------------------------------------------------------------------
/.vs/Tuite/v17/.futdcache.v2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/.vs/Tuite/v17/.futdcache.v2
--------------------------------------------------------------------------------
/.vs/Tuite/v17/.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/.vs/Tuite/v17/.suo
--------------------------------------------------------------------------------
/.vs/Tuite/v17/DocumentLayout.json:
--------------------------------------------------------------------------------
1 | {
2 | "Version": 1,
3 | "WorkspaceRootPath": "C:\\Users\\76038\\Desktop\\qwr\\Tuite\\",
4 | "Documents": [
5 | {
6 | "AbsoluteMoniker": "D:0:0:{1A9B89A7-D1C8-4FD9-8573-003E443E2636}|Tuite\\Tuite.csproj|c:\\users\\76038\\desktop\\qwr\\tuite\\tuite\\tuite.csproj||{04B8AB82-A572-4FEF-95CE-5222444B6B64}|",
7 | "RelativeMoniker": "D:0:0:{1A9B89A7-D1C8-4FD9-8573-003E443E2636}|Tuite\\Tuite.csproj|solutionrelative:tuite\\tuite.csproj||{04B8AB82-A572-4FEF-95CE-5222444B6B64}|"
8 | }
9 | ],
10 | "DocumentGroupContainers": [
11 | {
12 | "Orientation": 0,
13 | "VerticalTabListWidth": 256,
14 | "DocumentGroups": [
15 | {
16 | "DockedWidth": 200,
17 | "SelectedChildIndex": 0,
18 | "Children": [
19 | {
20 | "$type": "Document",
21 | "DocumentIndex": 0,
22 | "Title": "Tuite",
23 | "DocumentMoniker": "C:\\Users\\76038\\Desktop\\qwr\\Tuite\\Tuite\\Tuite.csproj",
24 | "RelativeDocumentMoniker": "Tuite\\Tuite.csproj",
25 | "ToolTip": "C:\\Users\\76038\\Desktop\\qwr\\Tuite\\Tuite\\Tuite.csproj",
26 | "RelativeToolTip": "Tuite\\Tuite.csproj",
27 | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000758|",
28 | "WhenOpened": "2024-04-23T09:02:18.073Z",
29 | "EditorCaption": ""
30 | }
31 | ]
32 | }
33 | ]
34 | }
35 | ]
36 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # TuiteUI
2 | Maui UI前端社区App开源项目
3 | # UI展示
4 | 
5 | 
6 | 
7 | 
8 | 
9 | 
10 | 
11 | 
12 |
--------------------------------------------------------------------------------
/Tuite.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.9.34607.119
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tuite", "Tuite\Tuite.csproj", "{1A9B89A7-D1C8-4FD9-8573-003E443E2636}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {1A9B89A7-D1C8-4FD9-8573-003E443E2636}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {1A9B89A7-D1C8-4FD9-8573-003E443E2636}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {1A9B89A7-D1C8-4FD9-8573-003E443E2636}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
17 | {1A9B89A7-D1C8-4FD9-8573-003E443E2636}.Release|Any CPU.ActiveCfg = Release|Any CPU
18 | {1A9B89A7-D1C8-4FD9-8573-003E443E2636}.Release|Any CPU.Build.0 = Release|Any CPU
19 | {1A9B89A7-D1C8-4FD9-8573-003E443E2636}.Release|Any CPU.Deploy.0 = Release|Any CPU
20 | EndGlobalSection
21 | GlobalSection(SolutionProperties) = preSolution
22 | HideSolutionNode = FALSE
23 | EndGlobalSection
24 | GlobalSection(ExtensibilityGlobals) = postSolution
25 | SolutionGuid = {25A3C01A-56F4-46A9-8425-608BAA129E73}
26 | EndGlobalSection
27 | EndGlobal
28 |
--------------------------------------------------------------------------------
/Tuite/App.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Tuite/App.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace Tuite;
2 | public partial class App : Application
3 | {
4 | public App()
5 | {
6 | InitializeComponent();
7 |
8 | MainPage = new NavigationPage(new AppShell());
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Tuite/AppShell.xaml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Tuite/AppShell.xaml.cs:
--------------------------------------------------------------------------------
1 | using Tuite.Views;
2 | namespace Tuite
3 | {
4 | public partial class AppShell : TabbedPage
5 | {
6 | public AppShell()
7 | {
8 | InitializeComponent();
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Tuite/GlobalModel.cs:
--------------------------------------------------------------------------------
1 | global using Tuite.ViewModels;
2 | global using Tuite.Models;
3 | global using Tuite.WebApi;
4 | global using Newtonsoft.Json;
5 |
6 | namespace Tuite;
7 | //网页接口
8 | public class AppWebApi
9 | {
10 | public static readonly TuiteApi tuiteApi;
11 |
12 | }
13 | //导航栏信息
14 | public class ShellPageInFo
15 | {
16 | public string Title { get; set; }
17 | public string Image { get; set; }
18 | }
19 |
--------------------------------------------------------------------------------
/Tuite/MauiProgram.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Extensions.Logging;
2 | using CommunityToolkit.Maui;
3 | namespace Tuite
4 | {
5 | public static class MauiProgram
6 | {
7 | public static MauiApp CreateMauiApp()
8 | {
9 | var builder = MauiApp.CreateBuilder();
10 | builder
11 | .UseMauiApp()
12 | .UseMauiCommunityToolkit()
13 | .ConfigureFonts(fonts =>
14 | {
15 | fonts.AddFont("DouyinSansBold.ttf", "DouyinSansBold");
16 | fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
17 | fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
18 | fonts.AddFont("iconfont.ttf", "iconfont");
19 | fonts.AddFont("iconfont1.ttf", "iconfont1");
20 | });
21 |
22 | #if DEBUG
23 | builder.Logging.AddDebug();
24 | #endif
25 | return builder.Build();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Tuite/Models/ChatInfo.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/Models/ChatInfo.cs
--------------------------------------------------------------------------------
/Tuite/Models/ClassifyModel.cs:
--------------------------------------------------------------------------------
1 | namespace Tuite.Models;
2 | //板块信息
3 | public class ClassifyInfo
4 | {
5 | public string Image { get; set; }
6 | public string Name { get; set; }
7 | //跳转页面内容
8 | public string ContentName { get; set; }
9 | //帖子回复数量
10 | public int ReplyNum { get; set; }
11 | }
12 | //管理员信息
13 | public class AdminInfo
14 | {
15 | public string Image { get; set; }
16 | public int UserID { get; set; }
17 | }
18 | //社区通知
19 | public class Community_Notifications
20 | {
21 | //帖子ID
22 | public int PostID { get; set; }
23 | //帖子标题
24 | public string Title { get; set; }
25 | }
--------------------------------------------------------------------------------
/Tuite/Models/CommentModel.cs:
--------------------------------------------------------------------------------
1 | namespace Tuite.Models;
2 | public class CommentModel
3 | {
4 | public int Id { get; set; }
5 | public string Content { get; set; }
6 | public int UserId { get; set; }
7 | public string UserName { get; set; }
8 | public string UserImage { get; set; }
9 | public DateTime Time { get; set; }
10 | public int PostID { get; set; }
11 | }
--------------------------------------------------------------------------------
/Tuite/Models/FirstModel.cs:
--------------------------------------------------------------------------------
1 | namespace Tuite.Models;
2 | //广告类
3 | public class AdClassInfo
4 | {
5 | public string Image { get; set; }
6 | public string URL { get; set; }
7 | }
8 | //快捷模板类
9 | public class Classify
10 | {
11 | public string Image { get; set; }
12 | public string Title { get; set; }
13 | public string PageUrl { get; set; }
14 | }
15 | //首页标签分类
16 | public class TextClassInfo
17 | {
18 | public string Title { get; set; }
19 | public bool IsChecked { get; set; }
20 | }
21 | //帖子类
22 | public class PostInfo
23 | {
24 | //帖子标题
25 | public string Title { get; set; }
26 | //作者昵称
27 | public string Name { get; set; }
28 | //帖子内容
29 | public string Content { get; set; }
30 | //帖子图片
31 | public List Image { get; set; }
32 | //作者头像
33 | public string HeadImage { get; set; }
34 | //作者id
35 | public int Byid { get; set; }
36 | //帖子ID
37 | public int PostID { get; set; }
38 | //最后更新时间
39 | public DateTime LastUpdated { get; set; }
40 | //点赞数量
41 | public int GoodNum { get; set; }
42 | //收藏数量
43 | public int ShouNum { get; set; }
44 | //关注状态
45 | public string Status { get; set; }
46 | //浏览量
47 | public int LookNum { get; set; }
48 | }
--------------------------------------------------------------------------------
/Tuite/Models/MessageModel.cs:
--------------------------------------------------------------------------------
1 | namespace Tuite.Models;
2 | public class MessageList
3 | {
4 | public int UserID { get; set; }
5 | public string Image { get; set; }
6 | public string Name { get; set; }
7 | public string Msg { get; set; }
8 | public DateTime Time { get; set; }
9 | public int MsgNumber { get; set; }
10 | }
--------------------------------------------------------------------------------
/Tuite/Models/SearchModel.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/Models/SearchModel.cs
--------------------------------------------------------------------------------
/Tuite/Models/UserModel.cs:
--------------------------------------------------------------------------------
1 | namespace Tuite.Models;
2 | //用户信息
3 | public class UserInfo
4 | {
5 | public string UserName { get; set; }
6 | public string UserEmail { get; set; }
7 | public string UserSign { get; set; }
8 | public string UserGender { get; set; }
9 | public int UserFenSi { get; set; }
10 | public int UserGuanZhu { get; set; }
11 | public int UserGrade { get; set; }
12 | public string UserImage { get; set; }
13 | public string UserBack { get; set; }
14 | public int UserID { get; set; }
15 | public int UserAge { get; set; }
16 | public DateTime UserZhuCeTime { get; set; }
17 | }
18 | //评论信息
19 | public class CommentInfo
20 | {
21 | public int ID { get; set; }
22 | public int userID { get; set; }
23 | public string userName { get; set; }
24 | public string Image { get; set; }
25 | public string Message { get; set; }
26 | public string Title { get; set; }
27 | public DateTime Time { get; set; }
28 | public int PostID { get; set; }
29 | }
--------------------------------------------------------------------------------
/Tuite/Platforms/Android/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Tuite/Platforms/Android/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using Android.App;
2 | using Android.Content.PM;
3 | using Android.OS;
4 |
5 | namespace Tuite
6 | {
7 | [Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
8 | public class MainActivity : MauiAppCompatActivity
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Tuite/Platforms/Android/MainApplication.cs:
--------------------------------------------------------------------------------
1 | using Android.App;
2 | using Android.Runtime;
3 |
4 | namespace Tuite
5 | {
6 | [Application]
7 | public class MainApplication : MauiApplication
8 | {
9 | public MainApplication(IntPtr handle, JniHandleOwnership ownership)
10 | : base(handle, ownership)
11 | {
12 | }
13 |
14 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Tuite/Platforms/Android/Resources/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #512BD4
4 | #2B0B98
5 | #2B0B98
6 |
--------------------------------------------------------------------------------
/Tuite/Platforms/MacCatalyst/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using Foundation;
2 |
3 | namespace Tuite
4 | {
5 | [Register("AppDelegate")]
6 | public class AppDelegate : MauiUIApplicationDelegate
7 | {
8 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Tuite/Platforms/MacCatalyst/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | com.apple.security.app-sandbox
8 |
9 |
10 | com.apple.security.network.client
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Tuite/Platforms/MacCatalyst/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | UIDeviceFamily
15 |
16 | 2
17 |
18 | UIRequiredDeviceCapabilities
19 |
20 | arm64
21 |
22 | UISupportedInterfaceOrientations
23 |
24 | UIInterfaceOrientationPortrait
25 | UIInterfaceOrientationLandscapeLeft
26 | UIInterfaceOrientationLandscapeRight
27 |
28 | UISupportedInterfaceOrientations~ipad
29 |
30 | UIInterfaceOrientationPortrait
31 | UIInterfaceOrientationPortraitUpsideDown
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | XSAppIconAssets
36 | Assets.xcassets/appicon.appiconset
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Tuite/Platforms/MacCatalyst/Program.cs:
--------------------------------------------------------------------------------
1 | using ObjCRuntime;
2 | using UIKit;
3 |
4 | namespace Tuite
5 | {
6 | public class Program
7 | {
8 | // This is the main entry point of the application.
9 | static void Main(string[] args)
10 | {
11 | // if you want to use a different Application Delegate class from "AppDelegate"
12 | // you can specify it here.
13 | UIApplication.Main(args, null, typeof(AppDelegate));
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Tuite/Platforms/Tizen/Main.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Maui;
2 | using Microsoft.Maui.Hosting;
3 | using System;
4 |
5 | namespace Tuite
6 | {
7 | internal class Program : MauiApplication
8 | {
9 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
10 |
11 | static void Main(string[] args)
12 | {
13 | var app = new Program();
14 | app.Run(args);
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Tuite/Platforms/Tizen/tizen-manifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | maui-appicon-placeholder
7 |
8 |
9 |
10 |
11 | http://tizen.org/privilege/internet
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Tuite/Platforms/Windows/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Tuite/Platforms/Windows/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.UI.Xaml;
2 |
3 | // To learn more about WinUI, the WinUI project structure,
4 | // and more about our project templates, see: http://aka.ms/winui-project-info.
5 |
6 | namespace Tuite.WinUI
7 | {
8 | ///
9 | /// Provides application-specific behavior to supplement the default Application class.
10 | ///
11 | public partial class App : MauiWinUIApplication
12 | {
13 | ///
14 | /// Initializes the singleton application object. This is the first line of authored code
15 | /// executed, and as such is the logical equivalent of main() or WinMain().
16 | ///
17 | public App()
18 | {
19 | this.InitializeComponent();
20 | }
21 |
22 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/Tuite/Platforms/Windows/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | $placeholder$
15 | User Name
16 | $placeholder$.png
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/Tuite/Platforms/Windows/app.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
11 | true/PM
12 | PerMonitorV2, PerMonitor
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Tuite/Platforms/iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using Foundation;
2 |
3 | namespace Tuite
4 | {
5 | [Register("AppDelegate")]
6 | public class AppDelegate : MauiUIApplicationDelegate
7 | {
8 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Tuite/Platforms/iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | LSRequiresIPhoneOS
6 |
7 | UIDeviceFamily
8 |
9 | 1
10 | 2
11 |
12 | UIRequiredDeviceCapabilities
13 |
14 | arm64
15 |
16 | UISupportedInterfaceOrientations
17 |
18 | UIInterfaceOrientationPortrait
19 | UIInterfaceOrientationLandscapeLeft
20 | UIInterfaceOrientationLandscapeRight
21 |
22 | UISupportedInterfaceOrientations~ipad
23 |
24 | UIInterfaceOrientationPortrait
25 | UIInterfaceOrientationPortraitUpsideDown
26 | UIInterfaceOrientationLandscapeLeft
27 | UIInterfaceOrientationLandscapeRight
28 |
29 | XSAppIconAssets
30 | Assets.xcassets/appicon.appiconset
31 |
32 |
33 |
--------------------------------------------------------------------------------
/Tuite/Platforms/iOS/Program.cs:
--------------------------------------------------------------------------------
1 | using ObjCRuntime;
2 | using UIKit;
3 |
4 | namespace Tuite
5 | {
6 | public class Program
7 | {
8 | // This is the main entry point of the application.
9 | static void Main(string[] args)
10 | {
11 | // if you want to use a different Application Delegate class from "AppDelegate"
12 | // you can specify it here.
13 | UIApplication.Main(args, null, typeof(AppDelegate));
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Tuite/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "Windows Machine": {
4 | "commandName": "MsixPackage",
5 | "nativeDebugging": false
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/Tuite/Resources/AppIcon/appicon.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Tuite/Resources/AppIcon/appiconfg.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/Tuite/Resources/Fonts/DouyinSansBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/Resources/Fonts/DouyinSansBold.ttf
--------------------------------------------------------------------------------
/Tuite/Resources/Fonts/OpenSans-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/Resources/Fonts/OpenSans-Regular.ttf
--------------------------------------------------------------------------------
/Tuite/Resources/Fonts/OpenSans-Semibold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/Resources/Fonts/OpenSans-Semibold.ttf
--------------------------------------------------------------------------------
/Tuite/Resources/Fonts/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/Resources/Fonts/iconfont.ttf
--------------------------------------------------------------------------------
/Tuite/Resources/Fonts/iconfont1.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/Resources/Fonts/iconfont1.ttf
--------------------------------------------------------------------------------
/Tuite/Resources/Images/addpost_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/Resources/Images/addpost_icon.png
--------------------------------------------------------------------------------
/Tuite/Resources/Images/classify_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/Resources/Images/classify_icon.png
--------------------------------------------------------------------------------
/Tuite/Resources/Images/first_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/Resources/Images/first_icon.png
--------------------------------------------------------------------------------
/Tuite/Resources/Images/home_collection.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/Resources/Images/home_collection.png
--------------------------------------------------------------------------------
/Tuite/Resources/Images/home_comments.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/Resources/Images/home_comments.png
--------------------------------------------------------------------------------
/Tuite/Resources/Images/home_history.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/Resources/Images/home_history.png
--------------------------------------------------------------------------------
/Tuite/Resources/Images/home_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/Resources/Images/home_icon.png
--------------------------------------------------------------------------------
/Tuite/Resources/Images/home_post.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/Resources/Images/home_post.png
--------------------------------------------------------------------------------
/Tuite/Resources/Images/home_set.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/Resources/Images/home_set.png
--------------------------------------------------------------------------------
/Tuite/Resources/Images/load.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/Resources/Images/load.png
--------------------------------------------------------------------------------
/Tuite/Resources/Images/message_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/Resources/Images/message_icon.png
--------------------------------------------------------------------------------
/Tuite/Resources/Images/more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/Resources/Images/more.png
--------------------------------------------------------------------------------
/Tuite/Resources/Images/test.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/Resources/Images/test.jpg
--------------------------------------------------------------------------------
/Tuite/Resources/Images/test2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/Resources/Images/test2.jpg
--------------------------------------------------------------------------------
/Tuite/Resources/Raw/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories). Deployment of the asset to your application
3 | is automatically handled by the following `MauiAsset` Build Action within your `.csproj`.
4 |
5 |
6 |
7 | These files will be deployed with you package and will be accessible using Essentials:
8 |
9 | async Task LoadMauiAsset()
10 | {
11 | using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
12 | using var reader = new StreamReader(stream);
13 |
14 | var contents = reader.ReadToEnd();
15 | }
16 |
--------------------------------------------------------------------------------
/Tuite/Resources/Splash/oipc.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/Resources/Splash/oipc.jpg
--------------------------------------------------------------------------------
/Tuite/Resources/Styles/Colors.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 | #512BD4
10 | #ac99ea
11 | #242424
12 | #DFD8F7
13 | #9880e5
14 | #2B0B98
15 |
16 | White
17 | Black
18 | #D600AA
19 | #190649
20 | #1f1f1f
21 |
22 | #E1E1E1
23 | #C8C8C8
24 | #ACACAC
25 | #919191
26 | #6E6E6E
27 | #404040
28 | #212121
29 | #141414
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/Tuite/Resources/Styles/Styles.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
10 |
11 |
15 |
16 |
21 |
22 |
25 |
26 |
51 |
52 |
69 |
70 |
90 |
91 |
112 |
113 |
134 |
135 |
140 |
141 |
162 |
163 |
181 |
182 |
185 |
186 |
192 |
193 |
199 |
200 |
204 |
205 |
227 |
228 |
243 |
244 |
264 |
265 |
268 |
269 |
292 |
293 |
313 |
314 |
320 |
321 |
340 |
341 |
344 |
345 |
373 |
374 |
394 |
395 |
399 |
400 |
412 |
413 |
418 |
419 |
425 |
426 |
427 |
--------------------------------------------------------------------------------
/Tuite/Tuite.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net8.0-maccatalyst;net8.0-ios;net8.0-android34.0
5 |
6 |
7 |
8 |
13 |
14 |
15 | Exe
16 | Tuite
17 | true
18 | true
19 | enable
20 | enable
21 |
22 |
23 | Tuite
24 |
25 |
26 | com.companyname.tuite
27 |
28 |
29 | 1.0
30 | 1
31 |
32 | 11.0
33 | 13.1
34 | 29.0
35 | 10.0.17763.0
36 | 10.0.17763.0
37 | 6.5
38 |
39 |
40 |
41 | False
42 | True
43 | False
44 | apk
45 | True
46 |
47 |
48 |
49 | True
50 |
51 |
52 |
53 | $(TargetFrameworks);net8.0-windows10.0.22621.0
54 |
55 |
56 |
57 | apk
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 | ListPage.xaml
111 |
112 |
113 | EnrollPage.xaml
114 |
115 |
116 | UserListViewDome.xaml
117 |
118 |
119 |
120 |
121 |
122 | MSBuild:Compile
123 |
124 |
125 | MSBuild:Compile
126 |
127 |
128 | MSBuild:Compile
129 |
130 |
131 | MSBuild:Compile
132 |
133 |
134 | MSBuild:Compile
135 |
136 |
137 | MSBuild:Compile
138 |
139 |
140 | MSBuild:Compile
141 |
142 |
143 | MSBuild:Compile
144 |
145 |
146 | MSBuild:Compile
147 |
148 |
149 | MSBuild:Compile
150 |
151 |
152 | MSBuild:Compile
153 |
154 |
155 | MSBuild:Compile
156 |
157 |
158 | MSBuild:Compile
159 |
160 |
161 | MSBuild:Compile
162 |
163 |
164 | MSBuild:Compile
165 |
166 |
167 | MSBuild:Compile
168 |
169 |
170 | MSBuild:Compile
171 |
172 |
173 | MSBuild:Compile
174 |
175 |
176 | MSBuild:Compile
177 |
178 |
179 | MSBuild:Compile
180 |
181 |
182 |
183 |
184 |
185 |
186 |
--------------------------------------------------------------------------------
/Tuite/Tuite.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | False
5 | net8.0-android34.0
6 | Pixel 2 - API 34 (Android 14.0 - API 34)
7 | Emulator
8 | pixel_2_-_api_34
9 |
10 |
11 | ios-arm64
12 | arm64
13 |
14 |
15 |
16 | Designer
17 |
18 |
19 | Designer
20 |
21 |
22 | Designer
23 |
24 |
25 | Designer
26 |
27 |
28 | Designer
29 |
30 |
31 | Designer
32 |
33 |
34 | Designer
35 |
36 |
37 | Designer
38 |
39 |
40 | Designer
41 |
42 |
43 | Designer
44 |
45 |
46 | Designer
47 |
48 |
49 | Designer
50 |
51 |
52 | Designer
53 |
54 |
55 | Designer
56 |
57 |
58 | Designer
59 |
60 |
61 | Designer
62 |
63 |
64 | Designer
65 |
66 |
67 | Designer
68 |
69 |
70 | Designer
71 |
72 |
73 | Designer
74 |
75 |
76 |
77 |
78 | Designer
79 |
80 |
81 | Designer
82 |
83 |
84 | Designer
85 |
86 |
87 | Designer
88 |
89 |
90 | Designer
91 |
92 |
93 | Designer
94 |
95 |
96 |
--------------------------------------------------------------------------------
/Tuite/ViewModels/AddPostPageModel.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | namespace Tuite.ViewModels;
3 | public class AddPostPageModel : INotifyPropertyChanged
4 | {
5 | public List _Image { get; set; }
6 | public List Image
7 | {
8 | get => _Image;
9 | set
10 | {
11 | _Image = value;
12 | PropertyChanged?.Invoke(this,new PropertyChangedEventArgs("Image"));
13 | }
14 | }
15 | public AddPostPageModel()
16 | {
17 | List _temp = new List();
18 | _temp.Add("addpost_icon.png");
19 | Image = _temp;
20 |
21 | }
22 |
23 | public event PropertyChangedEventHandler? PropertyChanged;
24 | }
--------------------------------------------------------------------------------
/Tuite/ViewModels/ChatPageModel.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/ViewModels/ChatPageModel.cs
--------------------------------------------------------------------------------
/Tuite/ViewModels/ClassifyPageModel.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/ViewModels/ClassifyPageModel.cs
--------------------------------------------------------------------------------
/Tuite/ViewModels/FirstPageModel.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using System.Windows.Input;
3 | namespace Tuite.ViewModels;
4 | public class FirstPageModel : INotifyPropertyChanged
5 | {
6 | private List _ad_List { get; set; }
7 | private List _classify_List { get; set; }
8 | private List _textLbael_List { get; set; }
9 | private List _postInfo_List { get; set; }
10 | //广告轮播图绑定数据
11 | public List ad_List {
12 | get => _ad_List;
13 | set {
14 | _ad_List = value;
15 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("ad_List"));
16 | }
17 | }
18 | //分类快捷模块
19 | public List classify_List
20 | {
21 | get => _classify_List;
22 | set
23 | {
24 | _classify_List = value;
25 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("classify_List"));
26 | }
27 | }
28 | //热门板块分类
29 | public List textLbael_List
30 | {
31 | get => _textLbael_List;
32 | set
33 | {
34 | _textLbael_List = value;
35 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("textLbael_List"));
36 | }
37 | }
38 | //帖子信息绑定
39 | public List postInfo_List
40 | {
41 | get => _postInfo_List;
42 | set
43 | {
44 | _postInfo_List = value;
45 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("postInfo_List"));
46 | }
47 | }
48 | //绑定刷新事件
49 | private bool _IsRefreshing;
50 | public bool IsRefreshing
51 | {
52 | get => _IsRefreshing;
53 | set {
54 | _IsRefreshing = value;
55 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("IsRefreshing"));
56 | }
57 | }
58 | //绑定刷新事件
59 | public ICommand RefreshCommand => new Command(async () => await OnGetPostCommand());
60 | private async Task OnGetPostCommand()
61 | {
62 | IsRefreshing = true;
63 | await Task.Delay(2000);
64 | PostInfo_List();
65 | IsRefreshing = false;
66 | }
67 |
68 | //初始化
69 | public FirstPageModel()
70 | {
71 | Ad_List();
72 | Classify_List();
73 | TextLbael_List();
74 | PostInfo_List();
75 | }
76 | public event PropertyChangedEventHandler? PropertyChanged;
77 |
78 | #region 测试函数
79 | //测试广告轮播图生成函数
80 | private void Ad_List()
81 | {
82 | List _temp = new List();
83 | _temp.Add(new AdClassInfo() { Image = "test.jpg", URL = "http://www.baidu.com" });
84 | _temp.Add(new AdClassInfo() { Image = "test.jpg", URL = "http://www.baidu.com" });
85 | _temp.Add(new AdClassInfo() { Image = "test.jpg", URL = "http://www.baidu.com" });
86 | _temp.Add(new AdClassInfo() { Image = "test.jpg", URL = "http://www.baidu.com" });
87 | _temp.Add(new AdClassInfo() { Image = "test.jpg", URL = "http://www.baidu.com" });
88 | _temp.Add(new AdClassInfo() { Image = "test.jpg", URL = "http://www.baidu.com" });
89 | ad_List = _temp;
90 | }
91 | //测试分类快捷模块
92 | private void Classify_List()
93 | {
94 | List _temp = new List();
95 | for (int i = 0; i < 3; i++)
96 | {
97 | _temp.Add(new Classify() { Image = "test2.jpg", Title = "在线客服", PageUrl = "在线客服" });
98 | }
99 | classify_List = _temp;
100 | }
101 | //测试文本分类标签
102 | private void TextLbael_List()
103 | {
104 | List _temp = new List();
105 | _temp.Add(new TextClassInfo { Title = "测试1", IsChecked = true });
106 | _temp.Add(new TextClassInfo { Title = "测试2", IsChecked = false });
107 | _temp.Add(new TextClassInfo { Title = "测试3", IsChecked = false });
108 | _temp.Add(new TextClassInfo { Title = "测试4", IsChecked = false });
109 | textLbael_List = _temp;
110 | }
111 | public void PostInfo_List()
112 | {
113 | List _temp = new List();
114 | string[] a = { "test2.jpg", "test.jpg" };
115 | List image = a.ToList();
116 | for(int i = 0; i<3; i++)
117 | {
118 | _temp.Add(new PostInfo() { Title = $"这是帖子的标题{i.ToString()}", LookNum = 144 , GoodNum = 10, ShouNum = 22, Status = "关注" , Content = "这是一个普通的帖子", HeadImage = "test.jpg", Image = image, Byid = 1, Name = "酷酷的小贤", PostID = 2, LastUpdated = new DateTime() });
119 | }
120 | postInfo_List = _temp;
121 | }
122 | #endregion
123 | }
124 |
--------------------------------------------------------------------------------
/Tuite/ViewModels/HomePageModel.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/ViewModels/HomePageModel.cs
--------------------------------------------------------------------------------
/Tuite/ViewModels/ListPageModel.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | namespace Tuite.ViewModels;
3 | public class ListPageModel:INotifyPropertyChanged
4 | {
5 | public List _postInfo_List { get; set; }
6 | public List _userlistinfo_List { get; set; }
7 | private List _commentInfos { get; set; }
8 | //评论内容
9 | public List CommentInfo_List
10 | {
11 | get => _commentInfos;
12 | set
13 | {
14 | _commentInfos = value;
15 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("postInfo_List"));
16 | }
17 | }
18 | //帖子内容
19 | public List postInfo_List
20 | {
21 | get => _postInfo_List;
22 | set
23 | {
24 | _postInfo_List = value;
25 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("postInfo_List"));
26 | }
27 | }
28 | //用户列表
29 | public List UserListinfo_List
30 | {
31 | get => _userlistinfo_List;
32 | set
33 | {
34 | _userlistinfo_List = value;
35 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("UserListinfo_List"));
36 | }
37 | }
38 | public ListPageModel(string value)
39 | {
40 | if (value == "收藏")//帖子:我的收藏
41 | {
42 | PostInfo_List();
43 | }
44 | else if (value == "浏览") //帖子:历史浏览
45 | {
46 | PostInfo_List();
47 | }
48 | else if (value == "我的") //帖子:我的帖子
49 | {
50 | PostInfo_List();
51 | }
52 | else if (value == "关注")//用户:关注用户
53 | {
54 | UserListinfo();
55 | }
56 | else if (value == "粉丝")//用户:粉丝用户
57 | {
58 | UserListinfo();
59 | }
60 | else if (value == "评论") //评论:我的评论
61 | {
62 | CommentInfo_Test();
63 | }
64 | }
65 | public event PropertyChangedEventHandler? PropertyChanged;
66 | #region
67 | public void PostInfo_List()
68 | {
69 | List _temp = new List();
70 | string[] a = { "test2.jpg", "test2.jpg" };
71 | List image = a.ToList();
72 | for (int i = 0; i < 10; i++)
73 | {
74 | _temp.Add(new PostInfo() { Title = $"这是帖子的标题{i.ToString()}", LookNum = 144, GoodNum = 10, ShouNum = 22, Status = "关注", Content = "这是一个普通的帖子", HeadImage = "test.jpg", Image = image, Byid = 1, Name = "酷酷的小贤", PostID = 2, LastUpdated = new DateTime() });
75 | }
76 | postInfo_List = _temp;
77 | }
78 | public void UserListinfo()
79 | {
80 | List _temp = new List();
81 | for (int i = 0; i < 20; i++)
82 | {
83 | _temp.Add(new UserListInfo() { UserID = 1001, Status = "关注", UserImge = "test2.jpg", UserName = "酷酷的小贤佬", UserSign = "这是一个个性的签名" });
84 | }
85 | UserListinfo_List = _temp;
86 | }
87 | public void CommentInfo_Test()
88 | {
89 | List _temp = new List();
90 | for (int i = 0; i < 10; i++)
91 | {
92 | _temp.Add(new CommentInfo() { ID = 1001, userName = "酷酷的小贤佬", Image = "test2.jpg", Title = "这是一个帖子的标题", Message = "我是回复内容", PostID = 1001, Time = new DateTime(), userID = 1001 });
93 | }
94 | CommentInfo_List = _temp;
95 | }
96 | #endregion
97 | }
98 |
--------------------------------------------------------------------------------
/Tuite/ViewModels/MessagePageModel.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/ViewModels/MessagePageModel.cs
--------------------------------------------------------------------------------
/Tuite/ViewModels/PostContentPageModel.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/ViewModels/PostContentPageModel.cs
--------------------------------------------------------------------------------
/Tuite/ViewModels/SearchPageModel.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | namespace Tuite.ViewModels;
3 | public class SearchPageModel : INotifyPropertyChanged
4 | {
5 | public List _textLbael_List { get; set; }
6 | public List _postInfo_List { get; set; }
7 | public List _userlistinfo_List { get; set; }
8 | public List _Bw { get; set; }
9 | //浏览记录
10 | public List Bw
11 | {
12 | get => _Bw;
13 | set
14 | {
15 | _Bw = value;
16 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Bw"));
17 | }
18 | }
19 | //用户列表
20 | public List UserListinfo_List
21 | {
22 | get => _userlistinfo_List;
23 | set
24 | {
25 | _userlistinfo_List = value;
26 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("UserListinfo_List"));
27 | }
28 | }
29 | //文本标签分类
30 | public List textLbael_List
31 | {
32 | get => _textLbael_List;
33 | set
34 | {
35 | _textLbael_List = value;
36 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("textLbael_List"));
37 | }
38 | }
39 | //帖子数据绑定
40 | public List postInfo_List
41 | {
42 | get => _postInfo_List;
43 | set
44 | {
45 | _postInfo_List = value;
46 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("postInfo_List"));
47 | }
48 | }
49 | public SearchPageModel()
50 | {
51 | Task.Run(() => {
52 | List _temp = new List();
53 | _temp.Add(new TextClassInfo(){ IsChecked = true, Title = "帖子" });
54 | _temp.Add(new TextClassInfo(){ IsChecked = false, Title = "用户" });
55 | textLbael_List = _temp;
56 | BwLit();
57 | });
58 | }
59 |
60 | public event PropertyChangedEventHandler? PropertyChanged;
61 | #region
62 | public void PostInfo_List()
63 | {
64 | List _temp = new List();
65 | string[] a = { "test2.jpg", "test2.jpg" };
66 | List image = a.ToList();
67 | for (int i = 0; i < 20; i++)
68 | {
69 | _temp.Add(new PostInfo() { Title = $"这是帖子的标题{i.ToString()}", LookNum = 144, GoodNum = 10, ShouNum = 22, Status = "关注", Content = "这是一个普通的帖子", HeadImage = "test.jpg", Image = image, Byid = 1, Name = "酷酷的小贤", PostID = 2, LastUpdated = new DateTime() });
70 | }
71 | postInfo_List = _temp;
72 | }
73 | public void UserListinfo()
74 | {
75 | List _temp = new List();
76 | for (int i = 0; i < 20; i++)
77 | {
78 | _temp.Add(new UserListInfo() { UserID = 1001, Status = "关注", UserImge = "test2.jpg", UserName = "酷酷的小贤佬", UserSign = "这是一个个性的签名" });
79 | }
80 | UserListinfo_List = _temp;
81 | }
82 | public void BwLit()
83 | {
84 | List _temp = new List();
85 | for (int i = 0; i < 5; i++)
86 | {
87 | _temp.Add($"记录{i.ToString()}");
88 | }
89 | Bw = _temp;
90 | }
91 | #endregion
92 | }
93 |
--------------------------------------------------------------------------------
/Tuite/ViewModels/UserPageModel.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/ViewModels/UserPageModel.cs
--------------------------------------------------------------------------------
/Tuite/Views/AddPostPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Tuite/Views/AddPostPage.xaml.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Front9966/TuiteUI/086de67f0ac11e3248789d4120e9023e0b6e152c/Tuite/Views/AddPostPage.xaml.cs
--------------------------------------------------------------------------------
/Tuite/Views/AppInfoPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
11 |
12 | Tuite
13 | Welcome to Tuite
14 |
15 |