using System;
using System.Collections.Generic;

namespace MOKA_Factory_Tools
{
    
    class StructList
    {
        public static string CheckServerConnectionUrl = "https://cn.uc.qhmoka.com/scbc-server";//检查网络是否通顺对应URL
    }

    public class LocalPath
    {
        public static string localpath { get; set; }= AppDomain.CurrentDomain.BaseDirectory;
    }


    public class MidList
    {
        public string message { get; set; }
        public string code { get; set; }
        public string factoryname { get; set; }
        public string factoryip { get; set; }
        public string factoryNum { get; set; }
        public string version { get; set; }
        public string projectid { get; set; }
        public string clienttype { get; set; }
        public string host { get; set; }
        public string quantity { get; set; }
        public string whiteType { get; set; }
        public RokuCustomer rokuCustomer { get; set; }
        public Dictionary <string,string> keytype { get; set; }
    }

    public class RokuCustomer
    {
        public string id { get; set; }
        public string ordernum { get; set; }
        public string brand { get; set; }
        public string region { get; set; }
        public string oemmodel { get; set; }
        public string supporturl { get; set; }
        public string supportphone { get; set; }
        public string productiondate { get; set; }
        public string remotetype { get; set; }
        public string updatetime { get; set; }
        public string createtime { get; set; }
        public string isdelete { get; set; }
    }

    public class WhiteBalanceInput
    {
        public string bid { get; set; }
        public string mac { get; set; }
    }
    public class WhiteBalanceList
    {
        public string message { get; set; }
        public string code { get; set; }
        public WhiteBalanceInfo whiteBalanceInfo { get; set; }
    }
    public class WhiteBalanceInfo
    {
        public string id { get; set; }
        public string ordernum { get; set; }
        public string hdmirgain { get; set; }
        public string hdmiggain { get; set; }
        public string hdmibgain { get; set; }
        public string nrgain { get; set; }
        public string nggain { get; set; }
        public string nbgain { get; set; }
        public string lrgain { get; set; }
        public string lggain { get; set; }
        public string lbgain { get; set; }
        public string updatetime { get; set; }
        public string createtime { get; set; }
        public string isdelete { get; set; }
        public string isExemption { get; set; }
    }

    public class MidAddress
    {
        public string host { get; set; }
        public string order { get; set; }
        public string number { get; set; }
        public string pid { get; set; }
        public string ctype { get; set; }
        public string version { get; set; }
        public string purl { get; set; }
        public string psize { get; set; }
        public string pmd5 { get; set; }
        public string status { get; set; }
        public string start_date { get; set; }
        public string finish_date { get; set; }
        public string des { get; set; }
        public string code { get; set; }

    }


    public class OrderInput
    {
        public string clientType { get; set; }
        public string version { get; set; }
        public string bid { get; set; }
        public string mac { get; set; }
    }

    public class DBKeysStringFormat
    {
        public string cikey { get; set; }
        public string esn { get; set; }
        public string hdcp { get; set; }
        public string widevine { get; set; }
        public string hdcp22 { get; set; }
        public string did { get; set; }
        public string mac { get; set; }
        public string widi { get; set; }
        public string mgk { get; set; }
        public string attestation { get; set; }
    }

    public class FunctionSetting
    {
        public string TVCOM { get; set; }
        public string TVBaud { get; set; }
        public string ChannelList { get; set; }
        public bool WriteChannel { get; set; }
        public bool WriteOSD { get; set; }
        public string OSDList { get; set; }
        public bool WriteSHOP { get; set; }
        public string SHOPList { get; set; }
        public bool WriteWB { get; set; }
        public bool WBInit { get; set; }
        public string WBPath { get; set; }
        public string WBFileName { get; set; }
        public byte[] ChannelCode { get; set; }
        public byte[] OSDLCode { get; set; }
        public byte[] ShopLCode { get; set; }
        public byte[] NormalRGB { get; set; }
        public byte[] CoolRGB { get; set; }
        public byte[] WarmRGB { get; set; }
        public int EnterFactoryRetry { get; set; }
        /// <summary>
        /// 全部Key抄写成功后,且上报成功后等待多久控件可用;
        /// </summary>
        public int Wait_after_completion { get; set; }
        public int LocalDidSize { get; set; }
        public int LocalMacSize { get; set; }
        public int LocalHdcpSize { get; set; }
        public int LocalWidiSize { get; set; }
        public int LocalHdcp22Size { get; set; }
        public int LocalEsnSize { get; set; }
        public int LocalMGKSize { get; set; }
        public int LocalCiSize { get; set; }
        public int LocalWidevineSize { get; set; }
        public int LocalFairplaySize { get; set; }
        public int LocalECPSize { get; set; }
        public int LocalWifiMacSize { get; set; }
        public int LocalBTMacSize { get; set; }
        public int localACASKeySize { get; set; }
        public bool NoDoublewrite { get; set; }//Local DB模式下不允许扫描已经抄写过的SN
        public string BarcodeKeyword { get; set; }
        public int BarcodeLength { get; set; }
        public bool BarcodeLimit { get; set; }
        public bool BarcodeWrite { get; set; }
        public int SerailDelay { get; set; }
        public bool UsingLocalServer { get; set; }
        public Dictionary<string, string> CustomCMD { get; set; }
        /// <summary>
        /// 允许不用扫条码抄写(单击按钮);
        /// </summary>
        public bool AllowNoScanning { get; set; }
        public int ReportTimeOut { get; set; }
        /// <summary>
        /// 是否启用G客户防呆措施;
        /// </summary>
        public bool UsingGFoolProofing { get; set; } = false;
        /// <summary>
        /// G客户防呆抄写次数限制,默认2次;
        /// </summary>
        public int GFoolProofingCount { get; set; } = 2;

        /// <summary>
        /// 是否导出日本板卡的ACAS ID与SN号;
        /// </summary>
        public bool ExportSNACASID { get; set; } = false;

        /// <summary>
        /// 串口指令读超时值,单位毫秒;
        /// </summary>
        public int ReadTimeout { get; set; } = 3000;

        /// <summary>
        /// 串口完成一次指令的Write、Read后,下一条指令等待多久开始执行;
        /// 单位:毫秒
        /// </summary>
        public int NextCommandWaitTime { get; set; } = 100;

        /// <summary>
        /// G客户NTF功能是否开启;
        /// </summary>
        public bool NTF { get; set; } = false;

        /// <summary>
        /// 产线线体;
        /// </summary>
        public string Line { get; set; }

        /// <summary>
        /// 产线工站,抄写工具默认为DataBurning
        /// </summary>
        public string Station { get; set; } = "DataBurning";
    }

    public class KeyInfo
    {
        public string DID { get; set; }
        public string Mac { get; set; }
        public string HDCP { get; set; }
        public string HDCP22 { get; set; }
        public string ESN { get; set; }
        public string WiDi { get; set; }
        public string Widevine { get; set; }
        public string CI_plus { get; set; }
        public string Attestation { get; set; }
        public string AttestationMD5 { get; set; }
        public string MGK { get; set; }
        public string Fairplay { get; set; }
        public string DSN { get; set; }
        public string WiFi_MAC { get; set; }
        public string BT_MAC { get; set; }
        public string LEK { get; set; }
        public string PEK { get; set; }
        public string Playready { get; set; }
        public string Hashkey { get; set; }
        public string ECP { get; set; }
        public string YouTube_KEY { get; set; }
        public string EDIDPid { get; set; }
        public string EDIDModelName { get; set; }
        public string ACASKey_Data { get; set; }
        public string ACASKey_Tool { get; set; }
        public string ACASKey_DataMd5 { get; set; }
        public string ACASKey_ToolMd5 { get; set; }
    }

    public class FireTVKey
    {
        public bool LEK { get; set; }
        public bool PEK { get; set; }
        public bool Playready { get; set; }
        public bool Hashkey { get; set; }
    }

    public class FireTVDsnInput
    {
        public string ordernum { get; set; }
        public string fsn { get; set; }
        public string psn { get; set; }
        public string deviceCode { get; set; }
        public string mac { get; set; }

    }

    public class ReadCheck
    {
        public bool PIDReadcheck { get; set; }
        public bool OSDReadcheck { get; set; }
        public bool SHOPReadcheck { get; set; }
        public bool DIDReadcheck { get; set; }
        public bool MacReadcheck { get; set; }
        public bool HDCPReadcheck { get; set; }
        public bool HDCP22Readcheck { get; set; }
        public bool ESNReadcheck { get; set; }
        public bool WiDiReadcheck { get; set; }
        public bool WidevineReadcheck { get; set; }
        public bool CI_plusReadcheck { get; set; }
        public bool AttestationReadcheck { get; set; }
        public bool MGKReadcheck { get; set; }
        public bool FairplayReadcheck { get; set; }
        public bool ECPReadcheck { get; set; }
        public bool WifiMacReadcheck { get; set; }
        public bool BTMacReadcheck { get; set; }
        public bool LEKReadcheck { get; set; }
        public bool PEKReadcheck { get; set; }
        public bool PlayreadyReadcheck { get; set; }
        public bool HashReadcheck { get; set; }
        public bool DSNReadcheck { get; set; }
        public bool YouTubeReadcheck { get; set; }
        public bool EDIDPIDReadcheck { get; set; }
        public bool EDIDModeNameReadcheck { get; set; }
        public bool ACASKeyReadcheck { get; set; }
        public bool ACASIDReadcheck { get; set; }
    }

    public class WriteCheck
    {
        public bool DIDCheckcheck { get; set; }
        public bool MacCheckcheck { get; set; }
        public bool HDCPCheckcheck { get; set; }
        public bool HDCP22Checkcheck { get; set; }
        public bool ESNCheckcheck { get; set; }
        public bool WiDiCheckcheck { get; set; }
        public bool WidevineCheckcheck { get; set; }
        public bool CI_plusCheckcheck { get; set; }
        public bool AttestationCheckcheck { get; set; }
        public bool MGKCheckcheck { get; set; }
        public bool FairplayCheckcheck { get; set; }
        public bool ECPCheckcheck { get; set; }
        public bool WifiMacCheckcheck { get; set; }
        public bool BTMacCheckcheck { get; set; }
        public bool LEKCheckcheck { get; set; }
        public bool PEKCheckcheck { get; set; }
        public bool PlayreadyCheckcheck { get; set; }
        public bool HashCheckcheck { get; set; }
        public bool DSNCheckcheck { get; set; }
        public bool YouTubeCheckcheck { get; set; }
        public bool ACASKeyCheckcheck { get; set; }
    }

    public class WriteDone
    {
        public bool PIDWrite_YesNo { get; set; }
        public int PIDWriteDelay { get; set; }
        public bool AutoWhiteBalance { get; set; }
        public bool ChannelWrite_YesNo { get; set; }
        public bool OSDWrite_YesNo { get; set; }
        public bool SHOPWrite_YesNo { get; set; }
        public bool ClientTypeCheck_YesNo { get; set; }
        public bool SoftwareVersionCheck_YesNo { get; set; }
        public bool DIDWrite_YesNo { get; set; }
        public bool MacWrite_YesNo { get; set; }
        public bool HDCPWrite_YesNo { get; set; }
        public bool HDCP22Write_YesNo { get; set; }
        public bool ESNWrite_YesNo { get; set; }
        public bool WiDiWrite_YesNo { get; set; }
        public bool WidevineWrite_YesNo { get; set; }
        public bool CI_plusWrite_YesNo { get; set; }
        public bool AttestationWrite_YesNo { get; set; }
        public bool MGKWrite_YesNo { get; set; }
        public bool FairplayWrite_YesNo { get; set; }
        public bool ECPWrite_YesNo { get; set; }
        public bool WifiMacWrite_YesNo { get; set; }
        public bool BTMacWrite_YesNo { get; set; }
        public bool LEKWrite_YesNo { get; set; }
        public bool PEKWrite_YesNo { get; set; }
        public bool PlayreadyWrite_YesNo { get; set; }
        public bool HashWrite_YesNo { get; set; }
        public bool DSNWrite_YesNo { get; set; }
        public bool YouTubeWrite_YesNo { get; set; }
        public bool EDIDPIDWrite_YesNo { get; set; }
        public bool EDIDModeNameWrite_YesNo { get; set; }
        public bool ACASKeyWrite_YesNo { get; set; }
    }

    public class ErrorInfo
    {
        public string reportType { get; set; }
        public string reportData { get; set; }
        public string version { get; set; }
        public string factory { get; set; }
        public string mac { get; set; }
        public string reportTime { get; set; }

    }

    public class UpgradeCheckInput
    {
        public string appid { get; set; }
        public string devicemodel { get; set; }
        public string dnum { get; set; }
        public string ver { get; set; }
        public string type { get; set; }
    }

    public class UpgradeMsgList
    {
        public string servertime { get; set; }
        public string callid { get; set; }
        public string state { get; set; }
        public string note { get; set; }
        public string language { get; set; }
        public UpgradeMsgList2 upgrade { get; set; }
        public string apiversion { get; set; }
    }

    public class UpgradeReportInput
    {
        public string appid { get; set; }
        public string devmodel { get; set; }
        public string dnum { get; set; }
        public string ver { get; set; }
        public string result { get; set; }
        public string type { get; set; }
    }

    public class UpgradeMsgList2
    {
        public string type { get; set; }
        public string appid { get; set; }
        public string apptype { get; set; }
        public string version { get; set; }
        public string verid { get; set; }
        public object md5 { get; set; }
        public string size { get; set; }
        public string minicon { get; set; }
        public object midicon { get; set; }
        public string fileurl { get; set; }
        public string increment { get; set; }
        public object appendver { get; set; }
        public string updatetime { get; set; }
    }

    public static class Serverurl
    {
        public static string Testurl = "http://test.scbc.qhmoka.com/scbc-server/clientType/getMessage.do";//测试用服务器
        public static string Officialurl = "https://cn.uc.qhmoka.com/scbc-server/clientType/getMessage.do";//生产用服务器
    }

    public static class UpgradeUrl
    {
        public static string Officialurl = "https://cn.ota.qhmoka.com/ota-services/upmp/upgradeIncrForTool";//生产用升级检查接口
        public static string Testurl = "https://test.uc.qhmoka.com/ota-services/upmp/upgradeIncrForTool";//测试用升级检查接口
    }

    public static class UpgradeReportUrl
    {
        public static string Officialurl = "https://cn.ota.qhmoka.com/ota-services/upmp/operateInterfaceForPC";//生产用升级上报接口
        //public static string Testurl = "https://test.uc.qhmoka.com/ota-services/upmp/operateInterfaceForPC";//测试用升级上报接口
    }

    public static class ErrorreportServerurl
    {
        public static string Testurl = "http://test.micro.server.qhmoka.com/report/reportToolsLog";//异常上报测试服务器
        public static string Officialurl = "https://ap.micro.server.qhmoka.com/report/reportToolsLog";//异常上报正式服务器
    }

    public static class GetWhiteBalanceInfoUrl
    {
        public static string Testurl = "http://test.scbc.qhmoka.com/scbc-server/clientType/getBalanceMessage.do";//获取订单白平衡配置测试接口
        public static string Officialurl = "https://cn.uc.qhmoka.com/scbc-server/clientType/getBalanceMessage.do";//获取订单白平衡配置正式接口
    }

    public static class FireTVDsnUrl
    {
        public static string Testurl = "http://test.scbc.qhmoka.com/scbc-server/dsn/";//获取FireTV DSN相关测试接口
        public static string Officialurl = "https://cn.uc.qhmoka.com/scbc-server/dsn/";//获取FireTV DSN相关正式接口
    }

    public static class Loginurl
    {
        public static string Testurl = "http://test.scbc.qhmoka.com/scbc-server/login.do";//测试用登录接口
        public static string Officialurl = "https://cn.uc.qhmoka.com/scbc-server/login.do";//生产用登录接口
    }

    public class LoginInput
    {
        public string account { get; set; }
        public string password { get; set; }
        public string mac { get; set; }
    }
    public class LoginOutput
    {
        public string msg { get; set; }
        public string code { get; set; }
        public string factoryname { get; set; }
        public string factorynum { get; set; }
    }

    public static class TestMode
    {
        // 默认为正式服务器;
        public static bool testMode = false;
        public static string MAC = CommonMethod.GetMacAddress();
        public static string loginUrl = Loginurl.Officialurl;
        public static string fireTVDsnUrl = FireTVDsnUrl.Officialurl;
        public static string getWhiteBalanceInfoUrl = GetWhiteBalanceInfoUrl.Officialurl;
        public static string errorreportServerurl = ErrorreportServerurl.Officialurl;
        public static string upgradeReportUrl = UpgradeReportUrl.Officialurl;
        public static string upgradeUrl = UpgradeUrl.Officialurl;
        public static string serverurl = Serverurl.Officialurl;

        public static void SetTestMode(bool simulation = false)
        {
            if (simulation)
            {// 模拟测试时使用测试服务器;
                loginUrl = Loginurl.Testurl;
                fireTVDsnUrl = FireTVDsnUrl.Testurl;
                getWhiteBalanceInfoUrl = GetWhiteBalanceInfoUrl.Testurl;
                errorreportServerurl = ErrorreportServerurl.Testurl;
                upgradeReportUrl = UpgradeReportUrl.Officialurl;
                upgradeUrl = UpgradeUrl.Testurl;
                serverurl = Serverurl.Testurl;
            }
            else
            {
                loginUrl = Loginurl.Officialurl;
                fireTVDsnUrl = FireTVDsnUrl.Officialurl;
                getWhiteBalanceInfoUrl = GetWhiteBalanceInfoUrl.Officialurl;
                errorreportServerurl = ErrorreportServerurl.Officialurl;
                upgradeReportUrl = UpgradeReportUrl.Officialurl;
                upgradeUrl = UpgradeUrl.Officialurl;
                serverurl = Serverurl.Officialurl;
            }
        }
    }

    #region G客户NTF统计功能
    public class MaInfo
    {
        public string ODF;
        public string BOM;
        public string SCREEN;
        public string SHIPPING;
        public string SIZE;
        public string Model;
    }
    #endregion
}