예제 #1
0
        private static bool _Create(clsProductInfoBase pProductInfo)
        {
            myEnvironment_ = myAppSettings_["Environment"];
            myDomain_      = myAppSettings_["Domain"];
            myProductInfo_ = pProductInfo;
            mySystemID_    = myProductInfo_.xSystemID;
            myWindowsUser_ = Environment.UserName;
            myMachineName_ = Environment.MachineName;

            try
            {
                myTimeZone_ = TimeZoneInfo.FindSystemTimeZoneById("Tokyo Standard Time");
            }
            catch { }

            try
            {
                myIPAddress_ = clsUtil.xGetLocalIPAddress();
            }
            catch (Exception ex) { }
            try
            {
                myMacAddress_ = clsUtil.xGetLocalMacAddress();
            }
            catch (Exception ex) { }

            if (myEnvironment_ == "local")
            {
                _SetSystemUseDirectory();
            }
            myIsCreated_ = true;

            if (!myProductInfo_.xCanUse)
            {
                ////string msg = "";
                ////msg += "◆ ";
                ////msg += mySystemID_;
                ////msg += " は、利用期間満了のため使用できません ◆";
                ////clsTextLogger.xWriteTextLog(myLoginUser_, myMachineName_, "clsSystemInfo", msg);

                ////mySystemID_ = "";
                ////myAppDataDir_ = "";
                ////////myConfDir_ = "";
                ////myLogDir_ = "";
                ////myTempDir_ = "";
                ////myVUpDir_ = "";
                ////////myProgramDir_ = "";
                ////myLoginUser_ = "";
                ////myMachineName_ = "";
                ////mySysConfFileName_ = "";
                ////myDBConfFileName_ = "";
            }

            return(myProductInfo_.xCanUse);
        }
예제 #2
0
        //private static TimeZoneInfo myTimeZone_ = TimeZoneInfo.FindSystemTimeZoneById("Tokyo Standard Time");


        //####################################################################
        //
        // function
        //
        //####################################################################

        /// <summary>
        /// SystemInfoを創成する。
        /// </summary>
        /// <param name="ProductInfo">プロダクト情報</param>
        /// <returns></returns>
        public static bool xCreate(IConfiguration pConfiguration, clsProductInfoBase pProductInfo)
        {
            myAppSettings_ = pConfiguration;

            return(_Create(pProductInfo));
        }