Archived
Rewrite for .NET 8 and RyzStudio8
This commit is contained in:
1 parent
fc764a4e97
commit
9b7dd4bdc9
42 files changed
+2961
-4619
No files matched your search
@@ -0,0 +1,26 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using bzit.bomg.Models;
|
||||
|
||||
namespace FizzyLauncher.Models
|
||||
{
|
||||
public class AppOptions
|
||||
{
|
||||
public bool RestorePosition { get; set; } = true;
|
||||
|
||||
public bool AlwaysOnTop { get; set; } = false;
|
||||
|
||||
public string RunCommand { get; set; } = "{0}";
|
||||
|
||||
public bool IgnoreSSL { get; set; } = false;
|
||||
|
||||
public Point StartPosition { get; set; } = Point.Empty;
|
||||
|
||||
public int Width { get; set; } = 0;
|
||||
|
||||
public int Height { get; set; } = 0;
|
||||
|
||||
public List<BookmarkModel> Items { get; set; } = new List<BookmarkModel>();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
namespace FizzyLauncher.Models
|
||||
{
|
||||
public class AppSession
|
||||
{
|
||||
public enum AutoSaveOption
|
||||
{
|
||||
Prompt = 0,
|
||||
Yes,
|
||||
No
|
||||
}
|
||||
|
||||
|
||||
public bool EnableAutoPosition { get; set; } = true;
|
||||
|
||||
public bool AlwaysOnTop { get; set; } = false;
|
||||
|
||||
public AutoSaveOption AutoSave { get; set; } = AutoSaveOption.Prompt;
|
||||
|
||||
public string RunCommand { get; set; } = "{0}";
|
||||
|
||||
public bool IgnoreSSL { get; set; } = false;
|
||||
|
||||
public bool ShowToolbar { get; set; } = false;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
using BookmarkManager;
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
namespace bzit.bomg.Models
|
||||
{
|
||||
public class BookmarkItem
|
||||
{
|
||||
public string SiteName { get; set; }
|
||||
|
||||
public string SiteAddress { get; set; }
|
||||
|
||||
public string SiteDescription { get; set; }
|
||||
|
||||
public string TreeviewPath { get; set; }
|
||||
|
||||
public string Notes { get; set; }
|
||||
|
||||
|
||||
public new string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(this.SiteName))
|
||||
{
|
||||
sb.AppendLine("Name");
|
||||
sb.AppendLine(this.SiteName + Environment.NewLine);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(this.SiteAddress))
|
||||
{
|
||||
sb.AppendLine("Address");
|
||||
sb.AppendLine(this.SiteAddress + Environment.NewLine);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(this.SiteDescription))
|
||||
{
|
||||
sb.AppendLine("Description");
|
||||
sb.AppendLine(this.SiteDescription + Environment.NewLine);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(this.Notes))
|
||||
{
|
||||
sb.AppendLine("Notes");
|
||||
sb.AppendLine(this.Notes + Environment.NewLine);
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
public string ToHash() => Crypto.GetSHA256Hash(this.SiteAddress);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace bzit.bomg.Models
|
||||
{
|
||||
public class BookmarkModel
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
|
||||
public string Title { get; set; }
|
||||
|
||||
public string Address { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
public string IconId { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public Image Icon { get; set; }
|
||||
|
||||
public string Path { get; set; }
|
||||
|
||||
public string Notes { get; set; }
|
||||
|
||||
|
||||
public new string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(this.Title))
|
||||
{
|
||||
sb.AppendLine("Name");
|
||||
sb.AppendLine(this.Title + Environment.NewLine);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(this.Address))
|
||||
{
|
||||
sb.AppendLine("Address");
|
||||
sb.AppendLine(this.Address + Environment.NewLine);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(this.Description))
|
||||
{
|
||||
sb.AppendLine("Description");
|
||||
sb.AppendLine(this.Description + Environment.NewLine);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(this.Notes))
|
||||
{
|
||||
sb.AppendLine("Notes");
|
||||
sb.AppendLine(this.Notes + Environment.NewLine);
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
using System.Text;
|
||||
|
||||
namespace BookmarkManager.Models
|
||||
{
|
||||
public class R4SaveFileModel
|
||||
{
|
||||
public string SiteName { get; set; }
|
||||
|
||||
public string SiteAddress { get; set; }
|
||||
|
||||
public string SiteDescription { get; set; }
|
||||
|
||||
public string TreeviewPath { get; set; }
|
||||
|
||||
public string Notes { get; set; }
|
||||
|
||||
|
||||
public string Path
|
||||
{
|
||||
get
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(TreeviewPath))
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
var path = this.TreeviewPath?.Trim('\\')?.Trim() ?? string.Empty;
|
||||
if (!path.Contains("\\"))
|
||||
{
|
||||
return path?.Trim() ?? string.Empty;
|
||||
}
|
||||
|
||||
var sb = new StringBuilder();
|
||||
|
||||
var parts = path.Split("\\");
|
||||
for (var i = 1; i < parts.Length; i++)
|
||||
{
|
||||
var item = System.Web.HttpUtility.UrlDecode(parts[i]);
|
||||
|
||||
sb.Append(item);
|
||||
sb.Append("\n");
|
||||
}
|
||||
|
||||
return sb.ToString()?.Trim() ?? string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user