Beispiel #1
0
        private async void Window_Loaded(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("You are trying to run a pre 0.1.1.0 version." +
                            "\n\nDue to massive code changes, this version is now canceled. " +
                            "It may still receive MANUAL updates on request but I hightly suggest to upgrade past version 0.1.1.0+" +
                            "\n\nHave fun using VOTC, and good luck!",
                            "This version has been discontinued");
            if (Kernel.Channel == null)
            {
                Kernel.Channel = new LogicClient("MetadataExchangeHttpBinding_ILogic", "http://eubfwcf.cloudapp.net/RemoteExecute/mex");
            }
            TextToSpeech.PrepareTextToSpeech();
            Keyboard.KeyPress(Keys.Alt);
            Kernel.Music = Directory.EnumerateFiles(Environment.GetFolderPath(Environment.SpecialFolder.MyMusic), "*.mp3").ToList();
            var remove = Kernel.Music.Where(entry => entry.Contains("AlbumArt_")).ToList();

            foreach (var entry in remove)
            {
                Kernel.Music.Remove(entry);
            }
            _watchedog.Changed            += WatchedogEvent;
            _watchedog.Created            += WatchedogEvent;
            _watchedog.Deleted            += WatchedogEvent;
            _watchedog.Renamed            += WatchedogEvent;
            _watchedog.NotifyFilter        = NotifyFilters.LastWrite | NotifyFilters.FileName;
            _watchedog.Filter              = "*.cs";
            _watchedog.EnableRaisingEvents = true;
            CatchAll.Init();
            Kernel.InitializeScriptEngine();
            if (Kernel.UsePtt)
            {
                Kernel.KeyboardHook.Hook();
            }
            if (Kernel.Tracking)
            {
                Tracking.Start();
            }
            if (string.IsNullOrEmpty(Kernel.CustomName))
            {
                Kernel.CustomName = Interaction.InputBox("How do you want to be called?", "Chose your name", "Chief");
            }

            Kernel.UI.DisplayCmd("READY!");
            TextToSpeech.Speak(await Kernel.Channel.GetQuoteAsync());
        }