Ejemplo n.º 1
0
 private void Start()
 {
     SteamClient.Create();
     ConsoleSystem.Run("config.load", false);
     ConsoleSystem.Run("serverfavourite.load", false);
     HudEnabled.Disable();
     DatablockDictionary.Initialize();
     Application.LoadLevelAdditive("GameUI");
     FeedbackLog.Start(FeedbackLog.TYPE.HardwareInfo);
     FeedbackLog.Writer.Write(SystemInfo.deviceModel);
     FeedbackLog.Writer.Write(SystemInfo.deviceName);
     FeedbackLog.Writer.Write(SystemInfo.graphicsDeviceName);
     FeedbackLog.Writer.Write(SystemInfo.graphicsDeviceVendor);
     FeedbackLog.Writer.Write(SystemInfo.graphicsDeviceVersion);
     FeedbackLog.Writer.Write(SystemInfo.graphicsMemorySize);
     FeedbackLog.Writer.Write(SystemInfo.graphicsShaderLevel);
     FeedbackLog.Writer.Write(SystemInfo.operatingSystem);
     FeedbackLog.Writer.Write(SystemInfo.processorCount);
     FeedbackLog.Writer.Write(SystemInfo.processorType);
     FeedbackLog.Writer.Write(SystemInfo.supportedRenderTargetCount);
     FeedbackLog.Writer.Write(SystemInfo.supportsComputeShaders);
     FeedbackLog.Writer.Write(SystemInfo.supportsImageEffects);
     FeedbackLog.Writer.Write(SystemInfo.supportsInstancing);
     FeedbackLog.Writer.Write(SystemInfo.supportsRenderTextures);
     FeedbackLog.Writer.Write(SystemInfo.supportsRenderToCubemap);
     FeedbackLog.Writer.Write(SystemInfo.supportsShadows);
     FeedbackLog.Writer.Write(SystemInfo.supportsStencil);
     FeedbackLog.Writer.Write(SystemInfo.systemMemorySize);
     FeedbackLog.End(FeedbackLog.TYPE.HardwareInfo);
     Connection.GameLoaded();
 }
        public async Task <FeedbackLogModel> SaveFeedback(string uniqueId, int personTypeId, string name, string email, FeedbackRequestModel model)
        {
            var newFeedback = new FeedbackLog
            {
                PersonUniqueId = uniqueId,
                Name           = name,
                Email          = email,
                PersonTypeId   = ChatLogPersonTypeEnum.Parent.Value,
                Subject        = model.Subject,
                Issue          = model.Issue,
                Description    = model.Description,
                CurrentUrl     = model.CurrentUrl
            };

            _edFiDb.FeedbackLogs.Add(newFeedback);


            await _edFiDb.SaveChangesAsync();

            return(new FeedbackLogModel {
                PersonUniqueId = newFeedback.PersonUniqueId,
                Name = newFeedback.Name,
                Email = newFeedback.Email,
                PersonTypeId = newFeedback.PersonTypeId,
                Subject = newFeedback.Subject,
                Issue = newFeedback.Issue,
                Description = newFeedback.Description,
                CurrentUrl = newFeedback.CurrentUrl,
                CreatedDate = newFeedback.CreateDate
            });
        }
Ejemplo n.º 3
0
    public bool DoConnect(string strURL, int iPort)
    {
        SteamClient.Needed();
        NetCull.config.timeoutDelay = 60f;
        if (Steam_GetSteamID() == 0)
        {
            LoadingScreen.Update("connection failed (no steam detected)");
            Object.Destroy(base.gameObject);
            return(false);
        }
        byte[] buffer = new byte[0x400];
        IntPtr pData  = Marshal.AllocHGlobal(0x400);
        uint   num2   = SteamClient_GetAuth(pData, 0x400);

        byte[] destination = new byte[num2];
        Marshal.Copy(pData, destination, 0, (int)num2);
        Marshal.FreeHGlobal(pData);
        BitStream stream = new BitStream(false);

        stream.WriteInt32(0x42d);
        stream.WriteByte(2);
        stream.WriteUInt64(Steam_GetSteamID());
        stream.WriteString(Marshal.PtrToStringAnsi(Steam_GetDisplayname()));
        stream.WriteBytes(destination);
        try
        {
            object[] loginData = new object[] { stream };
            NetError error     = NetCull.Connect(strURL, iPort, string.Empty, loginData);
            if (error != NetError.NoError)
            {
                LoadingScreen.Update("connection failed (" + error + ")");
                Object.Destroy(base.gameObject);
                return(false);
            }
        }
        catch (Exception exception)
        {
            Debug.LogException(exception);
            Object.Destroy(base.gameObject);
            return(false);
        }
        FeedbackLog.Start(FeedbackLog.TYPE.StartConnect);
        FeedbackLog.Writer.Write(strURL);
        FeedbackLog.Writer.Write(iPort);
        FeedbackLog.End(FeedbackLog.TYPE.StartConnect);
        SteamClient.SteamClient_OnJoinServer(strURL, iPort);
        return(true);
    }
Ejemplo n.º 4
0
 public static void LevelLoadLog(byte iStage)
 {
     FeedbackLog.Start(FeedbackLog.TYPE.LoadProgress);
     FeedbackLog.Writer.Write(iStage);
     FeedbackLog.End(FeedbackLog.TYPE.LoadProgress);
 }