- smoothy_source.zip
- Smoothy.gpState
- Smoothy.sln
- SmoothyInterface
- app.config
- bin
- Data
- Enum
- External
- BusyBarLib.dll
- Forms
- monitor.ico
- obj
- Program.cs
- Properties
- Resources
- action_refresh_blue.gif
- add.png
- afraid.bmp
- arrow_in.png
- arrow_out.png
- arrow_refresh.png
- arrow_refresh_small.png
- arrow_right.png
- arrow_up.png
- cancel.png
- cancel1.png
- color_swatch.png
- color_wheel.png
- connect.png
- door_out.png
- error.png
- FailureAudit.gif
- flag_orange.gif
- flag_red.gif
- flag_red.png
- help.png
- information.png
- key.png
- link_add.png
- link_error.png
- link_go.png
- lock.png
- monitor-48.png
- page.png
- page_copy.png
- page_gear.png
- script_code.png
- script_code_red.png
- SuccessAudit.gif
- tab_go.png
- table.png
- Warning.gif
- SmoothyInterface.csproj
- SmoothyInterface.snk
- Util
- TestEventLogTypes
- smoothy_bin.zip
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using SmoothyInterface.Properties;
using SmoothyInterface.Enum;
namespace SmoothyInterface.Forms
{
public partial class Options : Form
{
public Options()
{
InitializeComponent();
}
private void Options_Load(object sender, EventArgs e)
{
FillVisualStyle();
}
private void FillVisualStyle()
{
cbEventDistinction.Items.Clear();
string[] names = System.Enum.GetNames(typeof(VisualEventDistinctionType));
for (int i = 0; i < names.Length; i++)
{
cbEventDistinction.Items.Add(names[i]);
}
cbEventDistinction.SelectedItem = Settings.Default.ColorMode;
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
private void btnOK_Click(object sender, EventArgs e)
{
SaveSettings();
this.Close();
}
private void SaveSettings()
{
Settings.Default.ColorMode = cbEventDistinction.SelectedItem.ToString();
Settings.Default.Save();
}
private void ShowColorDialogForRows(ref Panel panel)
{
colorDialog.Color = panel.BackColor;
if (colorDialog.ShowDialog() == DialogResult.OK)
{
panel.BackColor = colorDialog.Color;
}
}
private void btnChooseInformation_Click(object sender, EventArgs e)
{
ShowColorDialogForRows(ref panelColourInformation);
}
private void btnChooseWarning_Click(object sender, EventArgs e)
{
ShowColorDialogForRows(ref panelColorWarning);
}
private void btnChooseError_Click(object sender, EventArgs e)
{
ShowColorDialogForRows(ref panelColorError);
}
private void btnChooseSucces_Click(object sender, EventArgs e)
{
ShowColorDialogForRows(ref panelColorSuccessAudit);
}
private void btnFailureAudit_Click(object sender, EventArgs e)
{
ShowColorDialogForRows(ref panelColorFailureAudit);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
The author is a software consultant in South Africa, specializing in bespoke software solutions.