This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -ex | |
MODULE_OPTS=""; # "disable_advanced_gui=yes module_enet_enabled=no module_openxr_enabled=yes module_text_server_adv_enabled=no module_text_server_fb_enabled=yes module_jsonrpc_enabled=no module_mbedtls_enabled=no module_mobile_vr_enabled=yes module_regex_enabled=no module_svg_enabled=no module_tga_enabled=no module_webrtc_enabled=no module_websocket_enabled=no module_multiplayer_enabled=no module_upnp_enabled=no module_webp_enabled=no module_webxr_enabled=no module_zip_enabled=no module_vorbis_enabled=no module_vhacd_enabled=no module_tinyexr_enabled=no module_theora_enabled=no" | |
MODE=$1 | |
shift; | |
PLATFORM=$1 | |
shift; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RideTheComet : View | |
{ | |
public record CometRide | |
{ | |
public int Rides { get; init; } = 0; | |
public string CometTrain => "☄️".Repeat(Rides); | |
} | |
CometRide state = new CometRide(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RideTheComet : View | |
{ | |
public record CometRide | |
{ | |
public int Rides { get; init; } = 0; | |
public string CometTrain => "☄️".Repeat(Rides); | |
} | |
State<CometRide> state = new CometRide(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainPage : View | |
{ | |
readonly State<int> ImageCount = new State<int>(); | |
readonly State<List<(string Path, string Name)>> images = new List<(string Path, string Name)>(); | |
Task<FileResult> currentPickerTask; | |
[Body] | |
View body() | |
=> new VStack { | |
new HStack(Comet.VerticalAlignment.Center){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading.Tasks; | |
using System.Linq; | |
namespace gMusic | |
{ | |
public class ArtistPlayableGroup : PlayableGroup | |
{ | |
ArtistViewModel model; | |
ArtistViewModel Model {get{ return model?? (model = new ArtistViewModel()); }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class StatefulView<TMessage,TModel> : View | |
{ | |
public StatefulView() { } | |
public StatefulView(TModel initialModel) | |
{ | |
state = initialModel; | |
} | |
readonly State<TModel> state = new State<TModel>(); | |
public void Dispatch(TMessage message) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CounterView : View | |
{ | |
readonly State<int> count = 0; | |
readonly State<int> step = 1; | |
readonly State<bool> timerOn = false; | |
void init() | |
{ | |
count.Value = 1; | |
step.Value = 0; | |
timerOn.Value = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This uses Records to make the code smaller, even though it doesnt come out until C# 9 | |
//IT also uses a new abstract class, that shouldnt count against it's line count: https://gist.github.com/Clancey/1df421c93ee20832d793a96b30fec997 | |
public data class Model | |
{ | |
public int Count { get; set; } | |
public int Step { get; set; } | |
public bool TimerOn { get; set; } | |
} | |
public enum Msg | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Testclass { | |
Action<bool> MyAction { get; set; } | |
Func<Task<bool>> MyAwaitedAction { get; set; } | |
public async Task AsyncTestMethod() | |
{ | |
MyAction += (result) => { | |
Console.WriteLine(result); | |
}; | |
MyAwaitedAction += () => { |
NewerOlder