public PlayerTimersGroup(ModuleTimers parentModule, string player) { this.ParentModule = parentModule; if (player != null) this.Player = player; Settings = new PersistentObject<GroupSettings>(new GroupSettings()); ThisGroupDir = Path.Combine(ParentModule.ModuleDataDir, Player); Settings.FilePath = Path.Combine(ThisGroupDir, "activeTimers.xml"); if (!Settings.Load()) Settings.Save(); LayoutControl = new UControlPlayerLayout(this); ParentModule.RegisterTimersGroup(LayoutControl); WurmLogs.SubscribeToLogFeed(Player, OnNewLogEvents); // init timers AT THE END of this async method // also may need to block adding/removing timers until this is done PerformAsyncInits(Settings.Value.LastServerGroupCheckup); }
public FormTimers(ModuleTimers moduleTimers) : this() { this.ParentModule = moduleTimers; }