// [OnSerializing] // private void Onerializing(StreamingContext c) // { // if (!rememberExpCollapseState) isExpanded = false; // } private void RemExCollapseListenConfig() { // listen to parent, changes have been saved Orator.Listen(OratorRooms.TN_REM_EXCOLLAPSE_STATE, OnAnnouncedRemExCollapseState); rememberExpCollapseState = (bool)(Orator.GetLastValue(OratorRooms.TN_REM_EXCOLLAPSE_STATE) ?? false); }
public void ConfigListener(string room) { Orator.Listen(room, OnIntEvent); object lv = Orator.GetLastValue(room); if (lv != null) { Console.WriteLine("@ subchild " + index + "| got lastValue| " + lv.ToString()); } }
static void Main(string[] args) { Program p = new Program(); c0 = new Child(); // p.Test1(); // p.Test2(); p.Test3(); c1 = new Child(); object lv = Orator.GetLastValue(MODIFY_EVT_NAME); Console.WriteLine("\n@ program| lastValue (before clear)| " + lv?.ToString() ?? "is null"); Orator.ClearLastValue(MODIFY_EVT_NAME); lv = Orator.GetLastValue(MODIFY_EVT_NAME); Console.WriteLine("\n@ program| lastValue (after clear)| " + (lv?.ToString() ?? "is null")); Console.WriteLine("\nWaiting...\n"); Console.ReadKey(); }