A Simple State Machine using a Static class in C# to notify other subscribers via Events
问题 I've been trying to write a simple Static-class State Machine for my application to notify other controls and code when the system state changes. And I think I almost have it, but I'm running into a small issue that I'm not sure how to work around. Here's the code: // An enum denoting the 3 States public enum Status { Error = -1, Working, Ready } // The main state change class public static class Sys { // system status private static Status state; // delegate and event public static delegate