SweetLib/SweetLib.Demo/MainForm.cs

38 lines
1.1 KiB
C#
Raw Permalink Normal View History

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using SweetLib.Utils.TaskBar;
namespace SweetLib.Demo
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
}
private void radioProgressCheckedChanged(object sender, EventArgs e)
{
var radio = (RadioButton) sender;
if(!radio.Checked)
return;
int state = Convert.ToInt32(radio.Tag);
TaskBarProgress.TaskbarStates realState = (TaskBarProgress.TaskbarStates)Convert.ToInt32(radio.Tag);
TaskBarProgress.SetState(Handle, TaskBarProgress.TaskbarStates.Indeterminate);
}
private void tbrTaskBarProgress_ValueChanged(object sender, EventArgs e)
{
TaskBarProgress.SetValue(Handle, tbrTaskBarProgress.Value, tbrTaskBarProgress.Maximum);
}
}
}