public VSS_PreviewWindow(PrivateSettings _programSettings, VSS.VSS_Entry_Group VSSdb) { InitializeComponent(); m_GlobalHook = Gma.System.MouseKeyHook.Hook.GlobalEvents(); directWaveOut = new DirectSoundOut(60); this._programSettings = _programSettings; this.VSSdb = new VSS.VSS_Entry_Group("ROOTNODE", Keys.NoName); this.VSSdb.Nodes.Add(VSSdb); this.CurrentNode = VSSdb; UpdateColors(); preview = new VSS_Preview(pictureBoxVSSPreview, Color.Black, Color.Yellow, 24, Color.White, 18, Color.WhiteSmoke, 4); SetToRoot(); m_GlobalHook.KeyDown += M_GlobalHook_KeyDown; }
public SoundBase(string importPath, PrivateSettings programSettings) { this.programSettings = programSettings; userDB = new Dictionary <string, DateTime>(); SoundPlayererStack = new List <NSoundPlayer>(); rng = new Random(); this.delay = programSettings.Delay; this.SoundBaseFile = importPath; this.speechSynthesizer = new SpeechSynthesizer(); this.speechSynthesizer.SelectVoice(GetSafeVoice(programSettings.VoiceSynthesizer)); this.speechSynthesizer.Volume = 100; this.speechSynthesizer.Rate = -2; soundlist = SoundStorageXML.LoadSoundBase(importPath); }
private void Form1_Load(object sender, EventArgs e) { _programSettings = PrivateSettings.LoadSettings(); UpdateColors(); connectOnStartupToolStripMenuItem.Checked = _programSettings.Autostart; int valrr = Convert.ToInt32(100 * _programSettings.Volume); trackBar_Volume.Value = valrr; L_Volume.Text = trackBar_Volume.Value.ToString() + "%"; soundDb = new SoundBase(Path.Combine("SoundDBs", "sounds.xml"), _programSettings); VSSdb = SoundStorage.VSSStorageXML.LoadVSSBase(Path.Combine("SoundDBs", "VSS.xml")); if (_programSettings.Autostart) { StartBot(); } }