Giter Site home page Giter Site logo

agauge's Introduction

AGauge

.NET Winforms Gauge Control created based on original work by A.J.Bauer with various improvment. List of improvement done on top of the original works is described in my page below:
http://www.codearteng.com/2012/08/agauge-winforms-gauge-control.html

The latest binary package had been published to NuGet Package Gallery named "AGauge V2".
https://www.nuget.org/packages/AGauge_V2/2.0.2

More Gauge Control

Check out WinForm Gauge at https://winformgauge.codearteng.com, high performance .NET Windows Form Gauge for info-graphics and real-time dashboard.

agauge's People

Contributors

chromhelm avatar code-artist avatar gbakeman avatar megunolink avatar nick135 avatar paulmartinsen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

agauge's Issues

Positioning Gauge Text

A better way to align gauge labels would be appreciated. Often I want to center the text and only adjust Y position up and down.

Perhaps a property on gauge labels which returns the Size of the drawn text. With this information one could calculate where to place the text using the size of the control and the size of the text.

Problem with aGauge when Reagion Format is Persian

Hello

Thanks for your great package.
It is working well but when I change my Region Format in control panel to Persian, I counter this error:

System.InvalidOperationException
HResult=0x80131509
Message=Failed to initialize because CategoryName is missing.
Source=System
StackTrace:
at System.Diagnostics.PerformanceCounter.InitializeImpl()
at System.Diagnostics.PerformanceCounter.EndInit()
at WindowsFormsApp1.Form1.InitializeComponent() in C:\Users\user\source\repos\WindowsFormsApp1\WindowsFormsApp1\Form1.Designer.cs:line 141
at WindowsFormsApp1.Form1..ctor() in C:\Users\user\source\repos\WindowsFormsApp1\WindowsFormsApp1\Form1.cs:line 17
at WindowsFormsApp1.Program.Main() in C:\Users\user\source\repos\WindowsFormsApp1\WindowsFormsApp1\Program.cs:line 18

image

Would you take a lock at it?

Best Regards

.nuspec file?

Greetings,

Thank you for merging my last PR; I'm glad you're still willing to accept contributions to keep this project going. I've been making some changes here and there in my fork, but my ultimate goal is to fix a bug where the gauge major tick marks sometimes are drawn past the end of the gauge.

I'd like to take you up on your offer to make an official release as I'd also like to switch WinNUT back to using AGauge as a nuget dependency, with a modified gauge class. Do you have an original .nuspec file, or are you fine with me generating one for upload to NuGet?

Reduce Memory Usage/Leak

I have two of these gauges on a form updating every 100ms with new values. Every time the gauge value is updated the memory usage is increasing. I noticed the memory will reach about 210MB before a garbage collection occurs.

In comparison I replaced the AGauage with a DevExpress gauge and did not experience the issue. Memory usage stayed steady at 20MB with no garbage collections occurring.

Below is a copy of the code on the main (and only form) in the program. (NOTE: This is currently the code for the devexpress gauges but it was very identical for the Aguage. I used gauge labels to display the degree and velocity.)

namespace TSDemoGUI
{
    public partial class Form1 : Form
    {
        private int selectedDevice;
        private double angle;
        private double ChannelOneVelocity;
        private double ChannelOneVelocityRPM;
        private double ChannelOneVelocityRPS;
        private Random value;

        public Form1()
        {
            InitializeComponent();
            // Set Up Synchro Device
            selectedDevice = 0;
            //SRTestSystemDevice.InitDevice(selectedDevice);
            //SRTestSystemDevice.SetUpDevice(selectedDevice);
            value = new Random();
            timerUpdateAngles.Enabled = true;
        }

        private void timerUpdateAngles_Tick(object sender, EventArgs e)
        {
            // Angle
            angle = value.Next(0, 359);
            arcScaleComponent2.Value = Convert.ToUInt32(angle);
            labelComponent3.Text = angle.ToString("000.000");

            // Velocity
            ChannelOneVelocityRPS = value.NextDouble() * 15;
            arcScaleComponent3.Value = Convert.ToSingle(ChannelOneVelocityRPS);
            labelComponent6.Text = ChannelOneVelocityRPS.ToString("+00.00;-00.00; 00.00");
        }

        private void buttonExit_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            timerUpdateAngles.Enabled = false;
        }
    }
}

Image of Form
capture

Crash on Dispose

Inside the Dispose method the following line could crash:

this.gaugeBitmap.Dispose();

This could happens if the control is instantiated but never shown. The gaugeBitmap is instantiated only inside the OnPaint method.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.