Ejemplo n.º 1
0
        public SoundNotifier(ModuleSoundNotify parentModule, string player, string moduleDataDir)
        {
            this.ParentModule = parentModule;
            Player = player;
            thisNotifierDataDir = Path.Combine(moduleDataDir, player);
            if (!Directory.Exists(thisNotifierDataDir)) Directory.CreateDirectory(thisNotifierDataDir);

            Settings = new PersistentObject<NotifierSettings>(new NotifierSettings());
            Settings.FilePath = Path.Combine(thisNotifierDataDir, "settings.xml");
            if (!Settings.Load())
            {
                Settings.Save();
            }

            //create control for Module UI
            controlUI = new UControlSoundNotifyPlayerController();

            //create this notifier UI
            SoundManagerUI = new FormSoundNotifyConfig(this);

            UpdateMutedState();
            controlUI.label1.Text = player;
            controlUI.buttonMute.Click += ToggleMute;
            controlUI.buttonConfigure.Click += Configure;
            controlUI.buttonRemove.Click += Stop;

            InitPortedCode(Player);
            WurmLogs.SubscribeToLogFeed(this.Player, OnNewLogEvents);
        }
Ejemplo n.º 2
0
 public void RemoveNotifierController(UControlSoundNotifyPlayerController controller)
 {
     flowLayoutPanel1.Controls.Remove(controller);
 }
Ejemplo n.º 3
0
 public void AddNotifierController(UControlSoundNotifyPlayerController controller)
 {
     flowLayoutPanel1.Controls.Add(controller);
 }