void UpdateKeywords(Material m)
    {
        foreach (var n in System.Enum.GetNames(typeof(DebugMode)))
        {
            m.DisableKeyword(n);
        }

        m.EnableKeyword(debugMode.ToString());
    }
Пример #2
0
 public ActionResult Login()
 {
     if (User.Identity.IsAuthenticated)
     {
         return(RedirectToAction("Index", "Home"));
     }
     return(View(DebugMode != null ? new LoginRequest()
     {
         UserName = DebugMode.ToString()
     } : new LoginRequest()));
 }
Пример #3
0
 public void DebugAlert(DebugMode flag, String msg)
 {
     if (!DebugFlag.Contains(flag))
     {
         return;
     }
     foreach (InputHandler ih in InputHandlers.Values)
     {
         ih.Bridge.DebugAlert(flag.ToString() + ": " + msg);
     }
 }
        internal string ToJavaScriptObject()
        {
            return($@"
clientAppProfile = {{
    theme: ""{Theme}"",
    culture: ""{Culture}"",
    version: ""{AppVersion}"",
    isDebugMode: {DebugMode.ToString(CultureInfo.InvariantCulture).ToLowerInvariant()},
    appTitle: ""{AppTitle}"",
    appName: ""{AppName}"",
    desiredTimeZone: ""{DesiredTimeZoneValue}"",
    environmentConfigs: {EnvironmentConfigsJson}
}};

                ");
        }
Пример #5
0
    public void SaveSettingsToFile(string sfilename)
    {
        try
        {
            XmlDocument xmlDoc = new XmlDocument();
            XmlElement  root   = xmlDoc.CreateElement("Settings");
            xmlDoc.AppendChild(root);
            // DebugMode
            XmlElement xdebug = xmlDoc.CreateElement("DebugMode");
            xdebug.InnerText = DebugMode.ToString();
            root.AppendChild(xdebug);

            XmlElement radious = xmlDoc.CreateElement("Radius");
            radious.InnerText = GPSRadius.ToString();
            root.AppendChild(radious);

            XmlElement saveRev = xmlDoc.CreateElement("SaveReversePOI");
            saveRev.InnerText = SaveReversePOIToSQLite.ToString();
            root.AppendChild(saveRev);

            XmlElement fuzzy = xmlDoc.CreateElement("FuzzyLogicFromSQLite");
            fuzzy.InnerText = FuzzyLogicFromSQLite.ToString();
            root.AppendChild(fuzzy);

            XmlElement spref = xmlDoc.CreateElement("CreateWithoutPredefined");
            spref.InnerText = CreateWithoutPredefined.ToString();
            root.AppendChild(spref);

            // now save the XML to file
            string   sxml = xmlDoc.InnerXml;
            FileInfo f    = new FileInfo(sfilename);
            if (f.Exists)
            {
                f.Delete();
            }
            File.WriteAllText(sfilename, sxml);
        }
        catch (Exception ex)
        {
            LogManager.Instance.AddLog(string.Format("Error save settings! {0}", ex.Message));
            return;
        }
    }
Пример #6
0
 private JToken GetDebugMode() => DebugMode.ToString();