#ifndef ENVCHECK_H
#define ENVCHECK_H

#include <QWidget>
#include "CHttpBll.h"
#include "CMultiMonitorEnumerator.h"

namespace Ui {
class envCheck;
}

class envCheck : public QWidget
{
    Q_OBJECT
signals:
    void checkUnpass();
    void checkpassed(bool bUpdateVersion);
    void sysUpadte();
public:
    explicit envCheck(QWidget *parent = nullptr);
    ~envCheck();

    void startCheck();
    QStringList unpassList();
private slots:
    void onSysNotice(CSysNotice sysNotice);
    void onUpgrade(CUpgrade upgrade);
    void onStudentClientConfig(CStudentClientConfig studentClientConfig);
    void onGetSoftwareConfig(CGetSoftwareConfig getSoftwareConfig);
private:
    void initUI();
    void checkProc();
    bool IsInsideVirtualMachine(bool &IsInsideVM, QString &sErrMsg);

    Ui::envCheck *ui;

    QStringList m_unpasslist;

    QString m_sDenyListFile;

    QStringList m_sCameraList;
    QStringList m_sRemoteList;
    QStringList m_sRemoteTipList;

    std::shared_ptr<CMultiMonitorEnumerator> m_MonitorEnumeratorPtr;

    bool m_bDisableVirtualMachine = false;
};

#endif // ENVCHECK_H
