mirror of
https://github.com/ultrasn0w/app.git
synced 2025-12-13 19:09:53 +01:00
First stuff
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,3 +5,4 @@ riderModule.iml
|
|||||||
/_ReSharper.Caches/
|
/_ReSharper.Caches/
|
||||||
.idea/
|
.idea/
|
||||||
.vs/
|
.vs/
|
||||||
|
/APP.sln.DotSettings.user
|
||||||
|
|||||||
BIN
0i21ur4fl1x11.png
Normal file
BIN
0i21ur4fl1x11.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
@@ -11,7 +11,7 @@
|
|||||||
<Description>Hanami Anime plan program</Description>
|
<Description>Hanami Anime plan program</Description>
|
||||||
<Copyright>Hanami</Copyright>
|
<Copyright>Hanami</Copyright>
|
||||||
<Company>HANAMI</Company>
|
<Company>HANAMI</Company>
|
||||||
<TargetFramework>net6.0-windows7.0</TargetFramework>
|
<TargetFramework>net6.0-windows10.0.22000.0</TargetFramework>
|
||||||
<LangVersion>10</LangVersion>
|
<LangVersion>10</LangVersion>
|
||||||
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
|
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -22,4 +22,23 @@
|
|||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.1" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Update="Properties\Resources.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Update="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
10
APP/DTO/Genre.cs
Normal file
10
APP/DTO/Genre.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace APP.DTO;
|
||||||
|
|
||||||
|
public class Genre
|
||||||
|
{
|
||||||
|
[JsonPropertyName("id")] public int Id { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("name")] public string Name { get; set; }
|
||||||
|
}
|
||||||
58
APP/DTO/SeasonAnime.cs
Normal file
58
APP/DTO/SeasonAnime.cs
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace APP.DTO;
|
||||||
|
|
||||||
|
public class SeasonAnime
|
||||||
|
{
|
||||||
|
[JsonPropertyName("anime")] public long Anime { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("title")] public string Title { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("titleEn")] public string TitleEn { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("titleJp")] public string TitleJp { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("imageMedium")] public string ImageMedium { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("imageLarge")] public string ImageLarge { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("imageThumb")] public string? ImageThumb { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("type")] public string Type { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("status")] public string Status { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("episodes")] public int Episodes { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("synopsis")] public string? Synopsis { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("genres")] public List<Genre>? Genres { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("startDate")] public DateTime StartDate { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("endDate")] public DateTime EndDate { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("year")] public int Year { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("season")] public string SeasonString { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("score")] public double Score { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("scoredBy")] public int ScoredBy { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("rank")] public int Rank { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("popularity")] public int Popularity { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("members")] public int Members { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("source")] public string? Source { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("weekday")] public string? Weekday { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("studios")] public List<Studio>? Studios { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("trailerUrl")] public string? TrailerUrl { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("trailerEmbedUrl")] public string? TrailerEmbedUrl { get; set; }
|
||||||
|
}
|
||||||
10
APP/DTO/Studio.cs
Normal file
10
APP/DTO/Studio.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace APP.DTO;
|
||||||
|
|
||||||
|
public class Studio
|
||||||
|
{
|
||||||
|
[JsonPropertyName("id")] public int Id { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("name")] public string Name { get; set; }
|
||||||
|
}
|
||||||
24
APP/DTO/User.cs
Normal file
24
APP/DTO/User.cs
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace APP.DTO;
|
||||||
|
|
||||||
|
public class User
|
||||||
|
{
|
||||||
|
[JsonPropertyName("id")] public long Id { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("username")] public string Username { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("url")] public string Url { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("imageUrl")] public string ImageUrl { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("lastOnline")] public DateTime LastOnline { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("gender")] public string? Gender { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("birthday")] public DateTime? Birthday { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("location")] public string? Location { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("joined")] public DateTime Joined { get; set; }
|
||||||
|
}
|
||||||
109
APP/Main.Designer.cs
generated
109
APP/Main.Designer.cs
generated
@@ -31,13 +31,20 @@
|
|||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main));
|
||||||
this.tabControl = new System.Windows.Forms.TabControl();
|
this.tabControl = new System.Windows.Forms.TabControl();
|
||||||
this.tabUser = new System.Windows.Forms.TabPage();
|
this.tabUser = new System.Windows.Forms.TabPage();
|
||||||
|
this.userLinkLabel = new System.Windows.Forms.LinkLabel();
|
||||||
|
this.userLabelInfo = new System.Windows.Forms.Label();
|
||||||
|
this.userLabel = new System.Windows.Forms.Label();
|
||||||
|
this.userImage = new System.Windows.Forms.PictureBox();
|
||||||
this.tabSeason = new System.Windows.Forms.TabPage();
|
this.tabSeason = new System.Windows.Forms.TabPage();
|
||||||
|
this.listViewSeason = new System.Windows.Forms.ListView();
|
||||||
this.tabAddAnime = new System.Windows.Forms.TabPage();
|
this.tabAddAnime = new System.Windows.Forms.TabPage();
|
||||||
this.menuStrip = new System.Windows.Forms.MenuStrip();
|
this.menuStrip = new System.Windows.Forms.MenuStrip();
|
||||||
this.memeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.memeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.loginToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.loginToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.listViewSeason = new System.Windows.Forms.ListView();
|
this.userLabelInfoData = new System.Windows.Forms.Label();
|
||||||
this.tabControl.SuspendLayout();
|
this.tabControl.SuspendLayout();
|
||||||
|
this.tabUser.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.userImage)).BeginInit();
|
||||||
this.tabSeason.SuspendLayout();
|
this.tabSeason.SuspendLayout();
|
||||||
this.menuStrip.SuspendLayout();
|
this.menuStrip.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
@@ -56,7 +63,12 @@
|
|||||||
//
|
//
|
||||||
// tabUser
|
// tabUser
|
||||||
//
|
//
|
||||||
this.tabUser.BackColor = System.Drawing.SystemColors.ControlDarkDark;
|
this.tabUser.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||||
|
this.tabUser.Controls.Add(this.userLabelInfoData);
|
||||||
|
this.tabUser.Controls.Add(this.userLinkLabel);
|
||||||
|
this.tabUser.Controls.Add(this.userLabelInfo);
|
||||||
|
this.tabUser.Controls.Add(this.userLabel);
|
||||||
|
this.tabUser.Controls.Add(this.userImage);
|
||||||
this.tabUser.Location = new System.Drawing.Point(4, 24);
|
this.tabUser.Location = new System.Drawing.Point(4, 24);
|
||||||
this.tabUser.Name = "tabUser";
|
this.tabUser.Name = "tabUser";
|
||||||
this.tabUser.Padding = new System.Windows.Forms.Padding(3);
|
this.tabUser.Padding = new System.Windows.Forms.Padding(3);
|
||||||
@@ -64,6 +76,55 @@
|
|||||||
this.tabUser.TabIndex = 0;
|
this.tabUser.TabIndex = 0;
|
||||||
this.tabUser.Text = "YOURNAME";
|
this.tabUser.Text = "YOURNAME";
|
||||||
//
|
//
|
||||||
|
// userLinkLabel
|
||||||
|
//
|
||||||
|
this.userLinkLabel.AutoSize = true;
|
||||||
|
this.userLinkLabel.LinkColor = System.Drawing.SystemColors.Highlight;
|
||||||
|
this.userLinkLabel.Location = new System.Drawing.Point(264, 51);
|
||||||
|
this.userLinkLabel.Name = "userLinkLabel";
|
||||||
|
this.userLinkLabel.Size = new System.Drawing.Size(60, 15);
|
||||||
|
this.userLinkLabel.TabIndex = 3;
|
||||||
|
this.userLinkLabel.TabStop = true;
|
||||||
|
this.userLinkLabel.Text = "linkLabel1";
|
||||||
|
this.userLinkLabel.Visible = false;
|
||||||
|
this.userLinkLabel.VisitedLinkColor = System.Drawing.SystemColors.Highlight;
|
||||||
|
this.userLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.userLinkLabel_LinkClicked);
|
||||||
|
//
|
||||||
|
// userLabelInfo
|
||||||
|
//
|
||||||
|
this.userLabelInfo.AutoSize = true;
|
||||||
|
this.userLabelInfo.ForeColor = System.Drawing.SystemColors.Control;
|
||||||
|
this.userLabelInfo.Location = new System.Drawing.Point(264, 76);
|
||||||
|
this.userLabelInfo.Name = "userLabelInfo";
|
||||||
|
this.userLabelInfo.Size = new System.Drawing.Size(67, 60);
|
||||||
|
this.userLabelInfo.TabIndex = 2;
|
||||||
|
this.userLabelInfo.Text = "MAL ID:\r\nLast online:\r\nLocation:\r\nJoined:";
|
||||||
|
this.userLabelInfo.Visible = false;
|
||||||
|
//
|
||||||
|
// userLabel
|
||||||
|
//
|
||||||
|
this.userLabel.AutoSize = true;
|
||||||
|
this.userLabel.Font = new System.Drawing.Font("Comic Sans MS", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
|
||||||
|
this.userLabel.ForeColor = System.Drawing.SystemColors.Control;
|
||||||
|
this.userLabel.Location = new System.Drawing.Point(264, 18);
|
||||||
|
this.userLabel.Name = "userLabel";
|
||||||
|
this.userLabel.Size = new System.Drawing.Size(123, 27);
|
||||||
|
this.userLabel.TabIndex = 1;
|
||||||
|
this.userLabel.Text = "YOURNAME";
|
||||||
|
this.userLabel.Visible = false;
|
||||||
|
//
|
||||||
|
// userImage
|
||||||
|
//
|
||||||
|
this.userImage.ErrorImage = null;
|
||||||
|
this.userImage.Image = ((System.Drawing.Image)(resources.GetObject("userImage.Image")));
|
||||||
|
this.userImage.InitialImage = null;
|
||||||
|
this.userImage.Location = new System.Drawing.Point(8, 6);
|
||||||
|
this.userImage.Name = "userImage";
|
||||||
|
this.userImage.Size = new System.Drawing.Size(250, 250);
|
||||||
|
this.userImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||||
|
this.userImage.TabIndex = 0;
|
||||||
|
this.userImage.TabStop = false;
|
||||||
|
//
|
||||||
// tabSeason
|
// tabSeason
|
||||||
//
|
//
|
||||||
this.tabSeason.BackColor = System.Drawing.SystemColors.ControlDarkDark;
|
this.tabSeason.BackColor = System.Drawing.SystemColors.ControlDarkDark;
|
||||||
@@ -75,9 +136,24 @@
|
|||||||
this.tabSeason.TabIndex = 1;
|
this.tabSeason.TabIndex = 1;
|
||||||
this.tabSeason.Text = "Season";
|
this.tabSeason.Text = "Season";
|
||||||
//
|
//
|
||||||
|
// listViewSeason
|
||||||
|
//
|
||||||
|
this.listViewSeason.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||||
|
this.listViewSeason.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||||
|
this.listViewSeason.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.listViewSeason.ForeColor = System.Drawing.SystemColors.Control;
|
||||||
|
this.listViewSeason.GridLines = true;
|
||||||
|
this.listViewSeason.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.listViewSeason.Name = "listViewSeason";
|
||||||
|
this.listViewSeason.ShowGroups = false;
|
||||||
|
this.listViewSeason.Size = new System.Drawing.Size(814, 513);
|
||||||
|
this.listViewSeason.TabIndex = 0;
|
||||||
|
this.listViewSeason.UseCompatibleStateImageBehavior = false;
|
||||||
|
this.listViewSeason.View = System.Windows.Forms.View.Tile;
|
||||||
|
//
|
||||||
// tabAddAnime
|
// tabAddAnime
|
||||||
//
|
//
|
||||||
this.tabAddAnime.BackColor = System.Drawing.SystemColors.ControlDarkDark;
|
this.tabAddAnime.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||||
this.tabAddAnime.Location = new System.Drawing.Point(4, 24);
|
this.tabAddAnime.Location = new System.Drawing.Point(4, 24);
|
||||||
this.tabAddAnime.Name = "tabAddAnime";
|
this.tabAddAnime.Name = "tabAddAnime";
|
||||||
this.tabAddAnime.Padding = new System.Windows.Forms.Padding(3);
|
this.tabAddAnime.Padding = new System.Windows.Forms.Padding(3);
|
||||||
@@ -110,21 +186,22 @@
|
|||||||
this.loginToolStripMenuItem.Text = "Login";
|
this.loginToolStripMenuItem.Text = "Login";
|
||||||
this.loginToolStripMenuItem.Click += new System.EventHandler(this.loginToolStripMenuItem_Click);
|
this.loginToolStripMenuItem.Click += new System.EventHandler(this.loginToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// listViewSeason
|
// userLabelInfoData
|
||||||
//
|
//
|
||||||
this.listViewSeason.BackColor = System.Drawing.SystemColors.ControlDark;
|
this.userLabelInfoData.AutoSize = true;
|
||||||
this.listViewSeason.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.userLabelInfoData.ForeColor = System.Drawing.SystemColors.Control;
|
||||||
this.listViewSeason.Location = new System.Drawing.Point(3, 3);
|
this.userLabelInfoData.Location = new System.Drawing.Point(374, 76);
|
||||||
this.listViewSeason.Name = "listViewSeason";
|
this.userLabelInfoData.Name = "userLabelInfoData";
|
||||||
this.listViewSeason.Size = new System.Drawing.Size(814, 513);
|
this.userLabelInfoData.Size = new System.Drawing.Size(38, 15);
|
||||||
this.listViewSeason.TabIndex = 0;
|
this.userLabelInfoData.TabIndex = 4;
|
||||||
this.listViewSeason.UseCompatibleStateImageBehavior = false;
|
this.userLabelInfoData.Text = "label1";
|
||||||
|
this.userLabelInfoData.Visible = false;
|
||||||
//
|
//
|
||||||
// Main
|
// Main
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.BackColor = System.Drawing.SystemColors.ControlDarkDark;
|
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||||
this.ClientSize = new System.Drawing.Size(828, 571);
|
this.ClientSize = new System.Drawing.Size(828, 571);
|
||||||
this.Controls.Add(this.tabControl);
|
this.Controls.Add(this.tabControl);
|
||||||
this.Controls.Add(this.menuStrip);
|
this.Controls.Add(this.menuStrip);
|
||||||
@@ -132,6 +209,9 @@
|
|||||||
this.Name = "Main";
|
this.Name = "Main";
|
||||||
this.Text = "APP - Anime plan program";
|
this.Text = "APP - Anime plan program";
|
||||||
this.tabControl.ResumeLayout(false);
|
this.tabControl.ResumeLayout(false);
|
||||||
|
this.tabUser.ResumeLayout(false);
|
||||||
|
this.tabUser.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.userImage)).EndInit();
|
||||||
this.tabSeason.ResumeLayout(false);
|
this.tabSeason.ResumeLayout(false);
|
||||||
this.menuStrip.ResumeLayout(false);
|
this.menuStrip.ResumeLayout(false);
|
||||||
this.menuStrip.PerformLayout();
|
this.menuStrip.PerformLayout();
|
||||||
@@ -150,5 +230,10 @@
|
|||||||
private ToolStripMenuItem memeToolStripMenuItem;
|
private ToolStripMenuItem memeToolStripMenuItem;
|
||||||
private ToolStripMenuItem loginToolStripMenuItem;
|
private ToolStripMenuItem loginToolStripMenuItem;
|
||||||
private ListView listViewSeason;
|
private ListView listViewSeason;
|
||||||
|
private PictureBox userImage;
|
||||||
|
private Label userLabel;
|
||||||
|
private Label userLabelInfo;
|
||||||
|
private LinkLabel userLinkLabel;
|
||||||
|
private Label userLabelInfoData;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
90
APP/Main.cs
90
APP/Main.cs
@@ -1,25 +1,91 @@
|
|||||||
using System;
|
using System.Diagnostics;
|
||||||
using System.Collections.Generic;
|
using APP.DTO;
|
||||||
using System.ComponentModel;
|
using APP.Utility;
|
||||||
using System.Data;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace APP
|
namespace APP;
|
||||||
|
|
||||||
|
public partial class Main : Form
|
||||||
{
|
{
|
||||||
public partial class Main : Form
|
private ImageList _imageListSeason;
|
||||||
{
|
private List<SeasonAnime>? _seasonAnime;
|
||||||
|
private User? _user;
|
||||||
|
|
||||||
public Main()
|
public Main()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
_imageListSeason = new ImageList();
|
||||||
|
Load += OnLoad;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void OnLoad(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await UpdateData();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task UpdateData()
|
||||||
|
{
|
||||||
|
_seasonAnime = await BackendComms.GetSeason();
|
||||||
|
if (_seasonAnime == null)
|
||||||
|
{
|
||||||
|
ShowError("Fehler beim Season abrufen");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach (var anime in _seasonAnime)
|
||||||
|
{
|
||||||
|
//_imageListSeason.Images.Add("", new )
|
||||||
|
listViewSeason.Items.Add(new ListViewItem
|
||||||
|
{
|
||||||
|
Text = anime.Title
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_user = await BackendComms.GetUser("ultrasn0w");
|
||||||
|
if (_user == null)
|
||||||
|
{
|
||||||
|
ShowError("Fehler beim User abrufen");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tabUser.Text = _user.Username;
|
||||||
|
userLabel.Text = _user.Username;
|
||||||
|
userLabel.Visible = true;
|
||||||
|
userLinkLabel.Text = _user.Url;
|
||||||
|
userLinkLabel.Visible = true;
|
||||||
|
userLabelInfo.Text = StringAssemble.UserInfo(_user);
|
||||||
|
userLabelInfo.Visible = true;
|
||||||
|
userLabelInfoData.Text = StringAssemble.UserData(_user);
|
||||||
|
userLabelInfoData.Visible = true;
|
||||||
|
userImage.LoadAsync(_user.ImageUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void ShowError(string text)
|
||||||
|
{
|
||||||
|
MessageBox.Show(text, @"FEHLER", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loginToolStripMenuItem_Click(object sender, EventArgs e)
|
private void loginToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
// TODO search for user in backend
|
// TODO search for user in backend
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void userLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(_user?.Url)) return;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var url = new Uri(_user.Url).ToString();
|
||||||
|
var sInfo = new ProcessStartInfo(url)
|
||||||
|
{
|
||||||
|
UseShellExecute = true
|
||||||
|
};
|
||||||
|
Process.Start(sInfo);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.Error.WriteLineAsync(ex.Message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
163
APP/Main.resx
163
APP/Main.resx
@@ -57,10 +57,171 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="userImage.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAAIAAAABnCAYAAADIf0rxAAABgmlDQ1BJQ0MgcHJvZmlsZQAAKM+VkU0o
|
||||||
|
RFEcxX8ziDRSzEKyeIthgxKSpYZIUZoZZbDw3hsz1Lw303sjG0tlqyx8bHwtbKzZWtgqpXyULK2siI30
|
||||||
|
/O8bNZMa5dbt/jr3ntO950LwIGtabnUPWHbBiY1FtZnkrFb7TDVN1BOhUzfd/GR8NEHF8XFLQK033SqL
|
||||||
|
/42G1KJrQkATHjLzTkF4QXhgtZBXvCMcNpf0lPCpcJcjFxS+V7pR5BfFGZ+DKjPsJGLDwmFhLVPGRhmb
|
||||||
|
S44l3C8cSVm25AdnipxSvKbYyq6YP/dULwwt2tNxpctsY4xxJplCw2CFZbIU6JbVFsUlJvvRCv5W3z8l
|
||||||
|
LkNcy5jiGCGHhe77UX/wu1s33ddbTApFoebJ897aoXYLvjY97/PQ876OoOoRLuySP3cAg++ib5a0yD40
|
||||||
|
rsPZZUkztuF8A1oe8rqj+1KVzGA6Da8n8k1JaL6G+rlibz/7HN9BQrqauILdPejISPZ8hXfXlff25xm/
|
||||||
|
P6LfpG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pFrZyMN1xbG4NHNTBV/G8ATwXP
|
||||||
|
p2PWy86/xjiYWwls1x5qZmP0zqVlUaCtY2IdqMOLgzKBlV09ECuVademUaI8X4tdtzbF8VMvxRpfhxcH
|
||||||
|
zQlsZqlggkzWQmC7dlCUqYliTIr9LZxKFT0JtA6VAzo+pnB6CNIVsoEC67WDQo1M0t6jY+NpwahIw+tQ
|
||||||
|
OaBJoQuLIvGSldF0gfXaQSkWxvNPzwyp8YMj/+mgAPvaulh0cDZdLbBeO6inv/kX9/fQwZF1/r8q8fBw
|
||||||
|
Mm5vi0dPfwvtOVU8RGactJT+ZRydG1TL6uu1DXSc7G8HkzBUZXNRYH/NU7qZ8ejzdG7wxYx7TAHusYbW
|
||||||
|
oYrAAux7FGiPT7H/UiVVlGFaWCL5L62lfXj3gaplAAAAAElFTkSuQmCC
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
<metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 17</value>
|
<value>17, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
|
||||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
AAABAAEAAAAAAAEAIADupQEAFgAAAIlQTkcNChoKAAAADUlIRFIAAAEAAAABAAgGAAAAXHKoZgAAIABJ
|
AAABAAEAAAAAAAEAIADupQEAFgAAAIlQTkcNChoKAAAADUlIRFIAAAEAAAABAAgGAAAAXHKoZgAAIABJ
|
||||||
|
|||||||
63
APP/Properties/Resources.Designer.cs
generated
Normal file
63
APP/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace APP.Properties {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
|
/// </summary>
|
||||||
|
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||||
|
// class via a tool like ResGen or Visual Studio.
|
||||||
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
|
// with the /str option, or rebuild your VS project.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class Resources {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal Resources() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("APP.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Overrides the current thread's CurrentUICulture property for all
|
||||||
|
/// resource lookups using this strongly typed resource class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
APP/Properties/Resources.resx
Normal file
120
APP/Properties/Resources.resx
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
31
APP/Utility/BackendComms.cs
Normal file
31
APP/Utility/BackendComms.cs
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
using System.Net.Http.Json;
|
||||||
|
using System.Text.Json;
|
||||||
|
using APP.DTO;
|
||||||
|
|
||||||
|
namespace APP.Utility;
|
||||||
|
|
||||||
|
internal static class BackendComms
|
||||||
|
{
|
||||||
|
private const string ApiBaseUrl = "https://huso.hanami.family/api/";
|
||||||
|
private static readonly HttpClient Client = new();
|
||||||
|
private static readonly JsonSerializerOptions JsonSerializerOptions = new() {PropertyNameCaseInsensitive = true};
|
||||||
|
|
||||||
|
internal static async Task<List<SeasonAnime>?> GetSeason()
|
||||||
|
{
|
||||||
|
var resp = await Client.GetAsync(ApiBaseUrl + "season");
|
||||||
|
if (!resp.IsSuccessStatusCode) return null;
|
||||||
|
return await resp.Content.ReadFromJsonAsync<List<SeasonAnime>>(JsonSerializerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static async Task<User?> GetUser(string username)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(username))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
var resp = await Client.GetAsync(ApiBaseUrl + "user/"+username);
|
||||||
|
if (!resp.IsSuccessStatusCode) return null;
|
||||||
|
var users = await resp.Content.ReadFromJsonAsync<ICollection<User>>(JsonSerializerOptions);
|
||||||
|
return users?.SingleOrDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
59
APP/Utility/StringAssemble.cs
Normal file
59
APP/Utility/StringAssemble.cs
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
using System.Text;
|
||||||
|
using APP.DTO;
|
||||||
|
|
||||||
|
namespace APP.Utility;
|
||||||
|
|
||||||
|
public static class StringAssemble
|
||||||
|
{
|
||||||
|
public static string UserInfo(User? user)
|
||||||
|
{
|
||||||
|
if (user == null)
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
sb.Append("MAL ID:");
|
||||||
|
sb.AppendLine();
|
||||||
|
|
||||||
|
sb.Append("Last online:");
|
||||||
|
sb.AppendLine();
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(user.Location))
|
||||||
|
{
|
||||||
|
sb.Append("Location:");
|
||||||
|
sb.AppendLine();
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.Append("Joined:");
|
||||||
|
sb.AppendLine();
|
||||||
|
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string UserData(User? user)
|
||||||
|
{
|
||||||
|
if (user == null)
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
sb.Append(user.Id);
|
||||||
|
sb.AppendLine();
|
||||||
|
|
||||||
|
sb.Append(user.LastOnline);
|
||||||
|
sb.AppendLine();
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(user.Location))
|
||||||
|
{
|
||||||
|
sb.Append(user.Location);
|
||||||
|
sb.AppendLine();
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.Append(user.Joined.ToShortDateString());
|
||||||
|
sb.AppendLine();
|
||||||
|
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user