Пример #1
0
 public FormTriggersMain(ModuleTriggers parentModule)
 {
     this.ParentModule = parentModule;
     InitializeComponent();
     trackBarGlobalVolume.Value = 
         GeneralHelper.ConstrainValue<int>((int)(ParentModule.Settings.Value.GlobalVolume * 100), 0, 100);
     SoundBank.GlobalVolume = ParentModule.Settings.Value.GlobalVolume;
     UpdateMuteIcon();
 }
Пример #2
0
        //defQueueSoundPlayer = new SB_SoundPlayer(Path.Combine(ParentModule.ModuleAssetDir, "defQueueSound.ogg"));
        //defQueueSoundPlayer.Load(volumeAdjust: false);

        public TriggerManager(ModuleTriggers parentModule, string player, string moduleDataDir)
        {
            this._parentModule = parentModule;
            Player = player;
            string thisNotifierDataDir = Path.Combine(moduleDataDir, player);
            if (!Directory.Exists(thisNotifierDataDir)) Directory.CreateDirectory(thisNotifierDataDir);

            Settings = new PersistentObject<NotifierSettings>(new NotifierSettings());
            Settings.SetFilePathAndLoad(Path.Combine(thisNotifierDataDir, "settings.xml"));

            //create control for Module UI
            _controlUi = new UcPlayerTriggersController();

            //create this notifier UI
            _triggersConfigUi = new FormTriggersConfig(this);

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

            WurmLogs.SubscribeToLogFeed(this.Player, OnNewLogEvents);
        }
Пример #3
0
 public SoundTriggersImporter(ModuleTriggers moduleTriggers)
 {
     _moduleTriggers = moduleTriggers;
 }