12 using System.Windows.Forms;
58 Invoke(c,
new object[] { d, s });
71 MessageBox.Show(
"Auth failed !",
"Device error", MessageBoxButtons.OK, MessageBoxIcon.Error);
119 Invoke(c,
new object[] { d, v });
BLEManager BluetoothManager
System.Windows.Forms.Label heartrateLabel
void OnAuth(MiBand d, bool s)
Authenticate MiBand
OnHeartrateChangedHandler HeartrateChanged
System.Windows.Forms.ToolStripLabel connectionStatusLabel
delegate void OnAuthHandler(MiBand d, bool s)
delegate void OnHeartrateChangeHandler(MiBand d, ushort v)
static void SaveErrorData(string error)
Log all the error that occurs in the program
void WriteRealtimeHeartrateInFile(MiBand d, ushort v)
bool HasDeviceConnected()
System.Windows.Forms.Button startButton
static DeviceControl Instance
void authButton_Click(object sender, EventArgs e)
Authentication button
System.Windows.Forms.Button stopButton
void InitializeComponent()
Required method for Designer support - do not modify the contents of this method with the code editor...
void OnHeartrateChange(MiBand d, ushort v)
Display heart rate change
void ControlFrame_Load(object sender, EventArgs e)
Load the selected MiBand
void StopMonitorHeartrate()
Stop heart rate reading
async void StartMonitorHeartrate()
void stopButton_Click(object sender, EventArgs e)
Stop Data Collection
void startButton_Click(object sender, EventArgs e)
Start Data collection
void ControlFrame_FormClosing(object sender, FormClosingEventArgs e)
Disconnect when application it closed
async void Authenticate(OnAuthHandler callback=null)