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