Пример #1
0
        private unsafe static string PluginBridge(string sCommand, string sData)
        {
            try
            {
                return(new string(PluginBridge(Rainmeter.String(sCommand), Rainmeter.String(sData))));
            }
            catch { }

            return(string.Empty);
        }
Пример #2
0
        // If an INI is missing, a blank string will be returned to avoid raising exceptions
        private unsafe static string ReadConfigString(string sSection, string sKey)
        {
            try
            {
                char *szString = ReadConfigString(Rainmeter.String(sSection), Rainmeter.String(sKey), Rainmeter.String(string.Empty));

                if (szString != null)
                {
                    return(new string(szString));
                }
            }
            catch { }

            return(string.Empty);
        }
Пример #3
0
 public unsafe static char *GetPluginAuthor()
 {
     if (!string.IsNullOrEmpty(Plugin.Email) && !string.IsNullOrEmpty(Plugin.Comments))
     {
         return(Rainmeter.String(Plugin.Author + " (" + Plugin.Email + "): " + Plugin.Comments));
     }
     if (!string.IsNullOrEmpty(Plugin.Email))
     {
         return(Rainmeter.String(Plugin.Author + " (" + Plugin.Email + ")"));
     }
     if (!string.IsNullOrEmpty(Plugin.Comments))
     {
         return(Rainmeter.String(Plugin.Author + ": " + Plugin.Comments));
     }
     return(Rainmeter.String(Plugin.Author));
 }
Пример #4
0
        // You can call this function directly to log to Rainmeter.log
        //
        // Rainmeter needs to be configured to allow debug logging, of course.

        public static unsafe bool Log(LogLevel level, string sText)
        {
            return(Rainmeter.LSLog((int)level, Rainmeter.String("C# plugin"), Rainmeter.String(sText)) != 0);
        }
Пример #5
0
 public unsafe static char *GetString(UInt32 id, UInt32 flags)
 {
     // Do not modify this member.  Instead, update your code in 'PluginCode.cs'.
     return(Rainmeter.String(new YourPlugin().GetString(Plugin, id)));
 }