Пример #1
0
        internal static object ObjectFromString(Rainmeter.API api, Type type, string str)
        {
            string[] strparams = str.Split(',');

            // search and invoke constructors that match the parameters
            var constructors = type.GetConstructors(BindingFlags.Public | BindingFlags.Instance);

            foreach (ConstructorInfo cinfo in constructors)
            {
                object instance = TryInvokeMethod(null, cinfo, strparams);
                if (instance != null)
                {
                    return(instance);
                }
            }

            // no constructor matched, lets search for static methods that return an instance
            var methods = type.GetMethods(BindingFlags.Public | BindingFlags.Static).Where(x => x.ReturnType == type);

            foreach (MethodInfo minfo in methods)
            {
                object instance = TryInvokeMethod(null, minfo, strparams);
                if (instance != null)
                {
                    return(instance);
                }
            }

            return(null);
        }
        internal override void Reload(Rainmeter.API api, ref double maxValue)
        {
            Name = api.GetMeasureName();
            API.Log(API.LogType.Debug, "Mediamonkey.dll: Reloading ChildMeasure=" + Name);

            base.Reload(api, ref maxValue);

            string parentName = api.ReadString("PlayerName", "", false).Replace("[", "").Replace("]", "");
            IntPtr skin       = api.GetSkin();

            API.Log(API.LogType.Debug, "Mediamonkey.dll: Looking for ParentMeasure" + parentName + "in skin " + skin + "for ChildMeasure " + Name);

            // Find parent using name AND the skin handle to be sure that it's the right one.
            ParentMeasure = null;
            foreach (ParentMeasure parentMeasure in ParentMeasure.ParentMeasures)
            {
                if (parentMeasure.Skin.Equals(skin) && parentMeasure.Name.Equals(parentName))
                {
                    API.Log(API.LogType.Debug, "Mediamonkey.dll: Found ParentMeasure " + parentMeasure.Name + " for ChildMeasure " + Name);
                    ParentMeasure = parentMeasure;
                }
            }

            if (ParentMeasure == null)
            {
                API.Log(API.LogType.Error, "Mediamonkey.dll: PlayerName=" + parentName + " not valid");
            }
        }
Пример #3
0
        internal override void Reload(Rainmeter.API api, ref double maxValue)
        {
            base.Reload(api, ref maxValue);

            string parentName = api.ReadString("ParentName", "");
            IntPtr skin       = api.GetSkin();

            // Find parent using name AND the skin handle to be sure that it's the right one
            RuntimeTypeHandle parentType = typeof(ParentMeasure).TypeHandle;

            foreach (KeyValuePair <uint, Measure> pair in Plugin.Measures)
            {
                if (System.Type.GetTypeHandle(pair.Value).Equals(parentType))
                {
                    ParentMeasure parentMeasure = (ParentMeasure)pair.Value;
                    if (parentMeasure.Name.Equals(parentName) &&
                        parentMeasure.Skin.Equals(skin))
                    {
                        HasParent = true;
                        ParentID  = pair.Key;
                        return;
                    }
                }
            }

            HasParent = false;
            API.Log(API.LogType.Error, "ParentChild.dll: ParentName=" + parentName + " not valid");
        }
Пример #4
0
        internal void Reload(Rainmeter.API rm, ref double maxValue)
        {
            string type = rm.ReadString("Type", "");

            switch (type.ToLowerInvariant())
            {
            case "major":
                Type = MeasureType.Major;
                break;

            case "minor":
                Type = MeasureType.Minor;
                break;

            case "number":
                Type = MeasureType.Number;
                break;

            case "string":
                Type = MeasureType.String;
                break;

            default:
                API.Log(API.LogType.Error, "SystemVersion.dll: Type=" + type + " not valid");
                break;
            }
        }
        internal virtual void Reload(Rainmeter.API api, ref double maxValue)
        {
            string type = api.ReadString("Type", "current");

            switch (type.ToLowerInvariant())
            {
            case "current":
                Type = MeasureType.current;
                break;

            case "lastx":
                Type = MeasureType.lastX;
                break;

            case "min":
                Type = MeasureType.min;
                break;

            case "max":
                Type = MeasureType.max;
                break;

            default:
                api.Log(API.LogType.Error, "ZWIFT_RM_API.dll: Type=" + type + " not valid");
                break;
            }
        }
Пример #6
0
        internal Measure(Rainmeter.API api)
        {
            ++measureCount;
            try
            {
                if (rainmeterFileSettingsLocation != api.GetSettingsFile())
                {
                    rainmeterFileSettingsLocation = api.GetSettingsFile();
                }

                if (wssv == null)
                {
                    //@TODO Declare on reload so that custom ports can be allowed?
                    wssv = new WebSocketServer(8974);
                }

                if (wssv.IsListening == false)
                {
                    wssv.AddWebSocketService <WebNowPlaying>("/");
                    wssv.Start();
                }
            }
            catch (Exception e)
            {
                API.Log(API.LogType.Error, "WebNowPlaying.dll - Error starting WebNowPlaying plugin");
                API.Log(API.LogType.Debug, "Error:" + e.ToString());
            }
        }
        /*
         * Example activity element in array, notice each entry has profile info as well as "sport" on case RUN and cycling should be sepearte
         *
         * {
         *  id_str: '1234567890',
         *  id: 1234567890,
         *  profileId: 1234567890,
         *  profile: {
         *    id: 1234567890,
         *    publicId: '1234567890-1234567890-1234567890',
         *    firstName: 'Example',
         *    lastName: 'Name',
         *    male: true,
         *    imageSrc: 'https://static-cdn.zwift.com/prod/profile/12345678901234567890',
         *    imageSrcLarge: 'https://static-cdn.zwift.com/prod/profile/12345678901234567890',
         *    playerType: 'NORMAL',
         *    countryAlpha3: 'deu',
         *    countryCode: 276,
         *    useMetric: true,
         *    riding: false,
         *    privacy: [Object],
         *    socialFacts: null,
         *    worldId: null,
         *    enrolledZwiftAcademy: false,
         *    playerTypeId: 1,
         *    playerSubTypeId: null,
         *    currentActivityId: null
         *  },
         *  worldId: 1,
         *  name: 'Zwift Run - Watopia',
         *  description: null,
         *  privateActivity: true,
         *  sport: 'RUNNING',
         *  startDate: '2021-01-01T00:00:00.000+0000',
         *  endDate: '2021-01-01T01:00:00.00+0000',
         *  lastSaveDate: '2021-01-01T01:00:00.00+0000',
         *  autoClosed: false,
         *  duration: '1:00',
         *  distanceInMeters: 1234.56,
         *  fitFileBucket: 's3-fit-prd-uswest2-zwift',
         *  fitFileKey: 'prod/123456/123456-123456123456',
         *  totalElevation: 0,
         *  avgWatts: 0,
         *  rideOnGiven: false,
         *  activityRideOnCount: 42,
         *  activityCommentCount: 0,
         *  snapshotList: null,
         *  calories: 4242.00,
         *  primaryImageUrl: 'https://s3-fit-prd-uswest2-zwift.s3.amazonaws.com/prod/img/123456-123456123456123456',
         *  movingTimeInMs: 123456,
         *  privacy: 'PRIVATE',
         *  topNotableMoment: {
         *    notableMomentTypeId: 1,
         *    activityId: 123456123456123456123456,
         *    incidentTime: 123456,
         *    priority: 8,
         *    aux1: '3',
         *    aux2: '300'
         *  },
         *  avgSpeedInMetersPerSecond: 2.42,
         *  feedImageThumbnailUrl: 'https://s3-fit-prd-uswest2-zwift.s3.amazonaws.com/prod/img/1234561-23456123456123456',
         *  eventSubgroupId: null,
         *  eventId: null,
         *  clubActivity: false
         * },
         *
         */

        internal override void Reload(Rainmeter.API api, ref double maxValue)
        {
            base.Reload(api, ref maxValue);
            Name = api.GetMeasureName();
            Skin = api.GetSkin();

            user      = api.ReadString("zwiftUser", "");
            password  = api.ReadString("zwiftPass", "");
            pastMonth = api.ReadInt("pastMonth", 0);

            var feedArr = fetchZwiftFeed();

            try
            {
                foreach (var activity in feedArr)
                {
                    CultureInfo provider = CultureInfo.InvariantCulture;
                    DateTime    start    = DateTime.Parse(activity.startDate);
                    var         month    = new DateTime(start.Year, start.Month, 1);
                    if (!distanceDict.ContainsKey(month))
                    {
                        distanceDict[month] = 0;
                    }
                    distanceDict[month] += Convert.ToDouble(activity.distanceInMeters);
                }
            }
            catch (Exception e)
            {
                api.Log(API.LogType.Error, "ZWIFT_RM_API.dll: Reload error:" + e.Message);
            };
        }
        internal virtual void Reload(Rainmeter.API api, ref double maxValue)
        {
            string type = api.ReadString("Type", "");

            switch (type.ToLowerInvariant())
            {
            case "name":
                this.Type = MeasureType.SongName;
                break;

            case "artists":
                this.Type = MeasureType.Artists;
                break;

            case "album":
                this.Type = MeasureType.Album;
                break;

            case "lyric":
                this.Type = MeasureType.Lyric;
                break;

            case "islyrictranslated":
                this.Type = MeasureType.IsLyricTranslated;
                break;

            case "translatedlyric":
                this.Type = MeasureType.TranslatedLyric;
                break;

            default:
                api.Log(API.LogType.Error, "ParentChild.dll: Type=" + type + " not valid");
                break;
            }
        }
        public static void Initialize(ref IntPtr data, IntPtr rm)
        {
            Rainmeter.API  api     = new Rainmeter.API(rm);
            GenericMeasure measure = new ZwiftMeasure(rm);

            data = GCHandle.ToIntPtr(GCHandle.Alloc(measure));
        }
Пример #10
0
        public void UpdateStatus(Rainmeter.API rm = null)
        {
            if (rm != null)
            {
                this._SkinName = rm.GetSkinName();
                this._Handle   = rm.GetSkinWindow();
            }

            RECT rct;

            if (GetWindowRect(this._Handle, out rct))
            {
                this._X = rct.Left;
                this._Y = rct.Top;
                this._W = rct.Right - rct.Left;
                this._H = rct.Bottom - rct.Top;
            }
            else
            {
                rm.Log(API.LogType.Error,
                       "Rainmeter told us the HWND for window '" + this._SkinName + "' is " + this._Handle.ToInt32().ToString() + "L, but couldn't receive a proper RECT from it");
            }

            this._IsTopmost = ((GetWindowLong(this._Handle, GWL_EXSTYLE) & WS_EX_TOPMOST) > 0);
        }
Пример #11
0
        // this is for initial "parent" type,
        // sent down inheritenace chain, overidden though?
        internal virtual void Reload(Rainmeter.API api, ref double maxValue)
        {
            string type = api.ReadString("Type", "");

            switch (type.ToLowerInvariant())
            {
            case "rank":
                Type = MeasureType.Rank;
                break;

            case "won":
                Type = MeasureType.Won;
                break;

            case "lost":
                Type = MeasureType.Lost;
                break;

            case "wontoday":
                Type = MeasureType.WonToday;
                break;

            case "losttoday":
                Type = MeasureType.LostToday;
                break;

            case "highestrank":
                Type = MeasureType.HighestRank;
                break;

            default:
                API.Log(API.LogType.Error, "Type=" + type + " is not valid");
                break;
            }
        }
Пример #12
0
        public static void Initialize(ref IntPtr data, IntPtr rm)
        {
            Measure measure = new Measure();

            data = GCHandle.ToIntPtr(GCHandle.Alloc(measure));
            Rainmeter.API api = (Rainmeter.API)rm;
            measure.ParseMeasureProps(api);
        }
        internal override void Reload(Rainmeter.API api, ref double maxValue)
        {
            base.Reload(api, ref maxValue);

            Name = api.GetMeasureName();
            Skin = api.GetSkin();

            this.HistoryJsonPath = api.ReadString("HistoryJsonPath", Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Netease/CloudMusic/webdata/file/history"));
        }
Пример #14
0
        public static void Reload(IntPtr data, IntPtr rm, ref double maxValue)
        {
            Measure measure = (Measure)data;

            Rainmeter.API api = (Rainmeter.API)rm;

            //Read measure for an Input string
            measure.myString = api.ReadString("Input", "");
        }
Пример #15
0
        //Set and Write Variable to ini File
        internal void SetVariable(string KeyName, string Value, IntPtr rm)
        {
            WritePrivateProfileString("Variables", KeyName, Value, Measure.iniPath);

            Rainmeter.API api     = (Rainmeter.API)rm;
            string        Command = string.Concat("[!SetVariable ", KeyName, " \"", Value, "\"]");

            API.Execute(api.GetSkin(), Command);
            return;
        }
Пример #16
0
        internal override void Reload(Rainmeter.API api, ref double maxValue)
        {
            base.Reload(api, ref maxValue);

            Name = api.GetMeasureName();
            Skin = api.GetSkin();

            Path   = api.ReadString("Path", "");
            Server = api.ReadString("Server", "");
        }
Пример #17
0
        public void Setup(Rainmeter.API api)
        {
            // Init members
            SendAsync             = (api.ReadInt("SendAsync", 0) > 0);
            TryToReconnect        = false;
            KeepConnectionAlive   = (api.ReadInt("KeepAlive", 1) > 0);
            PingServer            = (api.ReadInt("PingServer", 0) > 0);
            MaxReconnectAttempts  = api.ReadInt("MaxReconnectAttempts", 0);
            CurrentAttempt        = 0;
            LastConnectionAttempt = DateTime.Now;
            LastPing = LastConnectionAttempt;

            // Setup WebSocket
            String Address = api.ReadString("Address", "");

            if (!Address.IsNullOrEmpty())
            {
                ws            = new WebSocket(Address);
                ws.NoDelay    = true;
                ws.OnOpen    += OnOpen;
                ws.OnMessage += OnMessage;
                ws.OnError   += OnError;
                ws.OnClose   += OnClose;
                ws.ConnectAsync();
            }

            // Get Commands
            Skin         = api.GetSkin();
            cmdOnOpen    = api.ReadString("OnOpen", "");
            cmdOnMessage = api.ReadString("OnMessage", "");
            cmdOnError   = api.ReadString("OnError", "");
            cmdOnClose   = api.ReadString("OnClose", "");

            // Get Parsable Commands

            // Ex: ParseCommands="AA:|BB:|CMD:"
            // OnAA:=[Some Bang]
            // OnBB:=[Some Bang]
            // OnCMD:=[Some Bang]

            Commands = new List <Command>();
            String cmds = api.ReadString("ParseCommands", "");

            if (!cmds.IsNullOrEmpty())
            {
                var tags = cmds.Split('|');
                foreach (var tag in tags)
                {
                    String c = api.ReadString("On" + tag, "");
                    Commands.Add(new Command {
                        Tag = tag, cmdOnTag = c
                    });
                }
            }
        }
        internal override void Reload(Rainmeter.API api, ref double maxValue)
        {
            base.Reload(api, ref maxValue);

            Name = api.GetMeasureName();
            Skin = api.GetSkin();

            ValueA = api.ReadInt("ValueA", 0);
            ValueB = api.ReadInt("ValueB", 0);
            ValueC = api.ReadInt("ValueC", 0);
        }
Пример #19
0
        public static void Reload(IntPtr data, IntPtr rm, ref double maxValue)
        {
            Measure measure = (Measure)data;

            Rainmeter.API api = (Rainmeter.API)rm;

            measure.updateRate = api.ReadInt("Timer", 1);
            //We dont have to replace measures here as they will be replaced during Execute so we can pass false.
            //Note though that doing that measures will always then have their current info in update but variables will not. See the commented out code below to have both always act like DynamicVariables=1
            measure.myCommand = api.ReadString("OnTimer", "", false);
        }
        public static unsafe void Initialize(void** data, void* rm)
        {
            uint id = (uint)((void*)*data);

            RM.API api = new RM.API((IntPtr)rm);

            string parentName = api.ReadString("Parent", null);
            if (string.IsNullOrEmpty(parentName))
                Measures.Add(id, new XmlParserParent());
            else
                Measures.Add(id, new XmlParserChild());
        }
Пример #21
0
        internal Measure(Rainmeter.API api)
        {
            if (wssv == null)
            {
                wssv = new WebSocketServer(58932);
                //wssv.AddWebSocketService<MessagePassing>(baseService);
            }

            if (wssv.IsListening == false)
            {
                wssv.Start();
            }
        }
Пример #22
0
        internal void Reload(Rainmeter.API api, ref double maxValue)
        {
            int rank = api.ReadInt("Rank", 1);

            if (rank > 0)
            {
                Rank = rank;
            }
            else
            {
                Rank = 1;
            }
        }
Пример #23
0
        public static void Initialize(ref IntPtr data, IntPtr rm)
        {
            Measure measure = new Measure();

            Rainmeter.API api = (Rainmeter.API)rm;

            measure.api = api;

            //We do this in Initialize so that if a skin were to turn on DynamicVariables it will not break the plugin
            measure.timer = DateTime.UtcNow;

            data = GCHandle.ToIntPtr(GCHandle.Alloc(measure));
        }
Пример #24
0
        public static void Reload(IntPtr data, IntPtr rm, ref double maxValue)
        {
            Measure measure = (Measure)data;

            Rainmeter.API api = (Rainmeter.API)rm;

            string type = api.ReadString("Type", "");

            measure.Type = typeof(Control)
                           .Assembly
                           .GetTypes()
                           .Where(x => x.GetBaseTypes().Contains(typeof(Control)))
                           .FirstOrDefault(x => x.Name == type);

            if (measure.Type == default(Type))
            {
                measure.log.LogParameterNotValid(type, "Type");
                measure.Invalid = true;
                return;
            }

            if (measure.Control == null || measure.Type.GetType() != measure.Type || measure.Invalid)
            {
                measure.Control = (Control)measure.Type.GetConstructor(Type.EmptyTypes).Invoke(null);
            }

            PropertyParser.ParseProperties(api, measure.Control);

            measure.TabName = api.ReadString("TabName", "");

            if (measure.Control.GetType() != typeof(Form))
            {
                // Find parent using name AND the skin handle to be sure that it's the right one.
                string parentName = api.ReadString("ParentName", "");
                foreach (Measure parentMeasure in Measure.Measures)
                {
                    if (parentMeasure.Skin.Equals(measure.Skin) && parentMeasure.Name.Equals(parentName))
                    {
                        measure.Parent = parentMeasure;
                    }
                }

                if (measure.Parent == null)
                {
                    measure.log.LogError("RainForms.dll: " + measure.Type.ToString() + " needs a parent.");
                    measure.Invalid = true;
                    return;
                }
                measure.AddControlToParent();
            }
        }
Пример #25
0
        internal override void Reload(Rainmeter.API api, ref double maxValue)
        {
            Topic = api.ReadString("Topic", "");

            Debug("Reloading", 1);
            base.Reload(api, ref maxValue);
            Debug("Reloaded", 1);

            if (OnReloadBangs.Length > 0)
            {
                Log(API.LogType.Notice, "Executing OnReload Bangs");
                ExecuteBangs(OnReloadBangs);
            }
        }
        internal void Reload(Rainmeter.API api, ref double maxValue)
        {
            try
            {
                number = api.ReadInt("Value", 0);
            }
            catch (Exception e) {}
            try
            {
                Arc.Thickness = Convert.ToSingle(api.ReadDouble("Width", Arc.Thickness));
            }
            catch (Exception e) {}
            try
            {
                Digit.Size = Convert.ToInt32(api.ReadInt("Size", Digit.Size) * ScaleFactor);
            }
            catch (Exception e) {}
            try
            {
                outFilePath = api.ReadString("Out", string.Format("{0}.png", number.ToString()));
            }
            catch (Exception e) {}
            try
            {
                var colorVals = api.ReadString("Color", string.Format("{0},{1},{2},{3}", Arc.Red, Arc.Green, Arc.Blue, Arc.Opacity)).Split(',').Select(n => Int32.Parse(n)).ToArray();
                switch (colorVals.Length)
                {
                case 4:
                {
                    Arc.Opacity = colorVals[3];
                    goto case 3;
                }

                case 3:
                {
                    Arc.Red   = colorVals[0];
                    Arc.Green = colorVals[1];
                    Arc.Blue  = colorVals[2];
                    break;
                }
                }
            }
            catch (Exception e) {}
            try
            {
                Digit.GlobalAngle = Convert.ToSingle(api.ReadDouble("Angle", Digit.GlobalAngle));
            }
            catch (Exception e) { }
        }
Пример #27
0
        internal void Reload(Rainmeter.API rm, ref double maxValue)
        {
            string type = rm.ReadString("Type", "");

            switch (type.ToLowerInvariant())
            {
            case "Value":
                Type = MeasureType.Value;
                break;

            default:
                API.Log(API.LogType.Error, "VKPlugin.dll: Type=" + type + " not valid");
                break;
            }
        }
Пример #28
0
        internal void Reload(Rainmeter.API rm, ref double maxValue)
        {
            SkinHandle     = rm.GetSkin();
            FinishAction   = rm.ReadString("FinishAction", "");
            ConnectionType = rm.ReadString("ConnectionType", "INTERNET").ToUpperInvariant();
            if (ConnectionType != "NETWORK" && ConnectionType != "INTERNET")
            {
                API.Log(API.LogType.Error, "CheckNet.dll: ConnectionType=" + ConnectionType + " not valid");
            }

            UpdateRate = rm.ReadInt("UpdateRate", 20);
            if (UpdateRate <= 0)
            {
                UpdateRate = 20;
            }
        }
Пример #29
0
 public static void Initialize(ref IntPtr data, IntPtr rm)
 {
     Rainmeter.API api = new Rainmeter.API(rm);
     string parentname = api.ReadString("ParentName", "");
     Measure measure;
     if (string.IsNullOrEmpty(parentname))
     {
         measure = new ParentMeasure();
     }
     else
     {
         measure = new ChildMeasure();
     }
     measure.Initialize(api);
     data = GCHandle.ToIntPtr(GCHandle.Alloc(measure));
 }
Пример #30
0
        public static void Initialize(ref IntPtr data, IntPtr rm)
        {
            string path = Rainmeter.API.GetSettingsFile();

            Rainmeter.API api       = (Rainmeter.API)rm;
            string        latitude  = api.ReadString("Latitude", "21.3891", false);
            string        longitude = api.ReadString("Longitude", "39.8579", false);
            int           method    = api.ReadInt("Method", 4);
            int           school    = api.ReadInt("School", 0);
            int           latitudeAdjustmentMethod = api.ReadInt("LatitudeAdjustmentMethod", 1);
            int           hijriAdjustment          = api.ReadInt("HijriAdjustment", 0);
            int           midnightMode             = api.ReadInt("MidnightMode", 0);
            bool          _12hourmode = api.ReadInt("12HourClockMode", 24) == 12;

            data = GCHandle.ToIntPtr(GCHandle.Alloc(new Measure(path, latitude, longitude, method, school, latitudeAdjustmentMethod, hijriAdjustment, midnightMode, _12hourmode)));
        }
Пример #31
0
        public static void Reload(IntPtr data, IntPtr rm, ref double maxValue)
        {
            Measure measure = (Measure)data;

            Rainmeter.API api       = (Rainmeter.API)rm;
            string        latitude  = api.ReadString("Latitude", "21.3891", false);
            string        longitude = api.ReadString("Longitude", "39.8579", false);
            int           method    = api.ReadInt("Method", 4);
            int           school    = api.ReadInt("School", 0);
            int           latitudeAdjustmentMethod = api.ReadInt("LatitudeAdjustmentMethod", 1);
            int           hijriAdjustment          = api.ReadInt("HijriAdjustment", 0);
            int           midnightMode             = api.ReadInt("MidnightMode", 0);
            bool          _12hourmode = api.ReadInt("12HourClockMode", 24) == 12;

            measure.Reload(latitude, longitude, method, school, latitudeAdjustmentMethod, hijriAdjustment, midnightMode, _12hourmode);
        }
Пример #32
0
        public static void Initialize(ref IntPtr data, IntPtr rm)
        {
            Rainmeter.API api    = new Rainmeter.API(rm);
            string        parent = api.ReadString("ParentName", "");
            Measure       measure;

            if (String.IsNullOrEmpty(parent))
            {
                measure = new MqttClientMeasure(api);
            }
            else
            {
                measure = new MqttTopicMeasure(api);
            }

            data = GCHandle.ToIntPtr(GCHandle.Alloc(measure));
        }
        public static unsafe void Initialize(void** data, void* rm)
        {
            uint id = (uint)((void*)*data);
            Rainmeter.API api = new Rainmeter.API((IntPtr)rm);

            string parent = api.ReadString("ParentName", "");
            if (String.IsNullOrEmpty(parent))
            {
                Measures.Add(id, new ParentMeasure());
            }
            else
            {
                Measures.Add(id, new ChildMeasure());
            }
        }
Пример #34
0
 public static void Reload(IntPtr data, IntPtr rm, ref double maxValue)
 {
     Measure measure = (Measure)GCHandle.FromIntPtr(data).Target;
     Rainmeter.API api = new Rainmeter.API(rm);
     measure.Reload(api, ref maxValue);
 }
Пример #35
0
 internal Measure(Rainmeter.API rm)
 {
     this.rm = rm;
 }