Beispiel #1
0
        static void Main(string[] Args)
        {
            // Command line parsing
              ArgumentProcessor CommandLine = new ArgumentProcessor(Args);

              string inputFilename;
              string outputFilename;

              // Look for specific arguments values and display them if they exist (return null if they don't)
              inputFilename = CommandLine["i"];
              if (CommandLine["i"] != null)
            Console.WriteLine("i value: " + CommandLine["i"]);
              else
            Console.WriteLine("i not defined !");

              outputFilename = CommandLine["o"];
              if (CommandLine["o"] != null)
            Console.WriteLine("o value: " + CommandLine["o"]);
              else
            Console.WriteLine("o not defined !");

              PluginManager.PluginManager manager = new PluginManager.PluginManager();
              foreach (string name in manager.PluginNames)
              {
            Console.Out.WriteLine("Loaded Plugin " + name);
              }
              MuxEngine.MuxEngine engine = new MuxEngine.MuxEngine(manager);
              engine.AddInput(inputFilename);
              engine.OutputFilename = outputFilename;
              engine.Start();

              while (engine.Complete == false)
              {
            Thread.Sleep(100);
              }

              Console.Out.WriteLine("Muxing is complete.");
              Console.Out.WriteLine("Frames Muxed: " + engine.FramesMuxed);
              Console.Out.WriteLine("Time Elapsed: " + engine.TimeElapsed);

              // Wait for key
              Console.Out.WriteLine("Press any key...");
              Console.Read();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            var commandName = "EmailPlugin";
            var pm          = new PluginManager.PluginManager(commandName);

            var emailRequestModel = new EmailRequest
            {
                FromAddress = "*****@*****.**",
                ToAddress   = "*****@*****.**",
                IsHtml      = true,
                Body        = "Body",
                Subject     = "Subject",
                MailServer  = "smtp.gmail.com",
                Username    = "******",
                Password    = "******"
            };

            string json   = JsonConvert.SerializeObject(emailRequestModel);
            var    result = pm.plugin.Execute(json); // object
        }
Beispiel #3
0
 public MuxEngine(PluginManager.PluginManager manager)
 {
     m_Manager = manager;
 }
Beispiel #4
0
        /// <summary>
        /// Constructor for Main Window
        /// </summary>
        public App()
        {
            SplashScreen sp = new SplashScreen("pictures/splashscreen2.png");
            sp.Show(true);

            try
            {
                //Initialising Classes
                GameNoiseList aPlaylist = new GameNoiseList();
                Configuration aConfiguration = LoadSettings();
                PluginManager.PluginManager aPluginManager = new PluginManager.PluginManager();

                //Load Language
                Thread.CurrentThread.CurrentCulture = new CultureInfo(aConfiguration.Language);
                Thread.CurrentThread.CurrentUICulture = new CultureInfo(aConfiguration.Language);

                aStandard = new Standard(this, aConfiguration, aPluginManager);
                Ingame aIngame;

                try
                {
                    aIngame = new Ingame(aConfiguration, this);
                }
                catch (Exception)
                {
                    aIngame = null;
                }

                //Get Window Handler and initialize BASS
                Interfaces.IBassWrapper aBassWrapper = new BassWrapper(new WindowInteropHelper(aStandard).Handle);

                //Setting references in aStandard
                aStandard.ABassWrapperGui = (Interfaces.IBassWrapperGui)aBassWrapper;

                //Setting references in aPlayControler
                PlayControler aPlayControler = new PlayControler(aConfiguration.PathTmpEqualizer);
                aStandard.APlayControler = aPlayControler;
                aPlayControler.TmpPlaylist = aPlaylist;
                aPlayControler.ABassWrapper = aBassWrapper;
                aBassWrapper.aPlayControler = aPlayControler;
                aBassWrapper.aPluginManager = aPluginManager;

                aStandard.APlaylist = aPlaylist;
                aStandard.AIngame = aIngame;
                aStandard.LoadHotKeys();

                aPlaylist.AddObserver(aStandard);
                aBassWrapper.AddObserver(aStandard);
                aConfiguration.AddObserver(aStandard);
                aPlayControler.AddObserver(aStandard);

                //Ingame references
                if (aIngame != null)
                {
                    aPlaylist.AddObserver(aIngame);
                    aBassWrapper.AddObserver(aIngame);
                    aConfiguration.AddObserver(aIngame);
                }

                //Setting references in GameNoiseList
                aPlaylist.ABassWrapperOrganisation = (Interfaces.IBassWrapperOrganisation)aBassWrapper;
                aPlaylist.APluginManager = aPluginManager;

                //Show Standard GUI
                aStandard.Show();
                aConfiguration.InitNotify();
            }
            catch (FileNotFoundException e)
            {
                new Error("File: " + e.FileName + " not found!", true,aStandard);
            }
            catch (System.Runtime.Serialization.SerializationException e)
            {
                new Error("Equalizer Settings File is courrupt: " + e.Message, false, aStandard);
            }
            catch (BassWrapperException e)
            {
                new Error(e.GetMessage(), false, aStandard);
            }
            catch (DllNotFoundException e)
            {
                new Error(e.Message, true, aStandard);
            }
            catch (NotSupportedException)
            {}
            catch (ArgumentNullException)
            {}
            catch(ArgumentException)
            {}
        }