void Start () { Logger.instance.log( Logger.LEVEL_INFO, "Type to trigger key events" ); // Setup stage = MovieClipOverlayCameraBehaviour.instance.stage; MovieClipOverlayCameraBehaviour.instance.enableKeyboard = false; // Disable processing // Verify event stage.addEventListener( KeyboardEvent.KEY_DOWN, delegate(pumpkin.events.CEvent e) { KeyboardEvent keyEvent = e as KeyboardEvent; Logger.instance.log( Logger.LEVEL_INFO, "KEY_DOWN: " + keyEvent.charString + ", charCode:" + ( (int)(keyEvent.charString[0]) ) + ", controlKey: " + keyEvent.controlKey ); }); stage.addEventListener( KeyboardEvent.KEY_UP, delegate(pumpkin.events.CEvent e) { KeyboardEvent keyEvent = e as KeyboardEvent; Logger.instance.log( Logger.LEVEL_INFO, "KEY_UP: " + keyEvent.charString + ", charCode:" + ( (int)(keyEvent.charString[0]) ) + ", controlKey: " + keyEvent.controlKey ); }); }
private Stage _stageState; //!< ステージの状態 #endregion Fields #region Constructors public ScenarioData(ScenarioPatternType i_type, Stage i_state, TextAsset i_scenario, bool i_read) { _scenarioType = i_type; _stageState = i_state; _scenario = i_scenario; IsRead = i_read; }
private void JoinLobby() { ChangeSizeOfLobby(SizeOfLobbyDropdown.value); prefs.setSize(sizeOfLobby); driver.JoinLobby(sizeOfLobby); currentStage = Stage.JoinLobby; }
public override void LoadContent(Microsoft.Xna.Framework.Content.ContentManager content, ParameterSet parm, Stage stage) { if (contentLoaded) return; bool initialized = false; model = BasicModelLoad(parm, out initialized); if (!initialized) { foreach (ModelMesh mesh in model.Meshes) { foreach (ModelMeshPart part in mesh.MeshParts) { Water effect = new Water(content.Load<Effect>("Effects/v2/Water")); if (stage.Parm.HasParm("WaterSpecularPower")) effect.SpecularPower = stage.Parm.GetFloat("WaterSpecularPower"); if (stage.Parm.HasParm("WaterShininess")) effect.Shininess = stage.Parm.GetFloat("WaterShininess"); if (stage.Parm.HasParm("WaterColor")) effect.WaterColor = stage.Parm.GetVector4("WaterColor"); if (stage.Parm.HasParm("WaterBase")) effect.WaterBase = stage.Parm.GetVector4("WaterBase"); part.Effect = effect; } } } transforms = new Matrix[model.Bones.Count]; model.CopyAbsoluteBoneTransformsTo(transforms); base.LoadContent(content, parm, stage); }
public void SetStage(Stage stage, UnityAction clickAction) { _stage = stage; _stageName.text = _stage._stageName; GetComponent<Button> ().onClick.AddListener (clickAction); }
// Use this for initialization protected override void Start() { base.Start(); this.stageComponent = GameObject.FindGameObjectWithTag("Stage").GetComponent<Stage>(); this.SetTracePoints(this.stageComponent.GetPoints()); this.gameObject.GetComponent<LineTracer>().SetTracePoints(stageComponent.GetPoints()); }
public LoaderForm() { InitializeComponent(); stage = Stage.UserInfo; // setting up the starting loader screen LabelOperationPercentage.Text = "0%"; LabelOverallStage.Text = "0/5"; LabelOperation.Text = "Contacting Facebook..."; // setting up the worker thread backgroundLoader = new System.ComponentModel.BackgroundWorker(); backgroundLoader.WorkerReportsProgress = true; backgroundLoader.WorkerSupportsCancellation = true; backgroundLoader.DoWork += new DoWorkEventHandler(backgroundLoader_DoWork); backgroundLoader.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundLoader_RunWorkerCompleted); backgroundLoader.ProgressChanged += new ProgressChangedEventHandler(backgroundLoader_ProgressChanged); // starting the calculation // runs the GenerateGraph() method in Generator.cs backgroundLoader.RunWorkerAsync(); }
void Activate() { if (GameObject.Find("Main Camera").GetComponent<MovieClipOverlayCameraBehaviour>() == null) { return; } PauseStage = Camera.main.GetComponent<MovieClipOverlayCameraBehaviour>().stage; BackGround = new MovieClip("swf/PauseField.swf:FadeBackground"); BackGround.gotoAndStop(1); BackGround.x = Screen.width / 2; BackGround.y = Screen.height / 2; BackGround.scaleX = (float)Screen.width / 2048; BackGround.scaleY = BackGround.scaleX; PauseStage.addChild(BackGround); for (int i = 0; i < ButtonCount; i++) { Buttons[i] = new MovieClip("swf/PauseField.swf:PauseField"); Buttons[i].gotoAndStop(1); Buttons[i].x = Screen.width/2; Buttons[i].y = Screen.height * 0.3f + (float)Screen.height/2048 * 220 * i; Buttons[i].scaleX = (float)Screen.width / 2048; Buttons[i].scaleY = Buttons[i].scaleX; MenuFields[i] = Buttons[i].getChildByName<TextField>("Text"); MenuFields[i].text = names[i]; PauseStage.addChild(Buttons[i]); } Buttons[0].addEventListener(MouseEvent.CLICK, Resume); Buttons[1].addEventListener(MouseEvent.CLICK, Reload); Buttons[3].addEventListener(MouseEvent.CLICK, Quit); }
public static List<Stage> GetStages() { List<Stage> result = new List<Stage>(); try { // Get data DbDataReader reader = Database.GetData("SELECT * FROM stage"); foreach (DbDataRecord record in reader) { // Create new Stage Stage stage = new Stage(); // Get ID if (DBNull.Value.Equals(record["ID"])) stage.ID = -1; else stage.ID = Convert.ToInt32(record["ID"]); // Get Name if (DBNull.Value.Equals(record["Name"])) stage.Name = ""; else stage.Name = record["Name"].ToString(); result.Add(stage); } reader.Close(); } // Fail catch (Exception ex) { Console.WriteLine(ex.Message); } return result; }
private Stage _stageState; //!< ステージの状態 #endregion Fields #region Constructors public ScenarioDebugData(ScenarioPatternType i_type, Stage i_state, string i_scenario, bool i_read) { _scenarioType = i_type; _stageState = i_state; _scenario = i_scenario; IsRead = i_read; }
public override void Initialize(Stage stage) { SkinnedRModelInstance modelInstance = actor.modelInstance as SkinnedRModelInstance; animations = new AnimationPlayer[(int)AnimationTypes.COUNT]; if (actor.Parm.HasParm("WeakAttackAnimation")) animations[(int)AnimationTypes.WeakAttack] = new AnimationPlayer(AnimationClip.LoadClip(actor.Parm.GetString("WeakAttackAnimation")), modelInstance); if (actor.Parm.HasParm("MediumAttackAnimation")) animations[(int)AnimationTypes.MediumAttack] = new AnimationPlayer(AnimationClip.LoadClip(actor.Parm.GetString("MediumAttackAnimation")), modelInstance); if (actor.Parm.HasParm("HeavyAttackAnimation")) animations[(int)AnimationTypes.HeavyAttack] = new AnimationPlayer(AnimationClip.LoadClip(actor.Parm.GetString("HeavyAttackAnimation")), modelInstance); if (actor.Parm.HasParm("SmashAttackAnimation")) animations[(int)AnimationTypes.SmashAttack] = new AnimationPlayer(AnimationClip.LoadClip(actor.Parm.GetString("SmashAttackAnimation")), modelInstance); if (actor.Parm.HasParm("DashAnimation")) animations[(int)AnimationTypes.Dash] = new AnimationPlayer(AnimationClip.LoadClip(actor.Parm.GetString("DashAnimation")), modelInstance); if (actor.Parm.HasParm("IdleAnimation")) animations[(int)AnimationTypes.Idle] = new AnimationPlayer(AnimationClip.LoadClip(actor.Parm.GetString("IdleAnimation")), modelInstance); if (actor.Parm.HasParm("DeathAnimation")) animations[(int)AnimationTypes.Die] = new AnimationPlayer(AnimationClip.LoadClip(actor.Parm.GetString("DeathAnimation")), modelInstance); if (actor.Parm.HasParm("WalkAnimation")) animations[(int)AnimationTypes.Walk] = new AnimationPlayer(AnimationClip.LoadClip(actor.Parm.GetString("WalkAnimation")), modelInstance); if (actor.Parm.HasParm("TakeDamageAnimation")) animations[(int)AnimationTypes.TakeDamage] = new AnimationPlayer(AnimationClip.LoadClip(actor.Parm.GetString("TakeDamageAnimation")), modelInstance); if (actor.Parm.HasParm("JumpAnimation")) animations[(int)AnimationTypes.Jump] = new AnimationPlayer(AnimationClip.LoadClip(actor.Parm.GetString("JumpAnimation")), modelInstance); }
void ChangeRound() { //If all targets have been hit proceed switch (myStage) { case Stage.Start: StartCoroutine(RoundTransition(startTarget, wave1)); myStage = Stage.Wave1; break; case Stage.Wave1: StartCoroutine(RoundTransition(wave1, wave2)); myStage = Stage.Wave2; break; case Stage.Wave2: StartCoroutine(RoundTransition(wave2, wave3)); myStage = Stage.Wave3; break; case Stage.Wave3: print("Rounds finished!"); myStage = Stage.Done; doDone(); break; default: break; } sequenceIndex = 0; }
/// <summary> /// Awake /// </summary> public override void Awake() { base.Awake(); // ステージ状態をセット nowStage += 1; if (Application.loadedLevelName == Data.d_StageNameList[1]) nowStage = Stage.title; if (debug || nowStage == Stage.opening) nowStage = Stage.stage1; // シナリオデータを読み込む(正直、都度読み込む方が都合が良いけれども今回読み込む量はそんなに多くないはずなのでスタックしてしまう) if (scenarioData.Count <= 0) { StartCoroutine(ReadScenarioData()); } if (stageUIDic.Count <= 0) { SetStageUISprites(); } // 弾丸データを読み込む BulletBase.CreateEnemyBulletGroupData(); BulletBase.CreateEnemyBulletRadData(); DirectionData.CreateBezierDirectionData(); PlayerBulletMaster.CreatePlayerMasterData(); // 通常敵AIデータを読み込む EnemyFactory.CreateNormalEnemyAiData(); // 背景読み込み StageBackground.CreateBackgroundImageData(); StageBackground.CreateBackgroundImageSettingData(); }
public void Can_make_many_concurrent_calls() { var stage = new Stage(); var a1 = stage.Create<IAdder>().Proxy; var start = new ManualResetEvent(false); var ready = new List<ManualResetEvent>(); var tasks = new List<Task<int>>(); for(var i = 0; i < 10; i++) { var i2 = i; var mre = new ManualResetEvent(false); ready.Add(mre); var tcs = new TaskCompletionSource<int>(); tasks.Add(tcs.Task); new Thread(() => { mre.Set(); start.WaitOne(); a1.Add(i2, 10).ContinueWith(t => tcs.SetResult(t.Result)); }).Start(); } WaitHandle.WaitAll(ready.ToArray()); start.Set(); Task.WaitAll(tasks.ToArray()); Debug.WriteLine("all tasks completed"); for(var i = 0; i < 10; i++) { Assert.AreEqual(10 + i, tasks[i].Result); } }
void Start() { cluster = gameObject.GetComponent<Cluster>(); stageScript = gameObject.GetComponent<Stage> (); mouseDragged = Vector3.zero; mousePressed = Vector3.zero; }
public Actor CreateActor(ParameterSet parm, string instanceName, ref Vector3 position, ref Vector3 rotation, Stage stage) { Actor newActor = new Actor(parm, instanceName, ref position, ref rotation, Stage.Content, stage); actors.AddLast(newActor); NotifyActorCreatedList(newActor); return newActor; }
void Start () { // Validate MovieClipOverlayCameraBehaivour is attached to camera if( MovieClipOverlayCameraBehaviour.instance == null ) { Debug.LogError( "Failed to get MovieClipOverlayCameraBehaviour, ensure its attached to the MainCamera" ); return; } // Assign stage reference stage = MovieClipOverlayCameraBehaviour.instance.stage; // Create menu clip MovieClip btn = new MovieClip( "uniSWF/Examples/Tutorial 02 - Basic button script/swf/Tut02-ButtonAsset.swf:btn_ui" ); // Center on stage for the current screen size btn.x = (stage.stageWidth / 2) - (btn.srcWidth/2); btn.y = (stage.stageHeight / 2) - (btn.srcHeight/2); // Jump to first frame and stop btn.gotoAndStop(1); // Inner display object such as text fields will not recieve events btn.mouseChildrenEnabled = false; // Event listeners btn.addEventListener( MouseEvent.CLICK, onButtonClick); btn.addEventListener( MouseEvent.MOUSE_ENTER, onButtonEnter); btn.addEventListener( MouseEvent.MOUSE_LEAVE, onButtonLeave); // Add menu clip to stage stage.addChild(btn); }
public static void PostProcessStage(Stage stage, List<MapEntityLoader.RawMapEntity> rawEntityData) { // Process objects which belong to both Stage and Rooms. PostProcessSharedEntities(stage, rawEntityData); // Create Arrows out of AROB tags PostProcessArrows(stage, "AROB", rawEntityData); // Create Paths out of RPAT tags PostProcessPaths(stage, "PATH", "PPNT", rawEntityData); // Non Physical Items PostProcessMult(rawEntityData); // CAMR // DMAP // EnvR // Colo // Pale // Virt // EVNT // MECO // MEMA // RTBL // STAG }
public void StartGrowStage(Stage stage) { float duration = 0, scale = 0; switch (stage) { case Stage.Growing1: { duration = firstGrowStageDuration; scale = firstGrowStageScale; } break; case Stage.Growing2: { duration = secondGrowStageDuration; scale = secondGrowStageScale; } break; case Stage.Ripe: { duration = secondGrowStageDuration; scale = defaultCropScale; } break; default: return; } currentStage = stage; StartCoroutine(RunGrowStage(stage, duration, scale)); }
void Update() { switch(stage) { case Stage.WAIT: countdown -= Time.deltaTime; if(countdown <= 0f) { stage = Stage.EMIT; particleSystem.enableEmission = true; countdown = 4f; } break; case Stage.EMIT: countdown -= Time.deltaTime; Color col = sprite.color; col.a = countdown / 4f; sprite.color = col; if(countdown <= 0f) { stage = Stage.END; particleSystem.enableEmission = false; } break; case Stage.END: if(particleSystem.particleCount <= 0) { Destroy(sprite.gameObject); Destroy(gameObject); } break; } }
public string GetDialogue(MissionNPC npc, Stage stage) { try { XmlDocument xdoc = new XmlDocument(); xdoc.Load(filepath); string key = parseKey(npc.GetName(), npc.GetMissionType(), stage); if (xdoc.SelectSingleNode(key) == null) { return "Can't find dialogue for key:\n "+key; } return xdoc.SelectSingleNode(key).InnerText; } catch (FileNotFoundException e) { UI.Notify(e.Message); UI.ShowSubtitle(e.StackTrace + "\n" + e.Message, 7000); } catch (Exception e) { UI.Notify(e.Message); UI.ShowSubtitle(e.StackTrace+"\n"+ e.Message, 7000); } return "Can't find key"; }
public static string Dump(Stage[] stages) { StringBuilder builder = new StringBuilder (); foreach(var stage in stages) foreach(var evt in stage.gameEvents) { builder.AppendLine(evt.delay.ToString()); if(evt is SpawnSet) { var set = (SpawnSet)evt; foreach(var spawn in set.spawns) { if(spawn.color != Colors.player) { const string format = "Spawn {0} {1} {2} {3} {4}"; builder.AppendLine(string.Format(format, spawn.color, GetCannonString(spawn.cannons), Constants.slots.FindIndex(d=>d==spawn.position.x), spawn.rotated ? "rotator":"", spawn.shielded ? "shielded":"")); } else { const string format = "Spawn {0} {1} {2} {3} {4}"; builder.AppendLine(string.Format(format, "asteroid", "ffffffff", Constants.slots.FindIndex(d=>d==spawn.position.x), spawn.rotated ? "rotator":"", spawn.shielded ? "shielded":"")); } } } else if(evt is BackgroundShift) { builder.AppendLine("Shift " + ((BackgroundShift)evt).color); } } return builder.ToString(); }
public Stage GetStage() { Stage stage = new Stage(); stage.StageId = 1; stage.Name = "Egg"; return stage; }
public static Stage GetStage(int ID) { Stage stage = new Stage(); try { // Get data DbParameter param = Database.AddParameter("@id", ID); DbDataReader reader = Database.GetData("SELECT * FROM stage WHERE ID = @id", param); foreach (DbDataRecord record in reader) { // Get ID if (DBNull.Value.Equals(record["ID"])) stage.ID = -1; else stage.ID = Convert.ToInt32(record["ID"]); // Get Name if (DBNull.Value.Equals(record["Name"])) stage.Name = ""; else stage.Name = record["Name"].ToString(); } reader.Close(); return stage; } // Fail catch (Exception ex) { Console.WriteLine(ex.Message); } return null; }
public override void Initialize(Stage stage) { base.Initialize(stage); if (actor.Parm.HasParm("AddToAIQB") && actor.Parm.GetBool("AddToAIQB")) stage.GetQB<AIQB>().AddLiveEnemy(actor); if (actor.PhysicsObject.physicsType == PhysicsObject.PhysicsType.Box) { //if we are a platform if (actor.Parm.HasParm("Platform") && actor.Parm.GetBool("Platform")) { actor.PhysicsObject.CollisionInformation.CollisionRules.Group = PhysicsQB.platformGroup; bloodOnDamage = false; } else actor.PhysicsObject.CollisionInformation.CollisionRules.Group = PhysicsQB.normalAIGroup; actor.PhysicsObject.CollisionInformation.Entity.IsAffectedByGravity = false; stunnable = false; } else if(actor.PhysicsObject.physicsType == PhysicsObject.PhysicsType.CylinderCharacter) { actor.PhysicsObject.CollisionInformation.CollisionRules.Group = PhysicsQB.normalAIGroup; actor.PhysicsObject.CylinderCharController.HorizontalMotionConstraint.Speed = 0; } }
public AllGradeAnswersViewModel(ICurrentFormHolder currentFormHolder, Stage stage, string header) : base(currentFormHolder,stage,header) { Answers = new ObservableCollection<GradeAnswerViewModel>(); SetAnswers(mCurrentFormHolder.Form); }
//******************************************** // Public Properties //******************************************** //******************************************** // Constructors //******************************************** public StageManager(Main game) { z_game = game; z_stage = new Stage(); z_isUpdating = false; z_adds = new Stack<GameObject>(5); z_removes = new Stack<GameObject>(10); }
public AllAnswersViewModelBase(ICurrentFormHolder currentFormHolder, Stage stage, string header) { mCurrentFormHolder = currentFormHolder; mStage = stage; Header = header; mCurrentFormHolder.OnChanged += SetAnswers; }
public override void Initialize(Stage stage) { SkinnedRModelInstance modelInstance = actor.modelInstance as SkinnedRModelInstance; animation = new AnimationPlayer(AnimationClip.LoadClip(actor.Parm.GetString("ModelName")), modelInstance); animation.Looping = false; animation.Rewind(); animation.playState = AnimationPlayer.PlayState.Play; }
public Stage() { _instance = this; _stage = this; id = "stage"; updateTransform(); updateTransformInTree(); }
public static async Task <Command> Send(Widget widget, IEnumerable <Document> documnets, DocumentWork work, Stage stage, User user) { var sender = new DocumentSender(); sender.Localize(); sender.Initialize(documnets.ToList()); // sender.Hidden += SenderSendComplete; if (stage != null && user != null) { sender.Send(stage, user, DocumentSendType.Next); } return(await sender.ShowAsync(widget, Point.Zero)); }
public void Setup() { stage = new Stage(); }
public void EndLoad(IAsyncResult result) { IOAsyncResult.End(result); _expectedStage = Stage.Publish; }
/// <summary> /// Shows the purchase process for item. /// </summary> /// <param name="stage"></param> /// <param name="item"></param> /// <param name="callback"></param> public static void ShowShop(Stage stage, string item, Function callback) { // http://nonoba.com/developers/documentation/multiplayerapi/classnonobaapi }
public extern void Render(Stage stage);
// Update is called once per frame void Update() { switch (stage) { case Stage.intro: break; case Stage.horizontal: cam.above = true; horizontal.value += sliderSpeed; Vector3 pos = plunger.transform.position; pos.x += sliderSpeed * .1f; plunger.transform.position = pos; if (horizontal.value == -.5f || horizontal.value == .5f) { sliderSpeed *= -1; } if (Input.GetKeyDown(KeyCode.Space)) { if (horizontal.value > .1f || horizontal.value < -.1f) { tutorialText.text = "Not qute the middle..."; } else { tutorialText.text = "Good, now the vertical..."; stage = Stage.vertical; } } break; case Stage.vertical: cam.above = true; vertical.value += sliderSpeed; pos = plunger.transform.position; pos.z += sliderSpeed * .1f; plunger.transform.position = pos; if (vertical.value == -.5f || vertical.value == .5f) { sliderSpeed *= -1; } if (Input.GetKeyDown(KeyCode.Space)) { if (vertical.value > .1f || vertical.value < -.1f) { tutorialText.text = "Not qute the middle..."; } else { tutorialText.text = "Great Now you have to depress the plunger like this!"; stage = Stage.down; StartCoroutine("ExamplePlunger"); cam.above = false; } } break; case Stage.down: if (canPlunge) { downArrow.gameObject.SetActive(true); if (Input.GetKeyDown(KeyCode.DownArrow)) { tutorialText.text = tutorialInfo.Dequeue(); stage = Stage.up; pos = plunger.transform.position; pos.y -= .2f; plunger.transform.position = pos; downArrow.gameObject.SetActive(false); } } break; case Stage.up: upArrow.gameObject.SetActive(true); if (Input.GetKeyDown(KeyCode.UpArrow)) { pos = plunger.transform.position; pos.y += .2f; plunger.transform.position = pos; tutorialText.text = tutorialInfo.Dequeue(); stage = Stage.practice; upArrow.gameObject.SetActive(false); } break; case Stage.practice: if (Input.GetKeyDown(KeyCode.UpArrow) && !isUp) { pos = plunger.transform.position; pos.y += .2f; plunger.transform.position = pos; isUp = true; count++; } else if (Input.GetKeyDown(KeyCode.DownArrow) && isUp) { pos = plunger.transform.position; pos.y -= .2f; plunger.transform.position = pos; isUp = false; count++; } if (count > 10) { stage = Stage.combo; tutorialText.text = tutorialInfo.Dequeue(); Invoke("UpdateText", 5); comboText.gameObject.SetActive(true); } break; case Stage.combo: comboText.text = combo.ToString(); timer -= Time.deltaTime; if (timer <= 0) { combo = 1; timer = 1; } if (Input.GetKeyDown(KeyCode.UpArrow) && !isUp) { pos = plunger.transform.position; pos.y += .2f; plunger.transform.position = pos; isUp = true; combo++; timer = 1; } else if (Input.GetKeyDown(KeyCode.DownArrow) && isUp) { pos = plunger.transform.position; pos.y -= .2f; plunger.transform.position = pos; isUp = false; combo++; timer = 1; } else if (Input.GetKeyDown(KeyCode.DownArrow) && !isUp) { combo = 1; timer = 1; } else if (Input.GetKeyDown(KeyCode.UpArrow) && isUp) { combo = 1; timer = 1; } if (combo >= 10) { tutorialText.text = tutorialInfo.Dequeue(); plunger.gameObject.SetActive(false); Invoke("goToMain", 3); stage = Stage.intro; } break; default: break; } }
void SetStageToDown() { stage = Stage.down; }
public Actor(Stage stage, IntVector2 pos) { this.stage = stage; this.pos = pos; }
public Object(Stage stage, int width, int height) : this(stage, 0, 0, width, height) { }
public static IJournal <T> Using <TActor, TEntry, TState>(Stage stage, IDispatcher <Dispatchable <TEntry, TState> > dispatcher, params object[] additional) where TActor : Actor where TEntry : IEntry where TState : class, IState { return(additional.Length == 0 ? stage.ActorFor <IJournal <T> >(typeof(TActor), dispatcher) : stage.ActorFor <IJournal <T> >(typeof(TActor), dispatcher, additional)); }
protected RunableWithBenchmark([NotNull] string name, Stage stage, int sequenceNumber, [NotNull] ServiceRepository services, bool implementationFinished, [NotNull] IVisualizeSlice visualizeSlice) : base(name, stage, sequenceNumber, Steptype.Global, services, implementationFinished, visualizeSlice) { }
public void unloadState(Stage stage) { gameStates[(int)stage] = null; }
/* This draws UI shapes on the map. */ protected override void RenderOverlayExtended(RenderManager.CameraInfo cameraInfo) { //debugDrawMethod(cameraInfo); try { if (m_hoverNode != 0 && (stage == Stage.CentralPoint || stage == Stage.MainAxis)) { NetNode hoveredNode = NetAccess.Node(m_hoverNode); RenderManager.instance.OverlayEffect.DrawCircle(cameraInfo, Color.black, hoveredNode.m_position, 15f, hoveredNode.m_position.y - 1f, hoveredNode.m_position.y + 1f, true, true); UIWindow2.instance.m_hoveringLabel.isVisible = false; } else if (stage == Stage.CentralPoint) { RenderMousePositionCircle(cameraInfo); RenderHoveringLabel("Select center of elliptic roundabout"); } else if (stage == Stage.MainAxis) { RenderMousePositionCircle(cameraInfo); RenderHoveringLabel("Select any intersection in direction of main axis"); } else { UIWindow2.instance.m_hoveringLabel.isVisible = false; } if (stage == Stage.MainAxis || stage == Stage.Final) { NetNode centralNodeDraw = NetAccess.Node(centralNode); RenderManager.instance.OverlayEffect.DrawCircle(cameraInfo, Color.red, centralNodeDraw.m_position, 15f, centralNodeDraw.m_position.y - 1f, centralNodeDraw.m_position.y + 1f, true, true); } if (stage == Stage.Final) { NetNode axisNodeDraw = NetAccess.Node(axisNode); RenderManager.instance.OverlayEffect.DrawCircle(cameraInfo, Color.green, axisNodeDraw.m_position, 15f, axisNodeDraw.m_position.y - 1f, axisNodeDraw.m_position.y + 1f, true, true); if (Radius(out float radius1, out float radius2)) { /* If the radiuses didn't change, we don't have to generate new ellipse. */ if (radius1 == prevRadius1 && radius2 == prevRadius2 && ellipse != null) { DrawEllipse(cameraInfo); } else { prevRadius1 = radius1; prevRadius2 = radius2; ellipse = new Ellipse(NetAccess.Node(centralNode).m_position, NetAccess.Node(axisNode).m_position - NetAccess.Node(centralNode).m_position, radius1, radius2); DrawEllipse(cameraInfo); } } else { ellipse = null; } } } catch (Exception e) { Debug.Log("Catched exception while rendering ellipse UI."); Debug.Log(e); stage = Stage.CentralPoint; enabled = false; // ??? } }
public Image getImageFor(int index) { Stage stage = getStageBySelectedIndex(index); return(getImageFor(stage)); }
public StageDetailsViewModel() { this.Stage = new Stage(); }
/// <summary> /// Creates a new instance of Stage /// </summary> /// <returns></returns> public override Component NewInstance() { Stage = new Stage(); return(Stage); }
/// <summary> /// Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event. /// </summary> public static Connection MakeMultiplayer(Stage stage) { return(default(Connection)); }
/// <summary> /// Start your app. /// </summary> /// <param name="width">Stage width</param> /// <param name="height">Stage height</param> /// <param name="viewportHeight"></param> /// <param name="viewportWidth"></param> /// <param name="rootType">The root class of your app</param> /// <exception cref="InvalidOperationException">When rootType is null or this function is called twice</exception> /// <exception cref="NotSupportedException">When the OpenGL framebuffer creation fails.</exception> /// <exception cref="ArgumentException">When width or height are less than 32.</exception> public static void Start(uint width, uint height, uint viewportWidth, uint viewportHeight, Type rootType) { Debug.WriteLine("Sparrow starting"); if (width < 32 || height < 32 || viewportWidth < 32 || viewportHeight < 32) { throw new ArgumentException($"Invalid dimensions: {width}x{height}"); } var ver = Gl.CurrentVersion; if (ver.Api == "gl") { if (ver.Major < 4) { throw new NotSupportedException("You need at least OpenGL 4.0 to run Sparrow!"); } } else { if (ver.Major < 3) { throw new NotSupportedException("You need at least OpenGL ES 3.0 to run Sparrow!"); } IsRunningOpenGLES = true; } Gl.Disable(EnableCap.CullFace); Gl.Disable(EnableCap.Dither); Gl.Enable(EnableCap.DepthTest); Gl.DepthFunc(DepthFunction.Always); BlendMode.Get(BlendMode.NORMAL).Activate(); FramebufferStatus status = Gl.CheckFramebufferStatus(FramebufferTarget.Framebuffer); if (status != FramebufferStatus.FramebufferComplete) { throw new NotSupportedException("GL Framebuffer creation error. Status: " + status); } _viewPort = Rectangle.Create(0, 0, viewportWidth, viewportHeight); _previousViewPort = Rectangle.Create(); GPUInfo.PrintGPUInfo(); // Desktop GL core profile needs a VAO for vertex attrib pointers to work. uint vao = Gl.GenVertexArray(); Gl.BindVertexArray(vao); if (rootType == null) { throw new InvalidOperationException("Root cannot be null!"); } if (Root != null) { throw new InvalidOperationException("App already initialized!"); } _painter = new Painter(width, height); Stage = new Stage(width, height); DefaultJuggler = new Juggler(); UpdateViewPort(true); Root = (DisplayObject)Activator.CreateInstance(rootType); Stage.AddChild(Root); _frameId = 1; // starts with 1, so things on the first frame are cached }
/// <summary> /// Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event. /// </summary> public static Connection MakeMultiplayer(Stage stage, string s, int p) { return(default(Connection)); }
public UICanvas() { stage = new Stage(); }
public NecromancerBossEncounter(Stage stage) : base(stage) { stage.leftMostPositionX = -2f; }
public override void DrawCommandGUI() { serializedObject.Update(); Portrait t = target as Portrait; if (Stage.ActiveStages.Count > 1) { CommandEditor.ObjectField <Stage>(stageProp, new GUIContent("Portrait Stage", "Stage to display the character portraits on"), new GUIContent("<Default>"), Stage.ActiveStages); } else { t._Stage = null; } // Format Enum names string[] displayLabels = StringFormatter.FormatEnumNames(t.Display, "<None>"); displayProp.enumValueIndex = EditorGUILayout.Popup("Display", (int)displayProp.enumValueIndex, displayLabels); string characterLabel = "Character"; if (t.Display == DisplayType.Replace) { CommandEditor.ObjectField <Character>(replacedCharacterProp, new GUIContent("Replace", "Character to replace"), new GUIContent("<None>"), Character.ActiveCharacters); characterLabel = "With"; } CommandEditor.ObjectField <Character>(characterProp, new GUIContent(characterLabel, "Character to display"), new GUIContent("<None>"), Character.ActiveCharacters); bool showOptionalFields = true; Stage s = t._Stage; // Only show optional portrait fields once required fields have been filled... if (t._Character != null) // Character is selected { if (t._Character.Portraits == null || // Character has a portraits field t._Character.Portraits.Count <= 0) // Character has at least one portrait { EditorGUILayout.HelpBox("This character has no portraits. Please add portraits to the character's prefab before using this command.", MessageType.Error); showOptionalFields = false; } if (t._Stage == null) // If default portrait stage selected { if (t._Stage == null) // If no default specified, try to get any portrait stage in the scene { s = GameObject.FindObjectOfType <Stage>(); } } if (s == null) { EditorGUILayout.HelpBox("No portrait stage has been set.", MessageType.Error); showOptionalFields = false; } } if (t.Display != DisplayType.None && t._Character != null && showOptionalFields) { if (t.Display != DisplayType.Hide && t.Display != DisplayType.MoveToFront) { // PORTRAIT CommandEditor.ObjectField <Sprite>(portraitProp, new GUIContent("Portrait", "Portrait representing character"), new GUIContent("<Previous>"), t._Character.Portraits); if (t._Character.PortraitsFace != FacingDirection.None) { // FACING // Display the values of the facing enum as <-- and --> arrows to avoid confusion with position field string[] facingArrows = new string[] { "<Previous>", "<--", "-->", }; facingProp.enumValueIndex = EditorGUILayout.Popup("Facing", (int)facingProp.enumValueIndex, facingArrows); } else { t.Facing = FacingDirection.None; } } else { t._Portrait = null; t.Facing = FacingDirection.None; } string toPositionPrefix = ""; if (t.Move) { // MOVE EditorGUILayout.PropertyField(moveProp); } if (t.Move) { if (t.Display != DisplayType.Hide) { // START FROM OFFSET EditorGUILayout.PropertyField(shiftIntoPlaceProp); } } if (t.Move) { if (t.Display != DisplayType.Hide) { if (t.ShiftIntoPlace) { t.FromPosition = null; // OFFSET // Format Enum names string[] offsetLabels = StringFormatter.FormatEnumNames(t.Offset, "<Previous>"); offsetProp.enumValueIndex = EditorGUILayout.Popup("From Offset", (int)offsetProp.enumValueIndex, offsetLabels); } else { t.Offset = PositionOffset.None; // FROM POSITION CommandEditor.ObjectField <RectTransform>(fromPositionProp, new GUIContent("From Position", "Move the portrait to this position"), new GUIContent("<Previous>"), s.Positions); } } toPositionPrefix = "To "; } else { t.ShiftIntoPlace = false; t.FromPosition = null; toPositionPrefix = "At "; } if (t.Display == DisplayType.Show || (t.Display == DisplayType.Hide && t.Move)) { // TO POSITION CommandEditor.ObjectField <RectTransform>(toPositionProp, new GUIContent(toPositionPrefix + "Position", "Move the portrait to this position"), new GUIContent("<Previous>"), s.Positions); } else { t.ToPosition = null; } if (!t.Move && t.Display != DisplayType.MoveToFront) { // MOVE EditorGUILayout.PropertyField(moveProp); } if (t.Display != DisplayType.MoveToFront) { EditorGUILayout.Separator(); // USE DEFAULT SETTINGS EditorGUILayout.PropertyField(useDefaultSettingsProp); if (!t.UseDefaultSettings) { // FADE DURATION EditorGUILayout.PropertyField(fadeDurationProp); if (t.Move) { // MOVE SPEED EditorGUILayout.PropertyField(moveDurationProp); } if (t.ShiftIntoPlace) { // SHIFT OFFSET EditorGUILayout.PropertyField(shiftOffsetProp); } } } else { t.Move = false; t.UseDefaultSettings = true; EditorGUILayout.Separator(); } EditorGUILayout.PropertyField(waitUntilFinishedProp); if (t._Portrait != null && t.Display != DisplayType.Hide) { Texture2D characterTexture = t._Portrait.texture; float aspect = (float)characterTexture.width / (float)characterTexture.height; Rect previewRect = GUILayoutUtility.GetAspectRect(aspect, GUILayout.Width(100), GUILayout.ExpandWidth(true)); if (characterTexture != null) { GUI.DrawTexture(previewRect, characterTexture, ScaleMode.ScaleToFit, true, aspect); } } if (t.Display != DisplayType.Hide) { string portraitName = "<Previous>"; if (t._Portrait != null) { portraitName = t._Portrait.name; } string portraitSummary = " " + portraitName; int toolbarInt = 1; string[] toolbarStrings = { "<--", portraitSummary, "-->" }; toolbarInt = GUILayout.Toolbar(toolbarInt, toolbarStrings, GUILayout.MinHeight(20)); int portraitIndex = -1; if (toolbarInt != 1) { for (int i = 0; i < t._Character.Portraits.Count; i++) { if (portraitName == t._Character.Portraits[i].name) { portraitIndex = i; } } } if (toolbarInt == 0) { if (portraitIndex > 0) { t._Portrait = t._Character.Portraits[--portraitIndex]; } else { t._Portrait = null; } } if (toolbarInt == 2) { if (portraitIndex < t._Character.Portraits.Count - 1) { t._Portrait = t._Character.Portraits[++portraitIndex]; } } } } serializedObject.ApplyModifiedProperties(); }
protected void Page_Load(object sender, EventArgs e) { string idString = Request.QueryString["id"]; string stageIdString = Request.QueryString["stageid"]; string departmentIdString = Request.QueryString["departmentid"]; string fromDate = Request.QueryString["fromdate"]; string toDate = Request.QueryString["todate"]; if (!string.IsNullOrEmpty(idString)) { int branchId = Convert.ToInt32(idString); Branch branch = IBranchService.GetSingle(branchId); branchName.InnerHtml = branch.Name; if (Request.QueryString["hdnNumberPerPage"] != "" && Request.QueryString["hdnNumberPerPage"] != null) { hdnNumberPerPage.Value = Request.QueryString["hdnNumberPerPage"].ToString(); } if (Request.QueryString["hdnCurrentPageNo"] != "" && Request.QueryString["hdnCurrentPageNo"] != null) { hdnCurrentPageNo.Value = Request.QueryString["hdnCurrentPageNo"].ToString(); } if (Request.QueryString["hdnTotalRecordsCount"] != "" && Request.QueryString["hdnTotalRecordsCount"] != null) { hdnTotalRecordsCount.Value = Request.QueryString["hdnTotalRecordsCount"].ToString(); } StringBuilder filter = new StringBuilder(); StringBuilder filter1 = new StringBuilder(); filter.Append(" 1=1"); filter.Append(" and (status='1' or status='9')"); string branchIdColumnName = Converter.GetColumnNameByPropertyName <Batch>(nameof(Batch.BranchId)); filter.Append(" and " + branchIdColumnName + "='" + branch.Id + "'"); if (!string.IsNullOrEmpty(stageIdString)) { int stageId = Convert.ToInt32(stageIdString); Stage stage = IStageService.GetSingle(stageId); string stageIdColumnName = Converter.GetColumnNameByPropertyName <Batch>(nameof(Batch.StageId)); filter.Append(" and " + stageIdColumnName + "='" + stage.Id + "'"); if (string.IsNullOrEmpty(fromDate) && !string.IsNullOrEmpty(toDate)) { if (stage.Id >= 5) { string createdDateColumnName = Converter.GetColumnNameByPropertyName <Batch>(nameof(Batch.CreatedDate)); //filter.Append(" and DATE_FORMAT(DATE_SUB(" + createdDateColumnName + ", INTERVAL 0 YEAR),'%Y-%m-%d') = '" + DateTime.Now.ToString("yyyy-MM-dd") + "' "); //SQL filter.Append(" and CAST(DATEADD(year, " + DateInterval + ", " + createdDateColumnName + ") as DATE) = '" + DateTime.Now.ToString("yyyy-MM-dd") + "' "); //MYSQL //filter.Append(" and DATE_FORMAT(DATE_SUB(" + createdDateColumnName + ", INTERVAL " + DateInterval + " YEAR),'%Y-%m-%d') = '" + DateTime.Now.ToString("yyyy-MM-dd") + "' "); } } } if (!string.IsNullOrEmpty(fromDate) && !string.IsNullOrEmpty(toDate)) { filter.Append(" and created_date between '" + fromDate + "' and '" + toDate + "' "); } if (!string.IsNullOrEmpty(departmentIdString)) { int departmentId = Convert.ToInt32(departmentIdString); Department department = IDepartmentService.GetSingle(departmentId); string departmentIdColumnName = Converter.GetColumnNameByPropertyName <Batch>(nameof(Batch.DepartmentId)); filter.Append(" and " + departmentIdColumnName + "='" + department.Id + "'"); } // New code fro paging int skip = 0, take = 10; if (hdnCurrentPageNo.Value == "") { skip = 0; take = 10; hdnNumberPerPage.Value = "10"; hdnCurrentPageNo.Value = "1"; hdnTotalRecordsCount.Value = IBatchService.GetCountByFilter(filter.ToString()).ToString(); } else { if (hdnCurrentPageNo.Value.Contains(",")) { hdnCurrentPageNo.Value = hdnCurrentPageNo.Value.Split(',').Last(); } skip = (Convert.ToInt32(hdnCurrentPageNo.Value) - 1) * 10; take = 10; } List <Batch> batches = IBatchService.GetDataByFilter(filter.ToString(), skip, take, true); List <BatchLog> batchLogs = new List <BatchLog>(); List <int> batchIdList = batches.Select(a => a.Id).ToList(); if (batchIdList != null && batchIdList.Count != 0) { filter = new StringBuilder(); filter.Append(" 1=1"); string BatchIdColumnName = Converter.GetColumnNameByPropertyName <BatchLog>(nameof(BatchLog.BatchId)); List <string> branchIds = batches.Select(x => x.Id.ToString()).ToList <string>(); filter.Append(" and " + BatchIdColumnName + " in (" + String.Join(",", branchIds.ToArray()) + ")"); batchLogs = IBatchLogService.GetDataByFilter(filter.ToString(), 0, 0, false); } //End New code StringBuilder innerHTML = new StringBuilder(); var groupByDepartments = batches.Where(x => x.BranchId == branch.Id).ToList().GroupBy(x => x.DepartmentId).Select(grp => grp.ToList()).ToList(); if (groupByDepartments.Count > 0) { foreach (List <Batch> deptBatches in groupByDepartments) { Department department = IDepartmentService.GetSingle(deptBatches.FirstOrDefault().DepartmentId); filter = new StringBuilder(); filter.Append(" 1=1"); //List<string> batchIds = deptBatches.Select(x => x.Id.ToString()).ToList<string>(); //string BatchIdColumnName = Converter.GetColumnNameByPropertyName<Set>(nameof(Set.BatchId)); //filter.Append(" and " + BatchIdColumnName + " in (" + String.Join(",", batchIds.ToArray()) + ")"); StringBuilder batchesHTML = new StringBuilder(); foreach (Batch batch in deptBatches) { filter = new StringBuilder(); filter.Append(" 1=1"); string BatchIdColumnName = Converter.GetColumnNameByPropertyName <BatchLog>(nameof(BatchLog.BatchId)); filter.Append(" and " + BatchIdColumnName + " = '" + batch.Id + "'"); // batchLogs = IBatchLogService.GetDataByFilter(filter.ToString(), 0, 0, false); filter = new StringBuilder(); filter.Append(" 1=1"); BatchIdColumnName = Converter.GetColumnNameByPropertyName <Set>(nameof(Set.BatchId)); filter.Append(" and " + BatchIdColumnName + " = '" + batch.Id + "'"); filter.Append(" and status in (1, 9)"); List <Set> sets = ISetService.GetDataByFilter(filter.ToString(), 0, 0, false); StringBuilder setsHTML = new StringBuilder(); setsHTML.Append("<table cellspacing='0' width='100%'>"); setsHTML.Append("<thead><tr><th>Code No</th><th>Documents</th></tr></thead>"); setsHTML.Append("<tbody>"); int documentsCount = 0; int setsCount = 0; int scanPagesCount = 0; if (sets.Count > 0) { foreach (Set set in sets) { List <SetDocument> setDocuments = ISetDocumentService.GetDataByPropertyName(nameof(SetDocument.SetId), set.Id.ToString(), true, 0, 0, false); setDocuments = setDocuments.Where(x => x.Status == 1).ToList(); documentsCount += setDocuments.Count; StringBuilder setDocumentsHTML = new StringBuilder(); foreach (SetDocument setDocument in setDocuments) { scanPagesCount += setDocument.PageCount; //string NetworkPath = ConfigurationManager.AppSettings["NetworkPath"].ToString(); //string NetworkDrive = ConfigurationManager.AppSettings["NetworkDrive"].ToString(); //string mapLocalUrl = setDocument.DocumentUrl.Replace(NetworkPath, NetworkDrive); //string fileName = Path.GetFileName(setDocument.DocumentUrl); //string localUrl = Server.MapPath("/Content/Files/" + fileName); //if (File.Exists(setDocument.DocumentUrl) && !File.Exists(localUrl)) //{ // File.Copy(setDocument.DocumentUrl, localUrl); //} // setDocumentsHTML.Append(@"<div><a href='/Content/Files/" + fileName + "' target='_blank' data-original-title='Click to view' data-trigger='hover' data-placement='bottom' class='popovers text-info'><strong>" + setDocument.DocType + @"</strong></a> ( <small> pages: <strong>" + setDocument.PageCount + @"</strong></small> )</div>"); setDocumentsHTML.Append(@"<div><a href='#' data-original-title='Click to view' data-trigger='hover' data-placement='bottom' class='popovers text-info'><strong>" + setDocument.DocType + @"</strong></a> ( <small> pages: <strong>" + setDocument.PageCount + @"</strong></small> )</div>"); } string xmlFileName = Path.GetFileName(set.SetXmlPath); string localXMLUrl = Server.MapPath("/Content/Files/" + xmlFileName); string departmentCode = department.Code; string deptCode = departmentCode.Split('-')[0]; string jobCode = departmentCode.Split('-')[1]; string columnData = ""; if (departmentCode == "E-LIBRARY") { //AA NUMBER //ACCOUNT NUMBER columnData = "AA No: " + set.AaNo; columnData += "<br/>Account No: " + set.AccountNo; } else if (deptCode == "ETP") { if (jobCode == "LN") { columnData = "AA No: " + set.AaNo; columnData += "<br/>Account No: " + set.AccountNo; } else if (jobCode == "LL") { columnData = "AA No: " + set.AaNo; } else if (jobCode == "PR") { columnData = "Project Code: " + set.AaNo; } else if (jobCode == "WF") { columnData = "Welfare Code: " + set.AaNo; } } else if (deptCode == "LOS") { columnData = "AA No: " + set.AaNo; } if (!string.IsNullOrEmpty(set.SetXmlPath)) { setsCount++; //if (File.Exists(set.SetXmlPath) && !File.Exists(localXMLUrl)) // File.Copy(set.SetXmlPath, localXMLUrl); //setsHTML.Append(@" // <tr> // <td><a href='/Content/Files/" + xmlFileName + @"' target='_blank' data-original-title='Click to view XML' data-trigger='hover' data-placement='bottom' class='popovers text-info'><strong>" + columnData + @"</strong></a></td> // <td>" + setDocumentsHTML.ToString() + @"</td> // </tr> //"); setsHTML.Append(@" <tr> <td><a href='SetView.aspx?setId=" + set.Id + @"' target='_blank' data-original-title='Click to view Files' data-trigger='hover' data-placement='bottom' class='popovers text-info'><strong>" + columnData + @" <i class='fa fa-eye'></i></strong></a> </td> <td>" + setDocumentsHTML.ToString() + @"</td> </tr> "); } } } setsHTML.Append("</tbody>"); setsHTML.Append("</table>"); StringBuilder batchLogHTML = new StringBuilder(); foreach (BatchLog batchLog in batchLogs.Where(a => a.BatchId == batch.Id).ToList()) { batchLogHTML.Append(@" <div class='mini-stat clearfix text-left'> " + (batchLog.StageId == 1 ? @"<span class='mini-stat-icon orange'><i class='fa fa-print'></i></span>" : (batchLog.StageId == 2 ? "<span class='mini-stat-icon tar'><i class='fa fa-check-square-o'></i></span>" : (batchLog.StageId == 3 ? "<span class='mini-stat-icon pink'><i class='fa fa-external-link'></i></span>" : (batchLog.StageId == 4 ? "<span class='mini-stat-icon green'><i class='fa fa-puzzle-piece'></i></span>" : (batchLog.StageId == 5 ? "<span class='mini-stat-icon yellow-b'><i class='fa fa-files-o'></i></span>" : (batchLog.StageId == 6 ? "<span class='mini-stat-icon yellow-b'><i class='fa fa-hdd-o'></i></span>" : "")))))) + @" <div class='mini-stat-info'> " + (batchLog.StageId == 1 ? "<span>Scan</span>" : (batchLog.StageId == 2 ? "<span>Index</span>" : (batchLog.StageId == 3 ? "<span><span>Export</span> <small>To Server</small></span>" : (batchLog.StageId == 4 ? "<span><span>Integrate</span> <small>Sync Control</small></span>" : (batchLog.StageId == 5 ? "<span><span>Release</span> <small>To Mimzy</small></span>" : (batchLog.StageId == 6 ? "<span><span>Document</span> <small>By Mimzy</small></span>" : "")))))) + @" " + batchLog.UpdatedDate.ToString("dd/MM/yyyy HH:mm:ss") + @" - <strong>" + batchLog.BatchUser + @"</strong> </div> </div> "); } BatchLog firstBatchLog = batchLogs.FirstOrDefault(); BatchLog lastBatchLog = batchLogs.LastOrDefault(); TimeSpan timeSpan = lastBatchLog.UpdatedDate.Subtract(firstBatchLog.UpdatedDate); int isReleased = 0; int isException = 0; string mFIleStatus = ""; int isSetCount = sets.Count(); var releasedStatus2 = sets.Where(x => x.IsReleased == 2).ToList(); if (releasedStatus2 == null) { isReleased = 0; } else if (sets.Count != releasedStatus2.Count) { isReleased = 1; } else if (sets.Count == releasedStatus2.Count) { isReleased = 2; if (releasedStatus2.Count(x => x.Status == 9) == 0) { isException = 0; } else if (releasedStatus2.Count(x => x.Status == 9) != sets.Count) { isException = 1; } else if (releasedStatus2.Count(x => x.Status == 9) == sets.Count) { isException = 2; } } batchesHTML.Append(@" <tr> <td> <div class='text-center mb-5'> " + branch.Code + @" : <strong class='" + (batch.Status == 9 ? "text-danger" : "") + @"'>" + batch.BatchNo + @"</strong> <a href='javascript:;' class='text-info view_batch_log'><sup>View Log</sup></a> <div class='div_batch_log hide draggableDiv'> <span class='log_close'>X</span> <table> <tr><td colspan='2' class='text-center'><strong>Batch log</strong></td></tr> <tr><td>Batch No: <strong>" + batch.BatchNo + @"</strong></td><td>No. of sets: <strong>" + setsCount + @"</strong></td></tr> <tr><td colspan='2'><small>Duration: <label class='label label-primary'>" + timeSpan.Days + @" days, " + timeSpan.Hours + @" hours, " + timeSpan.Minutes + @" minutes, " + timeSpan.Seconds + @" seconds</label></small></tr> </table> " + batchLogHTML.ToString() + @" <div> Total scan pages: <strong>" + scanPagesCount + @"</strong> </div>"); if (isSetCount != 0) { batchesHTML.Append(@"<div> M - Files Status: <span clas = 'fs-14'> " + (isReleased == 0 || isReleased == 1 ? " <i class='fa fa-file text-muted'></i>" : (isReleased == 2 && isException == 0 ? "<i class='fa fa-file text-success'></i>" : (isReleased == 2 && isException == 1 ? "<i class='fa fa-file text-warning'></i>" : (isReleased == 2 && isException == 2 ? "<i class='fa fa-file text-danger'></i>" : "")))) + @"</span> </div>"); } batchesHTML.Append(@" </div> </div> </td> <td> " + batch.BatchUser + @" </td> <td> " + batch.CreatedDate.ToString("dd/MM/yyyy HH:mm:ss") + @" </td> <td> " + setsHTML.ToString() + @" </td> </tr> "); } innerHTML.Append(@" <section class='panel my-panel'> <header class='panel-heading'> Department: <strong>" + department.Name + @"</strong> <span class='tools pull-right'> <a href='javascript:;' class='fa fa-chevron-up panel-oc'></a> </span> </header> <div class='panel-body' style='display: none;'> <table class='display responsive nowrap table table-bordered dataTable' cellspacing='0' width='100%'> <thead> <tr> <th>Batch No</th> <th>Batch user</th> <th>Batch date</th> <th>Sets</th> </tr> </thead> <tbody> " + batchesHTML + @" </tbody> </table> </div> </section>"); } } panelBatches.InnerHtml = innerHTML.ToString(); } }
/// <summary> /// Compiles the specified path. /// </summary> /// <param name="code">The shader code.</param> /// <param name="stage">The stage.</param> /// <param name="entryPoint">The entry point.</param> /// <returns></returns> /// <exception cref="InvalidOperationException"></exception> public CompileResult Compile(string code, Stage stage, string entryPoint) => _compileFunction != null ? _compileFunction(code, stage, entryPoint) : throw new InvalidOperationException( $"The {GraphicsBackend} tool chain does not support compilation!");
private void GetStageInfo() { lastStage = SimManager.LastStage; }
public override void GoToFirstStage() { stage = Stage.CentralPoint; }
/// <summary> /// Makes sure that the next frame is actually rendered. /// <para>When <code>SkipUnchangedFrames</code> is enabled, some situations require that you /// manually force a redraw, e.g. when a RenderTexture is changed. This method is the /// easiest way to do so; it's just a shortcut to <code>Stage.SetRequiresRedraw()</code>. /// </para> /// </summary> public static void SetRequiresRedraw() { Stage.SetRequiresRedraw(); }
IJournal <T> IJournal <T> .Using <TActor, TEntry, TState>(Stage stage, IDispatcher <Dispatchable <TEntry, TState> > dispatcher, params object[] additional) { return(Using <TActor, TEntry, TState>(stage, dispatcher, additional)); }
public override void OnOpen(params object[] args) { cam = Camera.main; stage = args[0] as Stage; }
public static void OnContextCreated() { UpdateViewPort(true); Stage.SetRequiresRedraw(); ContextCreated?.Invoke(); }