コード例 #1
0
        public override void Refresh()
        {
            base.SetStatus("Refreshing device list.");

            GCDeviceCollection deviceList = _deviceManager.QueryDeviceList();

            _deviceView.RefreshList(deviceList);

            if (deviceList != null)
            {
                Program.Log.Write("{Device} Refresh device list succeed : " + deviceList.Count.ToString() + " items.");
            }
            else
            {
                Program.Log.Write(LogType.Warning, "{Device} Refresh device list failed : " + GCError.LastErrorInfor);
                Program.Log.Write(GCError.LastError);

                MessageBox.Show(frmMain, "Refresh device list failed.\r\n\r\n" + GCError.LastErrorInfor,
                                "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }

            base.ClearStatus();
        }