예제 #1
0
 public void ReadFrom(DataReader reader)
 {
     fLocalShowPath   = reader.ReadString("LocalShowPath", 500);
     fMaxSizeForShows = reader.ReadInt("MaxSizeForShows");
     fUserLogonID     = reader.ReadString("UserLogonID", 500);
     fUserPIN         = reader.ReadString("UserPIN", 500);
     fRememberUserPIN = reader.ReadBoolean("RememberUserPIN");
     fEnableLog       = reader.ReadBoolean("EnableLog");
     fNextProcessTime = reader.ReadDateTime("NextProcessTime");
 }
예제 #2
0
        public DType Accept(TDateTime type, object converter, ExcelStream x, DefAssembly ass)
        {
            var d = x.Read();

            if (CheckNull(type.IsNullable, d))
            {
                return(null);
            }
            return(DataUtil.CreateDateTime(d.ToString(), ass.TimeZone));
        }
예제 #3
0
        public StatusCode Signon()
        {
            StatusCode statusCode = StatusCode.sc_GeneralError;

            fIsUserLoggedOn = false;

            if (fUserID.IsUndefined)
            {
                throw new Exception("Session.Signon: Missing UserID");
            }
            if (fUserPassword.IsUndefined)
            {
                throw new Exception("Session.Signon: Missing UserPassword");
            }

            SignonRqst signonRqst;
            SignonResp signonResp;

            //TODO: encrypt UserID and Password

            signonRqst          = SignonRqst.NewInstance();
            signonRqst.UserID   = fUserID;
            signonRqst.Password = fUserPassword;
            signonRqst.Player   = fPlayer;

            try
            {
                DataRequestor dataRequestor = DataRequestor.NewInstance();
                signonResp = dataRequestor.SignonRequest(signonRqst);
                statusCode = dataRequestor.StatusCode;

                if (statusCode == StatusCode.sc_Success)
                {
                    fSessionData    = signonResp.SessionData;
                    fSessionExpires = signonResp.SessionExpires;
                    //fMemberPrefs = signonResp.MemberState.MemberPrefs;
                    //fIncludeAdult = fMemberPrefs.IncludeAdult;
                    //fCanAccessAdult = (fIncludeAdult == ina_Always);
                    //fMemberProviderList = signonResp.MemberState.MemberProviderList;

                    fIsUserLoggedOn = true;
                    return(statusCode);
                }
                else if (statusCode == StatusCode.sc_InvalidUserIDPassword)
                {
                    fBadUserCredentials = true;
                }
            }
            catch (Exception)
            {
            }

            return(statusCode);
        }
        public DType Accept(TDateTime type, ExcelStream x)
        {
            var d = x.Read();

            if (CheckNull(type.IsNullable, d))
            {
                return(null);
            }
            if (d is System.DateTime datetime)
            {
                return(new DDateTime(datetime));
            }
            return(DataUtil.CreateDateTime(d.ToString()));
        }
예제 #5
0
            //.........................................................................
            public byte[] GetVal()
            {
                // При запросе - установим текущую дату плюс iNumEv сек
                DateTime DTnow = DateTime.Now;

                if (DT.Month < DTnow.Month)
                {
                    DT = DTnow.AddSeconds(iNumEv);
                }

                TDateTime DTConv = new TDateTime(DT.Millisecond, DT.Second, DT.Minute, DT.Hour, (ushort)DT.Year, DT.Month, DT.Day);

                Global.Append(DTConv.Val, 0, Value, iPosDT, DTConv.Val.Length); // Дата/Время записи очередное ввели
                DT.AddSeconds(QUANT_EV + 2);                                    // Переносим время по этой записи на QUANT_EV + 2 сек
                return(Value);
            }
예제 #6
0
 public string Accept(TDateTime type)
 {
     return("FJsonValueNumber");
 }
예제 #7
0
 public string Accept(TDateTime type, string jsonVarName, string fieldName)
 {
     return($"{fieldName} = {jsonVarName}");
 }
예제 #8
0
 public DType Accept(TDateTime type, string x)
 {
     throw new NotSupportedException();
 }
예제 #9
0
 public string Accept(TDateTime type)
 {
     return("readInt");
 }
예제 #10
0
 public override bool Accept(TDateTime type)
 {
     return(false);
 }
 public virtual string Accept(TDateTime type)
 {
     return("int");
 }
예제 #12
0
 public string Accept(TDateTime type, string bufName, string fieldName)
 {
     return($"if(!{bufName}.readInt({fieldName})) return false;");
 }
예제 #13
0
 public string Accept(TDateTime type)
 {
     return("writeInt");
 }
 public virtual void Accept(TDateTime type, T x)
 {
 }
예제 #15
0
 public string Accept(TDateTime type, string bufName, string fieldName)
 {
     return($"{bufName}.WriteInt({fieldName});");
 }
예제 #16
0
 public virtual TR Accept(TDateTime type)
 {
     return DoAccept(type);
 }
예제 #17
0
 public string Accept(TDateTime type, string bufName)
 {
     return($"{bufName}.ReadInt()");
 }
 public override string Accept(TDateTime type)
 {
     return("string");
 }
예제 #19
0
 public void Accept(TDateTime type, Dictionary <string, DefTypeBase> x)
 {
 }
 public virtual void Accept(TDateTime type, T x)
 {
     DoAccept(type, x);
 }
예제 #21
0
 public DType Accept(TDateTime type, XElement x, DefAssembly ass)
 {
     return(DataUtil.CreateDateTime(x.Value));
 }
예제 #22
0
 public string Accept(TDateTime type)
 {
     return("INT");
 }
예제 #23
0
 public string Accept(TDateTime type, string x)
 {
     throw new NotImplementedException();
 }
예제 #24
0
 public bool GetProductionDataExport(long DataModelID, TASNodeRequestDescriptor ExternalRequestDescriptor,
                                     TASNodeUserPreferences UserPreferences, int ExportType, string CallerId, TICFilterSettings Filter,
                                     TICLiftBuildSettings LiftBuildSettings, bool TimeStampRequired, bool CellSizeRequired, bool RawData,
                                     bool RestrictSize, bool ZipFile, double Tolerance, bool IncludeSurveydSurface, bool Precheckonly, string Filename,
                                     TMachine[] MachineList, int CoordType, int OutputType, TDateTime DateFromUTC, TDateTime DateToUTC,
                                     TTranslation[] Translations, T3DBoundingWorldExtent ProjectExtents, out TDataExport DataExport)
 {
     return(client.GetProductionDataExport(DataModelID, ExternalRequestDescriptor, UserPreferences, ExportType,
                                           CallerId, Filter, LiftBuildSettings, TimeStampRequired, CellSizeRequired,
                                           RawData, RestrictSize, ZipFile, Tolerance, IncludeSurveydSurface, Precheckonly, Filename, MachineList,
                                           CoordType, OutputType, DateFromUTC, DateToUTC, Translations, ProjectExtents,
                                           out DataExport));
 }
예제 #25
0
 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.String) {
           Item = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           Trans = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.String) {
           Tags = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.Struct) {
           Time = new TDateTime();
           Time.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
 public string Accept(TDateTime type)
 {
     return("int32");
 }
예제 #27
0
 public string Accept(TDateTime type, string fieldName, string tablesName)
 {
     throw new NotImplementedException();
 }
예제 #28
0
 public void Accept(TDateTime type, HashSet <DefTypeBase> x)
 {
 }
예제 #29
0
 public DType Accept(TDateTime type, IEnumerable <ExcelStream> x, bool y, DefAssembly ass)
 {
     throw new NotImplementedException();
 }
예제 #30
0
 public string Accept(TDateTime type, string bufName, string fieldName)
 {
     return($"{fieldName} = {bufName}.ReadInt();");
 }
예제 #31
0
 public string Accept(TDateTime type, string json, string field)
 {
     return(DefaultLoad(json, field));
 }