Skip to content

Commit

Permalink
Merge pull request #1 from nutdotnet/form-additions
Browse files Browse the repository at this point in the history
Cleanup testing forms
  • Loading branch information
gbakeman authored Feb 8, 2024
2 parents 7fa5d28 + 737b7e2 commit d74b271
Show file tree
Hide file tree
Showing 11 changed files with 265 additions and 576 deletions.
7 changes: 0 additions & 7 deletions .hgignore

This file was deleted.

5 changes: 0 additions & 5 deletions .hgtags

This file was deleted.

23 changes: 9 additions & 14 deletions AGaugeDemo/AGaugeDemo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<StartupObject>
</StartupObject>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -50,25 +54,16 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainFormTest.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainFormTest.Designer.cs">
<DependentUpon>MainFormTest.cs</DependentUpon>
</Compile>
<Compile Include="MainForm.cs">
<Compile Include="GaugeDemo.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
<Compile Include="GaugeDemo.Designer.cs">
<DependentUpon>GaugeDemo.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="MainFormTest.resx">
<DependentUpon>MainFormTest.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
<EmbeddedResource Include="GaugeDemo.resx">
<DependentUpon>GaugeDemo.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
Expand Down
233 changes: 233 additions & 0 deletions AGaugeDemo/GaugeDemo.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 22 additions & 17 deletions AGaugeDemo/MainFormTest.cs → AGaugeDemo/GaugeDemo.cs
Original file line number Diff line number Diff line change
@@ -1,33 +1,25 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace AGaugeDemo
{
public partial class MainFormTest : Form
public partial class GaugeDemo : Form
{
private System.Windows.Forms.AGaugeLabel label;
private System.Windows.Forms.AGaugeRange alert;
public MainFormTest()
private AGaugeLabel label;
private AGaugeRange alert;
public GaugeDemo()
{
InitializeComponent();

label = aGauge1.GaugeLabels.FindByName("GaugeLabel1");
alert = aGauge1.GaugeRanges.FindByName("AlertRange");
//aGauge1.AutoSize = true;
aGauge1.ValueInRangeChanged += AGauge1_ValueInRangeChanged;
}

private void AGauge1_ValueInRangeChanged(object sender, ValueInRangeChangedEventArgs e)
{

tb_majTicks.Minimum = (int)gge_majTicks.MinValue;
tb_majTicks.Maximum = (int)gge_majTicks.MaxValue;
}

#region aGauge1

private void trackBar1_ValueChanged(object sender, EventArgs e)
{
aGauge1.Value = trackBar1.Value;
Expand All @@ -38,7 +30,7 @@ private void aGauge1_ValueChanged(object sender, EventArgs e)
label.Text = aGauge1.Value.ToString();
}

private void aGauge1_ValueInRangeChanged(object sender, System.Windows.Forms.ValueInRangeChangedEventArgs e)
private void aGauge1_ValueInRangeChanged(object sender, ValueInRangeChangedEventArgs e)
{
System.Diagnostics.Debug.WriteLine("InRange Event.");
if (e.Range == alert)
Expand All @@ -52,5 +44,18 @@ private void button1_Click(object sender, EventArgs e)
//aGauge1.GaugeRanges.RemoveAt(0);
aGauge1.GaugeRanges.Add(new AGaugeRange(Color.Blue, 40, 60));
}

#endregion

#region gge_majTicks


#endregion

private void tb_majTicks_ValueChanged(object sender, EventArgs e)
{
gge_majTicks.Value = tb_majTicks.Value;
gge_majTicks.GaugeLabels[0].Text = tb_majTicks.Value.ToString();
}
}
}
File renamed without changes.
Loading

0 comments on commit d74b271

Please sign in to comment.