illy
illy
CC#
Created by illy on 10/20/2023 in #help
❔ Releasing Software
I recently wrote a program using Avalonia, and I’ve uploaded an exe to github on the project so users can download and use the program I made. I’m running into an issue however that windows users keep getting a blue notification box when they run my program saying like Windows Stopped this file from running, and you have to click ‘More Info’ and then ‘Run Anyways’ for it to actually work and launch my program. I’m new to releasing software, so I don’t really k ow where to go to fix this. I’m not sure how to make windows happy with my program. What causes this, and how can I securely fix it?
33 replies
CC#
Created by illy on 10/19/2023 in #help
✅ Transparent Background
I'm trying to use AvaloniaUI in my project (linux, mac, and windows only) but I'm not sure how to create a window with a semi-transparent background. I'd like to be able to change the opacity of the window, however I can't figure out how to do this. Any helps?
4 replies
CC#
Created by illy on 9/26/2023 in #help
❔ Deserializing JSON
I'm working on a project where I need to deserialize a JSON api response, and do things with the data. This is a little demo thing:
class Response {
[JsonProperty("success")]
[DefaultValue(false)]
public bool Success { get; private set; }

[JsonProperty("days")]
public Days Days { get; private set; }
}

class Days {
[JsonProperty("first_day")]
[DefaultValue("monday")]
public string FirstDay { get; private set; }
}
class Response {
[JsonProperty("success")]
[DefaultValue(false)]
public bool Success { get; private set; }

[JsonProperty("days")]
public Days Days { get; private set; }
}

class Days {
[JsonProperty("first_day")]
[DefaultValue("monday")]
public string FirstDay { get; private set; }
}
My issue is, I need to be able to use Response.Days.FirstDay, when my JSON response looks like this: {'success': true, 'first_night': 'friday'} Essentially, I want the DefaultValue to be present, even if the JSON doesn't contain the 'first_day' key. I'm really not sure how to do this, because I'd need to do this with dozens of attributes in about 6 subclasses, so doing it all manually would take ages and doesn't seem good for maintainability. Any help on how I can achieve this result? To get everything to 'exist' even if it doesn't exist in the JSON, just by using the default value?
11 replies
CC#
Created by illy on 12/16/2022 in #help
❔ Following BPM with code
I’m wanting to create my own very small dmx light show maker in c#. I realize it takes forever to preprogram a song but just for the hell of it I think it would be fun. I’ve gotten as far as sending signals to the lights over USB. I’m just not sure how to change the lights at the same exact time as the rhythm of the song. I’ve tried using sleep but I can’t get it to exactly follow the BPM. Any pointers here? I’ve seen the word timecode around but I’m not sure if I want this or not.
18 replies