Skip to content

Commit

Permalink
Version 3.4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaskohl committed Nov 25, 2017
1 parent fe1f063 commit a847f68
Show file tree
Hide file tree
Showing 19 changed files with 1,374 additions and 1,274 deletions.
10 changes: 9 additions & 1 deletion CapsLockIndicatorV3/CapsLockIndicatorV3.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="app.config">
<SubType>Designer</SubType>
</None>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
Expand Down Expand Up @@ -162,6 +164,12 @@
</ItemGroup>
<ItemGroup>
<Content Include="CLIv3_Icon.ico" />
<None Include="Resources\CLIv3_Scroll_On.ico" />
<None Include="Resources\CLIv3_Scroll_Off.ico" />
<None Include="Resources\CLIv3_Num_On.ico" />
<None Include="Resources\CLIv3_Num_Off.ico" />
<None Include="Resources\CLIv3_Caps_On.ico" />
<None Include="Resources\CLIv3_Caps_Off.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
594 changes: 352 additions & 242 deletions CapsLockIndicatorV3/IndSettingsWindow.Designer.cs

Large diffs are not rendered by default.

200 changes: 126 additions & 74 deletions CapsLockIndicatorV3/IndSettingsWindow.cs
Original file line number Diff line number Diff line change
@@ -1,74 +1,126 @@
using System;
using System.Windows.Forms;

namespace CapsLockIndicatorV3
{
public partial class IndSettingsWindow : Form
{
public IndSettingsWindow()
{
InitializeComponent();

displayTimeSlider.Value = Properties.Settings.Default.indDisplayTime;
displayTimeLabel.Text = String.Format("{0} ms", displayTimeSlider.Value);

backgroundColourPreview.BackColor = Properties.Settings.Default.indBgColour;
foregroundColourPreview.BackColor = Properties.Settings.Default.indFgColour;
borderColourPreview.BackColor = Properties.Settings.Default.indBdColour;
}

private void displayTimeSlider_Scroll(object sender, EventArgs e)
{
Properties.Settings.Default.indDisplayTime = displayTimeSlider.Value;
displayTimeLabel.Text = string.Format("{0} ms", displayTimeSlider.Value);
}

private void button1_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
Properties.Settings.Default.Save();
Close();
}

private void displayTimeLabel_Click(object sender, EventArgs e)
{
NumberInputDialog numberInputDialog = new NumberInputDialog(displayTimeSlider.Value, displayTimeSlider.Minimum, displayTimeSlider.Maximum);
if (numberInputDialog.ShowDialog() == DialogResult.OK)
{
displayTimeSlider.Value = numberInputDialog.Value;
Properties.Settings.Default.indDisplayTime = numberInputDialog.Value;
displayTimeLabel.Text = string.Format("{0} ms", displayTimeSlider.Value);
}
}

private void backgroundColourButton_Click(object sender, EventArgs e)
{
mainColourPicker.Color = Properties.Settings.Default.indBgColour;
if (mainColourPicker.ShowDialog() == DialogResult.OK)
{
Properties.Settings.Default.indBgColour = mainColourPicker.Color;
}
backgroundColourPreview.BackColor = mainColourPicker.Color;
}

private void foregroundColourButton_Click(object sender, EventArgs e)
{
mainColourPicker.Color = Properties.Settings.Default.indFgColour;
if (mainColourPicker.ShowDialog() == DialogResult.OK)
{
Properties.Settings.Default.indFgColour = mainColourPicker.Color;
}
foregroundColourPreview.BackColor = mainColourPicker.Color;
}

private void borderColourButton_Click(object sender, EventArgs e)
{
mainColourPicker.Color = Properties.Settings.Default.indBdColour;
if (mainColourPicker.ShowDialog() == DialogResult.OK)
{
Properties.Settings.Default.indBdColour = mainColourPicker.Color;
}
borderColourPreview.BackColor = mainColourPicker.Color;
}
}
}
using System;
using System.Windows.Forms;

namespace CapsLockIndicatorV3
{
public partial class IndSettingsWindow : Form
{
public IndSettingsWindow()
{
InitializeComponent();

displayTimeSlider.Value = Properties.Settings.Default.indDisplayTime;
displayTimeLabel.Text = String.Format("{0} ms", displayTimeSlider.Value);

backgroundColourActivatedPreview.BackColor = Properties.Settings.Default.indBgColourActive;
backgroundColourDeactivatedPreview.BackColor = Properties.Settings.Default.indBgColourInactive;

foregroundColourActivatedPreview.BackColor = Properties.Settings.Default.indFgColourActive;
foregroundColourDeactivatedPreview.BackColor = Properties.Settings.Default.indFgColourInactive;

borderColourActivatedPreview.BackColor = Properties.Settings.Default.indBdColourActive;
borderColourDeactivatedPreview.BackColor = Properties.Settings.Default.indBdColourInactive;

fontButton.Font = Properties.Settings.Default.indFont;
}

private void displayTimeSlider_Scroll(object sender, EventArgs e)
{
Properties.Settings.Default.indDisplayTime = displayTimeSlider.Value;
displayTimeLabel.Text = string.Format("{0} ms", displayTimeSlider.Value);
}

private void button1_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
Properties.Settings.Default.Save();
Close();
}

private void displayTimeLabel_Click(object sender, EventArgs e)
{
NumberInputDialog numberInputDialog = new NumberInputDialog(displayTimeSlider.Value, displayTimeSlider.Minimum, displayTimeSlider.Maximum);
if (numberInputDialog.ShowDialog() == DialogResult.OK)
{
displayTimeSlider.Value = numberInputDialog.Value;
Properties.Settings.Default.indDisplayTime = numberInputDialog.Value;
displayTimeLabel.Text = string.Format("{0} ms", displayTimeSlider.Value);
}
}

private void backgroundColourActivatedButton_Click(object sender, EventArgs e)
{
mainColourPicker.Color = Properties.Settings.Default.indBgColourActive;
if (mainColourPicker.ShowDialog() == DialogResult.OK)
{
Properties.Settings.Default.indBgColourActive = mainColourPicker.Color;
}
backgroundColourActivatedPreview.BackColor = mainColourPicker.Color;
}

private void backgroundColourDeactivatedButton_Click(object sender, EventArgs e)
{
mainColourPicker.Color = Properties.Settings.Default.indBgColourInactive;
if (mainColourPicker.ShowDialog() == DialogResult.OK)
{
Properties.Settings.Default.indBgColourInactive = mainColourPicker.Color;
}
backgroundColourDeactivatedPreview.BackColor = mainColourPicker.Color;
}

private void foregroundColourActivatedButton_Click(object sender, EventArgs e)
{
mainColourPicker.Color = Properties.Settings.Default.indFgColourActive;
if (mainColourPicker.ShowDialog() == DialogResult.OK)
{
Properties.Settings.Default.indFgColourActive = mainColourPicker.Color;
}
foregroundColourActivatedPreview.BackColor = mainColourPicker.Color;
}

private void foregroundColourDeactivatedButton_Click(object sender, EventArgs e)
{
mainColourPicker.Color = Properties.Settings.Default.indFgColourInactive;
if (mainColourPicker.ShowDialog() == DialogResult.OK)
{
Properties.Settings.Default.indFgColourInactive = mainColourPicker.Color;
}
foregroundColourDeactivatedPreview.BackColor = mainColourPicker.Color;
}

private void borderColourActivatedButton_Click(object sender, EventArgs e)
{
mainColourPicker.Color = Properties.Settings.Default.indBdColourActive;
if (mainColourPicker.ShowDialog() == DialogResult.OK)
{
Properties.Settings.Default.indBdColourActive = mainColourPicker.Color;
}
borderColourActivatedPreview.BackColor = mainColourPicker.Color;
}

private void borderColourDeactivatedButton_Click(object sender, EventArgs e)
{
mainColourPicker.Color = Properties.Settings.Default.indBdColourInactive;
if (mainColourPicker.ShowDialog() == DialogResult.OK)
{
Properties.Settings.Default.indBdColourInactive = mainColourPicker.Color;
}
borderColourDeactivatedPreview.BackColor = mainColourPicker.Color;
}

private void fontButton_Click(object sender, EventArgs e)
{
indFontChooser.Font = Properties.Settings.Default.indFont;
if (indFontChooser.ShowDialog() == DialogResult.OK)
{
Properties.Settings.Default.indFont = indFontChooser.Font;
fontButton.Font = indFontChooser.Font;
}
}

private void cancelButton_Click(object sender, EventArgs e)
{

}
}
}
Loading

0 comments on commit a847f68

Please sign in to comment.