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); }
internal void UnregisterTimersGroup(UControlPlayerLayout layoutControl) { flowLayoutPanel1.Controls.Remove(layoutControl); _widgetManager.ResetMouseEvents(); }
internal void UnregisterTimersGroup(UControlPlayerLayout layoutControl) { ModuleUI.UnregisterTimersGroup(layoutControl); }
internal void RegisterTimersGroup(UControlPlayerLayout layoutControl) { layoutControl.WidgetManager = _widgetManager; flowLayoutPanel1.Controls.Add(layoutControl); _widgetManager.ResetMouseEvents(); }