daily update on 20231214 by nitload youmu

This commit is contained in:
Nitload
2023-12-14 07:01:01 +08:00
parent f97fb137ba
commit 8b14599233
54 changed files with 537 additions and 241 deletions
+23
View File
@@ -0,0 +1,23 @@
using StgSharp.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Logic
{
[System.Serializable]
internal class FrameTimeoutException : Exception
{
internal FrameTimeoutException() { }
internal FrameTimeoutException(string message) : base(message) { }
internal FrameTimeoutException(Form form) :
base($"Form {nameof(form)} cannot accoplish all render work at frame {form.timer.totalFrame}")
{ }
internal FrameTimeoutException(string message, Exception inner) : base(message, inner) { }
protected FrameTimeoutException(
System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
}
}
+1 -2
View File
@@ -6,9 +6,8 @@ namespace StgSharp
{
internal readonly T _value;
[AllowNull]
internal LinkedListNode<T> _previous;
[AllowNull]
internal LinkedListNode<T> _next;
internal LinkedList<T> list;
+37
View File
@@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Logic
{
/// <summary>
/// A pair of <see cref="bool"/> value
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 2)]
public struct Bool2
{
/// <summary>
/// A <see cref="ushort"/> value.
/// The lower byte is <see cref="bool0"/>,
/// and higher byte is <see cref="bool1"/>.
/// </summary>
[FieldOffset(0)] public ushort Value;
/// <summary>
/// The first <see cref="bool"/> value.
/// </summary>
[FieldOffset(0)] public bool bool0;
[FieldOffset(0)] public byte byte0;
/// <summary>
/// The second <see cref="bool"/> value.
/// </summary>
[FieldOffset(1)] public bool bool1;
[FieldOffset(1)] public bool byte1;
}
}