Ejemplo n.º 1
0
 public SettingsHelper(string database)
 {
     Database = database;
     _isLoaded = false;
     // figure out who's calling us
     string executablePath = Path.GetDirectoryName(Application.ExecutablePath);
     if (executablePath == null)
     {
         return;
     }
     if (executablePath.Contains("FieldWorks 7") || executablePath.Contains("FieldWorks"))
     {
         _hostProgram = HostProgram.FieldWorks;
     }
     else if (executablePath.Contains("Paratext"))
     {
         _hostProgram = HostProgram.Paratext;
     }
     else if (executablePath.Contains("PathwayB"))
     {
         _hostProgram = HostProgram.PathwayB;
     }
     else
     {
         // This could be the configuration tool, nunit test, etc. - 
         // whatever it is, it doesn't have a settings file we need to look at.
         _hostProgram = HostProgram.Other;
     }
 }
Ejemplo n.º 2
0
        public SettingsHelper(string database)
        {
            Database  = database;
            _isLoaded = false;
            // figure out who's calling us
            string executablePath = Path.GetDirectoryName(Application.ExecutablePath);

            if (executablePath == null)
            {
                return;
            }
            if (executablePath.ToLower().Contains("fieldworks"))
            {
                _hostProgram = HostProgram.FieldWorks;
            }
            else if (executablePath.ToLower().Contains("paratext"))
            {
                _hostProgram = HostProgram.Paratext;
            }
            else if (executablePath.ToLower().Contains("export"))
            {
                _hostProgram = HostProgram.PathwayExport;
            }
            else if (executablePath.ToLower().Contains("pathwayb"))
            {
                _hostProgram = HostProgram.PathwayB;
            }
            else
            {
                // This could be the configuration tool, nunit test, etc. -
                // whatever it is, it doesn't have a settings file we need to look at.
                _hostProgram = HostProgram.Other;
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Dispose of the host shader resources.
        /// </summary>
        public void Dispose()
        {
            HostProgram.Dispose();

            foreach (ShaderCodeHolder holder in Shaders)
            {
                holder?.HostShader.Dispose();
            }
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Dispose of the host shader resources.
 /// </summary>
 public void Dispose()
 {
     HostProgram.Dispose();
 }
Ejemplo n.º 5
0
        internal static void Main(string[] args)
        {
            var program = new HostProgram("http://localhost:6003");

            program.Main <Startup>();
        }