Radians are defined with 0° pointing to the right. This is important! Do not picture a compass in your head, which has 0° (North) pointing "up". Radians are a unit of measure used to define degrees of distance around a circle, starting with 0°, which is the point directly to the right of the center of the circle. The angles in a Roundline meter are defined in Radians. As you can see, we have set the value of StartAngle to StartAngle=(Rad(270)), and the value of RotationAngle to RotationAngle=(Rad(360)). This is done with the RotationAngle option. We also need to tell the Roundline how much of the circle to use as 100% (the distance to travel when the value is 100%). We need to tell the Roundline where the line should point when the value is 0% (the starting point). We first needed to define two options to control how the meter works. Keep in mind that this defines a circle that has a total width of 40 pixels, and a width from the center to the edge as 20 pixels. In this case, we have defined the size of the meter (and thus the circle) as 40x40 pixels. What the Roundline meter does is draw a line that rotates around the center of a circle defined by the W and H options of the meter. From the Manage dialog, find the System.ini entry in the list and click on the Load button on the upper right. So let's load our new skin and take a look at where we stand. Remember that if you define SolidColor on an image meter with no MeasureName option, it simply draws a square or rectangle based on the W and H (width and height) options. The meter will then use the value we defined as AlmostBlack=40,40,40,255 in the section earlier. Note that we have used the variable #AlmostBlack# in the SolidColor option for this meter. Let's go ahead and add that now, so we can demonstrate the first use of one of those variables we created above. In earlier tutorials, we waited until the end and put a solid background on the skin using an Image meter. In order to change the value in all places it is used, you only need to change it one time in the section of the skin. Variables are used to create a value, which can be used repeatedly in the skin by enclosing the variable name in # (example: #VarName#). The next thing we are going to do is define some variables for the skin. Building the System skinįirst, as we did in our earlier tutorial, let's add the section to control the Update speed of the skin. You only see one hard drive in that image? We will get to that. We are going to monitor the CPU with a Line meter, and display some information about the space on your hard drives. Then we are going to create some circular meters showing the usage with Roundline meters. it only needs OpenHardwareMonitorLib.dll to work, no need to OpenHardwareMonitor.exe running.What we are going to do is measure the percent usage of the CPU, and the space on a couple of hard drives. exe which shows 3 first fans speed at each launch. If (sensor.SensorType = SensorType.Fan & ("Fan #3", StringComparison.OrdinalIgnoreCase))Ĭonsole.WriteLine((string)sensor.Name + ": " + Convert.ToString((int)(float)sensor.Value)) Ĭompiled in VS, it outputs an. If(sensor.SensorType = SensorType.Fan & ("Fan #2", StringComparison.OrdinalIgnoreCase)) If(sensor.SensorType = SensorType.Fan & ("Fan #1", StringComparison.OrdinalIgnoreCase))Ĭonsole.WriteLine((string) sensor.Name + ": " + Convert.ToString((int) (float) sensor.Value)) is it possible for a C ++ guru to adapt this code for a Rainmeter plugin ?įoreach(var hardware in thisComputer.Hardware)įoreach(var subhardware in hardware.SubHardware)įoreach(var sensor in subhardware.Sensors) If (sensor.SensorType = SensorType.Temperature)Ĭonsole.WriteLine("", sensor.Name, sensor.Hardware, sensor.SensorType, sensor.Value) ĭo not like doing that, but my knowledge of C ++ are more than light. Protected virtual void ActivateSensor(ISensor sensor)įoreach (var hardwareItem in m圜omputer.Hardware)Ĭonsole.WriteLine(hardwareItem.GetReport()) įoreach (var sensor in hardwareItem.Sensors) Public event SensorEventHandler SensorRemoved Public event SensorEventHandler SensorAdded Protected readonly ListSet active = new ListSet()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |