Compare commits
No commits in common. "master" and "v3.5.5-RC5" have entirely different histories.
master
...
v3.5.5-RC5
|
@ -1 +0,0 @@
|
||||||
/Matrix App/bin/
|
|
|
@ -8,8 +8,8 @@
|
||||||
#define MATRIX_MAX_HEIGHT 20
|
#define MATRIX_MAX_HEIGHT 20
|
||||||
#define MATRIX_LED_MAX_COUNT (MATRIX_MAX_WIDTH * MATRIX_MAX_HEIGHT)
|
#define MATRIX_LED_MAX_COUNT (MATRIX_MAX_WIDTH * MATRIX_MAX_HEIGHT)
|
||||||
|
|
||||||
#define STD_WIDTH 16
|
#define STD_WIDTH 10
|
||||||
#define STD_HEIGHT 16
|
#define STD_HEIGHT 10
|
||||||
#define STD_LED_MAX_COUNT (STD_WIDTH * STD_HEIGHT)
|
#define STD_LED_MAX_COUNT (STD_WIDTH * STD_HEIGHT)
|
||||||
|
|
||||||
//#define DEBUG_PRINT_CALLBACK
|
//#define DEBUG_PRINT_CALLBACK
|
||||||
|
@ -23,6 +23,14 @@ uint8_t height = STD_HEIGHT;
|
||||||
|
|
||||||
uint32_t ledCount;
|
uint32_t ledCount;
|
||||||
|
|
||||||
|
uint8_t gamma8(uint8_t x) {
|
||||||
|
uint32_t x2 = (uint32_t) x;
|
||||||
|
|
||||||
|
x2 = x2 * x2 * 258 >> 16;
|
||||||
|
|
||||||
|
return (uint8_t) x2;
|
||||||
|
}
|
||||||
|
|
||||||
CRGB leds[MATRIX_LED_MAX_COUNT];
|
CRGB leds[MATRIX_LED_MAX_COUNT];
|
||||||
|
|
||||||
typedef void (*FNPTR_t)();
|
typedef void (*FNPTR_t)();
|
||||||
|
@ -67,10 +75,13 @@ void scale() {
|
||||||
Serial.println(ledCount);
|
Serial.println(ledCount);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
FastLED.addLeds<LED_TYPE, DATA_PIN, GRB>(leds, ledCount);
|
|
||||||
|
FastLED.addLeds<LED_TYPE, DATA_PIN>(leds, ledCount);
|
||||||
|
|
||||||
for (uint16_t x = 0; x < ledCount; x++) {
|
for (uint16_t x = 0; x < ledCount; x++) {
|
||||||
leds[x] = 0;
|
leds[x].r = 0;
|
||||||
|
leds[x].g = 0;
|
||||||
|
leds[x].b = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
FastLED.show();
|
FastLED.show();
|
||||||
|
@ -82,9 +93,9 @@ void single() {
|
||||||
#endif
|
#endif
|
||||||
uint16_t index = getWord();
|
uint16_t index = getWord();
|
||||||
|
|
||||||
uint8_t green = getByte();
|
uint8_t green = gamma8(getByte());
|
||||||
uint8_t red = getByte();
|
uint8_t red = gamma8(getByte());
|
||||||
uint8_t blue = getByte();
|
uint8_t blue = gamma8(getByte());
|
||||||
|
|
||||||
#ifdef DEBUG_PRINT_CALLBACK
|
#ifdef DEBUG_PRINT_CALLBACK
|
||||||
Serial.print("Index: ");
|
Serial.print("Index: ");
|
||||||
|
@ -109,6 +120,12 @@ void image() {
|
||||||
|
|
||||||
Serial.readBytes((char*) leds, ledCount * 3);
|
Serial.readBytes((char*) leds, ledCount * 3);
|
||||||
|
|
||||||
|
for (uint16_t x = 0; x < ledCount; x++) {
|
||||||
|
leds[x].r = gamma8(leds[x].r);
|
||||||
|
leds[x].g = gamma8(leds[x].g);
|
||||||
|
leds[x].b = gamma8(leds[x].b);
|
||||||
|
}
|
||||||
|
|
||||||
FastLED.show();
|
FastLED.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,9 +134,9 @@ void fill() {
|
||||||
Serial.println("Called fill");
|
Serial.println("Called fill");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint8_t green = getByte();
|
uint8_t green = gamma8(getByte());
|
||||||
uint8_t red = getByte();
|
uint8_t red = gamma8(getByte());
|
||||||
uint8_t blue = getByte();
|
uint8_t blue = gamma8(getByte());
|
||||||
|
|
||||||
#ifdef DEBUG_PRINT_CALLBACK
|
#ifdef DEBUG_PRINT_CALLBACK
|
||||||
Serial.print("Red: ");
|
Serial.print("Red: ");
|
||||||
|
@ -153,24 +170,12 @@ void config() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void upload() {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
void info() {
|
|
||||||
Serial.write((uint8_t) 91);
|
|
||||||
Serial.write((uint8_t) 0b01000000);
|
|
||||||
Serial.write("ATmega328P Arduino");
|
|
||||||
}
|
|
||||||
|
|
||||||
FNPTR_t opcodeTable[] = {
|
FNPTR_t opcodeTable[] = {
|
||||||
scale, // opcode 0x00
|
scale, // opcode 0x00
|
||||||
single, // opcode 0x01
|
single, // opcode 0x01
|
||||||
image, // opcode 0x02
|
image, // opcode 0x02
|
||||||
fill, // opcode 0x03
|
fill, // opcode 0x03
|
||||||
config, // opcode 0x04
|
config // opcode 0x04
|
||||||
upload,
|
|
||||||
info
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
|
@ -178,14 +183,12 @@ void setup() {
|
||||||
|
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
|
|
||||||
FastLED.addLeds<LED_TYPE, DATA_PIN, GRB>(leds, ledCount);
|
FastLED.addLeds<LED_TYPE, DATA_PIN>(leds, ledCount);
|
||||||
FastLED.setCorrection(TypicalLEDStrip);
|
|
||||||
FastLED.setBrightness(80);
|
|
||||||
|
|
||||||
for (uint16_t i = 0; i < ledCount; i++) {
|
for (uint16_t i = 0; i < ledCount; i++) {
|
||||||
leds[i] = 0;
|
leds[i].r = 0;
|
||||||
|
leds[i].g = 0;
|
||||||
|
leds[i].b = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
FastLED.show();
|
FastLED.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,9 +205,9 @@ void loop() {
|
||||||
Serial.println(opcode);
|
Serial.println(opcode);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (opcode <= 6) {
|
if (opcode <= 4) {
|
||||||
opcodeTable[opcode]();
|
opcodeTable[opcode]();
|
||||||
Serial.write(75);
|
Serial.write(21);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,169 +0,0 @@
|
||||||
from time import sleep
|
|
||||||
|
|
||||||
from machine import UART, Pin
|
|
||||||
|
|
||||||
import array, time
|
|
||||||
from machine import Pin
|
|
||||||
import rp2
|
|
||||||
|
|
||||||
# Configure the number of WS2812 LEDs.
|
|
||||||
NUM_LEDS = 256
|
|
||||||
PIN_NUM = 16
|
|
||||||
brightness = 0.2
|
|
||||||
|
|
||||||
@rp2.asm_pio(sideset_init=rp2.PIO.OUT_LOW, out_shiftdir=rp2.PIO.SHIFT_LEFT, autopull=True, pull_thresh=24)
|
|
||||||
def ws2812():
|
|
||||||
T1 = 2
|
|
||||||
T2 = 5
|
|
||||||
T3 = 3
|
|
||||||
wrap_target()
|
|
||||||
label("bitloop")
|
|
||||||
out(x, 1) .side(0) [T3 - 1]
|
|
||||||
jmp(not_x, "do_zero") .side(1) [T1 - 1]
|
|
||||||
jmp("bitloop") .side(1) [T2 - 1]
|
|
||||||
label("do_zero")
|
|
||||||
nop() .side(0) [T2 - 1]
|
|
||||||
wrap()
|
|
||||||
|
|
||||||
# Create the StateMachine with the ws2812 program, outputting on pin
|
|
||||||
sm = rp2.StateMachine(0, ws2812, freq=8_000_000, sideset_base=Pin(PIN_NUM))
|
|
||||||
|
|
||||||
# Start the StateMachine, it will wait for data on its FIFO.
|
|
||||||
sm.active(1)
|
|
||||||
|
|
||||||
# Display a pattern on the LEDs via an array of LED RGB values.
|
|
||||||
global ar
|
|
||||||
global leds
|
|
||||||
global gif
|
|
||||||
global currentFrame
|
|
||||||
global delay
|
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
|
|
||||||
def show():
|
|
||||||
for i in range(leds):
|
|
||||||
r = ar[i] >> 16
|
|
||||||
g = ar[i] >> 8 & 0xFF
|
|
||||||
b = ar[i] & 0xFF
|
|
||||||
|
|
||||||
r = r >> 1
|
|
||||||
g = g >> 1
|
|
||||||
b = b >> 1
|
|
||||||
|
|
||||||
ar[i] = r << 16 | g << 8 | b
|
|
||||||
|
|
||||||
sm.put(ar, 8)
|
|
||||||
|
|
||||||
leds = 256 # number of leds
|
|
||||||
uart = UART(0, 9600) # serial bluetooth
|
|
||||||
led = Pin(25, Pin.OUT) # builtin LED
|
|
||||||
ar = array.array("I", [0 for _ in range(NUM_LEDS)]) # color array
|
|
||||||
gif = [array.array("I", [0 for _ in range(leds)]) for _ in range(1)]
|
|
||||||
currentFrame = -1
|
|
||||||
|
|
||||||
# gurantees that only N-bytes are read from the UART
|
|
||||||
def readNBytes(n):
|
|
||||||
rawBytes = b''
|
|
||||||
bytesRead = 0
|
|
||||||
while True:
|
|
||||||
if uart.any():
|
|
||||||
rawBytes += uart.read(n - bytesRead)
|
|
||||||
|
|
||||||
bytesRead = len(rawBytes)
|
|
||||||
|
|
||||||
# not enough was read
|
|
||||||
if bytesRead < n:
|
|
||||||
continue
|
|
||||||
else:
|
|
||||||
return rawBytes
|
|
||||||
|
|
||||||
while True:
|
|
||||||
led.low()
|
|
||||||
if uart.any() != 0:
|
|
||||||
opcode = uart.read(1)
|
|
||||||
|
|
||||||
print("Opcode: ", opcode)
|
|
||||||
|
|
||||||
if opcode == b'\x00':
|
|
||||||
width = readNBytes(1)[0]
|
|
||||||
height = readNBytes(1)[0]
|
|
||||||
|
|
||||||
if width <= 32 and height <= 32:
|
|
||||||
leds = width * height
|
|
||||||
|
|
||||||
ar = array.array("I", [0 for _ in range(leds)])
|
|
||||||
show()
|
|
||||||
|
|
||||||
elif opcode == b'\x02':
|
|
||||||
rawBytes = readNBytes(leds * 3);
|
|
||||||
|
|
||||||
for i in range(leds):
|
|
||||||
ar[i] = rawBytes[i * 3 + 1] << 16 | rawBytes[i * 3] << 8 | rawBytes[i * 3 + 2]
|
|
||||||
|
|
||||||
show()
|
|
||||||
|
|
||||||
currentFrame = -1
|
|
||||||
|
|
||||||
elif opcode == b'\x03':
|
|
||||||
r = readNBytes(1)
|
|
||||||
g = readNBytes(1)
|
|
||||||
b = readNBytes(1)
|
|
||||||
|
|
||||||
for i in range(leds):
|
|
||||||
ar[i] = g[0] << 16 | r[0] << 8 | b[0]
|
|
||||||
|
|
||||||
show()
|
|
||||||
|
|
||||||
elif opcode == b'\x04':
|
|
||||||
|
|
||||||
uart.write([75])
|
|
||||||
|
|
||||||
# [width] [height] [frames] [delay] [rgb-frames]
|
|
||||||
elif opcode == b'\x05':
|
|
||||||
gifDim = readNBytes(5)
|
|
||||||
|
|
||||||
delay = (gifDim[3] << 8) | gifDim[4]
|
|
||||||
|
|
||||||
print("w ", gifDim[0], " h ", gifDim[1], " f ", gifDim[2], " d ", delay)
|
|
||||||
|
|
||||||
leds = gifDim[0] * gifDim[1]
|
|
||||||
gif = [array.array("I", [0 for _ in range(leds)]) for _ in range(gifDim[2])]
|
|
||||||
|
|
||||||
for f in range(gifDim[2]):
|
|
||||||
frame = readNBytes(leds * 3)
|
|
||||||
print("frame read: ", f)
|
|
||||||
for i in range(leds):
|
|
||||||
gif[f][i] = frame[i * 3 + 1] << 16 | frame[i * 3] << 8 | frame[i * 3 + 2]
|
|
||||||
#uart.write(bytearray([91])) # synchronize
|
|
||||||
|
|
||||||
currentFrame = 0
|
|
||||||
|
|
||||||
print("Everything read")
|
|
||||||
|
|
||||||
# [Synchro-byte] [feature-flags] [Controller-Id]
|
|
||||||
#
|
|
||||||
# feature-flags:
|
|
||||||
# [Bit 7] = Bluetooth (true)
|
|
||||||
# [Bit 6] = USB (false)
|
|
||||||
# [Bit 0] = Upload (true)
|
|
||||||
#
|
|
||||||
elif opcode == b'\x06':
|
|
||||||
uart.write(b'\x5B\x81')
|
|
||||||
uart.write("RP2040 Micro python")
|
|
||||||
|
|
||||||
led.high()
|
|
||||||
uart.write(bytearray([75]))
|
|
||||||
|
|
||||||
elif currentFrame != -1:
|
|
||||||
print("showing")
|
|
||||||
for i in range(leds):
|
|
||||||
ar[i] = gif[currentFrame][i]
|
|
||||||
|
|
||||||
show()
|
|
||||||
currentFrame += 1
|
|
||||||
|
|
||||||
if (currentFrame >= len(gif)):
|
|
||||||
currentFrame = 0
|
|
||||||
|
|
||||||
time.sleep(delay * 1e-3)
|
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Matrix_0020App_002Fforms_002FColorWheel/@EntryIndexedValue">False</s:Boolean>
|
|
||||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Matrix_0020App_002Fforms_002FMatrix/@EntryIndexedValue">False</s:Boolean>
|
|
||||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Matrix_0020App_002Fforms_002FMatrixDesigner/@EntryIndexedValue">True</s:Boolean>
|
|
||||||
|
|
||||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Matrix_0020App_002Fforms_002FSettings/@EntryIndexedValue">True</s:Boolean>
|
|
||||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Matrix_0020App_002FMatrix/@EntryIndexedValue">False</s:Boolean>
|
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Matrix_0020App_002FMatrix/@EntryIndexedValue">False</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Matrix_0020App_002FMatrixDesigner/@EntryIndexedValue">False</s:Boolean>
|
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Matrix_0020App_002FMatrixDesigner/@EntryIndexedValue">False</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Matrix_0020App_002FProperties_002FResources/@EntryIndexedValue">False</s:Boolean>
|
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Matrix_0020App_002FProperties_002FResources/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/Initialized/@EntryValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/ResxEditorPersonal/Initialized/@EntryValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/OrderByFullPath/@EntryValue">False</s:Boolean>
|
|
||||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/ShowComments/@EntryValue">False</s:Boolean></wpf:ResourceDictionary>
|
|
|
@ -732,6 +732,7 @@ namespace Matrix_App
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
components = new System.ComponentModel.Container();
|
components = new System.ComponentModel.Container();
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -3,8 +3,10 @@ namespace Matrix_App
|
||||||
{
|
{
|
||||||
public static class Defaults
|
public static class Defaults
|
||||||
{
|
{
|
||||||
public const int MatrixStartWidth = 16;
|
public const int PortNameUpdateInterval = 5000;
|
||||||
public const int MatrixStartHeight = 16;
|
|
||||||
|
public const int MatrixStartWidth = 10;
|
||||||
|
public const int MatrixStartHeight = 10;
|
||||||
public const int MatrixStartFrames = 1;
|
public const int MatrixStartFrames = 1;
|
||||||
|
|
||||||
public const int MatrixLimitedWidth = 512;
|
public const int MatrixLimitedWidth = 512;
|
||||||
|
@ -12,8 +14,13 @@ namespace Matrix_App
|
||||||
|
|
||||||
public const int BaudRate = 9600;
|
public const int BaudRate = 9600;
|
||||||
|
|
||||||
public const int ReadTimeoutMs = 20500;
|
public const int ReadTimeoutMs = 5500;
|
||||||
public const int WriteTimeoutMs = 2500;
|
public const int WriteTimeoutMs = 5500;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Total count of LEDs at start
|
||||||
|
/// </summary>
|
||||||
|
public static readonly int MATRIX_START_LED_COUNT = MatrixStartWidth * MatrixStartHeight * Bpp;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Number of Bytes Per Pixel: 3 cause Red (1 byte) + Blue (1 Byte) + Green (1 byte) = 3
|
/// Number of Bytes Per Pixel: 3 cause Red (1 byte) + Blue (1 Byte) + Green (1 byte) = 3
|
||||||
|
@ -23,14 +30,12 @@ namespace Matrix_App
|
||||||
public const int FilterPreviewWidth = 32;
|
public const int FilterPreviewWidth = 32;
|
||||||
public const int FilterPreviewHeight = 32;
|
public const int FilterPreviewHeight = 32;
|
||||||
|
|
||||||
public const int ArduinoSynchronizationByte = 91;
|
public const int ArduinoSuccessByte = 21;
|
||||||
public const int ArduinoSuccessByte = 75;
|
|
||||||
public const int ArduinoErrorByte = 255;
|
|
||||||
|
|
||||||
public const int ArduinoCommandQueueSize = 2;
|
public const int ArduinoCommandQueueSize = 5;
|
||||||
public const int ArduinoReceiveBufferSize = 1 + 1 + 1 + MatrixLimitedWidth * MatrixLimitedHeight;
|
public const int ArduinoReceiveBufferSize = 1 + 1 + 1 + MatrixLimitedWidth * MatrixLimitedHeight;
|
||||||
|
|
||||||
public const int DequeueWaitTimeoutCounter = 3;
|
public const int DequeueWaitTimeoutCounter = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ArduinoInstruction
|
public static class ArduinoInstruction
|
||||||
|
@ -38,9 +43,6 @@ namespace Matrix_App
|
||||||
public const byte OpcodeScale = 0;
|
public const byte OpcodeScale = 0;
|
||||||
public const byte OpcodeImage = 2;
|
public const byte OpcodeImage = 2;
|
||||||
public const byte OpcodeFill = 3;
|
public const byte OpcodeFill = 3;
|
||||||
public const byte OpcodePush = 5;
|
public static readonly byte OPCODE_CONFIG = 4;
|
||||||
|
|
||||||
public const byte OpcodeInfo = 6;
|
|
||||||
// public static readonly byte OpcodeConfig = 4;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -23,7 +23,7 @@ namespace Matrix_App
|
||||||
Height = height;
|
Height = height;
|
||||||
Bits = new Int32[width * height];
|
Bits = new Int32[width * height];
|
||||||
BitsHandle = GCHandle.Alloc(Bits, GCHandleType.Pinned);
|
BitsHandle = GCHandle.Alloc(Bits, GCHandleType.Pinned);
|
||||||
Bitmap = new Bitmap(width, height, width * 4, PixelFormat.Format32bppRgb, BitsHandle.AddrOfPinnedObject());
|
Bitmap = new Bitmap(width, height, width * 4, PixelFormat.Format32bppPArgb, BitsHandle.AddrOfPinnedObject());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetPixel(int x, int y, Color colour)
|
public void SetPixel(int x, int y, Color colour)
|
||||||
|
@ -31,7 +31,7 @@ namespace Matrix_App
|
||||||
int index = x + (y * Width);
|
int index = x + (y * Width);
|
||||||
int col = colour.ToArgb();
|
int col = colour.ToArgb();
|
||||||
|
|
||||||
Bits[index] = col & 0x00FFFFFF;
|
Bits[index] = col;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetImage(Bitmap image)
|
public void SetImage(Bitmap image)
|
|
@ -32,62 +32,6 @@ namespace Matrix_App
|
||||||
y /= len;
|
y /= len;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void RgbFromHsl(float h, float s, float l, out float r, out float g, out float b)
|
|
||||||
{
|
|
||||||
var c = (1 - MathF.Abs(2 * l - 1)) * s;
|
|
||||||
var x = c * (1.0f - Math.Abs((h / 60.0f) % 2.0f - 1.0f));
|
|
||||||
var m = l - c * 0.5f;
|
|
||||||
|
|
||||||
if (h < 60) { r = c; g = x; b = 0; }
|
|
||||||
else if (h < 120) { r = x; g = c; b = 0; }
|
|
||||||
else if (h < 180) { r = 0; g = c; b = x; }
|
|
||||||
else if (h < 240) { r = 0; g = x; b = c; }
|
|
||||||
else if (h < 300) { r = x; g = 0; b = c; }
|
|
||||||
else { r = c; g = 0; b = x; }
|
|
||||||
|
|
||||||
r += m;
|
|
||||||
g += m;
|
|
||||||
b += m;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void HslFromRgb(float r, float g, float b, out float h, out float s, out float l)
|
|
||||||
{
|
|
||||||
var cmax = Math.Max(Math.Max(r, g), b);
|
|
||||||
var cmin = Math.Min(Math.Min(r, g), b);
|
|
||||||
|
|
||||||
var delta = cmax - cmin;
|
|
||||||
|
|
||||||
if (delta < 1e-2)
|
|
||||||
{
|
|
||||||
h = 0;
|
|
||||||
}
|
|
||||||
else if (MathF.Abs(cmax - r) < 1e-3)
|
|
||||||
{
|
|
||||||
if (r < b)
|
|
||||||
{
|
|
||||||
h = 360 - MathF.Abs(60 * ((g - b) / delta));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
h = 60 * ((g - b) / delta + 0f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (MathF.Abs(cmax - g) < 1e-3)
|
|
||||||
{
|
|
||||||
h = 60 * ((b - r) / delta + 2f);
|
|
||||||
}
|
|
||||||
else if (MathF.Abs(cmax - b) < 1e-3)
|
|
||||||
{
|
|
||||||
h = 60 * ((r - g) / delta + 4f);
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
h = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
l = (cmax + cmin) * 0.5f;
|
|
||||||
s = (cmax - cmin) / (1 - MathF.Abs(2 * l - 1.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void RgbFromHsv(float h, float s, float v, out float r, out float g, out float b)
|
public static void RgbFromHsv(float h, float s, float v, out float r, out float g, out float b)
|
||||||
{
|
{
|
||||||
var c = v * s;
|
var c = v * s;
|
|
@ -8,7 +8,6 @@
|
||||||
<ApplicationIcon>MatrixIcon.ico</ApplicationIcon>
|
<ApplicationIcon>MatrixIcon.ico</ApplicationIcon>
|
||||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
|
@ -18,9 +17,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Bluetooth" Version="1.0.0.2" />
|
<PackageReference Include="System.IO.Ports" Version="3.1.0" />
|
||||||
<PackageReference Include="System.Drawing.Common" Version="5.0.2" />
|
|
||||||
<PackageReference Include="System.IO.Ports" Version="6.0.0-preview.5.21301.5" />
|
|
||||||
<PackageReference Include="System.Management" Version="5.0.0" />
|
<PackageReference Include="System.Management" Version="5.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
@ -31,21 +28,6 @@
|
||||||
<DependentUpon>Resources.resx</DependentUpon>
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Remove="SplashScreen.Designer.cs" />
|
<Compile Remove="SplashScreen.Designer.cs" />
|
||||||
<Compile Update="forms\MatrixDesigner.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Update="forms\Matrix.cs">
|
|
||||||
<SubType>UserControl</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Update="forms\ColorWheel.cs">
|
|
||||||
<SubType>UserControl</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Update="forms\SplashScreen.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Update="forms\Settings.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</Compile>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -10,8 +10,5 @@
|
||||||
<Compile Update="Matrix.cs">
|
<Compile Update="Matrix.cs">
|
||||||
<SubType>UserControl</SubType>
|
<SubType>UserControl</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Update="SplashScreen.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</Compile>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -1,6 +1,5 @@
|
||||||
using System.IO.Ports;
|
using System.IO.Ports;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace Matrix_App
|
namespace Matrix_App
|
||||||
{
|
{
|
||||||
|
@ -36,7 +35,7 @@ namespace Matrix_App
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MatrixDesignerMain));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MatrixDesignerMain));
|
||||||
this.Ports = new System.Windows.Forms.Button();
|
this.Ports = new System.Windows.Forms.ComboBox();
|
||||||
this.Modus = new System.Windows.Forms.TabControl();
|
this.Modus = new System.Windows.Forms.TabControl();
|
||||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||||
|
@ -83,7 +82,6 @@ namespace Matrix_App
|
||||||
this.DragDropButton = new System.Windows.Forms.Button();
|
this.DragDropButton = new System.Windows.Forms.Button();
|
||||||
matrixView = new Matrix_App.Matrix();
|
matrixView = new Matrix_App.Matrix();
|
||||||
this.panel3 = new System.Windows.Forms.Panel();
|
this.panel3 = new System.Windows.Forms.Panel();
|
||||||
this.PushButton = new Button();
|
|
||||||
this.Modus.SuspendLayout();
|
this.Modus.SuspendLayout();
|
||||||
this.tabPage1.SuspendLayout();
|
this.tabPage1.SuspendLayout();
|
||||||
this.groupBox3.SuspendLayout();
|
this.groupBox3.SuspendLayout();
|
||||||
|
@ -109,19 +107,12 @@ namespace Matrix_App
|
||||||
//
|
//
|
||||||
// Ports
|
// Ports
|
||||||
//
|
//
|
||||||
|
this.Ports.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
this.Ports.Location = new System.Drawing.Point(62, 130);
|
this.Ports.Location = new System.Drawing.Point(62, 130);
|
||||||
this.Ports.Name = "Ports";
|
this.Ports.Name = "Ports";
|
||||||
this.Ports.Size = new System.Drawing.Size(163, 23);
|
this.Ports.Size = new System.Drawing.Size(163, 23);
|
||||||
this.Ports.TabIndex = 0;
|
this.Ports.TabIndex = 0;
|
||||||
this.Ports.Click += PortsOnClick;
|
this.Ports.SelectedIndexChanged += new System.EventHandler(this.Ports_SelectedIndexChanged);
|
||||||
this.Ports.Text = "Settings";
|
|
||||||
//
|
|
||||||
// Push Button
|
|
||||||
//
|
|
||||||
this.PushButton.Location = new Point(3, 481 + 113 + 8);
|
|
||||||
this.PushButton.Size = new Size(216, 23 + 6);
|
|
||||||
this.PushButton.Text = "Push Animation";
|
|
||||||
this.PushButton.Click += PushButtonOnClick;
|
|
||||||
//
|
//
|
||||||
// Modus
|
// Modus
|
||||||
//
|
//
|
||||||
|
@ -354,7 +345,7 @@ namespace Matrix_App
|
||||||
this.matrixHeight.Size = new System.Drawing.Size(163, 23);
|
this.matrixHeight.Size = new System.Drawing.Size(163, 23);
|
||||||
this.matrixHeight.TabIndex = 1;
|
this.matrixHeight.TabIndex = 1;
|
||||||
this.matrixHeight.Value = new decimal(new int[] {
|
this.matrixHeight.Value = new decimal(new int[] {
|
||||||
16,
|
10,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0});
|
0});
|
||||||
|
@ -377,7 +368,7 @@ namespace Matrix_App
|
||||||
this.matrixWidth.Size = new System.Drawing.Size(163, 23);
|
this.matrixWidth.Size = new System.Drawing.Size(163, 23);
|
||||||
this.matrixWidth.TabIndex = 0;
|
this.matrixWidth.TabIndex = 0;
|
||||||
this.matrixWidth.Value = new decimal(new int[] {
|
this.matrixWidth.Value = new decimal(new int[] {
|
||||||
Defaults.MatrixStartWidth,
|
10,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0});
|
0});
|
||||||
|
@ -386,7 +377,6 @@ namespace Matrix_App
|
||||||
// Zeichnen
|
// Zeichnen
|
||||||
//
|
//
|
||||||
this.Zeichnen.BackColor = System.Drawing.Color.Transparent;
|
this.Zeichnen.BackColor = System.Drawing.Color.Transparent;
|
||||||
this.Zeichnen.Controls.Add(this.PushButton);
|
|
||||||
this.Zeichnen.Controls.Add(this.groupBox2);
|
this.Zeichnen.Controls.Add(this.groupBox2);
|
||||||
this.Zeichnen.Controls.Add(this.groupBox1);
|
this.Zeichnen.Controls.Add(this.groupBox1);
|
||||||
this.Zeichnen.Controls.Add(this.Clear);
|
this.Zeichnen.Controls.Add(this.Clear);
|
||||||
|
@ -560,7 +550,6 @@ namespace Matrix_App
|
||||||
this.fill.TabIndex = 7;
|
this.fill.TabIndex = 7;
|
||||||
this.fill.Text = "Fill";
|
this.fill.Text = "Fill";
|
||||||
this.fill.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
this.fill.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
|
|
||||||
this.fill.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
this.fill.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||||
this.fill.UseVisualStyleBackColor = true;
|
this.fill.UseVisualStyleBackColor = true;
|
||||||
this.fill.Click += new System.EventHandler(this.DrawFill_Click);
|
this.fill.Click += new System.EventHandler(this.DrawFill_Click);
|
||||||
|
@ -748,7 +737,7 @@ namespace Matrix_App
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
private System.Windows.Forms.Button Ports;
|
private System.Windows.Forms.ComboBox Ports;
|
||||||
private System.Windows.Forms.TabControl Modus;
|
private System.Windows.Forms.TabControl Modus;
|
||||||
private System.Windows.Forms.TabPage tabPage1;
|
private System.Windows.Forms.TabPage tabPage1;
|
||||||
private System.Windows.Forms.TabPage Zeichnen;
|
private System.Windows.Forms.TabPage Zeichnen;
|
||||||
|
@ -795,7 +784,6 @@ namespace Matrix_App
|
||||||
private System.Windows.Forms.Label label7;
|
private System.Windows.Forms.Label label7;
|
||||||
private System.Windows.Forms.Label label6;
|
private System.Windows.Forms.Label label6;
|
||||||
private System.Windows.Forms.GroupBox groupBox3;
|
private System.Windows.Forms.GroupBox groupBox3;
|
||||||
private System.Windows.Forms.Button PushButton;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,51 +2,52 @@
|
||||||
#define DEBUG_ENABLED
|
#define DEBUG_ENABLED
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Imaging;
|
using System.Linq;
|
||||||
using System.IO;
|
using System.Windows.Forms;
|
||||||
using System.IO.Ports;
|
using System.IO.Ports;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
using System.Windows.Forms;
|
using System.Drawing.Imaging;
|
||||||
using Matrix_App.adds;
|
using System.IO;
|
||||||
using Matrix_App.forms;
|
using System.Management;
|
||||||
using Matrix_App.Properties;
|
using System.Text.RegularExpressions;
|
||||||
using Matrix_App.Themes;
|
|
||||||
using static Matrix_App.Defaults;
|
using static Matrix_App.Defaults;
|
||||||
using static Matrix_App.ArduinoInstruction;
|
using static Matrix_App.ArduinoInstruction;
|
||||||
using static Matrix_App.Utils;
|
using static Matrix_App.Utils;
|
||||||
|
using Matrix_App.Themes;
|
||||||
using Timer = System.Timers.Timer;
|
using Timer = System.Timers.Timer;
|
||||||
|
|
||||||
namespace Matrix_App
|
namespace Matrix_App
|
||||||
{
|
{
|
||||||
public partial class MatrixDesignerMain : Form
|
public partial class MatrixDesignerMain : Form
|
||||||
{
|
{
|
||||||
private void PortsOnClick(object? sender, EventArgs e)
|
|
||||||
{
|
|
||||||
new Settings(ref commandQueue, ref port);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Private-Members
|
#region Private-Members
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Port update Timer
|
/// Port update Timer
|
||||||
/// Reloads available port names at consecutive rates
|
/// Reloads available port names at consecutive rates
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
private Timer? portNameUpdater;
|
||||||
private Timer? delay;
|
private Timer? delay;
|
||||||
|
|
||||||
|
private static SerialPort _port = new SerialPort();
|
||||||
|
|
||||||
|
private uint portNumber;
|
||||||
|
|
||||||
private bool runningGif;
|
private bool runningGif;
|
||||||
|
|
||||||
private static SerialPort port = new();
|
private readonly PortCommandQueue commandQueue = new PortCommandQueue(ref _port);
|
||||||
|
private readonly Regex comRegex = new Regex(@"COM[\d]+");
|
||||||
private PortCommandQueue commandQueue = new(ref port);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gif like frame video buffer
|
/// Gif like frame video buffer
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static byte[][] gifBuffer = CreateImageRGB_NT(MatrixStartWidth, MatrixStartHeight, MatrixStartFrames);
|
public static byte[][] gifBuffer = CreateImageRGB_NT(MatrixStartWidth, MatrixStartHeight, MatrixStartFrames);
|
||||||
|
|
||||||
public static readonly ThreadQueue IMAGE_DRAWER = new("Matrix Image Drawer", 4);
|
public static readonly ThreadQueue IMAGE_DRAWER = new ThreadQueue("Matrix Image Drawer", 4);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -64,12 +65,16 @@ namespace Matrix_App
|
||||||
Init();
|
Init();
|
||||||
// apply light-mode by default
|
// apply light-mode by default
|
||||||
new LightMode().ApplyTheme(this);
|
new LightMode().ApplyTheme(this);
|
||||||
|
|
||||||
Show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Init()
|
private void Init()
|
||||||
{
|
{
|
||||||
|
// Create port name update timer
|
||||||
|
portNameUpdater = new Timer(PortNameUpdateInterval);
|
||||||
|
portNameUpdater.Elapsed += UpdatePortNames;
|
||||||
|
portNameUpdater.AutoReset = true;
|
||||||
|
portNameUpdater.Enabled = true;
|
||||||
|
|
||||||
// create gif playback timer
|
// create gif playback timer
|
||||||
delay = new Timer((int) Delay.Value);
|
delay = new Timer((int) Delay.Value);
|
||||||
delay.Elapsed += Timelineupdate;
|
delay.Elapsed += Timelineupdate;
|
||||||
|
@ -79,42 +84,42 @@ namespace Matrix_App
|
||||||
ZeichnenFarbRad.handler = ColorWheel_Handler!;
|
ZeichnenFarbRad.handler = ColorWheel_Handler!;
|
||||||
|
|
||||||
// setup port settings
|
// setup port settings
|
||||||
port.BaudRate = BaudRate;
|
_port.BaudRate = BaudRate;
|
||||||
port.ReadTimeout = ReadTimeoutMs;
|
_port.ReadTimeout = ReadTimeoutMs;
|
||||||
port.WriteTimeout = WriteTimeoutMs;
|
_port.WriteTimeout = WriteTimeoutMs;
|
||||||
port.Parity = Parity.None;
|
|
||||||
port.DataBits = 8;
|
|
||||||
port.StopBits = StopBits.One;
|
|
||||||
|
|
||||||
// setup matrix
|
// setup matrix
|
||||||
AdjustMatrixTable();
|
AdjustMatrixTable();
|
||||||
|
|
||||||
// search for initial ports
|
// search for initial ports
|
||||||
//GatherPortNames();
|
GatherPortNames();
|
||||||
|
|
||||||
HideEasterEgg();
|
HideEasterEgg();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HideEasterEgg()
|
private void HideEasterEgg()
|
||||||
{
|
{
|
||||||
if (DateTime.Now.DayOfWeek != DayOfWeek.Wednesday)
|
if (((int) DateTime.Now.DayOfWeek) != 3)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (new Random().Next(0, 9) >= 1)
|
if (new Random().Next(0, 9) >= 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
using (Bitmap wednesdayFrog = new(Resources.Frosch))
|
using (Bitmap wednesdayFrog = new Bitmap(Properties.Resources.Frosch))
|
||||||
{
|
{
|
||||||
matrixWidth.Value = wednesdayFrog.Width;
|
matrixWidth.Value = wednesdayFrog.Width;
|
||||||
matrixHeight.Value = wednesdayFrog.Height;
|
matrixHeight.Value = wednesdayFrog.Height;
|
||||||
ResizeGif();
|
ResizeGif();
|
||||||
|
|
||||||
for (var x = 0; x < wednesdayFrog.Width; x++)
|
for (var x = 0; x < wednesdayFrog.Width; x++)
|
||||||
|
{
|
||||||
for (var y = 0; y < wednesdayFrog.Height; y++)
|
for (var y = 0; y < wednesdayFrog.Height; y++)
|
||||||
{
|
{
|
||||||
var pixel = wednesdayFrog.GetPixel(x, y);
|
var pixel = wednesdayFrog.GetPixel(x, y);
|
||||||
|
|
||||||
matrixView.SetPixelNoRefresh(x, y, pixel);
|
matrixView.SetPixelNoRefresh(x, y, pixel);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,18 +131,147 @@ namespace Matrix_App
|
||||||
#region UI-Methods
|
#region UI-Methods
|
||||||
|
|
||||||
#region Port-ComboBox
|
#region Port-ComboBox
|
||||||
|
/// <summary>
|
||||||
|
/// Updates the port names to newest available ports.
|
||||||
|
/// Called by <see cref="portNameUpdater"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="source"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
private void UpdatePortNames(object source, ElapsedEventArgs e)
|
||||||
|
{
|
||||||
|
if (Ports.InvokeRequired)
|
||||||
|
{
|
||||||
|
// invoke on the combo-boxes thread
|
||||||
|
Ports.Invoke(new Action(GatherPortNames));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// run on this thread
|
||||||
|
GatherPortNames();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gathers all available ports and sets them to the combobox <see cref="Ports"/>
|
||||||
|
/// </summary>
|
||||||
|
[SuppressMessage("ReSharper", "CoVariantArrayConversion", Justification = "Never got an exception, so seems to be just fine")]
|
||||||
|
private void GatherPortNames()
|
||||||
|
{
|
||||||
|
var ports = SerialPort.GetPortNames();
|
||||||
|
// save previously selected
|
||||||
|
var selected = this.Ports.SelectedItem;
|
||||||
|
// get device names from ports
|
||||||
|
var newPorts = GetDeviceNames(ports);
|
||||||
|
// add virtual port
|
||||||
|
newPorts.AddLast("Virtual-Unlimited (COM257)");
|
||||||
|
|
||||||
|
// search for new port
|
||||||
|
foreach (var newPort in newPorts)
|
||||||
|
{
|
||||||
|
// find any new port
|
||||||
|
var found = Ports.Items.Cast<object?>().Any(oldPort => (string) oldPort! == newPort);
|
||||||
|
|
||||||
|
// some port wasn't found, recreate list
|
||||||
|
if (!found)
|
||||||
|
{
|
||||||
|
commandQueue.InvalidatePort();
|
||||||
|
|
||||||
|
Ports.Items.Clear();
|
||||||
|
|
||||||
|
Ports.Items.AddRange(newPorts.ToArray()!);
|
||||||
|
|
||||||
|
// select previously selected port if port is still accessible
|
||||||
|
if (selected != null && Ports.Items.Contains(selected))
|
||||||
|
{
|
||||||
|
Ports.SelectedItem = selected;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
Ports.SelectedIndex = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static LinkedList<string> GetDeviceNames(string[] ports)
|
||||||
|
{
|
||||||
|
ManagementClass processClass = new ManagementClass("Win32_PnPEntity");
|
||||||
|
ManagementObjectCollection devicePortNames = processClass.GetInstances();
|
||||||
|
|
||||||
|
var newPorts = new LinkedList<string>();
|
||||||
|
|
||||||
|
foreach (var currentPort in ports)
|
||||||
|
{
|
||||||
|
foreach (var o in devicePortNames)
|
||||||
|
{
|
||||||
|
var name = ((ManagementObject) o).GetPropertyValue("Name");
|
||||||
|
|
||||||
|
if (name == null || !name.ToString()!.Contains(currentPort))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
newPorts.AddLast(name.ToString()!);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return newPorts;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Invoked when the selected port has changed.
|
||||||
|
/// Applies the new port settings.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
private void Ports_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
lock (_port)
|
||||||
|
{
|
||||||
|
if (!_port.IsOpen)
|
||||||
|
{
|
||||||
|
var item = (string)((ComboBox)sender).SelectedItem;
|
||||||
|
if (item != null)
|
||||||
|
{
|
||||||
|
// extract port
|
||||||
|
var matches = comRegex.Matches(item);
|
||||||
|
|
||||||
|
if(matches.Count > 0)
|
||||||
|
{
|
||||||
|
// only select valid port numbers (up to (including) 256)
|
||||||
|
portNumber = UInt32.Parse(matches[0].Value.Split('M')[1]);
|
||||||
|
|
||||||
|
if (portNumber <= 256)
|
||||||
|
{
|
||||||
|
// set valid port
|
||||||
|
_port.PortName = matches[0].Value;
|
||||||
|
commandQueue.ValidatePort();
|
||||||
|
} else if (portNumber == 257)
|
||||||
|
{
|
||||||
|
// virtual mode, increase limitations as no real arduino is connected
|
||||||
|
matrixWidth.Maximum = MatrixLimitedWidth;
|
||||||
|
matrixHeight.Maximum = MatrixLimitedHeight;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
// no port selected reset settings
|
||||||
|
matrixWidth.Maximum = MatrixStartWidth;
|
||||||
|
matrixHeight.Maximum = MatrixStartHeight;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Scale
|
#region Scale
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Applies a new size to the gif and matrix
|
/// Applies a new size to the gif and matrix
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void AdjustMatrixTable()
|
private void AdjustMatrixTable()
|
||||||
{
|
{
|
||||||
var width = (int) matrixWidth.Value;
|
int width = (int)this.matrixWidth.Value;
|
||||||
var height = (int) matrixHeight.Value;
|
int height = (int)this.matrixHeight.Value;
|
||||||
|
|
||||||
matrixView.resize(width, height);
|
matrixView.resize(width, height);
|
||||||
ResizeGif();
|
ResizeGif();
|
||||||
|
@ -149,8 +283,8 @@ namespace Matrix_App
|
||||||
AdjustMatrixTable();
|
AdjustMatrixTable();
|
||||||
commandQueue.EnqueueArduinoCommand(
|
commandQueue.EnqueueArduinoCommand(
|
||||||
OpcodeScale, // opcode
|
OpcodeScale, // opcode
|
||||||
(byte) matrixWidth.Value,
|
(byte)matrixWidth.Value,
|
||||||
(byte) matrixHeight.Value
|
(byte)matrixHeight.Value
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,8 +293,8 @@ namespace Matrix_App
|
||||||
AdjustMatrixTable();
|
AdjustMatrixTable();
|
||||||
commandQueue.EnqueueArduinoCommand(
|
commandQueue.EnqueueArduinoCommand(
|
||||||
OpcodeScale, // opcode
|
OpcodeScale, // opcode
|
||||||
(byte) matrixWidth.Value,
|
(byte)matrixWidth.Value,
|
||||||
(byte) matrixHeight.Value
|
(byte)matrixHeight.Value
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,25 +303,20 @@ namespace Matrix_App
|
||||||
#region Edit/Draw
|
#region Edit/Draw
|
||||||
|
|
||||||
#region TextBoxen
|
#region TextBoxen
|
||||||
|
|
||||||
private void DrawTextBoxRed_KeyUp(object sender, KeyEventArgs e)
|
private void DrawTextBoxRed_KeyUp(object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
if (int.TryParse(ZeichnenTextBoxRed.Text, out var value) && value < 256 && value >= 0)
|
if (int.TryParse(ZeichnenTextBoxRed.Text, out var value) && value < 256 && value >= 0)
|
||||||
{
|
{
|
||||||
ZeichnenTrackBarRed.Value = value;
|
ZeichnenTrackBarRed.Value = value;
|
||||||
ZeichnenFarbRad.setRGB((byte) ZeichnenTrackBarRed.Value, (byte) ZeichnenTrackBarGreen.Value,
|
ZeichnenFarbRad.setRGB((byte)ZeichnenTrackBarRed.Value, (byte)ZeichnenTrackBarGreen.Value, (byte)ZeichnenTrackBarBlue.Value);
|
||||||
(byte) ZeichnenTrackBarBlue.Value);
|
|
||||||
}
|
}
|
||||||
else if (value >= 256)
|
else if (value >= 256)
|
||||||
{
|
{
|
||||||
ZeichnenTrackBarRed.Value = 255;
|
ZeichnenTrackBarRed.Value = 255;
|
||||||
ZeichnenTextBoxRed.Text = @"255";
|
ZeichnenTextBoxRed.Text = @"255";
|
||||||
ZeichnenFarbRad.setRGB((byte) ZeichnenTrackBarRed.Value, (byte) ZeichnenTrackBarGreen.Value,
|
ZeichnenFarbRad.setRGB((byte)ZeichnenTrackBarRed.Value, (byte)ZeichnenTrackBarGreen.Value, (byte)ZeichnenTrackBarBlue.Value);
|
||||||
(byte) ZeichnenTrackBarBlue.Value);
|
|
||||||
}
|
}
|
||||||
|
matrixView.SetPaintColor(Color.FromArgb(ZeichnenTrackBarRed.Value, ZeichnenTrackBarGreen.Value, ZeichnenTrackBarBlue.Value));
|
||||||
matrixView.SetPaintColor(Color.FromArgb(ZeichnenTrackBarRed.Value, ZeichnenTrackBarGreen.Value,
|
|
||||||
ZeichnenTrackBarBlue.Value));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawTextBoxGreen_KeyUp(object sender, KeyEventArgs e)
|
private void DrawTextBoxGreen_KeyUp(object sender, KeyEventArgs e)
|
||||||
|
@ -195,19 +324,16 @@ namespace Matrix_App
|
||||||
if (int.TryParse(ZeichnenTextBoxGreen.Text, out var value) && value < 256 && value >= 0)
|
if (int.TryParse(ZeichnenTextBoxGreen.Text, out var value) && value < 256 && value >= 0)
|
||||||
{
|
{
|
||||||
ZeichnenTrackBarGreen.Value = value;
|
ZeichnenTrackBarGreen.Value = value;
|
||||||
ZeichnenFarbRad.setRGB((byte) ZeichnenTrackBarRed.Value, (byte) ZeichnenTrackBarGreen.Value,
|
ZeichnenFarbRad.setRGB((byte)ZeichnenTrackBarRed.Value, (byte)ZeichnenTrackBarGreen.Value, (byte)ZeichnenTrackBarBlue.Value);
|
||||||
(byte) ZeichnenTrackBarBlue.Value);
|
|
||||||
}
|
}
|
||||||
else if (value >= 256)
|
else if (value >= 256)
|
||||||
{
|
{
|
||||||
ZeichnenTrackBarGreen.Value = 255;
|
ZeichnenTrackBarGreen.Value = 255;
|
||||||
ZeichnenTextBoxGreen.Text = @"255";
|
ZeichnenTextBoxGreen.Text = @"255";
|
||||||
ZeichnenFarbRad.setRGB((byte) ZeichnenTrackBarRed.Value, (byte) ZeichnenTrackBarGreen.Value,
|
ZeichnenFarbRad.setRGB((byte)ZeichnenTrackBarRed.Value, (byte)ZeichnenTrackBarGreen.Value, (byte)ZeichnenTrackBarBlue.Value);
|
||||||
(byte) ZeichnenTrackBarBlue.Value);
|
|
||||||
}
|
}
|
||||||
|
matrixView.SetPaintColor(Color.FromArgb(ZeichnenTrackBarRed.Value, ZeichnenTrackBarGreen.Value, ZeichnenTrackBarBlue.Value));
|
||||||
|
|
||||||
matrixView.SetPaintColor(Color.FromArgb(ZeichnenTrackBarRed.Value, ZeichnenTrackBarGreen.Value,
|
|
||||||
ZeichnenTrackBarBlue.Value));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawTextBoxBlue_KeyUp(object sender, KeyEventArgs e)
|
private void DrawTextBoxBlue_KeyUp(object sender, KeyEventArgs e)
|
||||||
|
@ -215,52 +341,40 @@ namespace Matrix_App
|
||||||
if (int.TryParse(ZeichnenTextBoxBlue.Text, out var value) && value < 256 && value >= 0)
|
if (int.TryParse(ZeichnenTextBoxBlue.Text, out var value) && value < 256 && value >= 0)
|
||||||
{
|
{
|
||||||
ZeichnenTrackBarBlue.Value = value;
|
ZeichnenTrackBarBlue.Value = value;
|
||||||
ZeichnenFarbRad.setRGB((byte) ZeichnenTrackBarRed.Value, (byte) ZeichnenTrackBarGreen.Value,
|
ZeichnenFarbRad.setRGB((byte)ZeichnenTrackBarRed.Value, (byte)ZeichnenTrackBarGreen.Value, (byte)ZeichnenTrackBarBlue.Value);
|
||||||
(byte) ZeichnenTrackBarBlue.Value);
|
|
||||||
}
|
}
|
||||||
else if (value >= 256)
|
else if (value >= 256)
|
||||||
{
|
{
|
||||||
ZeichnenTrackBarBlue.Value = 255;
|
ZeichnenTrackBarBlue.Value = 255;
|
||||||
ZeichnenTextBoxBlue.Text = @"255";
|
ZeichnenTextBoxBlue.Text = @"255";
|
||||||
ZeichnenFarbRad.setRGB((byte) ZeichnenTrackBarRed.Value, (byte) ZeichnenTrackBarGreen.Value,
|
ZeichnenFarbRad.setRGB((byte)ZeichnenTrackBarRed.Value, (byte)ZeichnenTrackBarGreen.Value, (byte)ZeichnenTrackBarBlue.Value);
|
||||||
(byte) ZeichnenTrackBarBlue.Value);
|
|
||||||
}
|
}
|
||||||
|
matrixView.SetPaintColor(Color.FromArgb(ZeichnenTrackBarRed.Value, ZeichnenTrackBarGreen.Value, ZeichnenTrackBarBlue.Value));
|
||||||
|
|
||||||
matrixView.SetPaintColor(Color.FromArgb(ZeichnenTrackBarRed.Value, ZeichnenTrackBarGreen.Value,
|
|
||||||
ZeichnenTrackBarBlue.Value));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region TackBars
|
#region TackBars
|
||||||
|
|
||||||
private void ZeichnenTrackBarRed_Scroll(object sender, EventArgs e)
|
private void ZeichnenTrackBarRed_Scroll(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ZeichnenTextBoxRed.Text = ZeichnenTrackBarRed.Value.ToString();
|
ZeichnenTextBoxRed.Text = ZeichnenTrackBarRed.Value.ToString();
|
||||||
ZeichnenFarbRad.setRGB((byte) ZeichnenTrackBarRed.Value, (byte) ZeichnenTrackBarGreen.Value,
|
ZeichnenFarbRad.setRGB((byte)ZeichnenTrackBarRed.Value, (byte)ZeichnenTrackBarGreen.Value, (byte)ZeichnenTrackBarBlue.Value);
|
||||||
(byte) ZeichnenTrackBarBlue.Value);
|
matrixView.SetPaintColor(Color.FromArgb(ZeichnenTrackBarRed.Value, ZeichnenTrackBarGreen.Value, ZeichnenTrackBarBlue.Value));
|
||||||
matrixView.SetPaintColor(Color.FromArgb(ZeichnenTrackBarRed.Value, ZeichnenTrackBarGreen.Value,
|
|
||||||
ZeichnenTrackBarBlue.Value));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ZeichnenTrackBarGreen_Scroll(object sender, EventArgs e)
|
private void ZeichnenTrackBarGreen_Scroll(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ZeichnenTextBoxGreen.Text = ZeichnenTrackBarGreen.Value.ToString();
|
ZeichnenTextBoxGreen.Text = ZeichnenTrackBarGreen.Value.ToString();
|
||||||
ZeichnenFarbRad.setRGB((byte) ZeichnenTrackBarRed.Value, (byte) ZeichnenTrackBarGreen.Value,
|
ZeichnenFarbRad.setRGB((byte)ZeichnenTrackBarRed.Value, (byte)ZeichnenTrackBarGreen.Value, (byte)ZeichnenTrackBarBlue.Value);
|
||||||
(byte) ZeichnenTrackBarBlue.Value);
|
matrixView.SetPaintColor(Color.FromArgb(ZeichnenTrackBarRed.Value, ZeichnenTrackBarGreen.Value, ZeichnenTrackBarBlue.Value));
|
||||||
matrixView.SetPaintColor(Color.FromArgb(ZeichnenTrackBarRed.Value, ZeichnenTrackBarGreen.Value,
|
|
||||||
ZeichnenTrackBarBlue.Value));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ZeichnenTrackBarBlue_Scroll(object sender, EventArgs e)
|
private void ZeichnenTrackBarBlue_Scroll(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ZeichnenTextBoxBlue.Text = ZeichnenTrackBarBlue.Value.ToString();
|
ZeichnenTextBoxBlue.Text = ZeichnenTrackBarBlue.Value.ToString();
|
||||||
ZeichnenFarbRad.setRGB((byte) ZeichnenTrackBarRed.Value, (byte) ZeichnenTrackBarGreen.Value,
|
ZeichnenFarbRad.setRGB((byte)ZeichnenTrackBarRed.Value, (byte)ZeichnenTrackBarGreen.Value, (byte)ZeichnenTrackBarBlue.Value);
|
||||||
(byte) ZeichnenTrackBarBlue.Value);
|
matrixView.SetPaintColor(Color.FromArgb(ZeichnenTrackBarRed.Value, ZeichnenTrackBarGreen.Value, ZeichnenTrackBarBlue.Value));
|
||||||
matrixView.SetPaintColor(Color.FromArgb(ZeichnenTrackBarRed.Value, ZeichnenTrackBarGreen.Value,
|
|
||||||
ZeichnenTrackBarBlue.Value));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -295,8 +409,7 @@ namespace Matrix_App
|
||||||
ZeichnenTextBoxGreen.Text = ZeichnenFarbRad.getGreen().ToString();
|
ZeichnenTextBoxGreen.Text = ZeichnenFarbRad.getGreen().ToString();
|
||||||
ZeichnenTextBoxBlue.Text = ZeichnenFarbRad.getBlue().ToString();
|
ZeichnenTextBoxBlue.Text = ZeichnenFarbRad.getBlue().ToString();
|
||||||
|
|
||||||
matrixView.SetPaintColor(Color.FromArgb(ZeichnenTrackBarRed.Value, ZeichnenTrackBarGreen.Value,
|
matrixView.SetPaintColor(Color.FromArgb(ZeichnenTrackBarRed.Value, ZeichnenTrackBarGreen.Value, ZeichnenTrackBarBlue.Value));
|
||||||
ZeichnenTrackBarBlue.Value));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -306,16 +419,15 @@ namespace Matrix_App
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void DrawFill_Click(object sender, EventArgs e)
|
private void DrawFill_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var color = Color.FromArgb(ZeichnenTrackBarRed.Value, ZeichnenTrackBarGreen.Value,
|
var color = Color.FromArgb(ZeichnenTrackBarRed.Value, ZeichnenTrackBarGreen.Value, ZeichnenTrackBarBlue.Value);
|
||||||
ZeichnenTrackBarBlue.Value);
|
|
||||||
matrixView.SetPaintColor(color);
|
matrixView.SetPaintColor(color);
|
||||||
matrixView.Fill(color);
|
matrixView.Fill(color);
|
||||||
|
|
||||||
commandQueue.EnqueueArduinoCommand(
|
commandQueue.EnqueueArduinoCommand(
|
||||||
OpcodeFill, // Opcode
|
OpcodeFill, // Opcode
|
||||||
(byte) ZeichnenTrackBarRed.Value, // Red
|
(byte)ZeichnenTrackBarRed.Value, // Red
|
||||||
(byte) ZeichnenTrackBarGreen.Value, // Green
|
(byte)ZeichnenTrackBarGreen.Value,// Green
|
||||||
(byte) ZeichnenTrackBarBlue.Value // Blue
|
(byte)ZeichnenTrackBarBlue.Value // Blue
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -347,7 +459,7 @@ namespace Matrix_App
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void DragDrop_Click(object sender, EventArgs e)
|
private void DragDrop_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
using OpenFileDialog openFileDialog = new()
|
using OpenFileDialog openFileDialog = new OpenFileDialog
|
||||||
{
|
{
|
||||||
InitialDirectory = "c:\\",
|
InitialDirectory = "c:\\",
|
||||||
Filter = @"image files (*.PNG;*.JPG;*.GIF)|*.*",
|
Filter = @"image files (*.PNG;*.JPG;*.GIF)|*.*",
|
||||||
|
@ -378,9 +490,9 @@ namespace Matrix_App
|
||||||
var frames = Math.Min(gif.GetFrameCount(FrameDimension.Time), 120);
|
var frames = Math.Min(gif.GetFrameCount(FrameDimension.Time), 120);
|
||||||
|
|
||||||
if (gif.GetFrameCount(FrameDimension.Time) > 120)
|
if (gif.GetFrameCount(FrameDimension.Time) > 120)
|
||||||
MessageBox.Show(
|
{
|
||||||
@"Das Gif ist zu Groß. Die Maximalgröße sind 120 Frames. Das Gif wird abgeschnitten sein, damit es in die Maximalgröße passt.",
|
MessageBox.Show(@"Das Gif ist zu Groß. Die Maximalgröße sind 120 Frames. Das Gif wird abgeschnitten sein, damit es in die Maximalgröße passt.", @"Gif to large");
|
||||||
@"Gif to large");
|
}
|
||||||
|
|
||||||
FrameCount.Value = frames;
|
FrameCount.Value = frames;
|
||||||
Timeline.Maximum = frames - 1;
|
Timeline.Maximum = frames - 1;
|
||||||
|
@ -397,6 +509,7 @@ namespace Matrix_App
|
||||||
|
|
||||||
// fetch each pixel and store
|
// fetch each pixel and store
|
||||||
for (var x = 0; x < bitmap.Width; x++)
|
for (var x = 0; x < bitmap.Width; x++)
|
||||||
|
{
|
||||||
for (var y = 0; y < bitmap.Height; y++)
|
for (var y = 0; y < bitmap.Height; y++)
|
||||||
{
|
{
|
||||||
var pixel = bitmap.GetPixel(x, y);
|
var pixel = bitmap.GetPixel(x, y);
|
||||||
|
@ -405,33 +518,37 @@ namespace Matrix_App
|
||||||
|
|
||||||
matrixView.SetPixelNoRefresh(x, y, pixel);
|
matrixView.SetPixelNoRefresh(x, y, pixel);
|
||||||
|
|
||||||
gifBuffer[i][index * 3 + 0] = pixel.R;
|
gifBuffer[i][index * 3] = pixel.G;
|
||||||
gifBuffer[i][index * 3 + 1] = pixel.G;
|
gifBuffer[i][index * 3 + 1] = pixel.R;
|
||||||
gifBuffer[i][index * 3 + 2] = pixel.B;
|
gifBuffer[i][index * 3 + 2] = pixel.B;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
matrixView.Refresh();
|
matrixView.Refresh();
|
||||||
Timeline.Value = 0;
|
Timeline.Value = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Bitmap bitmap = ResizeImage(new Bitmap(filePath), matrixView.matrixWidth(), matrixView.matrixHeight());
|
Bitmap bitmap = new Bitmap(filePath);
|
||||||
|
bitmap = ResizeImage(bitmap, matrixView.matrixWidth(), matrixView.matrixHeight());
|
||||||
matrixView.SetImage(bitmap);
|
matrixView.SetImage(bitmap);
|
||||||
|
|
||||||
for (var x = 0; x < bitmap.Width; x++)
|
|
||||||
for (var y = 0; y < bitmap.Height; y++)
|
for (int x = 0; x < bitmap.Width; x++)
|
||||||
|
{
|
||||||
|
for (int y = 0; y < bitmap.Height; y++)
|
||||||
{
|
{
|
||||||
var pixel = bitmap.GetPixel(x, y);
|
var pixel = bitmap.GetPixel(x, y);
|
||||||
|
|
||||||
var index = x + y * bitmap.Width;
|
int index = x + y * bitmap.Width;
|
||||||
|
|
||||||
gifBuffer[Timeline.Value][index * 3 + 0] = pixel.R;
|
gifBuffer[Timeline.Value][index * 3] = pixel.G;
|
||||||
gifBuffer[Timeline.Value][index * 3 + 1] = pixel.G;
|
gifBuffer[Timeline.Value][index * 3 + 1] = pixel.R;
|
||||||
gifBuffer[Timeline.Value][index * 3 + 2] = pixel.B;
|
gifBuffer[Timeline.Value][index * 3 + 2] = pixel.B;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
WriteImage(gifBuffer[Timeline.Value]);
|
WriteImage(gifBuffer[Timeline.Value]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -445,11 +562,10 @@ namespace Matrix_App
|
||||||
|
|
||||||
private void DragDrop_DragDrop(object sender, DragEventArgs e)
|
private void DragDrop_DragDrop(object sender, DragEventArgs e)
|
||||||
{
|
{
|
||||||
string[] picturePath = (string[]) e.Data.GetData(DataFormats.FileDrop);
|
string[] picturePath = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||||
|
|
||||||
LoadFromFile(picturePath[0]);
|
LoadFromFile(picturePath[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Timeline
|
#region Timeline
|
||||||
|
@ -462,7 +578,7 @@ namespace Matrix_App
|
||||||
|
|
||||||
public int GetDelayTime()
|
public int GetDelayTime()
|
||||||
{
|
{
|
||||||
return (int) Delay.Value;
|
return (int)Delay.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FrameCount_ValueChanged(object sender, EventArgs e)
|
private void FrameCount_ValueChanged(object sender, EventArgs e)
|
||||||
|
@ -476,7 +592,7 @@ namespace Matrix_App
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Timeline.Enabled = true;
|
Timeline.Enabled = true;
|
||||||
Timeline.Maximum = (int) FrameCount.Value - 1;
|
Timeline.Maximum = (int)FrameCount.Value - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -484,13 +600,36 @@ namespace Matrix_App
|
||||||
{
|
{
|
||||||
var timeFrame = Timeline.Value;
|
var timeFrame = Timeline.Value;
|
||||||
|
|
||||||
|
IMAGE_DRAWER.Enqueue(() =>
|
||||||
|
{
|
||||||
WriteImage(gifBuffer[timeFrame]);
|
WriteImage(gifBuffer[timeFrame]);
|
||||||
|
|
||||||
|
var width = matrixView.matrixWidth();
|
||||||
|
var height = matrixView.matrixHeight();
|
||||||
|
|
||||||
lock (matrixView)
|
lock (matrixView)
|
||||||
{
|
{
|
||||||
matrixView.SetImage(gifBuffer[timeFrame]);
|
for (var y = 0; y < height; y++)
|
||||||
|
{
|
||||||
|
var index = y * width;
|
||||||
|
|
||||||
|
for (var x = 0; x < width; x++)
|
||||||
|
{
|
||||||
|
var tmp = (index + x) * 3;
|
||||||
|
|
||||||
|
var color = Color.FromArgb(gifBuffer[timeFrame][tmp + 1], gifBuffer[timeFrame][tmp], gifBuffer[timeFrame][tmp + 2]);
|
||||||
|
|
||||||
|
matrixView.SetPixelNoRefresh(x, y, color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
matrixView.Refresh();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
matrixView.Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stores the current matrix at the index noted by the timeline into the Gif
|
/// Stores the current matrix at the index noted by the timeline into the Gif
|
||||||
|
@ -499,38 +638,44 @@ namespace Matrix_App
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void Apply_Click(object sender, EventArgs e)
|
private void Apply_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var width = matrixView.matrixWidth();
|
int width = matrixView.matrixWidth();
|
||||||
var height = matrixView.matrixHeight();
|
int height = matrixView.matrixHeight();
|
||||||
|
|
||||||
for (var y = 0; y < height; y++)
|
for (int y = 0; y < height; y++)
|
||||||
{
|
{
|
||||||
var i = y * width;
|
int i = y * width;
|
||||||
|
|
||||||
for (var x = 0; x < width; x++)
|
for (int x = 0; x < width; x++)
|
||||||
{
|
{
|
||||||
var tmp = (i + x) * 3;
|
int tmp = (i + x) * 3;
|
||||||
|
|
||||||
var color = matrixView.GetPixel(x, y);
|
var color = matrixView.GetPixel(x, y);
|
||||||
|
|
||||||
gifBuffer[Timeline.Value][tmp + 0] = color.R;
|
gifBuffer[Timeline.Value][tmp] = color.G;
|
||||||
gifBuffer[Timeline.Value][tmp + 1] = color.G;
|
gifBuffer[Timeline.Value][tmp + 1] = color.R;
|
||||||
gifBuffer[Timeline.Value][tmp + 2] = color.B;
|
gifBuffer[Timeline.Value][tmp + 2] = color.B;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Timelineupdate(object source, ElapsedEventArgs e)
|
private void Timelineupdate(Object source, ElapsedEventArgs e)
|
||||||
{
|
{
|
||||||
if (Timeline.InvokeRequired)
|
if (Timeline.InvokeRequired)
|
||||||
|
{
|
||||||
// invoke on the combo-boxes thread
|
// invoke on the combo-boxes thread
|
||||||
Timeline.Invoke(new Action(() =>
|
Timeline.Invoke(new Action(() =>
|
||||||
{
|
{
|
||||||
if (Timeline.Value < Timeline.Maximum)
|
if (Timeline.Value < Timeline.Maximum)
|
||||||
|
{
|
||||||
Timeline.Value = Timeline.Value + 1;
|
Timeline.Value = Timeline.Value + 1;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
Timeline.Value = 0;
|
Timeline.Value = 0;
|
||||||
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Starts playing the timeline
|
/// Starts playing the timeline
|
||||||
|
@ -551,11 +696,11 @@ namespace Matrix_App
|
||||||
if (delay != null)
|
if (delay != null)
|
||||||
delay.Enabled = true;
|
delay.Enabled = true;
|
||||||
|
|
||||||
Play.Image = new Bitmap(Resources.Stop);
|
Play.Image = new Bitmap(Properties.Resources.Stop);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Play.Image = new Bitmap(Resources.Play);
|
Play.Image = new Bitmap(Properties.Resources.Play);
|
||||||
Play.Text = @"Play";
|
Play.Text = @"Play";
|
||||||
runningGif = false;
|
runningGif = false;
|
||||||
|
|
||||||
|
@ -567,14 +712,16 @@ namespace Matrix_App
|
||||||
|
|
||||||
private void Timeline_MouseDown(object sender, MouseEventArgs e)
|
private void Timeline_MouseDown(object sender, MouseEventArgs e)
|
||||||
{
|
{
|
||||||
if (!runningGif) return;
|
if (runningGif)
|
||||||
Play.Image = new Bitmap(Resources.Play);
|
{
|
||||||
|
Play.Image = new Bitmap(Properties.Resources.Play);
|
||||||
Play.Text = @"Play";
|
Play.Text = @"Play";
|
||||||
runningGif = false;
|
runningGif = false;
|
||||||
|
|
||||||
if (delay != null)
|
if (delay != null)
|
||||||
delay.Enabled = false;
|
delay.Enabled = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void Delay_ValueChanged(object sender, EventArgs _)
|
private void Delay_ValueChanged(object sender, EventArgs _)
|
||||||
{
|
{
|
||||||
|
@ -588,7 +735,7 @@ namespace Matrix_App
|
||||||
|
|
||||||
private void Save_Click(object sender, EventArgs e)
|
private void Save_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SaveFileDialog save = new()
|
SaveFileDialog save = new SaveFileDialog
|
||||||
{
|
{
|
||||||
InitialDirectory = "c:\\",
|
InitialDirectory = "c:\\",
|
||||||
Filter = @"image files (*.PNG;*.JPG;*.GIF)|*.*",
|
Filter = @"image files (*.PNG;*.JPG;*.GIF)|*.*",
|
||||||
|
@ -600,23 +747,20 @@ namespace Matrix_App
|
||||||
{
|
{
|
||||||
string filePath = save.FileName;
|
string filePath = save.FileName;
|
||||||
Bitmap[] gifBitmap = new Bitmap[gifBuffer.Length];
|
Bitmap[] gifBitmap = new Bitmap[gifBuffer.Length];
|
||||||
GifWriter writer = new(File.Create(filePath));
|
GifWriter writer = new GifWriter(File.Create(filePath));
|
||||||
for (var i = 0; i < FrameCount.Value; i++)
|
for (var i = 0; i < FrameCount.Value; i++)
|
||||||
{
|
{
|
||||||
gifBitmap[i] = new Bitmap((int) matrixWidth.Value, (int) matrixHeight.Value);
|
gifBitmap[i] = new Bitmap((int)matrixWidth.Value, (int)matrixHeight.Value);
|
||||||
|
|
||||||
for (var j = 0; j < gifBuffer[i].Length / 3; j++)
|
for (var j = 0; j < gifBuffer[i].Length / 3; j++)
|
||||||
{
|
{
|
||||||
var y = j / (int) matrixWidth.Value;
|
var y = j / (int)matrixWidth.Value;
|
||||||
var x = j % (int) matrixWidth.Value;
|
var x = j % (int)matrixWidth.Value;
|
||||||
|
|
||||||
gifBitmap[i].SetPixel(x, y,
|
gifBitmap[i].SetPixel(x, y, Color.FromArgb(gifBuffer[i][j * 3 + 1], gifBuffer[i][j * 3], gifBuffer[i][j * 3 + 2]));
|
||||||
Color.FromArgb(gifBuffer[i][j * 3], gifBuffer[i][j * 3 + 1], gifBuffer[i][j * 3 + 2]));
|
|
||||||
}
|
}
|
||||||
|
writer.WriteFrame(gifBitmap[i], (int)Delay.Value);
|
||||||
writer.WriteFrame(gifBitmap[i], (int) Delay.Value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
writer.Dispose();
|
writer.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -624,7 +768,7 @@ namespace Matrix_App
|
||||||
private void ConfigButton_Click(object sender, EventArgs e)
|
private void ConfigButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
commandQueue.EnqueueArduinoCommand(4);
|
commandQueue.EnqueueArduinoCommand(4);
|
||||||
PortCommandQueue.WaitForLastDequeue();
|
commandQueue.WaitForLastDequeue();
|
||||||
byte[] data = commandQueue.GetLastData();
|
byte[] data = commandQueue.GetLastData();
|
||||||
|
|
||||||
if (commandQueue.GetMark() > 0)
|
if (commandQueue.GetMark() > 0)
|
||||||
|
@ -632,25 +776,13 @@ namespace Matrix_App
|
||||||
int width = data[0];
|
int width = data[0];
|
||||||
int height = data[1];
|
int height = data[1];
|
||||||
|
|
||||||
matrixWidth.Value = width;
|
this.matrixWidth.Value = width;
|
||||||
matrixHeight.Value = height;
|
this.matrixHeight.Value = height;
|
||||||
|
|
||||||
for (var y = 0; y < height; y++)
|
for (var x = 0; x < width * height * 3; x++)
|
||||||
for (var x = 0; x < width; x++)
|
|
||||||
{
|
{
|
||||||
var i0 = x * 3 + y * width * 3;
|
gifBuffer[0][x] = data[2 + x];
|
||||||
|
|
||||||
var x1 = height - y - 1;
|
|
||||||
var y1 = width - x - 1;
|
|
||||||
|
|
||||||
var i1 = x1 * 3 + y1 * width * 3;
|
|
||||||
|
|
||||||
// degamma
|
|
||||||
gifBuffer[0][i0 + 0] = (byte) MathF.Sqrt(data[i1 + 0 + 2] / 258.0f * 65536.0f);
|
|
||||||
gifBuffer[0][i0 + 1] = (byte) MathF.Sqrt(data[i1 + 1 + 2] / 258.0f * 65536.0f);
|
|
||||||
gifBuffer[0][i0 + 2] = (byte) MathF.Sqrt(data[i1 + 2 + 2] / 258.0f * 65536.0f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Timeline.Value = 1;
|
Timeline.Value = 1;
|
||||||
Timeline.Value = 0;
|
Timeline.Value = 0;
|
||||||
}
|
}
|
||||||
|
@ -672,11 +804,13 @@ namespace Matrix_App
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void ResizeGif()
|
private void ResizeGif()
|
||||||
{
|
{
|
||||||
var frames = (int) FrameCount.Value;
|
int frames = (int)FrameCount.Value;
|
||||||
gifBuffer = new byte[frames + 1][];
|
gifBuffer = new byte[frames + 1][];
|
||||||
for (var i = 0; i <= frames; i++)
|
for (int i = 0; i <= frames; i++)
|
||||||
|
{
|
||||||
gifBuffer[i] = new byte[matrixView.matrixWidth() * matrixView.matrixHeight() * 3];
|
gifBuffer[i] = new byte[matrixView.matrixWidth() * matrixView.matrixHeight() * 3];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -700,31 +834,7 @@ namespace Matrix_App
|
||||||
|
|
||||||
private void WriteImage(byte[] rgbImageData)
|
private void WriteImage(byte[] rgbImageData)
|
||||||
{
|
{
|
||||||
var gammaImage = new byte[rgbImageData.Length];
|
commandQueue.EnqueueArduinoCommand(OpcodeImage, rgbImageData);
|
||||||
|
|
||||||
var width = matrixView.matrixWidth();
|
|
||||||
var height = matrixView.matrixHeight();
|
|
||||||
|
|
||||||
for (var y = 0; y < height; y++)
|
|
||||||
for (var x = 0; x < width; x++)
|
|
||||||
{
|
|
||||||
var i0 = x * 3 + y * width * 3;
|
|
||||||
|
|
||||||
;
|
|
||||||
var x1 = height - y - 1;
|
|
||||||
var y1 = width - x - 1;
|
|
||||||
|
|
||||||
var i1 = x1 * 3 + y1 * width * 3;
|
|
||||||
|
|
||||||
gammaImage[i0 + 0] = rgbImageData[i1 + 0];
|
|
||||||
gammaImage[i0 + 1] = rgbImageData[i1 + 1];
|
|
||||||
gammaImage[i0 + 2] = rgbImageData[i1 + 2];
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var i = 0; i < rgbImageData.Length; i++)
|
|
||||||
gammaImage[i] = (byte) ((gammaImage[i] * gammaImage[i] * 258) >> 16);
|
|
||||||
|
|
||||||
commandQueue.EnqueueArduinoCommand(OpcodeImage, gammaImage);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -736,38 +846,16 @@ namespace Matrix_App
|
||||||
|
|
||||||
byte[] image = new byte[pixels.Length * 3];
|
byte[] image = new byte[pixels.Length * 3];
|
||||||
|
|
||||||
for (var x = 0; x < pixels.Length; x++)
|
for (int x = 0; x < pixels.Length; x++)
|
||||||
{
|
{
|
||||||
image[x * 3 + 0] = (byte) ((pixels[x] >> 16) & 0xFF);
|
image[x * 3] = (byte)(pixels[x] >> 8 & 0xFF);
|
||||||
image[x * 3 + 1] = (byte) ((pixels[x] >> 8) & 0xFF);
|
image[x * 3 + 1] = (byte)(pixels[x] >> 16 & 0xFF);
|
||||||
image[x * 3 + 2] = (byte) ((pixels[x] >> 0) & 0xFF);
|
image[x * 3 + 2] = (byte)(pixels[x] & 0xFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteImage(image);
|
WriteImage(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private void PushButtonOnClick(object? sender, EventArgs e)
|
|
||||||
{
|
|
||||||
var bytes = matrixWidth.Value * matrixHeight.Value * 3 * gifBuffer.Length + 5;
|
|
||||||
var data = new byte[(int) bytes];
|
|
||||||
|
|
||||||
data[0] = (byte) matrixWidth.Value;
|
|
||||||
data[1] = (byte) matrixHeight.Value;
|
|
||||||
data[2] = (byte) gifBuffer.Length;
|
|
||||||
data[3] = (byte) ((int) Delay.Value >> 8);
|
|
||||||
data[4] = (byte) ((int) Delay.Value & 0xFF);
|
|
||||||
|
|
||||||
for (var frame = 0; frame < gifBuffer.Length; frame++)
|
|
||||||
{
|
|
||||||
for (var pixel = 0; pixel < gifBuffer[0].Length; pixel++)
|
|
||||||
{
|
|
||||||
data[frame * gifBuffer[0].Length + pixel + 5] = (byte) (gifBuffer[frame][pixel] * gifBuffer[frame][pixel] * 258 >> 16);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
commandQueue.EnqueueArduinoCommand(OpcodePush, data);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -4,7 +4,6 @@ using System.Drawing;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Matrix_App.minecraft;
|
|
||||||
using Matrix_App.PregeneratedMods.reflection;
|
using Matrix_App.PregeneratedMods.reflection;
|
||||||
using static Matrix_App.Utils;
|
using static Matrix_App.Utils;
|
||||||
using static Matrix_App.Defaults;
|
using static Matrix_App.Defaults;
|
||||||
|
@ -24,9 +23,7 @@ namespace Matrix_App
|
||||||
new Boxblur(),
|
new Boxblur(),
|
||||||
new ColorAdjust(),
|
new ColorAdjust(),
|
||||||
new Grayscale(),
|
new Grayscale(),
|
||||||
new Invert(),
|
new Invert()
|
||||||
new Transfom(),
|
|
||||||
new Minecraft()
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Static generator accessible members
|
// Static generator accessible members
|
||||||
|
@ -80,8 +77,6 @@ namespace Matrix_App
|
||||||
_playbackFrame++;
|
_playbackFrame++;
|
||||||
}
|
}
|
||||||
|
|
||||||
public delegate void update();
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Colors a single fragment at the specified pixel location (x|y) at frame frame.
|
/// Colors a single fragment at the specified pixel location (x|y) at frame frame.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -95,8 +90,6 @@ namespace Matrix_App
|
||||||
/// <param name="b">Pixel Blue value in range [0, 1] (saturated)</param>
|
/// <param name="b">Pixel Blue value in range [0, 1] (saturated)</param>
|
||||||
protected abstract void ColorFragment(in int x, in int y, in float u, in float v, in int frame, out float r, out float g, out float b);
|
protected abstract void ColorFragment(in int x, in int y, in float u, in float v, in int frame, out float r, out float g, out float b);
|
||||||
|
|
||||||
protected abstract void CreateUi(FlowLayoutPanel anchor, update runner);
|
|
||||||
|
|
||||||
// Buffer to store generator result in
|
// Buffer to store generator result in
|
||||||
private static byte[][] _animationBuffer = null!;
|
private static byte[][] _animationBuffer = null!;
|
||||||
|
|
||||||
|
@ -114,21 +107,13 @@ namespace Matrix_App
|
||||||
// generate button
|
// generate button
|
||||||
var button = new Button
|
var button = new Button
|
||||||
{
|
{
|
||||||
AutoSize = true,
|
Width = 215,
|
||||||
Text = FieldWidgets.GetBetterFieldName(generator.GetType().Name)
|
Text = FieldWidgets.GetBetterFieldName(generator.GetType().Name)
|
||||||
};
|
};
|
||||||
button.Width = anchor.ClientSize.Width - button.Margin.Right - button.Margin.Left;
|
button.Click += (sender, e) => OpenGeneratorUi(generator, matrix);
|
||||||
button.Click += (sender, e) =>
|
|
||||||
{
|
|
||||||
lock (matrix)
|
|
||||||
{
|
|
||||||
OpenGeneratorUi(generator, matrix);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
button.Image = CreateSnapshot(generator);
|
button.Image = CreateSnapshot(generator);
|
||||||
button.TextImageRelation = TextImageRelation.ImageBeforeText;
|
button.TextImageRelation = TextImageRelation.ImageBeforeText;
|
||||||
button.TextAlign = ContentAlignment.MiddleRight;
|
button.Height = FilterPreviewHeight * 3 / 2;
|
||||||
button.ImageAlign = ContentAlignment.MiddleLeft;
|
|
||||||
|
|
||||||
anchor.Controls.Add(button);
|
anchor.Controls.Add(button);
|
||||||
}
|
}
|
||||||
|
@ -180,7 +165,7 @@ namespace Matrix_App
|
||||||
@"Filter incomplete", MessageBoxButtons.YesNo, MessageBoxIcon.Warning))
|
@"Filter incomplete", MessageBoxButtons.YesNo, MessageBoxIcon.Warning))
|
||||||
{
|
{
|
||||||
BlockBuffer();
|
BlockBuffer();
|
||||||
ColorStore(_animationBuffer, MatrixDesignerMain.gifBuffer);
|
FlipColorStoreRG_GR(_animationBuffer, MatrixDesignerMain.gifBuffer);
|
||||||
_form.ResetTimeline();
|
_form.ResetTimeline();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -190,7 +175,7 @@ namespace Matrix_App
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ColorStore(_animationBuffer, MatrixDesignerMain.gifBuffer);
|
FlipColorStoreRG_GR(_animationBuffer, MatrixDesignerMain.gifBuffer);
|
||||||
_form.ResetTimeline();
|
_form.ResetTimeline();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -219,8 +204,8 @@ namespace Matrix_App
|
||||||
|
|
||||||
Form prompt = new Form
|
Form prompt = new Form
|
||||||
{
|
{
|
||||||
AutoSize = true,
|
Width = 500,
|
||||||
AutoSizeMode = AutoSizeMode.GrowOnly,
|
Height = 320,
|
||||||
Text = @"Vorgenerierter Modus: " + _generator.GetType().Name
|
Text = @"Vorgenerierter Modus: " + _generator.GetType().Name
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -232,16 +217,13 @@ namespace Matrix_App
|
||||||
|
|
||||||
FlowLayoutPanel controlPanel = new FlowLayoutPanel
|
FlowLayoutPanel controlPanel = new FlowLayoutPanel
|
||||||
{
|
{
|
||||||
Anchor = AnchorStyles.Bottom | AnchorStyles.Left,
|
Anchor = AnchorStyles.Top | AnchorStyles.Left,
|
||||||
FlowDirection = FlowDirection.BottomUp,
|
FlowDirection = FlowDirection.BottomUp,
|
||||||
Dock = DockStyle.Fill,
|
Dock = DockStyle.Top,
|
||||||
WrapContents = false,
|
WrapContents = false,
|
||||||
AutoSizeMode = AutoSizeMode.GrowOnly,
|
|
||||||
AutoSize = true
|
AutoSize = true
|
||||||
};
|
};
|
||||||
|
|
||||||
_generator.CreateUi(controlPanel, InvokeGenerator);
|
|
||||||
|
|
||||||
PlaybackTimer.Interval = _form.GetDelayTime();
|
PlaybackTimer.Interval = _form.GetDelayTime();
|
||||||
PlaybackTimer.Enabled = true;
|
PlaybackTimer.Enabled = true;
|
||||||
|
|
||||||
|
@ -276,9 +258,9 @@ namespace Matrix_App
|
||||||
prompt.MinimumSize = prompt.Size;
|
prompt.MinimumSize = prompt.Size;
|
||||||
prompt.Controls.Add(controlPanel);
|
prompt.Controls.Add(controlPanel);
|
||||||
prompt.Controls.Add(southPane);
|
prompt.Controls.Add(southPane);
|
||||||
prompt.MaximizeBox = false;
|
prompt.Height = southPane.Height * 2 + controlPanel.Height + 16;
|
||||||
prompt.FormBorderStyle = FormBorderStyle.FixedDialog;
|
prompt.FormBorderStyle = FormBorderStyle.FixedDialog;
|
||||||
prompt.StartPosition = FormStartPosition.CenterScreen;
|
prompt.MaximizeBox = false;
|
||||||
prompt.ShowDialog();
|
prompt.ShowDialog();
|
||||||
|
|
||||||
PlaybackTimer.Enabled = false;
|
PlaybackTimer.Enabled = false;
|
||||||
|
@ -290,7 +272,7 @@ namespace Matrix_App
|
||||||
{
|
{
|
||||||
// Create new initial buffer and copy what ever was in the Gif buffer to it
|
// Create new initial buffer and copy what ever was in the Gif buffer to it
|
||||||
_initialBuffer = CreateImageRGB_NT(matrix.matrixWidth(), matrix.matrixHeight(), MatrixDesignerMain.gifBuffer.Length);
|
_initialBuffer = CreateImageRGB_NT(matrix.matrixWidth(), matrix.matrixHeight(), MatrixDesignerMain.gifBuffer.Length);
|
||||||
ColorStore(MatrixDesignerMain.gifBuffer, _initialBuffer);
|
FlipColorStoreRG_GR(MatrixDesignerMain.gifBuffer, _initialBuffer);
|
||||||
// Set Generator args
|
// Set Generator args
|
||||||
SetGlobalArgs(matrix.matrixWidth(),
|
SetGlobalArgs(matrix.matrixWidth(),
|
||||||
matrix.matrixHeight(),
|
matrix.matrixHeight(),
|
||||||
|
@ -318,9 +300,8 @@ namespace Matrix_App
|
||||||
{
|
{
|
||||||
BorderStyle = BorderStyle.Fixed3D,
|
BorderStyle = BorderStyle.Fixed3D,
|
||||||
AutoSize = false,
|
AutoSize = false,
|
||||||
Dock = DockStyle.Fill,
|
|
||||||
Anchor = AnchorStyles.Top | AnchorStyles.Left,
|
|
||||||
Height = lineHeight,
|
Height = lineHeight,
|
||||||
|
Width = 500
|
||||||
};
|
};
|
||||||
|
|
||||||
controlPanel.Controls.Add(divider);
|
controlPanel.Controls.Add(divider);
|
||||||
|
@ -334,11 +315,11 @@ namespace Matrix_App
|
||||||
{
|
{
|
||||||
for (var x = 0; x < width; x++)
|
for (var x = 0; x < width; x++)
|
||||||
{
|
{
|
||||||
var u = x / (float) width;
|
var u = x / (float)width;
|
||||||
|
|
||||||
for (var y = 0; y < height; y++)
|
for (var y = 0; y < height; y++)
|
||||||
{
|
{
|
||||||
var v = y / (float) height;
|
var v = y / (float)height;
|
||||||
|
|
||||||
_generator!.ColorFragment(x, y, u, v, frame, out var r, out var g, out var b);
|
_generator!.ColorFragment(x, y, u, v, frame, out var r, out var g, out var b);
|
||||||
|
|
|
@ -0,0 +1,182 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Ports;
|
||||||
|
using System.Security.Permissions;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
|
using static Matrix_App.Defaults;
|
||||||
|
|
||||||
|
namespace Matrix_App
|
||||||
|
{
|
||||||
|
public class PortCommandQueue
|
||||||
|
{
|
||||||
|
private const string threadDeliverName = "Arduino Port Deliver Thread";
|
||||||
|
|
||||||
|
private Queue<byte[]> byteWriteQueue = new Queue<byte[]>();
|
||||||
|
|
||||||
|
private Thread portDeliverThread;
|
||||||
|
|
||||||
|
private SerialPort port;
|
||||||
|
|
||||||
|
private bool running = false;
|
||||||
|
|
||||||
|
private volatile bool kill = false;
|
||||||
|
|
||||||
|
private volatile bool isPortValid = false;
|
||||||
|
|
||||||
|
private byte[] recived = new byte[ArduinoReceiveBufferSize];
|
||||||
|
private int mark;
|
||||||
|
|
||||||
|
public PortCommandQueue(ref SerialPort port)
|
||||||
|
{
|
||||||
|
this.port = port;
|
||||||
|
|
||||||
|
portDeliverThread = new Thread(new ThreadStart(ManageQueue));
|
||||||
|
portDeliverThread.Name = threadDeliverName;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ManageQueue()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
while (!kill)
|
||||||
|
{
|
||||||
|
if (byteWriteQueue.Count > 0)
|
||||||
|
{
|
||||||
|
byte[] bytes;
|
||||||
|
lock (byteWriteQueue)
|
||||||
|
{
|
||||||
|
bytes = byteWriteQueue.Dequeue();
|
||||||
|
}
|
||||||
|
|
||||||
|
lock (port)
|
||||||
|
{
|
||||||
|
if (isPortValid)
|
||||||
|
{
|
||||||
|
port.Open();
|
||||||
|
port.Write(bytes, 0, bytes.Length);
|
||||||
|
|
||||||
|
int b;
|
||||||
|
mark = 0;
|
||||||
|
while((b = port.ReadByte()) != ArduinoSuccessByte)
|
||||||
|
{
|
||||||
|
recived[mark++] = (byte) b;
|
||||||
|
}
|
||||||
|
|
||||||
|
port.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (ThreadInterruptedException)
|
||||||
|
{
|
||||||
|
Thread.CurrentThread.Interrupt();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
// omit
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[SecurityPermissionAttribute(SecurityAction.Demand, ControlThread = true)]
|
||||||
|
public void Close()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (running)
|
||||||
|
{
|
||||||
|
kill = true;
|
||||||
|
portDeliverThread.Interrupt();
|
||||||
|
portDeliverThread.Join(1000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (ThreadStartException)
|
||||||
|
{
|
||||||
|
// omit
|
||||||
|
}
|
||||||
|
catch (ThreadInterruptedException)
|
||||||
|
{
|
||||||
|
// omit
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void EnqueueArduinoCommand(params byte[] bytes)
|
||||||
|
{
|
||||||
|
if (!running)
|
||||||
|
{
|
||||||
|
running = true;
|
||||||
|
portDeliverThread.Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (byteWriteQueue.Count < ArduinoCommandQueueSize)
|
||||||
|
{
|
||||||
|
lock (byteWriteQueue)
|
||||||
|
{
|
||||||
|
byteWriteQueue.Enqueue(bytes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void EnqueueArduinoCommand(byte opcode, params byte[] data)
|
||||||
|
{
|
||||||
|
byte[] wrapper = new byte[data.Length + 1];
|
||||||
|
System.Buffer.BlockCopy(data, 0, wrapper, 1, data.Length);
|
||||||
|
wrapper[0] = opcode;
|
||||||
|
|
||||||
|
EnqueueArduinoCommand(wrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DequeueAll()
|
||||||
|
{
|
||||||
|
lock (byteWriteQueue)
|
||||||
|
{
|
||||||
|
byteWriteQueue.Clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void WaitForLastDequeue()
|
||||||
|
{
|
||||||
|
int timeCount = 0;
|
||||||
|
|
||||||
|
bool wait = true;
|
||||||
|
while(wait)
|
||||||
|
{
|
||||||
|
lock(byteWriteQueue)
|
||||||
|
{
|
||||||
|
wait = byteWriteQueue.Count != 0;
|
||||||
|
}
|
||||||
|
timeCount++;
|
||||||
|
Thread.Sleep(500);
|
||||||
|
|
||||||
|
wait = timeCount == DequeueWaitTimeoutCounter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte[] GetLastData()
|
||||||
|
{
|
||||||
|
return recived;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ValidatePort()
|
||||||
|
{
|
||||||
|
isPortValid = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InvalidatePort()
|
||||||
|
{
|
||||||
|
isPortValid = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int GetMark()
|
||||||
|
{
|
||||||
|
int tmp = mark;
|
||||||
|
mark = 0;
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Windows.Forms;
|
|
||||||
using Matrix_App.PregeneratedMods.reflection;
|
using Matrix_App.PregeneratedMods.reflection;
|
||||||
using static Matrix_App.GifGeneratorUtils;
|
using static Matrix_App.GifGeneratorUtils;
|
||||||
|
|
||||||
|
@ -49,10 +48,5 @@ namespace Matrix_App.PregeneratedMods
|
||||||
b = tmpB;
|
b = tmpB;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void CreateUi(FlowLayoutPanel anchor, update invokeGenerator)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Windows.Forms;
|
|
||||||
using Matrix_App.PregeneratedMods.reflection;
|
using Matrix_App.PregeneratedMods.reflection;
|
||||||
using static Matrix_App.GifGeneratorUtils;
|
using static Matrix_App.GifGeneratorUtils;
|
||||||
|
|
||||||
|
@ -7,20 +6,16 @@ namespace Matrix_App.PregeneratedMods
|
||||||
{
|
{
|
||||||
public class ColorAdjust : MatrixGifGenerator
|
public class ColorAdjust : MatrixGifGenerator
|
||||||
{
|
{
|
||||||
[UiWidget]
|
|
||||||
[UiDescription(title: "Contrast", description: "Constrasts the image, or loweres difference")]
|
|
||||||
private float contrast = 0.5f;
|
|
||||||
|
|
||||||
[UiWidget]
|
[UiWidget]
|
||||||
[UiDescription(title: "Tone offset", description: "Sets an additional offset to the pixels hue")]
|
[UiDescription(title: "Tone offset", description: "Sets an additional offset to the pixels hue")]
|
||||||
private float hueOffset = 0.0f;
|
private float hueOffset = 0.0f;
|
||||||
|
|
||||||
[UiWidget]
|
[UiWidget]
|
||||||
[UiDescription(title: "Saturation boost", description: "Decreases or increases (chroma-based) saturation")]
|
[UiDescription(title: "Saturation boost", description: "Decreases or increases saturation")]
|
||||||
private float saturationBoost = 0.5f;
|
private float saturationBoost = 0.5f;
|
||||||
|
|
||||||
[UiWidget]
|
[UiWidget]
|
||||||
[UiDescription(title: "Luminance boost", description: "Decreases or increases luminance")]
|
[UiDescription(title: "Brightness boost", description: "Decreases or increases brightness")]
|
||||||
private float valueBoost = 0.5f;
|
private float valueBoost = 0.5f;
|
||||||
|
|
||||||
[UiWidget]
|
[UiWidget]
|
||||||
|
@ -45,7 +40,7 @@ namespace Matrix_App.PregeneratedMods
|
||||||
SampleFrame(actualStore!, frame, x, y, width, out float tr, out float tg, out float tb);
|
SampleFrame(actualStore!, frame, x, y, width, out float tr, out float tg, out float tb);
|
||||||
|
|
||||||
// Adjust HSV
|
// Adjust HSV
|
||||||
HslFromRgb(tr, tg, tb, out float h, out float s, out float value);
|
HsvFromRgb(tr, tg, tb, out float h, out float s, out float value);
|
||||||
|
|
||||||
h = h / 360.0f + hueOffset;
|
h = h / 360.0f + hueOffset;
|
||||||
h = (h - MathF.Floor(h)) * 360.0f;
|
h = (h - MathF.Floor(h)) * 360.0f;
|
||||||
|
@ -53,22 +48,11 @@ namespace Matrix_App.PregeneratedMods
|
||||||
value = Boost(value, valueBoost);
|
value = Boost(value, valueBoost);
|
||||||
|
|
||||||
// Adjust RGB
|
// Adjust RGB
|
||||||
RgbFromHsl(h, s, value, out tr, out tg, out tb);
|
RgbFromHsv(h, s, value, out tr, out tg, out tb);
|
||||||
|
|
||||||
r = Boost(tr, redBoost);
|
r = Boost(tr, redBoost);
|
||||||
g = Boost(tg, greenBoost);
|
g = Boost(tg, greenBoost);
|
||||||
b = Boost(tb, blueBoost);
|
b = Boost(tb, blueBoost);
|
||||||
|
|
||||||
float enhancedContrast = contrast * 10.0f;
|
|
||||||
|
|
||||||
r = MathF.Pow(r, enhancedContrast) * enhancedContrast;
|
|
||||||
g = MathF.Pow(g, enhancedContrast) * enhancedContrast;
|
|
||||||
b = MathF.Pow(b, enhancedContrast) * enhancedContrast;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void CreateUi(FlowLayoutPanel anchor, update invokeGenerator)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,4 @@
|
||||||
using System.Windows.Forms;
|
using Matrix_App.PregeneratedMods.reflection;
|
||||||
using Matrix_App.PregeneratedMods.reflection;
|
|
||||||
using static Matrix_App.GifGeneratorUtils;
|
using static Matrix_App.GifGeneratorUtils;
|
||||||
|
|
||||||
namespace Matrix_App.PregeneratedMods
|
namespace Matrix_App.PregeneratedMods
|
||||||
|
@ -30,10 +29,5 @@ namespace Matrix_App.PregeneratedMods
|
||||||
b = average;
|
b = average;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void CreateUi(FlowLayoutPanel anchor, update invokeGenerator)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,4 @@
|
||||||
using System.Windows.Forms;
|
using static Matrix_App.GifGeneratorUtils;
|
||||||
using static Matrix_App.GifGeneratorUtils;
|
|
||||||
|
|
||||||
namespace Matrix_App.PregeneratedMods
|
namespace Matrix_App.PregeneratedMods
|
||||||
{
|
{
|
||||||
|
@ -13,10 +12,5 @@ namespace Matrix_App.PregeneratedMods
|
||||||
g = 1 - lg;
|
g = 1 - lg;
|
||||||
b = 1 - lb;
|
b = 1 - lb;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void CreateUi(FlowLayoutPanel anchor, update invokeGenerator)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,7 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace Matrix_App.PregeneratedMods
|
namespace Matrix_App.PregeneratedMods
|
||||||
{
|
{
|
||||||
|
@ -56,10 +55,5 @@ namespace Matrix_App.PregeneratedMods
|
||||||
g += 0.1f * s4;
|
g += 0.1f * s4;
|
||||||
b += 0.2f * s4;
|
b += 0.2f * s4;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void CreateUi(FlowLayoutPanel anchor, update invokeGenerator)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Windows.Forms;
|
|
||||||
using Matrix_App.PregeneratedMods.reflection;
|
using Matrix_App.PregeneratedMods.reflection;
|
||||||
|
|
||||||
namespace Matrix_App.PregeneratedMods
|
namespace Matrix_App.PregeneratedMods
|
||||||
|
@ -17,11 +16,6 @@ namespace Matrix_App.PregeneratedMods
|
||||||
b = Next(frame, x, y + 34968);
|
b = Next(frame, x, y + 34968);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void CreateUi(FlowLayoutPanel anchor, update invokeGenerator)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private float Next(int frame, int x, int y)
|
private float Next(int frame, int x, int y)
|
||||||
{
|
{
|
||||||
var k = MathF.Sin(frame * 2356f + (x + y) * 5334f + (y * x) * 534f + 78.0f + seed * 435f) * 567f;
|
var k = MathF.Sin(frame * 2356f + (x + y) * 5334f + (y * x) * 534f + 78.0f + seed * 435f) * 567f;
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Windows.Forms;
|
|
||||||
using Matrix_App.PregeneratedMods.reflection;
|
using Matrix_App.PregeneratedMods.reflection;
|
||||||
using static Matrix_App.GifGeneratorUtils;
|
using static Matrix_App.GifGeneratorUtils;
|
||||||
|
|
||||||
|
@ -36,11 +35,6 @@ namespace Matrix_App.PregeneratedMods
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void CreateUi(FlowLayoutPanel anchor, update invokeGenerator)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private float AddHueOffset(float hue)
|
private float AddHueOffset(float hue)
|
||||||
{
|
{
|
||||||
return MathF.Abs(hue + rotation * 360) % 360.0f;
|
return MathF.Abs(hue + rotation * 360) % 360.0f;
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace Matrix_App.PregeneratedMods
|
namespace Matrix_App.PregeneratedMods
|
||||||
{
|
{
|
||||||
|
@ -30,10 +29,5 @@ namespace Matrix_App.PregeneratedMods
|
||||||
g = sp;
|
g = sp;
|
||||||
b = sp;
|
b = sp;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void CreateUi(FlowLayoutPanel anchor, update invokeGenerator)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,6 +1,5 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace Matrix_App.PregeneratedMods
|
namespace Matrix_App.PregeneratedMods
|
||||||
{
|
{
|
||||||
|
@ -12,10 +11,5 @@ namespace Matrix_App.PregeneratedMods
|
||||||
g = v;
|
g = v;
|
||||||
b = MathF.Sin(frame / (float) totalFrames * MathF.PI);
|
b = MathF.Sin(frame / (float) totalFrames * MathF.PI);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void CreateUi(FlowLayoutPanel anchor, update invokeGenerator)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,85 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using Matrix_App.PregeneratedMods.reflection;
|
|
||||||
using static Matrix_App.GifGeneratorUtils;
|
|
||||||
|
|
||||||
namespace Matrix_App.PregeneratedMods
|
|
||||||
{
|
|
||||||
public sealed class Transfom : MatrixGifGenerator
|
|
||||||
{
|
|
||||||
[UiWidget]
|
|
||||||
[UiDescription(title: "Flip Horizontally", description: "Flips the image in the middle on the horizontal axis")]
|
|
||||||
private bool flipHorizontally = false;
|
|
||||||
|
|
||||||
[UiWidget]
|
|
||||||
[UiDescription(title: "Flip Vertically", description: "Flips the image in the middle on the vertical axis")]
|
|
||||||
private bool flipVertically = false;
|
|
||||||
|
|
||||||
[UiWidget]
|
|
||||||
[UiDescription(title: "Mirror Horizontally", description: "Mirrors the image in the middle on the horizontal axis")]
|
|
||||||
private bool mirrorHorizontally = false;
|
|
||||||
|
|
||||||
[UiWidget]
|
|
||||||
[UiDescription(title: "Mirror Vertically", description: "Mirrors the image in the middle on the vertical axis")]
|
|
||||||
private bool mirrorVertically = false;
|
|
||||||
|
|
||||||
[UiWidget]
|
|
||||||
[UiDescription(title: "Rotation", description: "Rotate counter-clock-wise, repeating the image where needed (at corners)")]
|
|
||||||
private int rotation = 0;
|
|
||||||
|
|
||||||
[UiWidget]
|
|
||||||
[UiDescription(title: "Skew X", description: "Skew the image on the x-axis")]
|
|
||||||
private float skewX = 0.0f;
|
|
||||||
|
|
||||||
[UiWidget]
|
|
||||||
[UiDescription(title: "Skew Y", description: "Skew the image on the y-axis")]
|
|
||||||
private float skewY = 0.0f;
|
|
||||||
|
|
||||||
[UiWidget]
|
|
||||||
[UiDescription(title: "Scale", description: "Scale up or down")]
|
|
||||||
private float scale = 0.5f;
|
|
||||||
|
|
||||||
protected override void ColorFragment(in int x, in int y, in float u, in float v, in int frame, out float r, out float g, out float b)
|
|
||||||
{
|
|
||||||
var sint = MathF.Sin(rotation / 180.0f * MathF.PI);
|
|
||||||
var cost = MathF.Cos(rotation / 180.0f * MathF.PI);
|
|
||||||
|
|
||||||
var tx = x;
|
|
||||||
var ty = y;
|
|
||||||
|
|
||||||
var otx = x - (width >> 1);
|
|
||||||
var oty = y - (height >> 1);
|
|
||||||
|
|
||||||
tx = (int) (otx * cost - oty * sint);
|
|
||||||
ty = (int) (otx * sint + oty * cost);
|
|
||||||
|
|
||||||
tx += width >> 1;
|
|
||||||
ty += height >> 1;
|
|
||||||
|
|
||||||
tx = flipVertically ? width - tx - 1 : tx;
|
|
||||||
ty = flipHorizontally ? height - ty - 1 : ty;
|
|
||||||
tx = mirrorVertically ? tx % (width >> 1) : tx;
|
|
||||||
ty = mirrorHorizontally ? ty % (height >> 1) : ty;
|
|
||||||
|
|
||||||
tx += (int) (ty * skewX * 2.0f);
|
|
||||||
ty += (int) (tx * skewY * 2.0f);
|
|
||||||
|
|
||||||
tx = (int) ((tx - (width >> 1)) * scale * 2.0f) + (width >> 1);
|
|
||||||
ty = (int) ((ty - (height >> 1)) * scale * 2.0f) + (height >> 1);
|
|
||||||
|
|
||||||
tx = Math.Abs(tx) % width;
|
|
||||||
ty = Math.Abs(ty) % height;
|
|
||||||
|
|
||||||
SampleFrame(actualStore!, frame, tx, ty, width, out float lr, out float lg, out float lb);
|
|
||||||
|
|
||||||
r = lr;
|
|
||||||
g = lg;
|
|
||||||
b = lb;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void CreateUi(FlowLayoutPanel anchor, update invokeGenerator)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,55 +0,0 @@
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using Matrix_App.Properties;
|
|
||||||
|
|
||||||
namespace Matrix_App.minecraft
|
|
||||||
{
|
|
||||||
public class Minecraft : MatrixGifGenerator
|
|
||||||
{
|
|
||||||
private Bitmap? texture = Resources.Pumpkin;
|
|
||||||
|
|
||||||
protected override void CreateUi(FlowLayoutPanel anchor, update invokeGenerator)
|
|
||||||
{
|
|
||||||
CreateButton(Resources.CreeperHead, "Creeper", anchor, invokeGenerator);
|
|
||||||
CreateButton(Resources.EndermanHead, "Enderman", anchor, invokeGenerator);
|
|
||||||
CreateButton(Resources.EmeraldBlock, "Emerald", anchor, invokeGenerator);
|
|
||||||
CreateButton(Resources.CommandBlock, "Command Block", anchor, invokeGenerator);
|
|
||||||
CreateButton(Resources.DiamondOre, "Diamond ore", anchor, invokeGenerator);
|
|
||||||
CreateButton(Resources.GrassBlock, "Grass", anchor, invokeGenerator);
|
|
||||||
CreateButton(Resources.Pumpkin, "Pumpkin", anchor, invokeGenerator);
|
|
||||||
CreateButton(Resources.RedstoneLamp, "Redstone lamp", anchor, invokeGenerator);
|
|
||||||
CreateButton(Resources.TNT, "TNT", anchor, invokeGenerator);
|
|
||||||
CreateButton(Resources.BlueWool, "Blue wool", anchor, invokeGenerator);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CreateButton(Bitmap bitmap, string title, FlowLayoutPanel anchor, update invokeGenerator)
|
|
||||||
{
|
|
||||||
var button = new Button()
|
|
||||||
{
|
|
||||||
Text = title,
|
|
||||||
AutoSize = true,
|
|
||||||
Image = bitmap,
|
|
||||||
TextImageRelation = TextImageRelation.ImageBeforeText,
|
|
||||||
ImageAlign = ContentAlignment.MiddleLeft,
|
|
||||||
TextAlign = ContentAlignment.MiddleRight
|
|
||||||
};
|
|
||||||
button.Width = anchor.ClientSize.Width - button.Margin.Left - button.Margin.Right;
|
|
||||||
button.Click += (a, b) =>
|
|
||||||
{
|
|
||||||
texture = bitmap;
|
|
||||||
invokeGenerator();
|
|
||||||
};
|
|
||||||
anchor.Controls.Add(button);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void ColorFragment(in int x, in int y, in float u, in float v, in int frame, out float r, out float g, out float b)
|
|
||||||
{
|
|
||||||
var color = texture!.GetPixel((int) (u * texture.Width), (int) (v * texture.Height));
|
|
||||||
|
|
||||||
r = color.R / 255.0f;
|
|
||||||
g = color.G / 255.0f;
|
|
||||||
b = color.B / 255.0f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -37,6 +37,7 @@ namespace Matrix_App.PregeneratedMods.reflection
|
||||||
title = desc.title;
|
title = desc.title;
|
||||||
description.Text = desc.description;
|
description.Text = desc.description;
|
||||||
description.ForeColor = Color.Gray;
|
description.ForeColor = Color.Gray;
|
||||||
|
description.Height += 10;
|
||||||
description.AutoSize = true;
|
description.AutoSize = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,6 +47,7 @@ namespace Matrix_App.PregeneratedMods.reflection
|
||||||
Text = title,
|
Text = title,
|
||||||
Dock = DockStyle.Left,
|
Dock = DockStyle.Left,
|
||||||
Anchor = AnchorStyles.Top | AnchorStyles.Left,
|
Anchor = AnchorStyles.Top | AnchorStyles.Left,
|
||||||
|
Width = 100
|
||||||
});
|
});
|
||||||
|
|
||||||
switch (fieldValue)
|
switch (fieldValue)
|
||||||
|
@ -54,11 +56,10 @@ namespace Matrix_App.PregeneratedMods.reflection
|
||||||
{
|
{
|
||||||
var upDown = new NumericUpDown
|
var upDown = new NumericUpDown
|
||||||
{
|
{
|
||||||
Width = 360,
|
|
||||||
Dock = DockStyle.Fill,
|
Dock = DockStyle.Fill,
|
||||||
Anchor = AnchorStyles.Top | AnchorStyles.Right,
|
Anchor = AnchorStyles.Top | AnchorStyles.Right,
|
||||||
Value = value,
|
Width = 360,
|
||||||
Maximum = 1000
|
Value = value
|
||||||
};
|
};
|
||||||
upDown.ValueChanged += (a, b) =>
|
upDown.ValueChanged += (a, b) =>
|
||||||
{
|
{
|
||||||
|
@ -93,8 +94,8 @@ namespace Matrix_App.PregeneratedMods.reflection
|
||||||
Maximum = 100,
|
Maximum = 100,
|
||||||
Minimum = 0,
|
Minimum = 0,
|
||||||
Value = (int) (floatValue * 100.0f),
|
Value = (int) (floatValue * 100.0f),
|
||||||
Width = 360,
|
|
||||||
TickFrequency = 10,
|
TickFrequency = 10,
|
||||||
|
Width = 360
|
||||||
};
|
};
|
||||||
upDown.ValueChanged += (a, b) =>
|
upDown.ValueChanged += (a, b) =>
|
||||||
{
|
{
|
||||||
|
|
|
@ -70,16 +70,6 @@ namespace Matrix_App.Properties {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap BlueWool {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("BlueWool", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -90,56 +80,6 @@ namespace Matrix_App.Properties {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap CommandBlock {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("CommandBlock", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap CreeperHead {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("CreeperHead", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap DiamondOre {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("DiamondOre", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap EmeraldBlock {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("EmeraldBlock", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap EndermanHead {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("EndermanHead", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -170,16 +110,6 @@ namespace Matrix_App.Properties {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap GrassBlock {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("GrassBlock", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -200,26 +130,6 @@ namespace Matrix_App.Properties {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap Pumpkin {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("Pumpkin", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap RedstoneLamp {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("RedstoneLamp", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -239,15 +149,5 @@ namespace Matrix_App.Properties {
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap TNT {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("TNT", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -145,35 +145,4 @@
|
||||||
<data name="Pfüsikuh" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Pfüsikuh" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Splashcreen.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Splashcreen.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<data name="DiamondOre" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\resources\diamond-ore.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="GrassBlock" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\resources\grass-block.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="Pumpkin" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\resources\pumpkin.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="RedstoneLamp" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\resources\redstone-lamp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="TNT" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\resources\tnt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="BlueWool" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\resources\wool.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="CommandBlock" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\resources\command-block.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="CreeperHead" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\resources\creeper-head.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="EmeraldBlock" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\resources\emerald-block.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="EndermanHead" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\resources\enderman-head.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
Before Width: | Height: | Size: 245 KiB After Width: | Height: | Size: 241 KiB |
Before Width: | Height: | Size: 694 B |
Before Width: | Height: | Size: 609 B |
Before Width: | Height: | Size: 499 B |
Before Width: | Height: | Size: 740 B |
Before Width: | Height: | Size: 194 B |
Before Width: | Height: | Size: 650 B |
Before Width: | Height: | Size: 703 B |
Before Width: | Height: | Size: 880 B |
Before Width: | Height: | Size: 331 B |
Before Width: | Height: | Size: 769 B |
|
@ -1,7 +1,6 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
|
|
||||||
namespace Matrix_App
|
namespace Matrix_App
|
||||||
{
|
{
|
||||||
public class ThreadQueue
|
public class ThreadQueue
|
||||||
|
@ -35,40 +34,35 @@ namespace Matrix_App
|
||||||
{
|
{
|
||||||
while(running)
|
while(running)
|
||||||
{
|
{
|
||||||
lock (taskQueue)
|
Task? task = null;
|
||||||
|
|
||||||
|
lock(taskQueue)
|
||||||
{
|
{
|
||||||
working = taskQueue.Count > 0;
|
if (taskQueue.Count > 0)
|
||||||
|
{
|
||||||
|
working = true;
|
||||||
|
task = taskQueue.Dequeue();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
working = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (working)
|
if (task != null)
|
||||||
|
{
|
||||||
|
running = task();
|
||||||
|
} else
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Task task;
|
Thread.Sleep(10);
|
||||||
lock (taskQueue)
|
|
||||||
{
|
|
||||||
task = taskQueue.Dequeue();
|
|
||||||
}
|
|
||||||
|
|
||||||
running = task();
|
|
||||||
|
|
||||||
lock (taskQueue)
|
|
||||||
{
|
|
||||||
working = taskQueue.Count > 0;
|
|
||||||
}
|
|
||||||
} catch(ThreadInterruptedException)
|
} catch(ThreadInterruptedException)
|
||||||
{
|
{
|
||||||
thread.Interrupt();
|
thread.Interrupt();
|
||||||
running = false;
|
running = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
lock (taskQueue)
|
|
||||||
{
|
|
||||||
Monitor.Wait(taskQueue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,13 +70,11 @@ namespace Matrix_App
|
||||||
{
|
{
|
||||||
lock (taskQueue)
|
lock (taskQueue)
|
||||||
{
|
{
|
||||||
if (taskQueue.Count >= capacity)
|
if (taskQueue.Count < capacity)
|
||||||
return;
|
{
|
||||||
|
|
||||||
Monitor.Pulse(taskQueue);
|
|
||||||
|
|
||||||
working = true;
|
|
||||||
taskQueue.Enqueue(task);
|
taskQueue.Enqueue(task);
|
||||||
|
working = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,15 +85,10 @@ namespace Matrix_App
|
||||||
|
|
||||||
public void Stop()
|
public void Stop()
|
||||||
{
|
{
|
||||||
lock (taskQueue)
|
|
||||||
{
|
|
||||||
Monitor.Pulse(taskQueue);
|
|
||||||
}
|
|
||||||
|
|
||||||
running = false;
|
running = false;
|
||||||
|
|
||||||
thread.Interrupt();
|
thread.Interrupt();
|
||||||
thread.Join(100);
|
thread.Join(1500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -5,7 +5,7 @@ using static Matrix_App.Defaults;
|
||||||
|
|
||||||
namespace Matrix_App
|
namespace Matrix_App
|
||||||
{
|
{
|
||||||
public static class Utils
|
public sealed class Utils
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Resizes and image to the specified size in pixels.
|
/// Resizes and image to the specified size in pixels.
|
||||||
|
@ -23,17 +23,20 @@ namespace Matrix_App
|
||||||
|
|
||||||
destImage.SetResolution(image.HorizontalResolution, image.VerticalResolution);
|
destImage.SetResolution(image.HorizontalResolution, image.VerticalResolution);
|
||||||
|
|
||||||
using var graphics = Graphics.FromImage(destImage);
|
using (var graphics = Graphics.FromImage(destImage))
|
||||||
|
{
|
||||||
graphics.CompositingMode = CompositingMode.SourceCopy;
|
graphics.CompositingMode = CompositingMode.SourceCopy;
|
||||||
graphics.CompositingQuality = CompositingQuality.HighQuality;
|
graphics.CompositingQuality = CompositingQuality.HighQuality;
|
||||||
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
||||||
graphics.SmoothingMode = SmoothingMode.HighQuality;
|
graphics.SmoothingMode = SmoothingMode.HighQuality;
|
||||||
graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
||||||
|
|
||||||
using var wrapMode = new ImageAttributes();
|
using (var wrapMode = new ImageAttributes())
|
||||||
|
{
|
||||||
wrapMode.SetWrapMode(WrapMode.TileFlipXY);
|
wrapMode.SetWrapMode(WrapMode.TileFlipXY);
|
||||||
graphics.DrawImage(image, destRect, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, wrapMode);
|
graphics.DrawImage(image, destRect, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, wrapMode);
|
||||||
|
}
|
||||||
|
}
|
||||||
return destImage;
|
return destImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,14 +45,15 @@ namespace Matrix_App
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="source"></param>
|
/// <param name="source"></param>
|
||||||
/// <param name="dest"></param>
|
/// <param name="dest"></param>
|
||||||
public static void ColorStore(byte[][] source, byte[][] dest)
|
public static void FlipColorStoreRG_GR(byte[][] source, byte[][] dest)
|
||||||
{
|
{
|
||||||
for (var f = 0; f < source.Length; f++)
|
for (int f = 0; f < dest.Length; f++)
|
||||||
{
|
{
|
||||||
for (var x = 0; x < source[0].Length; x += 3)
|
for (int x = 0; x < dest[0].Length; x += 3)
|
||||||
{
|
{
|
||||||
dest[f][x + 0] = source[f][x + 0];
|
// flip r, g
|
||||||
dest[f][x + 1] = source[f][x + 1];
|
dest[f][x + 0] = source[f][x + 1];
|
||||||
|
dest[f][x + 1] = source[f][x + 0];
|
||||||
dest[f][x + 2] = source[f][x + 2];
|
dest[f][x + 2] = source[f][x + 2];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,11 +70,11 @@ namespace Matrix_App
|
||||||
{
|
{
|
||||||
var image = new Bitmap(width, height);
|
var image = new Bitmap(width, height);
|
||||||
|
|
||||||
for (var x = 0; x < width; x++)
|
for (int x = 0; x < width; x++)
|
||||||
{
|
{
|
||||||
for (var y = 0; y < height; y++)
|
for (int y = 0; y < height; y++)
|
||||||
{
|
{
|
||||||
var index = (x + y * width) * Bpp;
|
int index = (x + y * width) * Bpp;
|
||||||
|
|
||||||
image.SetPixel(x, y, Color.FromArgb(
|
image.SetPixel(x, y, Color.FromArgb(
|
||||||
buffer[index + 0],
|
buffer[index + 0],
|
||||||
|
@ -94,7 +98,7 @@ namespace Matrix_App
|
||||||
{
|
{
|
||||||
byte[][] bytes = new byte[frames][];
|
byte[][] bytes = new byte[frames][];
|
||||||
|
|
||||||
for (var frame = 0; frame < frames; frame++)
|
for (int frame = 0; frame < frames; frame++)
|
||||||
{
|
{
|
||||||
bytes[frame] = new byte[width * height * Bpp];
|
bytes[frame] = new byte[width * height * Bpp];
|
||||||
}
|
}
|
|
@ -1,252 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO.Ports;
|
|
||||||
using System.Security.Permissions;
|
|
||||||
using System.Threading;
|
|
||||||
using static Matrix_App.Defaults;
|
|
||||||
|
|
||||||
namespace Matrix_App.adds
|
|
||||||
{
|
|
||||||
public class PortCommandQueue
|
|
||||||
{
|
|
||||||
private const string ThreadDeliverName = "Arduino Port Deliver Thread";
|
|
||||||
|
|
||||||
private readonly Queue<byte[]> byteWriteQueue = new();
|
|
||||||
private readonly Queue<byte> statusByteQueue = new();
|
|
||||||
|
|
||||||
private readonly Thread portDeliverThread;
|
|
||||||
|
|
||||||
private readonly SerialPort tx;
|
|
||||||
|
|
||||||
private bool running;
|
|
||||||
|
|
||||||
private volatile bool kill;
|
|
||||||
|
|
||||||
private volatile bool isPortValid;
|
|
||||||
|
|
||||||
private readonly byte[] received = new byte[ArduinoReceiveBufferSize];
|
|
||||||
private int mark;
|
|
||||||
|
|
||||||
private volatile bool synchronized;
|
|
||||||
private bool updateRealtime;
|
|
||||||
|
|
||||||
public PortCommandQueue(ref SerialPort tx)
|
|
||||||
{
|
|
||||||
this.tx = tx;
|
|
||||||
|
|
||||||
portDeliverThread = new Thread(ManageQueue) { Name = ThreadDeliverName };
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ManageQueue()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
while (!kill)
|
|
||||||
{
|
|
||||||
if (!isPortValid) continue;
|
|
||||||
if (byteWriteQueue.Count <= 0)
|
|
||||||
{
|
|
||||||
lock (byteWriteQueue)
|
|
||||||
{
|
|
||||||
Monitor.Wait(byteWriteQueue);
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
byte[] bytes;
|
|
||||||
int statusByte;
|
|
||||||
lock (byteWriteQueue)
|
|
||||||
{
|
|
||||||
bytes = byteWriteQueue.Dequeue();
|
|
||||||
statusByte = statusByteQueue.Dequeue();
|
|
||||||
}
|
|
||||||
|
|
||||||
lock (tx)
|
|
||||||
{
|
|
||||||
var success = false;
|
|
||||||
var tryCounter = 0;
|
|
||||||
|
|
||||||
do
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
tx.Write(bytes, 0, bytes.Length);
|
|
||||||
|
|
||||||
var b = ArduinoErrorByte;
|
|
||||||
var errorFlag = false;
|
|
||||||
mark = 0;
|
|
||||||
while (!errorFlag && (b = tx.ReadByte()) != statusByte)
|
|
||||||
{
|
|
||||||
received[mark++] = (byte) b;
|
|
||||||
|
|
||||||
errorFlag = b == ArduinoErrorByte;
|
|
||||||
}
|
|
||||||
synchronized = b == ArduinoSynchronizationByte;
|
|
||||||
success = !errorFlag;
|
|
||||||
Debug.WriteLine("===================> Com Success !");
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
Debug.WriteLine("=============================> ERROR <=================================");
|
|
||||||
Debug.WriteLine(e.Message);
|
|
||||||
}
|
|
||||||
|
|
||||||
tryCounter++;
|
|
||||||
} while (!success && tryCounter < 3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (ThreadInterruptedException)
|
|
||||||
{
|
|
||||||
Thread.CurrentThread.Interrupt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[SecurityPermission(SecurityAction.Demand, ControlThread = true)]
|
|
||||||
public void Close()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (!running) return;
|
|
||||||
kill = true;
|
|
||||||
portDeliverThread.Interrupt();
|
|
||||||
portDeliverThread.Join(1000);
|
|
||||||
}
|
|
||||||
catch (ThreadStartException)
|
|
||||||
{
|
|
||||||
// omit
|
|
||||||
}
|
|
||||||
catch (ThreadInterruptedException)
|
|
||||||
{
|
|
||||||
// omit
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
if (tx.IsOpen)
|
|
||||||
{
|
|
||||||
tx.Close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void EnqueueArduinoCommand(params byte[] bytes)
|
|
||||||
{
|
|
||||||
if (!updateRealtime && bytes[0] != ArduinoInstruction.OpcodeScale &&
|
|
||||||
bytes[0] != ArduinoInstruction.OpcodePush)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!running)
|
|
||||||
{
|
|
||||||
running = true;
|
|
||||||
portDeliverThread.Start();
|
|
||||||
}
|
|
||||||
|
|
||||||
lock (byteWriteQueue)
|
|
||||||
{
|
|
||||||
Monitor.Pulse(byteWriteQueue);
|
|
||||||
if (byteWriteQueue.Count >= ArduinoCommandQueueSize) return;
|
|
||||||
lock (byteWriteQueue)
|
|
||||||
{
|
|
||||||
byteWriteQueue.Enqueue(bytes);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void EnqueueArduinoCommand(byte opcode, params byte[] data)
|
|
||||||
{
|
|
||||||
byte[] wrapper = new byte[data.Length + 1];
|
|
||||||
Buffer.BlockCopy(data, 0, wrapper, 1, data.Length);
|
|
||||||
wrapper[0] = opcode;
|
|
||||||
|
|
||||||
statusByteQueue.Enqueue(ArduinoSuccessByte);
|
|
||||||
EnqueueArduinoCommand(wrapper);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void DequeueAll()
|
|
||||||
{
|
|
||||||
lock (byteWriteQueue)
|
|
||||||
{
|
|
||||||
byteWriteQueue.Clear();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void WaitForLastDequeue()
|
|
||||||
{
|
|
||||||
var timeCount = 0;
|
|
||||||
var wait = true;
|
|
||||||
|
|
||||||
while(wait)
|
|
||||||
{
|
|
||||||
timeCount++;
|
|
||||||
Thread.Sleep(500);
|
|
||||||
|
|
||||||
wait = timeCount == DequeueWaitTimeoutCounter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public byte[] GetLastData()
|
|
||||||
{
|
|
||||||
return received;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ValidatePort()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (!tx.IsOpen)
|
|
||||||
{
|
|
||||||
tx.Open();
|
|
||||||
isPortValid = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
isPortValid = false;
|
|
||||||
|
|
||||||
Debug.WriteLine("Failed opening port: " + e.Message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void InvalidatePort()
|
|
||||||
{
|
|
||||||
isPortValid = false;
|
|
||||||
tx.Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns last location of written byte in the received buffer.
|
|
||||||
/// Call clears the mark. Any other call will return 0, unless the mark has been
|
|
||||||
/// altered by reading new data from the serial port.
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
public int GetMark()
|
|
||||||
{
|
|
||||||
var tmp = mark;
|
|
||||||
mark = 0;
|
|
||||||
return tmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void EnqueueArduinoCommandSynchronized(byte[] bytes)
|
|
||||||
{
|
|
||||||
statusByteQueue.Enqueue(ArduinoSynchronizationByte);
|
|
||||||
EnqueueArduinoCommand(bytes);
|
|
||||||
|
|
||||||
while (!synchronized)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
Debug.WriteLine("======================> Synchronized!");
|
|
||||||
synchronized = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetRealtimeUpdates(bool @checked)
|
|
||||||
{
|
|
||||||
updateRealtime = @checked;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool GetRealtimeUpdates()
|
|
||||||
{
|
|
||||||
return updateRealtime;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -8,117 +8,32 @@
|
||||||
".NETCoreApp,Version=v3.1": {
|
".NETCoreApp,Version=v3.1": {
|
||||||
"Matrix App/1.0.0": {
|
"Matrix App/1.0.0": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Bluetooth": "1.0.0.2",
|
"System.IO.Ports": "4.4.0",
|
||||||
"System.Drawing.Common": "5.0.2",
|
|
||||||
"System.IO.Ports": "6.0.0-preview.5.21301.5",
|
|
||||||
"System.Management": "5.0.0"
|
"System.Management": "5.0.0"
|
||||||
},
|
},
|
||||||
"runtime": {
|
"runtime": {
|
||||||
"Matrix App.dll": {}
|
"Matrix App.dll": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Bluetooth/1.0.0.2": {
|
|
||||||
"dependencies": {
|
|
||||||
"Microsoft.Windows.SDK.Contracts": "10.0.19041.1",
|
|
||||||
"System.Runtime.InteropServices.WindowsRuntime": "4.3.0",
|
|
||||||
"System.Runtime.WindowsRuntime": "4.7.0"
|
|
||||||
},
|
|
||||||
"runtime": {
|
|
||||||
"lib/netstandard2.0/Bluetooth.dll": {
|
|
||||||
"assemblyVersion": "1.0.0.2",
|
|
||||||
"fileVersion": "1.0.0.2"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Microsoft.NETCore.Platforms/5.0.0": {},
|
"Microsoft.NETCore.Platforms/5.0.0": {},
|
||||||
"Microsoft.NETCore.Targets/1.1.0": {},
|
"Microsoft.Win32.Registry/5.0.0": {
|
||||||
"Microsoft.Win32.Registry/6.0.0-preview.5.21301.5": {
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"System.Security.AccessControl": "6.0.0-preview.5.21301.5",
|
"System.Security.AccessControl": "5.0.0",
|
||||||
"System.Security.Principal.Windows": "6.0.0-preview.5.21301.5"
|
"System.Security.Principal.Windows": "5.0.0"
|
||||||
},
|
},
|
||||||
"runtime": {
|
"runtime": {
|
||||||
"lib/netstandard2.0/Microsoft.Win32.Registry.dll": {
|
"lib/netstandard2.0/Microsoft.Win32.Registry.dll": {
|
||||||
"assemblyVersion": "6.0.0.0",
|
"assemblyVersion": "5.0.0.0",
|
||||||
"fileVersion": "6.0.21.30105"
|
"fileVersion": "5.0.20.51904"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"runtimeTargets": {
|
"runtimeTargets": {
|
||||||
"runtimes/win/lib/netstandard2.0/Microsoft.Win32.Registry.dll": {
|
"runtimes/win/lib/netstandard2.0/Microsoft.Win32.Registry.dll": {
|
||||||
"rid": "win",
|
"rid": "win",
|
||||||
"assetType": "runtime",
|
"assetType": "runtime",
|
||||||
"assemblyVersion": "6.0.0.0",
|
|
||||||
"fileVersion": "6.0.21.30105"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Microsoft.Win32.SystemEvents/5.0.0": {
|
|
||||||
"dependencies": {
|
|
||||||
"Microsoft.NETCore.Platforms": "5.0.0"
|
|
||||||
},
|
|
||||||
"runtime": {
|
|
||||||
"lib/netstandard2.0/Microsoft.Win32.SystemEvents.dll": {
|
|
||||||
"assemblyVersion": "5.0.0.0",
|
"assemblyVersion": "5.0.0.0",
|
||||||
"fileVersion": "5.0.20.51904"
|
"fileVersion": "5.0.20.51904"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"runtimeTargets": {
|
|
||||||
"runtimes/win/lib/netcoreapp3.0/Microsoft.Win32.SystemEvents.dll": {
|
|
||||||
"rid": "win",
|
|
||||||
"assetType": "runtime",
|
|
||||||
"assemblyVersion": "5.0.0.0",
|
|
||||||
"fileVersion": "5.0.20.51904"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Microsoft.Windows.SDK.Contracts/10.0.19041.1": {
|
|
||||||
"dependencies": {
|
|
||||||
"System.Runtime.WindowsRuntime": "4.7.0",
|
|
||||||
"System.Runtime.WindowsRuntime.UI.Xaml": "4.6.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"runtime.linux-arm.runtime.native.System.IO.Ports/6.0.0-preview.5.21301.5": {
|
|
||||||
"runtimeTargets": {
|
|
||||||
"runtimes/linux-arm/native/libSystem.IO.Ports.Native.so": {
|
|
||||||
"rid": "linux-arm",
|
|
||||||
"assetType": "native",
|
|
||||||
"fileVersion": "0.0.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"runtime.linux-arm64.runtime.native.System.IO.Ports/6.0.0-preview.5.21301.5": {
|
|
||||||
"runtimeTargets": {
|
|
||||||
"runtimes/linux-arm64/native/libSystem.IO.Ports.Native.so": {
|
|
||||||
"rid": "linux-arm64",
|
|
||||||
"assetType": "native",
|
|
||||||
"fileVersion": "0.0.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"runtime.linux-x64.runtime.native.System.IO.Ports/6.0.0-preview.5.21301.5": {
|
|
||||||
"runtimeTargets": {
|
|
||||||
"runtimes/linux-x64/native/libSystem.IO.Ports.Native.so": {
|
|
||||||
"rid": "linux-x64",
|
|
||||||
"assetType": "native",
|
|
||||||
"fileVersion": "0.0.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"runtime.native.System.IO.Ports/6.0.0-preview.5.21301.5": {
|
|
||||||
"dependencies": {
|
|
||||||
"runtime.linux-arm.runtime.native.System.IO.Ports": "6.0.0-preview.5.21301.5",
|
|
||||||
"runtime.linux-arm64.runtime.native.System.IO.Ports": "6.0.0-preview.5.21301.5",
|
|
||||||
"runtime.linux-x64.runtime.native.System.IO.Ports": "6.0.0-preview.5.21301.5",
|
|
||||||
"runtime.osx-x64.runtime.native.System.IO.Ports": "6.0.0-preview.5.21301.5"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"runtime.osx-x64.runtime.native.System.IO.Ports/6.0.0-preview.5.21301.5": {
|
|
||||||
"runtimeTargets": {
|
|
||||||
"runtimes/osx-x64/native/libSystem.IO.Ports.Native.dylib": {
|
|
||||||
"rid": "osx-x64",
|
|
||||||
"assetType": "native",
|
|
||||||
"fileVersion": "0.0.0.0"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"System.CodeDom/5.0.0": {
|
"System.CodeDom/5.0.0": {
|
||||||
|
@ -129,67 +44,29 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"System.Drawing.Common/5.0.2": {
|
"System.IO.Ports/4.4.0": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.Win32.SystemEvents": "5.0.0"
|
"Microsoft.Win32.Registry": "5.0.0"
|
||||||
},
|
|
||||||
"runtime": {
|
|
||||||
"lib/netcoreapp3.0/System.Drawing.Common.dll": {
|
|
||||||
"assemblyVersion": "5.0.0.2",
|
|
||||||
"fileVersion": "5.0.421.11614"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"runtimeTargets": {
|
|
||||||
"runtimes/unix/lib/netcoreapp3.0/System.Drawing.Common.dll": {
|
|
||||||
"rid": "unix",
|
|
||||||
"assetType": "runtime",
|
|
||||||
"assemblyVersion": "5.0.0.2",
|
|
||||||
"fileVersion": "5.0.421.11614"
|
|
||||||
},
|
|
||||||
"runtimes/win/lib/netcoreapp3.0/System.Drawing.Common.dll": {
|
|
||||||
"rid": "win",
|
|
||||||
"assetType": "runtime",
|
|
||||||
"assemblyVersion": "5.0.0.2",
|
|
||||||
"fileVersion": "5.0.421.11614"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"System.IO.Ports/6.0.0-preview.5.21301.5": {
|
|
||||||
"dependencies": {
|
|
||||||
"Microsoft.Win32.Registry": "6.0.0-preview.5.21301.5",
|
|
||||||
"runtime.native.System.IO.Ports": "6.0.0-preview.5.21301.5"
|
|
||||||
},
|
},
|
||||||
"runtime": {
|
"runtime": {
|
||||||
"lib/netstandard2.0/System.IO.Ports.dll": {
|
"lib/netstandard2.0/System.IO.Ports.dll": {
|
||||||
"assemblyVersion": "6.0.0.0",
|
"assemblyVersion": "4.0.0.0",
|
||||||
"fileVersion": "6.0.21.30105"
|
"fileVersion": "4.6.25519.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"runtimeTargets": {
|
"runtimeTargets": {
|
||||||
"runtimes/linux/lib/netstandard2.0/System.IO.Ports.dll": {
|
|
||||||
"rid": "linux",
|
|
||||||
"assetType": "runtime",
|
|
||||||
"assemblyVersion": "6.0.0.0",
|
|
||||||
"fileVersion": "6.0.21.30105"
|
|
||||||
},
|
|
||||||
"runtimes/osx/lib/netstandard2.0/System.IO.Ports.dll": {
|
|
||||||
"rid": "osx",
|
|
||||||
"assetType": "runtime",
|
|
||||||
"assemblyVersion": "6.0.0.0",
|
|
||||||
"fileVersion": "6.0.21.30105"
|
|
||||||
},
|
|
||||||
"runtimes/win/lib/netstandard2.0/System.IO.Ports.dll": {
|
"runtimes/win/lib/netstandard2.0/System.IO.Ports.dll": {
|
||||||
"rid": "win",
|
"rid": "win",
|
||||||
"assetType": "runtime",
|
"assetType": "runtime",
|
||||||
"assemblyVersion": "6.0.0.0",
|
"assemblyVersion": "4.0.0.0",
|
||||||
"fileVersion": "6.0.21.30105"
|
"fileVersion": "4.6.25519.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"System.Management/5.0.0": {
|
"System.Management/5.0.0": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.NETCore.Platforms": "5.0.0",
|
"Microsoft.NETCore.Platforms": "5.0.0",
|
||||||
"Microsoft.Win32.Registry": "6.0.0-preview.5.21301.5",
|
"Microsoft.Win32.Registry": "5.0.0",
|
||||||
"System.CodeDom": "5.0.0"
|
"System.CodeDom": "5.0.0"
|
||||||
},
|
},
|
||||||
"runtime": {
|
"runtime": {
|
||||||
|
@ -207,66 +84,45 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"System.Runtime/4.3.0": {
|
"System.Security.AccessControl/5.0.0": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.NETCore.Platforms": "5.0.0",
|
"Microsoft.NETCore.Platforms": "5.0.0",
|
||||||
"Microsoft.NETCore.Targets": "1.1.0"
|
"System.Security.Principal.Windows": "5.0.0"
|
||||||
}
|
|
||||||
},
|
|
||||||
"System.Runtime.InteropServices.WindowsRuntime/4.3.0": {
|
|
||||||
"dependencies": {
|
|
||||||
"System.Runtime": "4.3.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"System.Runtime.WindowsRuntime/4.7.0": {
|
|
||||||
"dependencies": {
|
|
||||||
"Microsoft.NETCore.Platforms": "5.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"System.Runtime.WindowsRuntime.UI.Xaml/4.6.0": {
|
|
||||||
"dependencies": {
|
|
||||||
"Microsoft.NETCore.Platforms": "5.0.0",
|
|
||||||
"System.Runtime.WindowsRuntime": "4.7.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"System.Security.AccessControl/6.0.0-preview.5.21301.5": {
|
|
||||||
"dependencies": {
|
|
||||||
"System.Security.Principal.Windows": "6.0.0-preview.5.21301.5"
|
|
||||||
},
|
},
|
||||||
"runtime": {
|
"runtime": {
|
||||||
"lib/netstandard2.0/System.Security.AccessControl.dll": {
|
"lib/netstandard2.0/System.Security.AccessControl.dll": {
|
||||||
"assemblyVersion": "6.0.0.0",
|
"assemblyVersion": "5.0.0.0",
|
||||||
"fileVersion": "6.0.21.30105"
|
"fileVersion": "5.0.20.51904"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"runtimeTargets": {
|
"runtimeTargets": {
|
||||||
"runtimes/win/lib/netstandard2.0/System.Security.AccessControl.dll": {
|
"runtimes/win/lib/netcoreapp2.0/System.Security.AccessControl.dll": {
|
||||||
"rid": "win",
|
"rid": "win",
|
||||||
"assetType": "runtime",
|
"assetType": "runtime",
|
||||||
"assemblyVersion": "6.0.0.0",
|
"assemblyVersion": "5.0.0.0",
|
||||||
"fileVersion": "6.0.21.30105"
|
"fileVersion": "5.0.20.51904"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"System.Security.Principal.Windows/6.0.0-preview.5.21301.5": {
|
"System.Security.Principal.Windows/5.0.0": {
|
||||||
"runtime": {
|
"runtime": {
|
||||||
"lib/netstandard2.0/System.Security.Principal.Windows.dll": {
|
"lib/netstandard2.0/System.Security.Principal.Windows.dll": {
|
||||||
"assemblyVersion": "6.0.0.0",
|
"assemblyVersion": "5.0.0.0",
|
||||||
"fileVersion": "6.0.21.30105"
|
"fileVersion": "5.0.20.51904"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"runtimeTargets": {
|
"runtimeTargets": {
|
||||||
"runtimes/unix/lib/netcoreapp2.1/System.Security.Principal.Windows.dll": {
|
"runtimes/unix/lib/netcoreapp2.1/System.Security.Principal.Windows.dll": {
|
||||||
"rid": "unix",
|
"rid": "unix",
|
||||||
"assetType": "runtime",
|
"assetType": "runtime",
|
||||||
"assemblyVersion": "6.0.0.0",
|
"assemblyVersion": "5.0.0.0",
|
||||||
"fileVersion": "6.0.21.30105"
|
"fileVersion": "5.0.20.51904"
|
||||||
},
|
},
|
||||||
"runtimes/win/lib/netcoreapp2.1/System.Security.Principal.Windows.dll": {
|
"runtimes/win/lib/netcoreapp2.1/System.Security.Principal.Windows.dll": {
|
||||||
"rid": "win",
|
"rid": "win",
|
||||||
"assetType": "runtime",
|
"assetType": "runtime",
|
||||||
"assemblyVersion": "6.0.0.0",
|
"assemblyVersion": "5.0.0.0",
|
||||||
"fileVersion": "6.0.21.30105"
|
"fileVersion": "5.0.20.51904"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -278,13 +134,6 @@
|
||||||
"serviceable": false,
|
"serviceable": false,
|
||||||
"sha512": ""
|
"sha512": ""
|
||||||
},
|
},
|
||||||
"Bluetooth/1.0.0.2": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-dI5MtUEkDm2L81kHFeofWkpOvq7Yn2iNVl8dKa+DIeXhqHb9LrBSH7LpmaNOlZMLwQFDKageUpxV0w39GMeUag==",
|
|
||||||
"path": "bluetooth/1.0.0.2",
|
|
||||||
"hashPath": "bluetooth.1.0.0.2.nupkg.sha512"
|
|
||||||
},
|
|
||||||
"Microsoft.NETCore.Platforms/5.0.0": {
|
"Microsoft.NETCore.Platforms/5.0.0": {
|
||||||
"type": "package",
|
"type": "package",
|
||||||
"serviceable": true,
|
"serviceable": true,
|
||||||
|
@ -292,68 +141,12 @@
|
||||||
"path": "microsoft.netcore.platforms/5.0.0",
|
"path": "microsoft.netcore.platforms/5.0.0",
|
||||||
"hashPath": "microsoft.netcore.platforms.5.0.0.nupkg.sha512"
|
"hashPath": "microsoft.netcore.platforms.5.0.0.nupkg.sha512"
|
||||||
},
|
},
|
||||||
"Microsoft.NETCore.Targets/1.1.0": {
|
"Microsoft.Win32.Registry/5.0.0": {
|
||||||
"type": "package",
|
"type": "package",
|
||||||
"serviceable": true,
|
"serviceable": true,
|
||||||
"sha512": "sha512-aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==",
|
"sha512": "sha512-dDoKi0PnDz31yAyETfRntsLArTlVAVzUzCIvvEDsDsucrl33Dl8pIJG06ePTJTI3tGpeyHS9Cq7Foc/s4EeKcg==",
|
||||||
"path": "microsoft.netcore.targets/1.1.0",
|
"path": "microsoft.win32.registry/5.0.0",
|
||||||
"hashPath": "microsoft.netcore.targets.1.1.0.nupkg.sha512"
|
"hashPath": "microsoft.win32.registry.5.0.0.nupkg.sha512"
|
||||||
},
|
|
||||||
"Microsoft.Win32.Registry/6.0.0-preview.5.21301.5": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-qYLtJIAEJJmY2vXxlVO8x4uXfgq7DFOHjpmnHlLm7kmAvyNFckYY/Dx5CZythBXvI2/7sratbIGKqSTysfgZ8A==",
|
|
||||||
"path": "microsoft.win32.registry/6.0.0-preview.5.21301.5",
|
|
||||||
"hashPath": "microsoft.win32.registry.6.0.0-preview.5.21301.5.nupkg.sha512"
|
|
||||||
},
|
|
||||||
"Microsoft.Win32.SystemEvents/5.0.0": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-Bh6blKG8VAKvXiLe2L+sEsn62nc1Ij34MrNxepD2OCrS5cpCwQa9MeLyhVQPQ/R4Wlzwuy6wMK8hLb11QPDRsQ==",
|
|
||||||
"path": "microsoft.win32.systemevents/5.0.0",
|
|
||||||
"hashPath": "microsoft.win32.systemevents.5.0.0.nupkg.sha512"
|
|
||||||
},
|
|
||||||
"Microsoft.Windows.SDK.Contracts/10.0.19041.1": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-sgDwuoyubbLFNJR/BINbvfSNRiglF91D+Q0uEAkU4ZTO5Hgbnu8+gA4TCc65S56e1kK7gvR1+H4kphkDTr+9bw==",
|
|
||||||
"path": "microsoft.windows.sdk.contracts/10.0.19041.1",
|
|
||||||
"hashPath": "microsoft.windows.sdk.contracts.10.0.19041.1.nupkg.sha512"
|
|
||||||
},
|
|
||||||
"runtime.linux-arm.runtime.native.System.IO.Ports/6.0.0-preview.5.21301.5": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-VlGxrS0KZuoXA2zP/4JtcsnAUr66ivzLj2TdwXcaQ2vKTFOq9wCz7xYh08KvZVWXJKthpzhS+lWtdw/9vbVlgg==",
|
|
||||||
"path": "runtime.linux-arm.runtime.native.system.io.ports/6.0.0-preview.5.21301.5",
|
|
||||||
"hashPath": "runtime.linux-arm.runtime.native.system.io.ports.6.0.0-preview.5.21301.5.nupkg.sha512"
|
|
||||||
},
|
|
||||||
"runtime.linux-arm64.runtime.native.System.IO.Ports/6.0.0-preview.5.21301.5": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-fN2ienMgX5Gl8rmmmTkCxEBeN+KMEwHkTIE+4bHIH0sgPZJqrGV7o7sjjivZlv95L64cF+a4UVlxGqiMVEN6Nw==",
|
|
||||||
"path": "runtime.linux-arm64.runtime.native.system.io.ports/6.0.0-preview.5.21301.5",
|
|
||||||
"hashPath": "runtime.linux-arm64.runtime.native.system.io.ports.6.0.0-preview.5.21301.5.nupkg.sha512"
|
|
||||||
},
|
|
||||||
"runtime.linux-x64.runtime.native.System.IO.Ports/6.0.0-preview.5.21301.5": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-wLbxixueLlN1bT3tHi4bnXhyp2tuyJ92TBBBwW01YS4isxkLr8o4f2AGw8YbsF4y2Fgx8RRQiipkG1EFrZ7AKg==",
|
|
||||||
"path": "runtime.linux-x64.runtime.native.system.io.ports/6.0.0-preview.5.21301.5",
|
|
||||||
"hashPath": "runtime.linux-x64.runtime.native.system.io.ports.6.0.0-preview.5.21301.5.nupkg.sha512"
|
|
||||||
},
|
|
||||||
"runtime.native.System.IO.Ports/6.0.0-preview.5.21301.5": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-9Int9JpQ3quVnY3nsUFmrcanozIrEMFAydF+v8KmDwh0CtPb2AZLyyRtNEC3Z1WmoF8qf+T7jWwuPlrfl338dw==",
|
|
||||||
"path": "runtime.native.system.io.ports/6.0.0-preview.5.21301.5",
|
|
||||||
"hashPath": "runtime.native.system.io.ports.6.0.0-preview.5.21301.5.nupkg.sha512"
|
|
||||||
},
|
|
||||||
"runtime.osx-x64.runtime.native.System.IO.Ports/6.0.0-preview.5.21301.5": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-IhXEnQFgPxM/pUkEJkFBkr6XBkWFiuMGLlyl5BDG7LkJuGX4jAxJwL6n9Pue88ZyV45c0ajvuZOBnZJap+uIKA==",
|
|
||||||
"path": "runtime.osx-x64.runtime.native.system.io.ports/6.0.0-preview.5.21301.5",
|
|
||||||
"hashPath": "runtime.osx-x64.runtime.native.system.io.ports.6.0.0-preview.5.21301.5.nupkg.sha512"
|
|
||||||
},
|
},
|
||||||
"System.CodeDom/5.0.0": {
|
"System.CodeDom/5.0.0": {
|
||||||
"type": "package",
|
"type": "package",
|
||||||
|
@ -362,19 +155,12 @@
|
||||||
"path": "system.codedom/5.0.0",
|
"path": "system.codedom/5.0.0",
|
||||||
"hashPath": "system.codedom.5.0.0.nupkg.sha512"
|
"hashPath": "system.codedom.5.0.0.nupkg.sha512"
|
||||||
},
|
},
|
||||||
"System.Drawing.Common/5.0.2": {
|
"System.IO.Ports/4.4.0": {
|
||||||
"type": "package",
|
"type": "package",
|
||||||
"serviceable": true,
|
"serviceable": true,
|
||||||
"sha512": "sha512-rvr/M1WPf24ljpvvrVd74+NdjRUJu1bBkspkZcnzSZnmAUQWSvanlQ0k/hVHk+cHufZbZfu7vOh/vYc0q5Uu/A==",
|
"sha512": "sha512-izaIWbjFZdik3ypDuA6GWj6fabhB+tR5M7QLcvAqd+I+VjI8UWoVZkh68Ao8Vf8poWWrCU875r3HQZnQW6a7GA==",
|
||||||
"path": "system.drawing.common/5.0.2",
|
"path": "system.io.ports/4.4.0",
|
||||||
"hashPath": "system.drawing.common.5.0.2.nupkg.sha512"
|
"hashPath": "system.io.ports.4.4.0.nupkg.sha512"
|
||||||
},
|
|
||||||
"System.IO.Ports/6.0.0-preview.5.21301.5": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-9jguTG3uxGLvERVKV6w8ctcaYktBv8ssZgl6xm1hI89BBIaU6WwC2SQt9ur+TT8UMxdu9ZG+QQMbCJKEKv9dnQ==",
|
|
||||||
"path": "system.io.ports/6.0.0-preview.5.21301.5",
|
|
||||||
"hashPath": "system.io.ports.6.0.0-preview.5.21301.5.nupkg.sha512"
|
|
||||||
},
|
},
|
||||||
"System.Management/5.0.0": {
|
"System.Management/5.0.0": {
|
||||||
"type": "package",
|
"type": "package",
|
||||||
|
@ -383,47 +169,19 @@
|
||||||
"path": "system.management/5.0.0",
|
"path": "system.management/5.0.0",
|
||||||
"hashPath": "system.management.5.0.0.nupkg.sha512"
|
"hashPath": "system.management.5.0.0.nupkg.sha512"
|
||||||
},
|
},
|
||||||
"System.Runtime/4.3.0": {
|
"System.Security.AccessControl/5.0.0": {
|
||||||
"type": "package",
|
"type": "package",
|
||||||
"serviceable": true,
|
"serviceable": true,
|
||||||
"sha512": "sha512-JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==",
|
"sha512": "sha512-dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==",
|
||||||
"path": "system.runtime/4.3.0",
|
"path": "system.security.accesscontrol/5.0.0",
|
||||||
"hashPath": "system.runtime.4.3.0.nupkg.sha512"
|
"hashPath": "system.security.accesscontrol.5.0.0.nupkg.sha512"
|
||||||
},
|
},
|
||||||
"System.Runtime.InteropServices.WindowsRuntime/4.3.0": {
|
"System.Security.Principal.Windows/5.0.0": {
|
||||||
"type": "package",
|
"type": "package",
|
||||||
"serviceable": true,
|
"serviceable": true,
|
||||||
"sha512": "sha512-J4GUi3xZQLUBasNwZnjrffN8i5wpHrBtZoLG+OhRyGo/+YunMRWWtwoMDlUAIdmX0uRfpHIBDSV6zyr3yf00TA==",
|
"sha512": "sha512-t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA==",
|
||||||
"path": "system.runtime.interopservices.windowsruntime/4.3.0",
|
"path": "system.security.principal.windows/5.0.0",
|
||||||
"hashPath": "system.runtime.interopservices.windowsruntime.4.3.0.nupkg.sha512"
|
"hashPath": "system.security.principal.windows.5.0.0.nupkg.sha512"
|
||||||
},
|
|
||||||
"System.Runtime.WindowsRuntime/4.7.0": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-RQxUkf37fp7MSWbOfKRjUjyudyfZb2u79YY5i1s+d7vuD80A7kmr2YfefO0JprQUhanxSm8bhXigCVfX2kEh+w==",
|
|
||||||
"path": "system.runtime.windowsruntime/4.7.0",
|
|
||||||
"hashPath": "system.runtime.windowsruntime.4.7.0.nupkg.sha512"
|
|
||||||
},
|
|
||||||
"System.Runtime.WindowsRuntime.UI.Xaml/4.6.0": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-r4tNw5v5kqRJ9HikWpcyNf3suGw7DjX93svj9iBjtdeLqL8jt9Z+7f+s4wrKZJr84u8IMsrIjt8K6jYvkRqMSg==",
|
|
||||||
"path": "system.runtime.windowsruntime.ui.xaml/4.6.0",
|
|
||||||
"hashPath": "system.runtime.windowsruntime.ui.xaml.4.6.0.nupkg.sha512"
|
|
||||||
},
|
|
||||||
"System.Security.AccessControl/6.0.0-preview.5.21301.5": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-EA9ul7nGN8oggMvloILnR+wnrbgLNZZQBYHq5nEq/ixwnKLV3M3Tbd1Jbj8oGck3XMj0owq81e4Jxp3s0IMICw==",
|
|
||||||
"path": "system.security.accesscontrol/6.0.0-preview.5.21301.5",
|
|
||||||
"hashPath": "system.security.accesscontrol.6.0.0-preview.5.21301.5.nupkg.sha512"
|
|
||||||
},
|
|
||||||
"System.Security.Principal.Windows/6.0.0-preview.5.21301.5": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-ywwCqFAaRVbgqqORqYg8jdaX6NUEpzbuhxyUhAs+7mZ8AFAO4PzFYrZ5JPkYejXwougDldtbi0zOkk1lLzugLw==",
|
|
||||||
"path": "system.security.principal.windows/6.0.0-preview.5.21301.5",
|
|
||||||
"hashPath": "system.security.principal.windows.6.0.0-preview.5.21301.5.nupkg.sha512"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"runtimeOptions": {
|
"runtimeOptions": {
|
||||||
"additionalProbingPaths": [
|
"additionalProbingPaths": [
|
||||||
"C:\\Users\\Besitzer\\.dotnet\\store\\|arch|\\|tfm|",
|
"C:\\Users\\SvenV\\.dotnet\\store\\|arch|\\|tfm|",
|
||||||
"C:\\Users\\Besitzer\\.nuget\\packages"
|
"C:\\Users\\SvenV\\.nuget\\packages"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,187 @@
|
||||||
|
{
|
||||||
|
"runtimeTarget": {
|
||||||
|
"name": ".NETCoreApp,Version=v3.1",
|
||||||
|
"signature": ""
|
||||||
|
},
|
||||||
|
"compilationOptions": {},
|
||||||
|
"targets": {
|
||||||
|
".NETCoreApp,Version=v3.1": {
|
||||||
|
"Matrix App/1.0.0": {
|
||||||
|
"dependencies": {
|
||||||
|
"System.IO.Ports": "4.4.0",
|
||||||
|
"System.Management": "5.0.0"
|
||||||
|
},
|
||||||
|
"runtime": {
|
||||||
|
"Matrix App.dll": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Microsoft.NETCore.Platforms/5.0.0": {},
|
||||||
|
"Microsoft.Win32.Registry/5.0.0": {
|
||||||
|
"dependencies": {
|
||||||
|
"System.Security.AccessControl": "5.0.0",
|
||||||
|
"System.Security.Principal.Windows": "5.0.0"
|
||||||
|
},
|
||||||
|
"runtime": {
|
||||||
|
"lib/netstandard2.0/Microsoft.Win32.Registry.dll": {
|
||||||
|
"assemblyVersion": "5.0.0.0",
|
||||||
|
"fileVersion": "5.0.20.51904"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"runtimeTargets": {
|
||||||
|
"runtimes/win/lib/netstandard2.0/Microsoft.Win32.Registry.dll": {
|
||||||
|
"rid": "win",
|
||||||
|
"assetType": "runtime",
|
||||||
|
"assemblyVersion": "5.0.0.0",
|
||||||
|
"fileVersion": "5.0.20.51904"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"System.CodeDom/5.0.0": {
|
||||||
|
"runtime": {
|
||||||
|
"lib/netstandard2.0/System.CodeDom.dll": {
|
||||||
|
"assemblyVersion": "5.0.0.0",
|
||||||
|
"fileVersion": "5.0.20.51904"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"System.IO.Ports/4.4.0": {
|
||||||
|
"dependencies": {
|
||||||
|
"Microsoft.Win32.Registry": "5.0.0"
|
||||||
|
},
|
||||||
|
"runtime": {
|
||||||
|
"lib/netstandard2.0/System.IO.Ports.dll": {
|
||||||
|
"assemblyVersion": "4.0.0.0",
|
||||||
|
"fileVersion": "4.6.25519.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"runtimeTargets": {
|
||||||
|
"runtimes/win/lib/netstandard2.0/System.IO.Ports.dll": {
|
||||||
|
"rid": "win",
|
||||||
|
"assetType": "runtime",
|
||||||
|
"assemblyVersion": "4.0.0.0",
|
||||||
|
"fileVersion": "4.6.25519.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"System.Management/5.0.0": {
|
||||||
|
"dependencies": {
|
||||||
|
"Microsoft.NETCore.Platforms": "5.0.0",
|
||||||
|
"Microsoft.Win32.Registry": "5.0.0",
|
||||||
|
"System.CodeDom": "5.0.0"
|
||||||
|
},
|
||||||
|
"runtime": {
|
||||||
|
"lib/netstandard2.0/System.Management.dll": {
|
||||||
|
"assemblyVersion": "4.0.0.0",
|
||||||
|
"fileVersion": "5.0.20.51904"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"runtimeTargets": {
|
||||||
|
"runtimes/win/lib/netcoreapp2.0/System.Management.dll": {
|
||||||
|
"rid": "win",
|
||||||
|
"assetType": "runtime",
|
||||||
|
"assemblyVersion": "4.0.0.0",
|
||||||
|
"fileVersion": "5.0.20.51904"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"System.Security.AccessControl/5.0.0": {
|
||||||
|
"dependencies": {
|
||||||
|
"Microsoft.NETCore.Platforms": "5.0.0",
|
||||||
|
"System.Security.Principal.Windows": "5.0.0"
|
||||||
|
},
|
||||||
|
"runtime": {
|
||||||
|
"lib/netstandard2.0/System.Security.AccessControl.dll": {
|
||||||
|
"assemblyVersion": "5.0.0.0",
|
||||||
|
"fileVersion": "5.0.20.51904"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"runtimeTargets": {
|
||||||
|
"runtimes/win/lib/netcoreapp2.0/System.Security.AccessControl.dll": {
|
||||||
|
"rid": "win",
|
||||||
|
"assetType": "runtime",
|
||||||
|
"assemblyVersion": "5.0.0.0",
|
||||||
|
"fileVersion": "5.0.20.51904"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"System.Security.Principal.Windows/5.0.0": {
|
||||||
|
"runtime": {
|
||||||
|
"lib/netstandard2.0/System.Security.Principal.Windows.dll": {
|
||||||
|
"assemblyVersion": "5.0.0.0",
|
||||||
|
"fileVersion": "5.0.20.51904"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"runtimeTargets": {
|
||||||
|
"runtimes/unix/lib/netcoreapp2.1/System.Security.Principal.Windows.dll": {
|
||||||
|
"rid": "unix",
|
||||||
|
"assetType": "runtime",
|
||||||
|
"assemblyVersion": "5.0.0.0",
|
||||||
|
"fileVersion": "5.0.20.51904"
|
||||||
|
},
|
||||||
|
"runtimes/win/lib/netcoreapp2.1/System.Security.Principal.Windows.dll": {
|
||||||
|
"rid": "win",
|
||||||
|
"assetType": "runtime",
|
||||||
|
"assemblyVersion": "5.0.0.0",
|
||||||
|
"fileVersion": "5.0.20.51904"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"libraries": {
|
||||||
|
"Matrix App/1.0.0": {
|
||||||
|
"type": "project",
|
||||||
|
"serviceable": false,
|
||||||
|
"sha512": ""
|
||||||
|
},
|
||||||
|
"Microsoft.NETCore.Platforms/5.0.0": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-VyPlqzH2wavqquTcYpkIIAQ6WdenuKoFN0BdYBbCWsclXacSOHNQn66Gt4z5NBqEYW0FAPm5rlvki9ZiCij5xQ==",
|
||||||
|
"path": "microsoft.netcore.platforms/5.0.0",
|
||||||
|
"hashPath": "microsoft.netcore.platforms.5.0.0.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"Microsoft.Win32.Registry/5.0.0": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-dDoKi0PnDz31yAyETfRntsLArTlVAVzUzCIvvEDsDsucrl33Dl8pIJG06ePTJTI3tGpeyHS9Cq7Foc/s4EeKcg==",
|
||||||
|
"path": "microsoft.win32.registry/5.0.0",
|
||||||
|
"hashPath": "microsoft.win32.registry.5.0.0.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"System.CodeDom/5.0.0": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-JPJArwA1kdj8qDAkY2XGjSWoYnqiM7q/3yRNkt6n28Mnn95MuEGkZXUbPBf7qc3IjwrGY5ttQon7yqHZyQJmOQ==",
|
||||||
|
"path": "system.codedom/5.0.0",
|
||||||
|
"hashPath": "system.codedom.5.0.0.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"System.IO.Ports/4.4.0": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-izaIWbjFZdik3ypDuA6GWj6fabhB+tR5M7QLcvAqd+I+VjI8UWoVZkh68Ao8Vf8poWWrCU875r3HQZnQW6a7GA==",
|
||||||
|
"path": "system.io.ports/4.4.0",
|
||||||
|
"hashPath": "system.io.ports.4.4.0.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"System.Management/5.0.0": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-MF1CHaRcC+MLFdnDthv4/bKWBZnlnSpkGqa87pKukQefgEdwtb9zFW6zs0GjPp73qtpYYg4q6PEKbzJbxCpKfw==",
|
||||||
|
"path": "system.management/5.0.0",
|
||||||
|
"hashPath": "system.management.5.0.0.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"System.Security.AccessControl/5.0.0": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==",
|
||||||
|
"path": "system.security.accesscontrol/5.0.0",
|
||||||
|
"hashPath": "system.security.accesscontrol.5.0.0.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"System.Security.Principal.Windows/5.0.0": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA==",
|
||||||
|
"path": "system.security.principal.windows/5.0.0",
|
||||||
|
"hashPath": "system.security.principal.windows.5.0.0.nupkg.sha512"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,278 +0,0 @@
|
||||||
{
|
|
||||||
"runtimeTarget": {
|
|
||||||
"name": ".NETCoreApp,Version=v3.1",
|
|
||||||
"signature": ""
|
|
||||||
},
|
|
||||||
"compilationOptions": {},
|
|
||||||
"targets": {
|
|
||||||
".NETCoreApp,Version=v3.1": {
|
|
||||||
"Matrix App/1.0.0": {
|
|
||||||
"dependencies": {
|
|
||||||
"System.IO.Ports": "6.0.0-preview.5.21301.5",
|
|
||||||
"System.Management": "5.0.0"
|
|
||||||
},
|
|
||||||
"runtime": {
|
|
||||||
"Matrix App.dll": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Microsoft.NETCore.Platforms/5.0.0": {},
|
|
||||||
"Microsoft.Win32.Registry/6.0.0-preview.5.21301.5": {
|
|
||||||
"dependencies": {
|
|
||||||
"System.Security.AccessControl": "6.0.0-preview.5.21301.5",
|
|
||||||
"System.Security.Principal.Windows": "6.0.0-preview.5.21301.5"
|
|
||||||
},
|
|
||||||
"runtime": {
|
|
||||||
"lib/netstandard2.0/Microsoft.Win32.Registry.dll": {
|
|
||||||
"assemblyVersion": "6.0.0.0",
|
|
||||||
"fileVersion": "6.0.21.30105"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"runtimeTargets": {
|
|
||||||
"runtimes/win/lib/netstandard2.0/Microsoft.Win32.Registry.dll": {
|
|
||||||
"rid": "win",
|
|
||||||
"assetType": "runtime",
|
|
||||||
"assemblyVersion": "6.0.0.0",
|
|
||||||
"fileVersion": "6.0.21.30105"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"runtime.linux-arm.runtime.native.System.IO.Ports/6.0.0-preview.5.21301.5": {
|
|
||||||
"runtimeTargets": {
|
|
||||||
"runtimes/linux-arm/native/libSystem.IO.Ports.Native.so": {
|
|
||||||
"rid": "linux-arm",
|
|
||||||
"assetType": "native",
|
|
||||||
"fileVersion": "0.0.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"runtime.linux-arm64.runtime.native.System.IO.Ports/6.0.0-preview.5.21301.5": {
|
|
||||||
"runtimeTargets": {
|
|
||||||
"runtimes/linux-arm64/native/libSystem.IO.Ports.Native.so": {
|
|
||||||
"rid": "linux-arm64",
|
|
||||||
"assetType": "native",
|
|
||||||
"fileVersion": "0.0.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"runtime.linux-x64.runtime.native.System.IO.Ports/6.0.0-preview.5.21301.5": {
|
|
||||||
"runtimeTargets": {
|
|
||||||
"runtimes/linux-x64/native/libSystem.IO.Ports.Native.so": {
|
|
||||||
"rid": "linux-x64",
|
|
||||||
"assetType": "native",
|
|
||||||
"fileVersion": "0.0.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"runtime.native.System.IO.Ports/6.0.0-preview.5.21301.5": {
|
|
||||||
"dependencies": {
|
|
||||||
"runtime.linux-arm.runtime.native.System.IO.Ports": "6.0.0-preview.5.21301.5",
|
|
||||||
"runtime.linux-arm64.runtime.native.System.IO.Ports": "6.0.0-preview.5.21301.5",
|
|
||||||
"runtime.linux-x64.runtime.native.System.IO.Ports": "6.0.0-preview.5.21301.5",
|
|
||||||
"runtime.osx-x64.runtime.native.System.IO.Ports": "6.0.0-preview.5.21301.5"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"runtime.osx-x64.runtime.native.System.IO.Ports/6.0.0-preview.5.21301.5": {
|
|
||||||
"runtimeTargets": {
|
|
||||||
"runtimes/osx-x64/native/libSystem.IO.Ports.Native.dylib": {
|
|
||||||
"rid": "osx-x64",
|
|
||||||
"assetType": "native",
|
|
||||||
"fileVersion": "0.0.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"System.CodeDom/5.0.0": {
|
|
||||||
"runtime": {
|
|
||||||
"lib/netstandard2.0/System.CodeDom.dll": {
|
|
||||||
"assemblyVersion": "5.0.0.0",
|
|
||||||
"fileVersion": "5.0.20.51904"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"System.IO.Ports/6.0.0-preview.5.21301.5": {
|
|
||||||
"dependencies": {
|
|
||||||
"Microsoft.Win32.Registry": "6.0.0-preview.5.21301.5",
|
|
||||||
"runtime.native.System.IO.Ports": "6.0.0-preview.5.21301.5"
|
|
||||||
},
|
|
||||||
"runtime": {
|
|
||||||
"lib/netstandard2.0/System.IO.Ports.dll": {
|
|
||||||
"assemblyVersion": "6.0.0.0",
|
|
||||||
"fileVersion": "6.0.21.30105"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"runtimeTargets": {
|
|
||||||
"runtimes/linux/lib/netstandard2.0/System.IO.Ports.dll": {
|
|
||||||
"rid": "linux",
|
|
||||||
"assetType": "runtime",
|
|
||||||
"assemblyVersion": "6.0.0.0",
|
|
||||||
"fileVersion": "6.0.21.30105"
|
|
||||||
},
|
|
||||||
"runtimes/osx/lib/netstandard2.0/System.IO.Ports.dll": {
|
|
||||||
"rid": "osx",
|
|
||||||
"assetType": "runtime",
|
|
||||||
"assemblyVersion": "6.0.0.0",
|
|
||||||
"fileVersion": "6.0.21.30105"
|
|
||||||
},
|
|
||||||
"runtimes/win/lib/netstandard2.0/System.IO.Ports.dll": {
|
|
||||||
"rid": "win",
|
|
||||||
"assetType": "runtime",
|
|
||||||
"assemblyVersion": "6.0.0.0",
|
|
||||||
"fileVersion": "6.0.21.30105"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"System.Management/5.0.0": {
|
|
||||||
"dependencies": {
|
|
||||||
"Microsoft.NETCore.Platforms": "5.0.0",
|
|
||||||
"Microsoft.Win32.Registry": "6.0.0-preview.5.21301.5",
|
|
||||||
"System.CodeDom": "5.0.0"
|
|
||||||
},
|
|
||||||
"runtime": {
|
|
||||||
"lib/netstandard2.0/System.Management.dll": {
|
|
||||||
"assemblyVersion": "4.0.0.0",
|
|
||||||
"fileVersion": "5.0.20.51904"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"runtimeTargets": {
|
|
||||||
"runtimes/win/lib/netcoreapp2.0/System.Management.dll": {
|
|
||||||
"rid": "win",
|
|
||||||
"assetType": "runtime",
|
|
||||||
"assemblyVersion": "4.0.0.0",
|
|
||||||
"fileVersion": "5.0.20.51904"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"System.Security.AccessControl/6.0.0-preview.5.21301.5": {
|
|
||||||
"dependencies": {
|
|
||||||
"System.Security.Principal.Windows": "6.0.0-preview.5.21301.5"
|
|
||||||
},
|
|
||||||
"runtime": {
|
|
||||||
"lib/netstandard2.0/System.Security.AccessControl.dll": {
|
|
||||||
"assemblyVersion": "6.0.0.0",
|
|
||||||
"fileVersion": "6.0.21.30105"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"runtimeTargets": {
|
|
||||||
"runtimes/win/lib/netstandard2.0/System.Security.AccessControl.dll": {
|
|
||||||
"rid": "win",
|
|
||||||
"assetType": "runtime",
|
|
||||||
"assemblyVersion": "6.0.0.0",
|
|
||||||
"fileVersion": "6.0.21.30105"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"System.Security.Principal.Windows/6.0.0-preview.5.21301.5": {
|
|
||||||
"runtime": {
|
|
||||||
"lib/netstandard2.0/System.Security.Principal.Windows.dll": {
|
|
||||||
"assemblyVersion": "6.0.0.0",
|
|
||||||
"fileVersion": "6.0.21.30105"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"runtimeTargets": {
|
|
||||||
"runtimes/unix/lib/netcoreapp2.1/System.Security.Principal.Windows.dll": {
|
|
||||||
"rid": "unix",
|
|
||||||
"assetType": "runtime",
|
|
||||||
"assemblyVersion": "6.0.0.0",
|
|
||||||
"fileVersion": "6.0.21.30105"
|
|
||||||
},
|
|
||||||
"runtimes/win/lib/netcoreapp2.1/System.Security.Principal.Windows.dll": {
|
|
||||||
"rid": "win",
|
|
||||||
"assetType": "runtime",
|
|
||||||
"assemblyVersion": "6.0.0.0",
|
|
||||||
"fileVersion": "6.0.21.30105"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"libraries": {
|
|
||||||
"Matrix App/1.0.0": {
|
|
||||||
"type": "project",
|
|
||||||
"serviceable": false,
|
|
||||||
"sha512": ""
|
|
||||||
},
|
|
||||||
"Microsoft.NETCore.Platforms/5.0.0": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-VyPlqzH2wavqquTcYpkIIAQ6WdenuKoFN0BdYBbCWsclXacSOHNQn66Gt4z5NBqEYW0FAPm5rlvki9ZiCij5xQ==",
|
|
||||||
"path": "microsoft.netcore.platforms/5.0.0",
|
|
||||||
"hashPath": "microsoft.netcore.platforms.5.0.0.nupkg.sha512"
|
|
||||||
},
|
|
||||||
"Microsoft.Win32.Registry/6.0.0-preview.5.21301.5": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-qYLtJIAEJJmY2vXxlVO8x4uXfgq7DFOHjpmnHlLm7kmAvyNFckYY/Dx5CZythBXvI2/7sratbIGKqSTysfgZ8A==",
|
|
||||||
"path": "microsoft.win32.registry/6.0.0-preview.5.21301.5",
|
|
||||||
"hashPath": "microsoft.win32.registry.6.0.0-preview.5.21301.5.nupkg.sha512"
|
|
||||||
},
|
|
||||||
"runtime.linux-arm.runtime.native.System.IO.Ports/6.0.0-preview.5.21301.5": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-VlGxrS0KZuoXA2zP/4JtcsnAUr66ivzLj2TdwXcaQ2vKTFOq9wCz7xYh08KvZVWXJKthpzhS+lWtdw/9vbVlgg==",
|
|
||||||
"path": "runtime.linux-arm.runtime.native.system.io.ports/6.0.0-preview.5.21301.5",
|
|
||||||
"hashPath": "runtime.linux-arm.runtime.native.system.io.ports.6.0.0-preview.5.21301.5.nupkg.sha512"
|
|
||||||
},
|
|
||||||
"runtime.linux-arm64.runtime.native.System.IO.Ports/6.0.0-preview.5.21301.5": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-fN2ienMgX5Gl8rmmmTkCxEBeN+KMEwHkTIE+4bHIH0sgPZJqrGV7o7sjjivZlv95L64cF+a4UVlxGqiMVEN6Nw==",
|
|
||||||
"path": "runtime.linux-arm64.runtime.native.system.io.ports/6.0.0-preview.5.21301.5",
|
|
||||||
"hashPath": "runtime.linux-arm64.runtime.native.system.io.ports.6.0.0-preview.5.21301.5.nupkg.sha512"
|
|
||||||
},
|
|
||||||
"runtime.linux-x64.runtime.native.System.IO.Ports/6.0.0-preview.5.21301.5": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-wLbxixueLlN1bT3tHi4bnXhyp2tuyJ92TBBBwW01YS4isxkLr8o4f2AGw8YbsF4y2Fgx8RRQiipkG1EFrZ7AKg==",
|
|
||||||
"path": "runtime.linux-x64.runtime.native.system.io.ports/6.0.0-preview.5.21301.5",
|
|
||||||
"hashPath": "runtime.linux-x64.runtime.native.system.io.ports.6.0.0-preview.5.21301.5.nupkg.sha512"
|
|
||||||
},
|
|
||||||
"runtime.native.System.IO.Ports/6.0.0-preview.5.21301.5": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-9Int9JpQ3quVnY3nsUFmrcanozIrEMFAydF+v8KmDwh0CtPb2AZLyyRtNEC3Z1WmoF8qf+T7jWwuPlrfl338dw==",
|
|
||||||
"path": "runtime.native.system.io.ports/6.0.0-preview.5.21301.5",
|
|
||||||
"hashPath": "runtime.native.system.io.ports.6.0.0-preview.5.21301.5.nupkg.sha512"
|
|
||||||
},
|
|
||||||
"runtime.osx-x64.runtime.native.System.IO.Ports/6.0.0-preview.5.21301.5": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-IhXEnQFgPxM/pUkEJkFBkr6XBkWFiuMGLlyl5BDG7LkJuGX4jAxJwL6n9Pue88ZyV45c0ajvuZOBnZJap+uIKA==",
|
|
||||||
"path": "runtime.osx-x64.runtime.native.system.io.ports/6.0.0-preview.5.21301.5",
|
|
||||||
"hashPath": "runtime.osx-x64.runtime.native.system.io.ports.6.0.0-preview.5.21301.5.nupkg.sha512"
|
|
||||||
},
|
|
||||||
"System.CodeDom/5.0.0": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-JPJArwA1kdj8qDAkY2XGjSWoYnqiM7q/3yRNkt6n28Mnn95MuEGkZXUbPBf7qc3IjwrGY5ttQon7yqHZyQJmOQ==",
|
|
||||||
"path": "system.codedom/5.0.0",
|
|
||||||
"hashPath": "system.codedom.5.0.0.nupkg.sha512"
|
|
||||||
},
|
|
||||||
"System.IO.Ports/6.0.0-preview.5.21301.5": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-9jguTG3uxGLvERVKV6w8ctcaYktBv8ssZgl6xm1hI89BBIaU6WwC2SQt9ur+TT8UMxdu9ZG+QQMbCJKEKv9dnQ==",
|
|
||||||
"path": "system.io.ports/6.0.0-preview.5.21301.5",
|
|
||||||
"hashPath": "system.io.ports.6.0.0-preview.5.21301.5.nupkg.sha512"
|
|
||||||
},
|
|
||||||
"System.Management/5.0.0": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-MF1CHaRcC+MLFdnDthv4/bKWBZnlnSpkGqa87pKukQefgEdwtb9zFW6zs0GjPp73qtpYYg4q6PEKbzJbxCpKfw==",
|
|
||||||
"path": "system.management/5.0.0",
|
|
||||||
"hashPath": "system.management.5.0.0.nupkg.sha512"
|
|
||||||
},
|
|
||||||
"System.Security.AccessControl/6.0.0-preview.5.21301.5": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-EA9ul7nGN8oggMvloILnR+wnrbgLNZZQBYHq5nEq/ixwnKLV3M3Tbd1Jbj8oGck3XMj0owq81e4Jxp3s0IMICw==",
|
|
||||||
"path": "system.security.accesscontrol/6.0.0-preview.5.21301.5",
|
|
||||||
"hashPath": "system.security.accesscontrol.6.0.0-preview.5.21301.5.nupkg.sha512"
|
|
||||||
},
|
|
||||||
"System.Security.Principal.Windows/6.0.0-preview.5.21301.5": {
|
|
||||||
"type": "package",
|
|
||||||
"serviceable": true,
|
|
||||||
"sha512": "sha512-ywwCqFAaRVbgqqORqYg8jdaX6NUEpzbuhxyUhAs+7mZ8AFAO4PzFYrZ5JPkYejXwougDldtbi0zOkk1lLzugLw==",
|
|
||||||
"path": "system.security.principal.windows/6.0.0-preview.5.21301.5",
|
|
||||||
"hashPath": "system.security.principal.windows.6.0.0-preview.5.21301.5.nupkg.sha512"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|