Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
//		Debug.Log (theKeyName.ToString().GetHashCode());
        switch (theKeyName)
        {
        default:
            Sprite_Default = KeyBoardManager._instance.Letter_Sprites_Default[theKeyName.ToString().GetHashCode() - 65];
            Sprite_Hover   = KeyBoardManager._instance.Letter_Sprites_Hover[theKeyName.ToString().GetHashCode() - 65];
            Sprite_Confirm = KeyBoardManager._instance.Letter_Sprites_Confirm[theKeyName.ToString().GetHashCode() - 65];
            break;

        case KeyName.BackSpace:
            Sprite_Default = KeyBoardManager._instance.Letter_Sprites_Default[26];
            Sprite_Hover   = KeyBoardManager._instance.Letter_Sprites_Hover[26];
            Sprite_Confirm = KeyBoardManager._instance.Letter_Sprites_Confirm[26];
            break;

        case KeyName.Enter:
            Sprite_Default = KeyBoardManager._instance.Letter_Sprites_Default[27];
            Sprite_Hover   = KeyBoardManager._instance.Letter_Sprites_Hover[27];
            Sprite_Confirm = KeyBoardManager._instance.Letter_Sprites_Confirm[27];
            break;
        }
        _Image.sprite = Sprite_Default;
    }
Ejemplo n.º 2
0
 public static bool SetConfigurationValue(KeyName key, string value)
 {
     try
     {
         if (!File.Exists(PublicConfigFilePath))
         {
             CopyConfigFile();
             ExeConfigurationFileMap fileMap = new ExeConfigurationFileMap()
             {
                 ExeConfigFilename = PublicConfigFilePath
             };
             config     = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None);
             appSection = config.AppSettings;
             SetConfigurationValue(KeyName.version, Assembly.GetEntryAssembly().GetName().Version.ToString());
         }
         if (appSection.Settings.AllKeys.Contains(key.ToString()))
         {
             appSection.Settings[key.ToString()].Value = value;
         }
         else
         {
             appSection.Settings.Add(key.ToString(), value);
         }
         config.Save();
         return(true);
     }
     catch { }
     return(false);
 }
Ejemplo n.º 3
0
 public static string GetConfigurationValue(KeyName key)
 {
     try
     {
         if (appSection.Settings.AllKeys.Contains(key.ToString()))
         {
             return(appSection.Settings[key.ToString()].Value);
         }
         return(string.Empty);
     }
     catch
     {
         return(string.Empty);
     }
 }
Ejemplo n.º 4
0
 public static string GetConfigurationValue(KeyName key)
 {
     try
     {
         return(appSection.Settings[key.ToString()].Value);
     }
     catch
     {
         return("");
     }
 }
Ejemplo n.º 5
0
        public String GetValue(String paPrinterName, KeyName paKey)
        {
            JObject lcJObject;

            if ((lcJObject = clPrinterList[paPrinterName]) != null)
            {
                return(General.GetJValueStr((JValue)lcJObject[paKey.ToString()]));
            }

            return(String.Empty);
        }
Ejemplo n.º 6
0
        public static Color GetRegistryValue(KeyName keyPlace)
        {
            var regKey = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(@"SoftWare\so2Analyze\color");

            var argb = regKey.GetValue(keyPlace.ToString(), SystemColors.Control.ToArgb());

            if (keyPlace == KeyName.StrColor && (int)argb == SystemColors.Control.ToArgb())
            {
                return(Color.Black);
            }

            return(Color.FromArgb((int)argb));
        }
Ejemplo n.º 7
0
 public static bool SetConfigurationValue(KeyName key, string value)
 {
     try
     {
         if (!File.Exists(PublicConfigFilePath))
         {
             CopyConfigFile();
             ExeConfigurationFileMap fileMap = new ExeConfigurationFileMap() { ExeConfigFilename = PublicConfigFilePath };
             config = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None);
             appSection = config.AppSettings;
             SetConfigurationValue(KeyName.version, Assembly.GetEntryAssembly().GetName().Version.ToString());
         }
         if (appSection.Settings.AllKeys.Contains(key.ToString()))
         {
             appSection.Settings[key.ToString()].Value = value;
         }
         else
         {
             appSection.Settings.Add(key.ToString(), value);
         }
         config.Save();
         return true;
     }
     catch { }
     return false;
 }
Ejemplo n.º 8
0
 public static string GetConfigurationValue(KeyName key)
 {
     try
     {
         return appSection.Settings[key.ToString()].Value;
     }
     catch
     {
         return "";
     }
 }
Ejemplo n.º 9
0
        public static void SetRegistryValue(Color color, KeyName keyplace)
        {
            var regKey = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(@"SoftWare\so2Analyze\color");

            regKey.SetValue(keyplace.ToString(), color.ToArgb());
        }