static void Init() { // Get existing open window or if none, make a new one: AutoSave window = (AutoSave)EditorWindow.GetWindow(typeof(AutoSave)); window.Show(); }
protected override StorableSettings GetSettingsCore() { var settings = base.GetSettingsCore(); settings.GlobalSettings[autoSaveKey] = AutoSave.ToString(); settings.GlobalSettings[mouseCoordinateKey] = MouseCoordinateType.ToString(); settings.GlobalSettings[windowLocationKey] = windowLocation; settings.GlobalSettings[recentProjectFilesKey] = recentProjectFiles; settings.GlobalSettings[ThreadMaxCountKey] = ThreadMaxCount.ToString(); settings.GlobalSettings[ThreadMinCountKey] = ThreadMinCount.ToString(); settings.GlobalSettings[IsDisplayAutoSaveKey] = IsDisplayAutoSave.ToString(); if (Application.Current != null && Application.Current.MainWindow.Tag is Dictionary <string, string> ) { settings.GlobalSettings[alwaysShowHintsKey] = (Application.Current.MainWindow.Tag as Dictionary <string, string>)["ShowHintSettings"]; settings.GlobalSettings[currentExtentKey] = (Application.Current.MainWindow.Tag as Dictionary <string, string>)[currentExtentKey]; } XElement xml = new XElement("Scales"); foreach (var scale in scales) { xml.Add(new XElement("scale", scale)); } settings.GlobalSettings["Scales"] = xml.ToString(); return(settings); }
public void Drop() { print("Drop de sangue"); int qSangue = Random.Range(Drops.inicio, Drops.fim + 1); AutoSave.AtualizarSangue(qSangue, true); }
protected override void OnTick() { World.Broadcast(0x22, true, "WARNING:"); World.Broadcast(0x22, true, "The server is Now Restarting."); AutoSave.Save(); Process.Start(Core.ExePath, Core.Arguments); Core.Process.Kill(); }
public void GameOver() { AutoSave.AtualizaRecord(); if (_endGameCallBack != null) { _endGameCallBack.Invoke(); } }
void Awake() { atbPlayer = GetComponent <Atributos>(); ctrAnim = GetComponent <ControleDeAnimacao>(); arma = AutoSave.QualArma(atbPlayer.Personagem); nivel = AutoSave.QualNivel(arma); }
public void OnWorldQuit() { if (sTimer != null) { sTimer.Stop(); sTimer = null; } }
/// <summary> /// Process text /// </summary> public static void process(List <ProgramNodeInterface> nodes, Boolean reset, String startInput = DEFAULT_INPUT_TEXT) { if (reset) { registers = new List <string>(); variables = new Dictionary <string, LogVar>(); opSteps = new List <string>(); outputSteps = new List <string>(); functionalBlocks = new Dictionary <string, FunctionalBlock>(); errors = ""; output = ""; AutoSave.saveLogProcessor(programText, inputText); } int step = 0; int lastLoadFilesStep = 0; // Process Text try { if (startInput.Equals(DEFAULT_INPUT_TEXT)) { startInput = inputText; } String processedText = startInput; while (step < nodes.Count || loopback) { if (loopback) { loopback = false; step = lastLoadFilesStep; } else { if (nodes[step] is LoadFiles) { lastLoadFilesStep = step + 1; } } ProgramNodeInterface node = nodes[step]; processedText = node.calculate(processedText); if (debugMode) { outputSteps.Add(processedText); opSteps.Add(nodes[step].ToString()); } step++; } output = processedText; } catch (Exception e) { errors += e.Message + Environment.NewLine + e.StackTrace; } }
static void ShowEditor() { AutoSave editor = EditorWindow.GetWindow <AutoSave>(); editor.minSize = new Vector2(300, 100); editor.maxSize = new Vector2(300, 100); editor.Init(); }
public static void RestartTimers() { if (World.IsEditInGameFromWBMode()) { return; } foreach (AlarmTask task in sTasks) { task.Dispose(); } sTasks.Clear(); if (sTimer != null) { sTimer.Stop(); sTimer = null; } switch (Saver.Settings.SaveStyle) { case SaverSpace.Options.SaveStyle.RealTime: if (Saver.Settings.mRealMinutesBetweenSaves > 0) { sTimer = new AutoSave(Saver.Settings.mRealMinutesBetweenSaves); Simulator.AddObject(sTimer); } break; case SaverSpace.Options.SaveStyle.SimTime: if (Saver.Settings.mSimMinutesBetweenSaves > 0) { sTasks.Add(new AlarmTask(Saver.Settings.mSimMinutesBetweenSaves, TimeUnit.Minutes, OnSimTimer, Saver.Settings.mSimMinutesBetweenSaves, TimeUnit.Minutes)); } break; case SaverSpace.Options.SaveStyle.SimHour: foreach (float hour in Saver.Settings.mSimSaveHour) { sTasks.Add(new AlarmTask(hour, DaysOfTheWeek.All, OnSimTimer)); } break; } if ((sTimer == null) && (sTasks.Count == 0)) { SimpleMessageDialog.Show(Common.Localize("Root:MenuName"), Common.Localize("Unset:Prompt")); Saver.Settings.SaveStyle = SaverSpace.Options.SaveStyle.RealTime; Saver.Settings.mRealMinutesBetweenSaves = 30; RestartTimers(); } }
protected override void OnTick() { World.Broadcast(0x22, true, "WARNING:"); World.Broadcast(0x22, true, "The server will be restarting in 15 seconds."); AutoSave.Save(); I_Auto_RestarterC tmrC = new I_Auto_RestarterC(); tmrC.Start(); this.Stop(); }
// Use this for initialization void Start() { AutoSave.Load(); AutoSave.Save(); Debug.Log(GameData.playerName); Debug.Log(GameData.playerLevel); Debug.Log(GameData.sence); }
static string[] OnWillSaveAssets(string[] paths) { bool manualSave = AutoSave.IsManualSave; if (manualSave) { AutoSave.Backup(); } return(paths); }
void Update() { if (Player == Dados.PlayerIndice.Vazio) { return; } delayTempo += Time.deltaTime; if (Input.GetButtonDown(Player.ToString() + "RB") && delayTempo > delayBotao)//Próximo { delayTempo = 0; SFX.PlayOneShot(SomClick); ArmaSeguinte(); } if (Input.GetButtonDown(Player.ToString() + "LB") && delayTempo > delayBotao)//Anterior { delayTempo = 0; SFX.PlayOneShot(SomClick); ArmaAnterior(); } if (Input.GetButtonDown(Selecionados.VezLoja.ToString() + "Y")) { print("Upgrade da arma"); if (ArmaNivel != Dados.ArmaNivel.Nivel5) { if (AutoSave.Sangue >= Dados.CustoNivel[(int)ArmaNivel + 1]) { AutoSave.AtualizarSangue(Dados.CustoNivel[(int)ArmaNivel + 1], false); AutoSave.AtualizarArma(Personagem, Itens[indice].Arma); AutoSave.AtualizarNivelArma(Itens[indice].Arma); TrocaArma(); txtSangue.text = AutoSave.Sangue.ToString(); } } } if (Input.GetButtonDown(Player.ToString() + "A") && delayTempo > delayBotao)//Selecionar Arma { delayTempo = 0; SFX.PlayOneShot(SomClick); alvoLoja.GetComponent <ControleDeArmas>().AtivarArma(Itens[indice].Arma, AutoSave.QualNivel(Itens[indice].Arma)); TrocaArma(); } if (Input.GetButtonDown(Selecionados.VezLoja.ToString() + "B")) { FecharLoja(); } }
void saveScene() { EditorApplication.SaveScene(scenePath); lastSaveTimeScene = DateTime.Now; isStarted = true; if (showMessage) { Debug.Log("AutoSave saved: " + scenePath + " on " + lastSaveTimeScene); } AutoSave repaintSaveWindow = (AutoSave)EditorWindow.GetWindow(typeof(AutoSave)); repaintSaveWindow.Repaint(); }
public static void SavePreferences() { EditorPrefs.SetBool(AUTOSAVE_ENABLED_KEY, autosaveEnabled); EditorPrefs.SetInt(SAVE_INTERVAL_INDEX_KEY, saveIntervalIndex); saveInterval = intervalValues [saveIntervalIndex]; EditorPrefs.SetBool(LOG_SAVE_EVENT_KEY, logSaveEvent); EditorPrefs.SetBool(SAVE_ASSETS_KEY, saveAssets); EditorPrefs.SetBool(SAVE_ON_HIERARCHY_CHANGE_KEY, saveOnHierarchyChanges); EditorPrefs.SetInt(HIERARCHY_CHANGE_COUNT_TRIGGER_KEY, hierarchyChangeCountTrigger); EditorPrefs.SetBool(SAVE_BEFORE_RUN_KEY, saveBeforeRun); EditorPrefs.SetBool(SAVE_UNNAMED_NEW_SCENE_KEY, saveUnnamedNewScene); AutoSave.LoadPreferences(); }
/// <summary> /// Saves the XML document. /// </summary> public static void SaveXml() { using (XmlWriter writer = XmlWriter.Create(Paths.CreateOSPath("settings.xml"), XmlWriterSettings)) { writer.WriteStartDocument(); writer.WriteStartElement("Options"); writer.WriteStartElement("General"); writer.WriteElementString("AutoSave", AutoSave.ToString()); writer.WriteElementString("AutoSaveSpeed", AutoSaveSpeed.ToString()); writer.WriteElementString("AutoScroll", AutoScroll.ToString()); writer.WriteElementString("Music", Music.ToString()); writer.WriteElementString("NpcBar", NpcBar.ToString()); writer.WriteElementString("NpcDamage", NpcDamage.ToString()); writer.WriteElementString("NpcName", NpcName.ToString()); writer.WriteElementString("PlayerBar", PlayerBar.ToString()); writer.WriteElementString("PlayerDamage", PlayerDamage.ToString()); writer.WriteElementString("PlayerName", PlayerName.ToString()); writer.WriteElementString("SavedAccount", SavedAccount); writer.WriteElementString("SavedPassword", SavedPassword); writer.WriteElementString("Sound", Sound.ToString()); writer.WriteElementString("SpeechBubbles", SpeechBubbles.ToString()); writer.WriteElementString("Timestamps", Timestamps.ToString()); writer.WriteElementString("ActiveSkin", ActiveSkin); writer.WriteElementString("LastClientUpdateTime", LastClientUpdateTime.ToBinary().ToString()); writer.WriteElementString("LastGFXUpdateTime", LastGFXUpdateTime.ToBinary().ToString()); writer.WriteEndElement(); writer.WriteStartElement("ConnectionInfo"); writer.WriteElementString("Port", ConnectionPort.ToString()); writer.WriteElementString("Server", ConnectionIP); writer.WriteElementString("UpdateLink", UpdateAddress); writer.WriteElementString("SFXLink", SoundAddress); writer.WriteElementString("MusicLink", MusicAddress); writer.WriteEndElement(); writer.WriteStartElement("Editor"); writer.WriteElementString("MapGrid", MapGrid.ToString()); writer.WriteElementString("DisplayAttributes", DisplayAttributes.ToString()); writer.WriteElementString("DragAndPlace", DragAndPlace.ToString()); writer.WriteEndElement(); writer.WriteEndElement(); writer.WriteEndDocument(); } }
public void OnPreSave() { sSaveWasPerformed = true; sSaveWasRequested = false; if (GameStates.GetInWorldSubState() is LiveModeState) { if (sTimer != null) { sTimer.Stop(); sTimer = null; } } }
public string nomeJogador; //para saber qual jogador perdeu void Start() { AutoSave.Carregar(); manipuladorJogo = GameObject.FindObjectOfType <ManipuladorJogo>(); direcaoMovimentoGrade = new Vector2Int(direcaoInicial.x, direcaoInicial.y); movimentacaoTempoGradeMaximo = 0.3f; movimentacaoTempoGrade = movimentacaoTempoGradeMaximo; posicaoGrade = new Vector2Int(posicaoInicial.x, posicaoInicial.y); this.listaPosicoesMovimentosCobra = new List <Vector2Int>(); this.listaPosicoesCorpoCobra = new List <Transform>(); tamanhoCorpoCobra = 0; PoderEngenharia(); InvokeRepeating("MovimentaçãoMapa", 0, 0.01f /*- (tamanhoCorpoCobra * 0.01f)*/); }
private static void Shutdown(NetState state, PacketReader pvSrc) { bool restart = pvSrc.ReadBoolean(); bool save = pvSrc.ReadBoolean(); Console.WriteLine("RemoteAdmin: shutting down server (Restart: {0}) (Save: {1}) [{2}]", restart, save, DateTime.Now); if (save && !AutoRestart.Restarting) { AutoSave.Save(); } Core.Kill(restart); }
public static void SetSaveFrequency_OnCommand(CommandEventArgs e) { if (e.Length < 1) { e.Mobile.SendMessage("Format: SaveFrequency <duration> [warning duration]"); return; } var saveDelay = e.GetTimeSpan(0); var warningDelay = e.Length >= 2 ? e.GetTimeSpan(1) : AutoSave.Warning; AutoSave.ResetAutoSave(saveDelay, warningDelay); e.Mobile.SendMessage("Save frequency has been updated."); }
/// <summary> /// Load an autosave for the cancel / redo system /// </summary> /// <param name="auto"></param> public void LoadAutoSave(AutoSave auto) { var jsonString = File.ReadAllText(Path.Combine(m_folderAutoSave, auto.ProjectPath)); SelectedObjectManager.Instance.ResetSelection(); var settings = new JsonSerializerSettings(); settings.Converters.Add(new ColorConverter()); settings.Converters.Add(new QuaternionConverter()); Project = JsonConvert.DeserializeObject <Project>(jsonString, settings); LoadFromCurrentFloor(); ProjectFormScript.Instance.LoadProject(); }
static void Init() { AutoSave saveWindow = (AutoSave)EditorWindow.GetWindow(typeof(AutoSave)); saveWindow.Show(); Debug.Log("启动自动存储"); //Thread thread = new Thread(new ParameterizedThreadStart((object obj) => //{ // AutoSave autoSave = obj as AutoSave; // Debug.Log("启动自动存储线程"); // autoSave.Auto(); // Thread.Sleep(1000); //})); //thread.Start(saveWindow); }
/// <summary> /// Load autosave file. /// </summary> private void LoadAutoSave() { //Loads an instance of autosave file autoSaveFile = (AutoSave)SaveSystem.Load("autosave"); //If file does not exists, creates a new one if (autoSaveFile == null) { Debug.Log("Creating new savefile"); //Creates new instance of save file. autoSaveFile = new AutoSave(); //Store autosave file SaveSystem.Save(autoSaveFile, "autosave"); } }
void Start() { if (Personagens.Length == 0) { txtBotaoPlayer.text = "Em breve..."; } for (int x = 0; x < Personagens.Length; x++) { Personagens[x].GetComponent <Rigidbody>().isKinematic = true; Personagens[x].GetComponent <Move>().enabled = false; Animator anim = Personagens[x].GetComponent <Animator>(); Dados.Personagens person = Personagens[x].GetComponent <Atributos>().Personagem; Dados.Armas arma = AutoSave.QualArma(person); Dados.ArmaNivel nivel = AutoSave.QualNivel(arma); Personagens[x].SetActive(false); } }
private static void ServerControl(NetState state, PacketReader pvSrc) // 0x09 { bool save = false; bool restart = false; bool kill = false; ServerAction action = (ServerAction)pvSrc.ReadByte(); switch (action) { case ServerAction.Save: save = true; break; case ServerAction.RestartSave: save = true; restart = true; kill = true; break; case ServerAction.RestartNoSave: restart = true; kill = true; break; case ServerAction.ShutdownSave: save = true; kill = true; break; case ServerAction.ShutdownNoSave: kill = true; break; } if (save) { AutoSave.Save(); } #if MONO if (restart) { Process.Start("mono", Core.ExePath); } #else if (restart) { Process.Start(Core.ExePath); } #endif if (kill) { Core.Process.Kill(); } }
void saveScene() { if (EditorApplication.isPlaying) { return; } Scene activeScene = SceneManager.GetActiveScene(); EditorSceneManager.SaveScene(activeScene); lastSaveTimeScene = DateTime.Now; isStarted = true; AutoSave repaintSaveWindow = (AutoSave)GetWindow(typeof(AutoSave)); repaintSaveWindow.Repaint(); if (showMessage) { Debug.Log("AutoSave saved: " + scenePath + " on " + lastSaveTimeScene); } }
public void addEndItem(DateTime timestamp) { try { string lastLine = File.ReadLines(timerFilePath).Last(); if (!lastLine.Split('\t')[1].Contains("END")) { using (System.IO.StreamWriter file = new System.IO.StreamWriter(timerFilePath, true)) { file.WriteLine(timestamp + "\tEND\t"); } } } catch (Exception) { // It's OK. File does not exist so test has passed. } AutoSave.Stop(); }
private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag.Equals("block")) //se a cobra encostar no bloco, ela destroi { Destroy(collision.gameObject); gradeNivel.GerarComida(); //if (tamanhoCorpoCobra < 3) //{ //tamanhoCorpoCobra++; //} CancelInvoke("MovimentaçãoMapa"); blocosComidos++; AutoSave.Salvar(blocosComidos); CriarCorpoCobra(); //PoderEngenharia(); Debug.Log("0.04" + "-" + (tamanhoCorpoCobra * 0.01f)); InvokeRepeating("MovimentaçãoMapa", 0, 0.01f /* - (tamanhoCorpoCobra * 0.01f)*/); } }
public void addStartItem(string taskName) { try { string lastLine = File.ReadLines(timerFilePath).Last(); if (!lastLine.Split('\t')[1].Contains("END")) { addEndItem(); } } catch (Exception) { // It's OK. File does not exist so test has passed. } using (System.IO.StreamWriter file = new System.IO.StreamWriter(timerFilePath, true)) { file.WriteLine(DateTime.Now + "\tSTART\t" + taskName); } AutoSave.Start(); }
private void method_1(string string_3, string string_4) { LibraryClass class2 = new LibraryClass(); string[] strArray = new AutoSave().getAutoSaveInfo(string_4); try { string str = strArray[0].ToString(); string str2 = strArray[1].ToString(); string str3 = strArray[4].ToString(); string strParameters = strArray[2].ToString(); string str5 = strArray[3].ToString(); string str6 = strArray[5].ToString(); this.Session["SubjectNo"] = str; this.Session["LibraryNo"] = strParameters; Convert.ToDateTime(strArray[6]); this.string_2 = class2.getLibraryLayout(strParameters); string str7 = this.jc.SixSelections ? "true" : "false"; string text1 = this.jc.FillAutoScore ? "true" : "false"; string str8 = this.jP.getSaveInterval(); string str9 = this.jP.getBackShowAnswer(); this.str_PaperHead = ""; this.str_PaperHead = this.str_PaperHead + " <p><img src=\"" + this.string_1 + "img1.gif\" /><span class=\"PaperItemlbl\">恢复考试</span></p>\n "; string str10 = this.str_PaperHead; this.str_PaperHead = str10 + " <p><img src=\"" + this.string_1 + "img2.gif\" /><span>科目:</span><span class=\"PaperItemlbl\">" + str2 + "</span></p>\n "; str10 = this.str_PaperHead; this.str_PaperHead = str10 + " <p><img src=\"" + this.string_1 + "img3.gif\" /><span>试卷:</span><span class=\"PaperItemlbl\" id=\"LibraryName\">" + str5 + "</span></p>\n "; str10 = this.str_PaperHead; this.str_PaperHead = str10 + " <p>\n<img src=\"" + this.string_1 + "img5.gif\" /><span>姓名:</span>\n<span id=\"lbl_TrueName\" class=\"PaperItemlbl\">" + str6 + "</span>\n</p>\n "; this.str_PaperHead = this.str_PaperHead + " <p>\n<img src=\"" + this.string_1 + "img4.gif\" /><span>剩余时间:</span>\n<span id=\"timer\" class=\"PaperItemlbl\"></span>\n</p>\n "; this.str_PaperHead = this.str_PaperHead + " <p>\n<img src=\"" + this.string_1 + "img4.gif\" /><span>已用时间:</span>\n<span id=\"DivtimerLong\" class=\"PaperItemlbl\"></span>\n</p>\n "; this.pageHead.Controls.Add(new LiteralControl(this.str_PaperHead)); string str11 = "var imgpath = '" + this.string_1 + "',PageLibraryLayout='" + this.string_2 + "',NormalExit=false,SixSelections=" + str7 + ",timer,maxtime,timerLong,sec=0,fnAutoSave,SubjectNo='" + str + "',SubjectName='" + str2 + "',LibraryNo='" + strParameters + "',LibraryName='" + str5 + "',UserCardId='" + string_3 + "',UserTrueName='" + str6 + "',UserGroupID='" + str3 + "',SaveInterval=" + str8 + ",RecoverAutoTest='1',Animation=false,AutoChange=false,TotalNum=0,FQ_Not=false,yizuo=0,aryyizuo='',weizuo=0,aryweizuo='',strSummar,RadioHead,MoreHead,BoolHead,FillHead,QAHead,LibraryProperties,RadioNum=Number(0),MoreNum=Number(0),BoolNum=Number(0),FillNum=Number(0),QANum=Number(0),LibraryScore,TestTime,PassingGrade,fixedNo,NowPType='',NowRadioId,NowMoreId,NowBoolId,NowFillId,NowQAId,NowSelId='SelectBtn1',OneRScore,OneMScore,OneBScore,testDate='" + DateTime.Now.ToString() + "',backShowAnswer=" + str9 + ",_ie6,_ie7,_ie8,screenW,screenH,allAnswer,allAnalysis,allPNo;"; this.liScript.Text = "<script type=\"text/javascript\">" + str11 + this.method_2() + "</script>"; } catch { base.Response.Write("载入自动保存的试题时出现错误!"); base.Response.End(); } }
public void OnPreSave() { sSaveWasPerformed = true; sSaveWasRequested = false; if (GameStates.GetInWorldSubState() is LiveModeState) { if (sTimer != null) { sTimer.Stop(); sTimer = null; } } }
public void OnWorldQuit() { if (sTimer != null) { sTimer.Stop(); sTimer = null; } }
public static void RestartTimers() { if (World.IsEditInGameFromWBMode()) return; foreach (AlarmTask task in sTasks) { task.Dispose(); } sTasks.Clear(); if (sTimer != null) { sTimer.Stop(); sTimer = null; } switch (Saver.Settings.SaveStyle) { case SaverSpace.Options.SaveStyle.RealTime: if (Saver.Settings.mRealMinutesBetweenSaves > 0) { sTimer = new AutoSave(Saver.Settings.mRealMinutesBetweenSaves); Simulator.AddObject(sTimer); } break; case SaverSpace.Options.SaveStyle.SimTime: if (Saver.Settings.mSimMinutesBetweenSaves > 0) { sTasks.Add(new AlarmTask(Saver.Settings.mSimMinutesBetweenSaves, TimeUnit.Minutes, OnSimTimer, Saver.Settings.mSimMinutesBetweenSaves, TimeUnit.Minutes)); } break; case SaverSpace.Options.SaveStyle.SimHour: foreach (float hour in Saver.Settings.mSimSaveHour) { sTasks.Add(new AlarmTask(hour, DaysOfTheWeek.All, OnSimTimer)); } break; } if ((sTimer == null) && (sTasks.Count == 0)) { SimpleMessageDialog.Show(Common.Localize("Root:MenuName"), Common.Localize("Unset:Prompt")); Saver.Settings.SaveStyle = SaverSpace.Options.SaveStyle.RealTime; Saver.Settings.mRealMinutesBetweenSaves = 30; RestartTimers(); } }
public void OnEnable () { instance = this; }
public void ProcessRequest(HttpContext context) { string str5; Db db; string str10; string str12; string str13; if (context.Request.Form["Test"] != null) { string testInfo = context.Request.Form["Test"].ToString(); if (jcPublic.TestSumbit(testInfo)) { if (context.Session["FillResult"] != null) { context.Response.Write(context.Session["FillResult"].ToString()); context.Session.Remove("FillResult"); } else { context.Response.Write("sumbitOK"); } } else { context.Response.Write("sumbitFail"); } context.Response.End(); } if (context.Request.Form["AutoSave"] != null) { string strSaveText = context.Request.Form["AutoSave"].ToString(); AutoSave save = new AutoSave(); if (save.Save(strSaveText)) { context.Response.Write("AutoSaveOK"); } else { context.Response.Write("AutoSaveFail"); } context.Response.End(); } if (context.Request.Form["ComprehensiveFill"] != null) { string[] strArray = context.Request.Form["ComprehensiveFill"].ToString().Split(new char[] { '|' }); double num = jcPublic.ZHLXFillScore(strArray[0], strArray[1]); context.Response.Write(num.ToString("F1")); } switch (context.Request.QueryString["textItem"]) { case "UserExists": { str5 = context.Request.QueryString["UserCardId"]; string userPwd = context.Request.QueryString["UserPwd"]; db = new Db(); if (jcUser.CheckUserExists(str5)) { context.Response.Write("True"); } else { context.Response.Write("False"); } break; } case "regUserStatus": try { string str7 = HttpUtility.UrlDecode(context.Request.QueryString["userName"]); string sql = "select count(*) from jc_User where UserIdCard='" + str7 + "'"; db = new Db(); if (db.cmd_ExecuteScalar(sql) > 0) { context.Response.Write("False"); } else { context.Response.Write("True"); } } catch { context.Response.Write("Error"); } break; case "Session": { string str9 = context.Request.QueryString["UserCardId"]; context.Session["UserIdCard"] = str9; break; } case "RequestLibraryInfo": { str10 = context.Request.QueryString["LibraryNo"]; string s = jcPublic.Get_LXLibraryInfo(str10); context.Response.Write(s); break; } case "PaperZHLX": str10 = context.Request.QueryString["LibraryNo"]; str12 = ""; str12 = new GenerationPapers().CreatePaper("", str10, "", ""); context.Response.Write(str12); break; case "PaperCTLX": str13 = context.Request.QueryString["SubjectNo"]; str5 = context.Request.QueryString["UserCardId"]; str12 = new GenerationPapers().CreatePaper(str13, "", "ctlx", str5); context.Response.Write(str12); break; case "PaperTXLX": { str13 = context.Request.QueryString["SubjectNo"]; string otherVal = HttpUtility.UrlDecode(context.Request.QueryString["PaperType"]); str12 = new GenerationPapers().CreatePaper(str13, "", "txlx", otherVal); context.Response.Write(str12); break; } case "PaperZJLX": { str13 = context.Request.QueryString["SubjectNo"]; string str15 = context.Request.QueryString["SubjectUnit"]; str12 = new GenerationPapers().CreatePaper(str13, "", "zjlx", str15); context.Response.Write(str12); break; } case "PaperMNCS": str10 = context.Request.QueryString["LibraryNo"]; str12 = ""; str12 = new GenerationPapers().CreatePaper("", str10, "", ""); context.Response.Write(str12); break; case "CompleteLX": { string str18; new jc_System(); str5 = HttpUtility.UrlDecode(context.Request.QueryString["UserCardId"]); string totalScore = context.Request.QueryString["TotalScore"]; string str17 = context.Request.QueryString["LxType"]; if (str17 == "zhlx") { str18 = "综合练习"; } else if (str17 == "ctlx") { str18 = "错题练习"; } else if (str17 == "txlx") { str18 = "题型练习"; } else if (str17 == "zjlx") { str18 = "章节练习"; } else { str18 = "未知"; } str13 = context.Request.QueryString["SubjectNo"]; string subjectName = HttpUtility.UrlDecode(context.Request.QueryString["SubjectName"]); str10 = context.Request.QueryString["LibraryNo"]; string libraryName = HttpUtility.UrlDecode(context.Request.QueryString["LibraryName"]); string trueName = HttpUtility.UrlDecode(context.Request.QueryString["TrueName"]); string userGroupId = context.Request.QueryString["UserGroupID"]; string str23 = context.Request.QueryString["StartLxTime"]; DateTime time = Convert.ToDateTime(str23); DateTime now = DateTime.Now; string endLxTime = now.ToString("yyyy-MM-dd HH:mm:ss"); TimeSpan span = (TimeSpan)(now - time); string exerciseLong = span.TotalSeconds.ToString(); if (((context.Request.QueryString["RadioRight"] != null) && (context.Request.QueryString["MoreRight"] != null)) && (context.Request.QueryString["BoolRight"] != null)) { jcPublic.UpdateErrorTable(context.Request.QueryString["RadioRight"] + context.Request.QueryString["MoreRight"] + context.Request.QueryString["BoolRight"], str5); } if (jcPublic.CompleteLX(str18, str13, subjectName, str10, libraryName, str5, userGroupId, trueName, userGroupId, str23, endLxTime, exerciseLong, totalScore)) { context.Response.Write("True"); } else { context.Response.Write("False"); } context.Session["UserIdCard"] = str5; context.Session["StartLxTime"] = str23; break; } case "LoadAutoSave": str5 = context.Request.QueryString["UserCardId"]; str12 = new GenerationPapers().LoadAutoSavePaper(str5); context.Response.Write(str12); break; case "evalResult": string userId = context.Request.QueryString["userId"]; string evalCourseId = context.Request.QueryString["evalCourseId"]; string SurveryId = context.Request.QueryString["evalSurveryId"]; string evalItemId = context.Request.QueryString["evalItemId"]; string evalResult = context.Request.QueryString["evalResult"]; jcEvaluateResult.Merge(new SHMetroTestSysModel.jc_EvaluateResult() { evalCourseId = int.Parse(evalCourseId), evalItemId = int.Parse(evalItemId), evalSurveryId = int.Parse(SurveryId), evalUserId = int.Parse(userId), evalResult = evalResult }); break; } context.Response.End(); }