protected override void Update(GameTime gameTime) { if (Profiler.InContext("OutOfContext")) { Profiler.ExitContext("OutOfContext"); } Profiler.EnterContext("Update"); IsFixedTimeStep = Settings.Game.IsFixedTimeStep; if (!IsRunning) { Settings.Save(); Exit(); } else { base.Update(gameTime); double totalMS = gameTime.TotalGameTime.TotalMilliseconds; double frameMS = gameTime.ElapsedGameTime.TotalMilliseconds; TotalMS = totalMS; Input.Update(totalMS, frameMS); UserInterface.Update(totalMS, frameMS); if (Network.IsConnected) { Network.Slice(); } ActiveModel.Update(totalMS, frameMS); } Profiler.ExitContext("Update"); Profiler.EnterContext("OutOfContext"); }
protected override void Draw(GameTime gameTime) { Profiler.EndFrame(); Profiler.BeginFrame(); if (Profiler.InContext("OutOfContext")) { Profiler.ExitContext("OutOfContext"); } Profiler.EnterContext("RenderFrame"); if (!IsMinimized) { SpriteBatch3D.Reset(); GraphicsDevice.Clear(Color.Black); ActiveModel.GetView() .Draw(gameTime.ElapsedGameTime.TotalMilliseconds); UserInterface.Draw(gameTime.ElapsedGameTime.TotalMilliseconds); } Profiler.ExitContext("RenderFrame"); Profiler.EnterContext("OutOfContext"); UpdateWindowCaption(gameTime); }
protected override void Draw(GameTime gameTime) { Profiler.EndFrame(); Profiler.BeginFrame(); if (Profiler.InContext("OutOfContext")) { Profiler.ExitContext("OutOfContext"); } Profiler.EnterContext("RenderFrame"); if (!IsMinimized) { if (ActiveModel is WorldModel) { CheckWindowSize(Settings.UserInterface.PlayWindowGumpResolution.Width, Settings.UserInterface.PlayWindowGumpResolution.Height); } else { CheckWindowSize(800, 600); } ActiveModel.GetView() .Draw(gameTime.ElapsedGameTime.TotalMilliseconds); UserInterface.Draw(gameTime.ElapsedGameTime.TotalMilliseconds); } Profiler.ExitContext("RenderFrame"); Profiler.EnterContext("OutOfContext"); UpdateWindowCaption(gameTime); }
/// <summary> /// Disposing /// </summary> public override void Dispose() { // Clean active model ActiveModel?.Dispose(); // Dispose command manager CommandManager?.Dispose(); // NOTE: Don't dispose the application, SolidWorks does that itself //base.Dispose(); }
protected override void Draw(GameTime gameTime) { if (IsMinimized) { return; } SpriteBatch3D.ResetZ(); GraphicsDevice.Clear(Color.Black); ActiveModel.GetView() .Draw(gameTime.ElapsedGameTime.TotalMilliseconds); UserInterface.Draw(gameTime.ElapsedGameTime.TotalMilliseconds); EngineVars.UpdateFPS(gameTime.ElapsedGameTime.TotalMilliseconds); Window.Title = Settings.Debug.ShowFps ? string.Format("UltimaXNA FPS:{0}", EngineVars.UpdateFPS(gameTime.ElapsedGameTime.TotalMilliseconds)) : "UltimaXNA"; }
public IActionResult ActiveAccount([FromBody] ActiveModel model) { var account = _db.Set <Account>().FirstOrDefault(x => x.Email == model.email); if (account == null) { return(BadRequest("Sistemde tanımlı hesap bulunamadı!")); } var password = _db.Set <UserPassword>().FirstOrDefault(x => x.UserId == account.Id && x.Password == model.password); if (password == null) { return(BadRequest("Şifre Hatalı veya Aktif Değil!")); } else { account.isActive = model.active; _db.SaveChanges(); return(Ok("Hesap Aktif Edildi.")); } }
protected override void Update(GameTime gameTime) { IsFixedTimeStep = Settings.Game.IsFixedTimeStep; if (!EngineVars.EngineRunning) { Settings.Save(); Exit(); } else { var totalMs = gameTime.TotalGameTime.TotalMilliseconds; var frameMs = gameTime.ElapsedGameTime.TotalMilliseconds; TotalMs = totalMs; Input.Update(totalMs, frameMs); UserInterface.Update(totalMs, frameMs); Network.Slice(); ActiveModel.Update(totalMs, frameMs); } }
internal void DeleteRow(DataRow Row) { Row.Delete(); ActiveModel.AcceptChanges(); }
public void OnSaveModel() { ActiveModel.Save(ActiveModelPath); ActiveModelChanged = false; }
public void OnLoadModel() { ActiveModel = ActiveModel.Open(ActiveModelPath); ActiveModelChanged = false; }
private void MouseLeftButtonDownHandler(object sender, MouseButtonEventArgs e) { if (ActiveModel != null) { PluginChangedEventArgs args = new PluginChangedEventArgs(ActiveModel.Plugin, ActiveModel.GetName(), DisplayPluginMode.Normal); MyEditor.onSelectedPluginChanged(args); e.Handled = true; } return; }