Exemple #1
0
        static void Main(string[] args)
        {
            // Uncomment this line of code to allow for debugging
            //while (!System.Diagnostics.Debugger.IsAttached) { System.Threading.Thread.Sleep(100); }

            // Searches common install locations for ShareX
            if (File.Exists("C:\\Program Files\\ShareX\\sharex.exe"))
            {
                Globals.xpath = "C:\\Program Files\\ShareX\\sharex.exe";
            }
            else if (File.Exists("C:\\Program Files (x86)\\ShareX\\sharex.exe"))
            {
                Globals.xpath = "C:\\Program Files (x86)\\ShareX\\sharex.exe";
            }
            else if (File.Exists("C:\\Program Files (x86)\\Steam\\steamapps\\common\\ShareX\\sharex.exe"))
            {
                Globals.xpath = "C:\\Program Files (x86)\\Steam\\steamapps\\common\\ShareX\\sharex.exe";
            }
            // Checks PATH to see if ShareX exists
            else if (File.Exists("sharex"))
            {
                Globals.xpath = "sharex";
            }
            // Checks currently running process for ShareX
            else if (Globals.FindShareX() != "")
            {
                Globals.xpath = Globals.FindShareX();
            }
            // Alert user that ShareX was unable to be found.
            else
            {
                Globals.xpath = null;
            }
            SDWrapper.Run(args);
        }
        static void Main(string[] args)
        {
            // Uncomment this line of code to allow for debugging
            //while (!System.Diagnostics.Debugger.IsAttached) { System.Threading.Thread.Sleep(100); }

            SDWrapper.Run(args);
        }
Exemple #3
0
        static void Main(string[] args)
        {
            // Uncomment this line of code to allow for debugging
            // while (!System.Diagnostics.Debugger.IsAttached) { System.Threading.Thread.Sleep(100); }

            FsIpcConnection instance = FsIpcConnection.GetInstance();

            SDWrapper.Run(args);
        }
Exemple #4
0
        static void Main(string[] args)
        {
#if DEBUG
            // Uncomment this line of code to allow for debugging
            //System.Diagnostics.Debugger.Launch();
#endif

            SDWrapper.Run(args);
        }
Exemple #5
0
        static void Main(string[] args)
        {
            // Uncomment this line of code to allow for debugging
            //while (!System.Diagnostics.Debugger.IsAttached) { System.Threading.Thread.Sleep(100); }

            Logger.Instance.LogMessage(TracingLevel.INFO, "Init Elite Api");

            try
            {
                GetKeyBindings(null);


                var journalPath = StandardDirectory.FullName;

                Logger.Instance.LogMessage(TracingLevel.INFO, "journal path " + journalPath);

                if (!Directory.Exists(journalPath))
                {
                    Logger.Instance.LogMessage(TracingLevel.FATAL, $"Directory doesn't exist {journalPath}");
                }

                var defaultFilter = @"Journal.*.log";
//#if DEBUG
                //defaultFilter = @"JournalAlpha.*.log";
//#endif

                StatusWatcher = new StatusWatcher(journalPath);

                StatusWatcher.StatusUpdated += EliteData.HandleStatusEvents;

                StatusWatcher.StartWatching();

                JournalWatcher = new JournalWatcher(journalPath, defaultFilter);

                JournalWatcher.AllEventHandler += EliteData.HandleEliteEvents;

                JournalWatcher.StartWatching().Wait();

                CargoWatcher = new CargoWatcher(journalPath);

                CargoWatcher.CargoUpdated += EliteData.HandleCargoEvents;

                CargoWatcher.StartWatching();
            }
            catch (Exception ex)
            {
                Logger.Instance.LogMessage(TracingLevel.FATAL, $"Elite Api: {ex}");
            }


            //EliteAPI.Events.AllEvent += (sender, e) => Console.Beep();

            Profile.ReadProfiles();


            SDWrapper.Run(args);
        }
        static void Main(string[] args)
        {
            // Uncomment this line of code to allow for debugging
            //while (!System.Diagnostics.Debugger.IsAttached) { System.Threading.Thread.Sleep(100); }
            Program.nbMonitors = Gen_init();

            SDWrapper.Run(args);

            Gen_Close();
        }
        private static void Main(string[] args)
        {
#if DEBUG
            while (!System.Diagnostics.Debugger.IsAttached)
            {
                System.Threading.Thread.Sleep(100);
            }
#endif
            SDWrapper.Run(args);
        }
        static void Main(string[] args)
        {
            // Uncomment this line of code to allow for debugging
            // while (!System.Diagnostics.Debugger.IsAttached) { System.Threading.Thread.Sleep(100); }
            // Logger.Instance.LogMessage(TracingLevel.ERROR, "Starting Simulator Controller Plugin with arguments:");
            // foreach (string s in args)
            //    Logger.Instance.LogMessage(TracingLevel.ERROR, "    " + s);

            new Thread(ServerThread).Start();

            SDWrapper.Run(args);
        }
        static void Main(string[] args)
        {
#if DEBUG
            while (!System.Diagnostics.Debugger.IsAttached)
            {
                System.Threading.Thread.Sleep(100);
            }
#endif
            ViewModel.IconManager.s_instance.NoOperation();
            Sys.s_instance.Osc.RequestRefresh();
            SDWrapper.Run(args);
            Sys.s_instance.Dispose();
        }
        static void Main(string[] args)
        {
            // Uncomment this line of code to allow for debugging
            //while (!System.Diagnostics.Debugger.IsAttached) { System.Threading.Thread.Sleep(100); }

            List <PluginActionId> supportedActionIds = new List <PluginActionId>();

            supportedActionIds.Add(new PluginActionId("com.barraider.vmmicrophone", typeof(VMMicrophone)));
            supportedActionIds.Add(new PluginActionId("com.barraider.vmmodify", typeof(VMModify)));
            supportedActionIds.Add(new PluginActionId("com.barraider.vmadvanced", typeof(VMAdvanced)));
            supportedActionIds.Add(new PluginActionId("com.barraider.vmadvancedtoggle", typeof(VMAdvancedToggle)));

            SDWrapper.Run(args, supportedActionIds.ToArray());
        }
        private static void Main(string[] args)
        {
#if DEBUG
            var seconds = 10;
            while (!System.Diagnostics.Debugger.IsAttached && seconds > 0)
            {
                Console.WriteLine($"Waiting for debugger to be attached ({seconds}s)...");
                Thread.Sleep(1000);
                seconds--;
            }
#endif

            SDWrapper.Run(args);
        }
 static void Main(string[] args)
 {
     SDWrapper.Run(args);
 }
Exemple #13
0
 internal static void Main(string[] args)
 => SDWrapper.Run(args);
Exemple #14
0
 static void Main(string[] args)
 {
     //while (!System.Diagnostics.Debugger.IsAttached) { System.Threading.Thread.Sleep(100); }
     SDWrapper.Run(args);
 }
Exemple #15
0
 private static void ConnectPlugin(string[] args) => SDWrapper.Run(args);
 static void Main(string[] args)
 {
     USM.Run();
     SDWrapper.Run(args);
 }
Exemple #17
0
 private static void Main(string[] args) => SDWrapper.Run(args);
Exemple #18
0
        static void Main(string[] args)
        {
            // Uncomment this line of code to allow for debugging
            //while (!System.Diagnostics.Debugger.IsAttached) { System.Threading.Thread.Sleep(100); }

            Logger.Instance.LogMessage(TracingLevel.INFO, "Init Elite Api");

            try
            {
                var journalPath = StandardDirectory.FullName;

                Logger.Instance.LogMessage(TracingLevel.INFO, "journal path " + journalPath);

                if (!Directory.Exists(journalPath))
                {
                    Logger.Instance.LogMessage(TracingLevel.FATAL, $"Directory doesn't exist {journalPath}");
                }

                statusWatcher = new StatusWatcher(journalPath);

                statusWatcher.StatusUpdated += EliteData.HandleStatusEvents;

                statusWatcher.StartWatching();

                watcher = new JournalWatcher(journalPath);

                watcher.AllEventHandler += EliteData.HandleEliteEvents;

                watcher.StartWatching().Wait();

                var bindingsPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Frontier Developments\Elite Dangerous\Options\Bindings");

                Logger.Instance.LogMessage(TracingLevel.INFO, "bindings path " + bindingsPath);

                if (!Directory.Exists(bindingsPath))
                {
                    Logger.Instance.LogMessage(TracingLevel.FATAL, $"Directory doesn't exist {bindingsPath}");
                }

                var bindsName = File.ReadAllText(Path.Combine(bindingsPath, "StartPreset.start"));

                var fileName = Path.Combine(bindingsPath, bindsName + ".3.0.binds");

                if (!File.Exists(fileName))
                {
                    //Logger.Instance.LogMessage(TracingLevel.ERROR, "file not found " + fileName);

                    fileName = fileName.Replace(".3.0.binds", ".binds");

                    if (!File.Exists(fileName))
                    {
                        bindingsPath = SteamPath.FindSteamEliteDirectory();

                        if (!string.IsNullOrEmpty(bindingsPath))
                        {
                            fileName = Path.Combine(bindingsPath, bindsName + ".3.0.binds");

                            if (!File.Exists(fileName))
                            {
                                //Logger.Instance.LogMessage(TracingLevel.ERROR, "file not found " + fileName);

                                fileName = fileName.Replace(".3.0.binds", ".binds");
                            }
                        }
                    }
                }

                var serializer = new XmlSerializer(typeof(UserBindings));

                Logger.Instance.LogMessage(TracingLevel.INFO, "using " + fileName);

                var reader = new StreamReader(fileName);
                Bindings = (UserBindings)serializer.Deserialize(reader);
                reader.Close();
            }
            catch (Exception ex)
            {
                Logger.Instance.LogMessage(TracingLevel.FATAL, $"Elite Api: {ex}");
            }


            //EliteAPI.Events.AllEvent += (sender, e) => Console.Beep();


            SDWrapper.Run(args);
        }