protected override void SelectMenuItem(ISelectableControl isc) { // Same item selected and we are not in the middle of building a DOM element // In this case we need to construct the selected item DOM element for this new display mode. if (_selectedControl == isc && !_buildingDOMElement) { return; } // We either get the current display mode of this control through what is presently // shown in the ribbon. If not, then we are creating it and just setting the initially shown // item. In this case, we want to set the menu item to the one that we are currently creating. string displayMode = !CUIUtility.IsNullOrUndefined(DisplayedComponent) ? DisplayedComponent.Title : CurrentlyCreatedDisplayMode; Span itemContainer; switch (displayMode) { case "Large": itemContainer = _elmLargeSelectedItem; break; case "Medium": itemContainer = _elmMediumSelectedItem; break; case "Small": itemContainer = _elmSmallSelectedItem; break; default: throw new ArgumentOutOfRangeException("Invalid display mode on split button while selecting a menu item"); } _selectedControl = isc; StateProperties[DropDownCommandProperties.SelectedItemId] = isc.GetMenuItemId(); Control iscControl = (Control)isc; if (iscControl.DisplayedComponent is MenuItem) { Menu.SelectedMenuItem = (MenuItem)iscControl.DisplayedComponent; } Span selectedItem = (Span)_selectedControl.GetDropDownDOMElementForDisplayMode(displayMode); // The drop down element should not have a <BR> in it because it is // used in an MRUSplitButton and there is only room for one line of text. if (selectedItem.ChildNodes.Length > 1) { HtmlElement elm = (HtmlElement)selectedItem.ChildNodes[1]; if (elm.ChildNodes.Length > 1) { if (((HtmlElement)elm.ChildNodes[1]).TagName.ToLower() == "br") { Span elmText = new Span(); UIUtility.SetInnerText(elmText, " "); elm.ReplaceChild(elmText, elm.ChildNodes[1]); } } } // Set the ID to null since this DOM element is now hosted in this MRUSplitButton. selectedItem.Id = Id + "-SelectedItem"; if (itemContainer.HasChildNodes()) { HtmlElement oldSelectedItem = (HtmlElement)itemContainer.FirstChild; itemContainer.ReplaceChild(selectedItem, oldSelectedItem); } else { itemContainer.AppendChild(selectedItem); } selectedItem.Click += OnSelectedItemClick; selectedItem.DblClick += OnDblClick; }
public override void OnSuccess(WWWResult www) { if (Network.IsError) { switch (Network.ErrCode) { case Network.EErrCode.ShopSoldOut: case Network.EErrCode.ShopBuyCostShort: case Network.EErrCode.ShopBuyLvShort: case Network.EErrCode.ShopBuyNotFound: case Network.EErrCode.ShopBuyItemNotFound: this.OnBack(); break; case Network.EErrCode.ShopRefreshItemList: UIUtility.SystemMessage((string)null, Network.ErrMsg, (UIUtility.DialogResultEvent)(go => this.ActivateOutputLinks(121)), (GameObject)null, false, -1); ((Behaviour)this).set_enabled(false); Network.RemoveAPI(); Network.ResetError(); break; case Network.EErrCode.ShopBuyOutofItemPeriod: UIUtility.SystemMessage((string)null, Network.ErrMsg, (UIUtility.DialogResultEvent)(go => this.ActivateOutputLinks(120)), (GameObject)null, false, -1); ((Behaviour)this).set_enabled(false); Network.RemoveAPI(); Network.ResetError(); break; case Network.EErrCode.ShopBuyOutofPeriod: UIUtility.SystemMessage((string)null, Network.ErrMsg, (UIUtility.DialogResultEvent)(go => this.ActivateOutputLinks(122)), (GameObject)null, false, -1); ((Behaviour)this).set_enabled(false); Network.RemoveAPI(); Network.ResetError(); break; default: this.OnRetry(); break; } } else { WebAPI.JSON_BodyResponse <Json_ShopBuyResponse> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <Json_ShopBuyResponse> >(www.text); DebugUtility.Assert(jsonObject != null, "res == null"); if (jsonObject.body == null) { this.OnRetry(); } else { Network.RemoveAPI(); ShopData shop = MonoSingleton <GameManager> .Instance.Player.GetShopData(this.mShopType) ?? new ShopData(); if (!shop.Deserialize(jsonObject.body)) { this.OnFailed(); } else { MonoSingleton <GameManager> .Instance.Player.SetShopData(this.mShopType, shop); if (jsonObject.body.cards != null && jsonObject.body.cards.Length > 0) { GlobalVars.IsDirtyConceptCardData.Set(true); Json_ShopBuyConceptCard[] cards = jsonObject.body.cards; for (int index = 0; index < cards.Length; ++index) { if (cards[index] != null && cards[index].IsGetConceptCardUnit) { FlowNode_ConceptCardGetUnit.AddConceptCardData(ConceptCardData.CreateConceptCardDataForDisplay(cards[index].iname)); } } } ShopParam shopParam = MonoSingleton <GameManager> .Instance.MasterParam.GetShopParam(this.mShopType); if (shopParam != null) { PlayerData player = MonoSingleton <GameManager> .Instance.Player; ShopItem shopItem = shop.items.FirstOrDefault <ShopItem>((Func <ShopItem, bool>)(item => item.id == GlobalVars.ShopBuyIndex)); string iname = shopItem.iname; if (shopItem.isSetSaleValue) { MyMetaps.TrackSpendShop(shopItem.saleType, this.mShopType, shopItem.saleValue); } else { int num = !shopItem.IsArtifact ? (!shopItem.IsConceptCard ? MonoSingleton <GameManager> .Instance.GetItemParam(shopItem.iname).GetBuyNum(shopItem.saleType) * shopItem.num : shopItem.saleValue) : MonoSingleton <GameManager> .Instance.MasterParam.GetArtifactParam(shopItem.iname).GetBuyNum(shopItem.saleType) * shopItem.num; if (num > 0) { MyMetaps.TrackSpendShop(shopItem.saleType, this.mShopType, num); } } player.OnBuyAtShop(shopParam.iname, iname, shopItem.num); } this.Success(); } } } }
private QState StatePickHGACheckVacuumAndMoveUp(IQEvent qEvent) { LogStateInfo(_processName, System.Reflection.MethodBase.GetCurrentMethod().Name, qEvent); if (qEvent.IsSignal(SigStateJob)) { try { if (_controller.IsVacuumOK()) { OutputEEPicksUpHGAFromPrecisorNestProcessCycleTimeStopWatch.Stop(); if (HSTMachine.Workcell.HSTSettings.Install.EnableDebugLog) { CommonFunctions.Instance.LogProcessCycleTime("Output EE Picks Up HGAs From Precisor Nest Process Cycle Time.csv", OutputEEPicksUpHGAFromPrecisorNestProcessCycleTimeStopWatch.ElapsedTime); } OutputEELeavesPrecisorNestAfterHGAPickProcessCycleTimeStopWatch.Start(); OutputEEUpFromPrecisorNestPositionTravellingTimeStopWatch.Start(); _controller.PickHGAMoveUp(); HSTWorkcell.outputEEHoldingHGAs = true; OutputEEUpFromPrecisorNestPositionTravellingTimeStopWatch.Stop(); if (HSTMachine.Workcell != null) { if (HSTMachine.Workcell.getPanelOperation() != null) { if (HSTMachine.Workcell.getPanelOperation().getOperationStatusPanel() != null) { UIUtility.Invoke(HSTMachine.Workcell.getPanelOperation().getOperationStatusPanel(), () => { HSTMachine.Workcell.getPanelOperation().getOperationStatusPanel().labelOutputUpFromPrecisorNestPositionTravellingTime.Text = OutputEEUpFromPrecisorNestPositionTravellingTimeStopWatch.ElapsedTime.ToString(); }); } } } OutputEELeavesPrecisorNestAfterHGAPickProcessCycleTimeStopWatch.Stop(); if (HSTMachine.Workcell.HSTSettings.Install.EnableDebugLog) { CommonFunctions.Instance.LogProcessCycleTime("Output EE Leaves Precisor Nest After HGA Pick Process Cycle Time.csv", OutputEELeavesPrecisorNestAfterHGAPickProcessCycleTimeStopWatch.ElapsedTime); } ProcessStopWatch PSW1 = new ProcessStopWatch(_controller.IncomingCarrier.CarrierID, new Stopwatch()); if (HSTMachine.Workcell.HSTSettings.Install.EnableDebugLog) { CommonFunctions.Instance.CollisionAvoidanceBetweenOutputEEAndPrecisorNestLeavingOutputStationProcessCycleTimeStopWatch.Enqueue(PSW1); } TransitionTo(statePublishSigPrecisorPickDone); } else { TransitionTo(stateAlertOperatorHGADrop); } } catch (Exception ex) { ButtonList btnlst = new ButtonList(ErrorButton.OK, ErrorButton.NoButton, ErrorButton.NoButton); TransitionToErrorState(btnlst, ex); } return(null); } return(stateRun); }
private void OutOfCoin() { FixParam fixParam = MonoSingleton <GameManager> .Instance.MasterParam.FixParam; UIUtility.NegativeSystemMessage((string)null, LocalizedText.Get("sys.OUTOFCOIN", (object)fixParam.BuyGoldCost, (object)fixParam.BuyGoldAmount), (UIUtility.DialogResultEvent)(go => {}), (GameObject)null, false, -1); }
private void OutOfBuyCount() { UIUtility.NegativeSystemMessage((string)null, LocalizedText.Get("sys.STAMINA_BUY_LIMIT"), (UIUtility.DialogResultEvent)(go => {}), (GameObject)null, false, -1); }
/// <summary> /// Initialize the MaterialEditor UI /// </summary> protected void InitUI() { Padding = new RectOffset(3, 2, 0, 1); MaterialEditorWindow = UIUtility.CreateNewUISystem("MaterialEditorCanvas"); MaterialEditorWindow.GetComponent <CanvasScaler>().referenceResolution = new Vector2(1920f / UIScale.Value, 1080f / UIScale.Value); Visible = false; MaterialEditorWindow.gameObject.transform.SetParent(transform); MaterialEditorWindow.sortingOrder = 1000; MaterialEditorMainPanel = UIUtility.CreatePanel("Panel", MaterialEditorWindow.transform); MaterialEditorMainPanel.color = Color.white; MaterialEditorMainPanel.transform.SetRect(0.05f, 0.05f, UIWidth.Value * UIScale.Value, UIHeight.Value * UIScale.Value); UIUtility.AddOutlineToObject(MaterialEditorMainPanel.transform, Color.black); DragPanel = UIUtility.CreatePanel("Draggable", MaterialEditorMainPanel.transform); DragPanel.transform.SetRect(0f, 1f, 1f, 1f, 0f, -HeaderSize); DragPanel.color = Color.gray; UIUtility.MakeObjectDraggable(DragPanel.rectTransform, MaterialEditorMainPanel.rectTransform); var nametext = UIUtility.CreateText("Nametext", DragPanel.transform, "Material Editor"); nametext.transform.SetRect(); nametext.alignment = TextAnchor.MiddleCenter; FilterInputField = UIUtility.CreateInputField("Filter", DragPanel.transform, "Filter"); FilterInputField.transform.SetRect(0f, 0f, 0f, 1f, 1f, 1f, 100f, -1f); FilterInputField.onValueChanged.AddListener(RefreshUI); var close = UIUtility.CreateButton("CloseButton", DragPanel.transform, ""); close.transform.SetRect(1f, 0f, 1f, 1f, -20f, 1f, -1f, -1f); close.onClick.AddListener(() => Visible = false); //X button var x1 = UIUtility.CreatePanel("x1", close.transform); x1.transform.SetRect(0f, 0f, 1f, 1f, 8f, 0f, -8f); x1.rectTransform.eulerAngles = new Vector3(0f, 0f, 45f); x1.color = Color.black; var x2 = UIUtility.CreatePanel("x2", close.transform); x2.transform.SetRect(0f, 0f, 1f, 1f, 8f, 0f, -8f); x2.rectTransform.eulerAngles = new Vector3(0f, 0f, -45f); x2.color = Color.black; MaterialEditorScrollableUI = UIUtility.CreateScrollView("MaterialEditorWindow", MaterialEditorMainPanel.transform); MaterialEditorScrollableUI.transform.SetRect(0f, 0f, 1f, 1f, MarginSize, MarginSize, -MarginSize, -HeaderSize - MarginSize / 2f); MaterialEditorScrollableUI.gameObject.AddComponent <Mask>(); MaterialEditorScrollableUI.content.gameObject.AddComponent <VerticalLayoutGroup>(); MaterialEditorScrollableUI.content.gameObject.AddComponent <ContentSizeFitter>().verticalFit = ContentSizeFitter.FitMode.PreferredSize; MaterialEditorScrollableUI.verticalScrollbar.GetComponent <RectTransform>().offsetMin = new Vector2(ScrollOffsetX, 0f); MaterialEditorScrollableUI.viewport.offsetMax = new Vector2(ScrollOffsetX, 0f); MaterialEditorScrollableUI.movementType = ScrollRect.MovementType.Clamped; MaterialEditorScrollableUI.verticalScrollbar.GetComponent <Image>().color = new Color(1, 1, 1, 0.6f); var template = ItemTemplate.CreateTemplate(MaterialEditorScrollableUI.content.transform); VirtualList = MaterialEditorScrollableUI.gameObject.AddComponent <VirtualList>(); VirtualList.ScrollRect = MaterialEditorScrollableUI; VirtualList.EntryTemplate = template; VirtualList.Initialize(); }
private void Add_Charge_Header(PaintEventArgs e, int index, int count, string text) { UIUtility.Merge_Header(e, index, count, text, dgvList); }
void Awake() { lockTrans = UIUtility.FindTransfrom(transform, "LockInfo"); buildTrans = UIUtility.FindTransfrom(transform, "Build"); }
internal static GameObject CreateTemplate(Transform parent) { var contentList = UIUtility.CreatePanel("ListEntry", parent); contentList.gameObject.AddComponent <LayoutElement>().preferredHeight = panelHeight; contentList.gameObject.AddComponent <Mask>(); contentList.color = rowColor; //Renderer { var itemPanel = UIUtility.CreatePanel("RendererPanel", contentList.transform); itemPanel.gameObject.AddComponent <CanvasGroup>(); itemPanel.gameObject.AddComponent <HorizontalLayoutGroup>().padding = padding; var label = UIUtility.CreateText("RendererLabel", itemPanel.transform, ""); label.alignment = TextAnchor.MiddleLeft; label.color = Color.black; var labelLE = label.gameObject.AddComponent <LayoutElement>(); labelLE.preferredWidth = labelWidth; labelLE.flexibleWidth = labelWidth; Text labelRenderer = UIUtility.CreateText("RendererText", itemPanel.transform); labelRenderer.alignment = TextAnchor.MiddleRight; labelRenderer.color = Color.black; var labelRendererLE = labelRenderer.gameObject.AddComponent <LayoutElement>(); labelRendererLE.preferredWidth = 200; labelRendererLE.flexibleWidth = 0; Button exportUVButton = UIUtility.CreateButton("ExportUVButton", itemPanel.transform, "Export UV Map"); var exportUVButtonLE = exportUVButton.gameObject.AddComponent <LayoutElement>(); exportUVButtonLE.preferredWidth = 110; exportUVButtonLE.flexibleWidth = 0; Button exportMeshButton = UIUtility.CreateButton("ExportObjButton", itemPanel.transform, "Export .obj"); var exportMeshButtonLE = exportMeshButton.gameObject.AddComponent <LayoutElement>(); exportMeshButtonLE.preferredWidth = 85; exportMeshButtonLE.flexibleWidth = 0; } //Renderer Enabled { var itemPanel = UIUtility.CreatePanel("RendererEnabledPanel", contentList.transform); itemPanel.gameObject.AddComponent <CanvasGroup>(); itemPanel.gameObject.AddComponent <HorizontalLayoutGroup>().padding = padding; var label = UIUtility.CreateText("RendererEnabledLabel", itemPanel.transform, ""); label.alignment = TextAnchor.MiddleLeft; label.color = Color.black; var labelLE = label.gameObject.AddComponent <LayoutElement>(); labelLE.preferredWidth = labelWidth; labelLE.flexibleWidth = labelWidth; Dropdown dropdownEnabled = UIUtility.CreateDropdown("RendererEnabledDropdown", itemPanel.transform); dropdownEnabled.transform.SetRect(0f, 0f, 0f, 1f, 0f, 0f, 100f); dropdownEnabled.captionText.transform.SetRect(0f, 0f, 1f, 1f, 0f, 2f, -15f, -2f); dropdownEnabled.captionText.alignment = TextAnchor.MiddleLeft; dropdownEnabled.options.Clear(); dropdownEnabled.options.Add(new Dropdown.OptionData("Off")); dropdownEnabled.options.Add(new Dropdown.OptionData("On")); dropdownEnabled.value = 0; dropdownEnabled.captionText.text = "Off"; var dropdownEnabledLE = dropdownEnabled.gameObject.AddComponent <LayoutElement>(); dropdownEnabledLE.preferredWidth = dropdownWidth; dropdownEnabledLE.flexibleWidth = 0; var reset = UIUtility.CreateButton($"RendererEnabledResetButton", itemPanel.transform, "Reset"); var resetLE = reset.gameObject.AddComponent <LayoutElement>(); resetLE.preferredWidth = resetButtonWidth; resetLE.flexibleWidth = 0; } //Renderer ShadowCastingMode { var itemPanel = UIUtility.CreatePanel("RendererShadowCastingModePanel", contentList.transform); itemPanel.gameObject.AddComponent <CanvasGroup>(); itemPanel.gameObject.AddComponent <HorizontalLayoutGroup>().padding = padding; var label = UIUtility.CreateText("RendererShadowCastingModeLabel", itemPanel.transform, ""); label.alignment = TextAnchor.MiddleLeft; label.color = Color.black; var labelLE = label.gameObject.AddComponent <LayoutElement>(); labelLE.preferredWidth = labelWidth; labelLE.flexibleWidth = labelWidth; Dropdown dropdownShadowCastingMode = UIUtility.CreateDropdown("RendererShadowCastingModeDropdown", itemPanel.transform); dropdownShadowCastingMode.transform.SetRect(0f, 0f, 0f, 1f, 0f, 0f, 100f); dropdownShadowCastingMode.captionText.transform.SetRect(0f, 0f, 1f, 1f, 0f, 2f, -15f, -2f); dropdownShadowCastingMode.captionText.alignment = TextAnchor.MiddleLeft; dropdownShadowCastingMode.options.Clear(); dropdownShadowCastingMode.options.Add(new Dropdown.OptionData("Off")); dropdownShadowCastingMode.options.Add(new Dropdown.OptionData("On")); dropdownShadowCastingMode.options.Add(new Dropdown.OptionData("Two Sided")); dropdownShadowCastingMode.options.Add(new Dropdown.OptionData("Shadows Only")); dropdownShadowCastingMode.value = 0; dropdownShadowCastingMode.captionText.text = "Off"; var dropdownShadowCastingModeLE = dropdownShadowCastingMode.gameObject.AddComponent <LayoutElement>(); dropdownShadowCastingModeLE.preferredWidth = dropdownWidth; dropdownShadowCastingModeLE.flexibleWidth = 0; var reset = UIUtility.CreateButton($"RendererShadowCastingModeResetButton", itemPanel.transform, "Reset"); var resetLE = reset.gameObject.AddComponent <LayoutElement>(); resetLE.preferredWidth = resetButtonWidth; resetLE.flexibleWidth = 0; } //Renderer ReceiveShadows { var itemPanel = UIUtility.CreatePanel("RendererReceiveShadowsPanel", contentList.transform); itemPanel.gameObject.AddComponent <CanvasGroup>(); itemPanel.gameObject.AddComponent <HorizontalLayoutGroup>().padding = padding; var label = UIUtility.CreateText("RendererReceiveShadowsLabel", itemPanel.transform, ""); label.alignment = TextAnchor.MiddleLeft; label.color = Color.black; var labelLE = label.gameObject.AddComponent <LayoutElement>(); labelLE.preferredWidth = labelWidth; labelLE.flexibleWidth = labelWidth; Dropdown dropdownReceiveShadows = UIUtility.CreateDropdown("RendererReceiveShadowsDropdown", itemPanel.transform); dropdownReceiveShadows.transform.SetRect(0f, 0f, 0f, 1f, 0f, 0f, 100f); dropdownReceiveShadows.captionText.transform.SetRect(0f, 0f, 1f, 1f, 0f, 2f, -15f, -2f); dropdownReceiveShadows.captionText.alignment = TextAnchor.MiddleLeft; dropdownReceiveShadows.options.Clear(); dropdownReceiveShadows.options.Add(new Dropdown.OptionData("Off")); dropdownReceiveShadows.options.Add(new Dropdown.OptionData("On")); dropdownReceiveShadows.value = 0; dropdownReceiveShadows.captionText.text = "Off"; var dropdownReceiveShadowsLE = dropdownReceiveShadows.gameObject.AddComponent <LayoutElement>(); dropdownReceiveShadowsLE.preferredWidth = dropdownWidth; dropdownReceiveShadowsLE.flexibleWidth = 0; var reset = UIUtility.CreateButton($"RendererReceiveShadowsResetButton", itemPanel.transform, "Reset"); var resetLE = reset.gameObject.AddComponent <LayoutElement>(); resetLE.preferredWidth = resetButtonWidth; resetLE.flexibleWidth = 0; } //Material { var itemPanel = UIUtility.CreatePanel("MaterialPanel", contentList.transform); itemPanel.gameObject.AddComponent <CanvasGroup>(); itemPanel.gameObject.AddComponent <HorizontalLayoutGroup>().padding = padding; var label = UIUtility.CreateText("MaterialLabel", itemPanel.transform, ""); label.alignment = TextAnchor.MiddleLeft; label.color = Color.black; var labelLE = label.gameObject.AddComponent <LayoutElement>(); labelLE.preferredWidth = labelWidth; labelLE.flexibleWidth = labelWidth; Text materialText = UIUtility.CreateText("MaterialText", itemPanel.transform); materialText.alignment = TextAnchor.MiddleRight; materialText.color = Color.black; var materialTextLE = materialText.gameObject.AddComponent <LayoutElement>(); materialTextLE.preferredWidth = 200; materialTextLE.flexibleWidth = 0; var copy = UIUtility.CreateButton($"MaterialCopy", itemPanel.transform, "Copy Edits"); var copyLE = copy.gameObject.AddComponent <LayoutElement>(); copyLE.preferredWidth = buttonWidth; copyLE.flexibleWidth = 0; var paste = UIUtility.CreateButton($"MaterialPaste", itemPanel.transform, "Paste Edits"); var pasteLE = paste.gameObject.AddComponent <LayoutElement>(); pasteLE.preferredWidth = buttonWidth; pasteLE.flexibleWidth = 0; //var copy = UIUtility.CreateButton($"MaterialCopyRemove", itemPanel.transform, "Copy Material"); //var copyLE = copy.gameObject.AddComponent<LayoutElement>(); //copyLE.preferredWidth = buttonWidth; //copyLE.flexibleWidth = 0; } //Material Shader { var itemPanel = UIUtility.CreatePanel("ShaderPanel", contentList.transform); itemPanel.gameObject.AddComponent <CanvasGroup>(); itemPanel.gameObject.AddComponent <HorizontalLayoutGroup>().padding = padding; var label = UIUtility.CreateText("ShaderLabel", itemPanel.transform, ""); label.alignment = TextAnchor.MiddleLeft; label.color = Color.black; var labelLE = label.gameObject.AddComponent <LayoutElement>(); labelLE.preferredWidth = labelWidth; labelLE.flexibleWidth = labelWidth; Dropdown dropdownShader = UIUtility.CreateDropdown("ShaderDropdown", itemPanel.transform); dropdownShader.transform.SetRect(0f, 0f, 0f, 1f, 0f, 0f, 100f); dropdownShader.captionText.transform.SetRect(0f, 0f, 1f, 1f, 0f, 2f, -15f, -2f); dropdownShader.captionText.alignment = TextAnchor.MiddleLeft; dropdownShader.options.Clear(); dropdownShader.options.Add(new Dropdown.OptionData("Reset")); foreach (var shader in MaterialEditorPlugin.XMLShaderProperties.Where(x => x.Key != "default")) { dropdownShader.options.Add(new Dropdown.OptionData(shader.Key)); } var dropdownShaderLE = dropdownShader.gameObject.AddComponent <LayoutElement>(); dropdownShaderLE.preferredWidth = dropdownWidth * 3; dropdownShaderLE.flexibleWidth = 0; var reset = UIUtility.CreateButton($"ShaderResetButton", itemPanel.transform, "Reset"); var resetLE = reset.gameObject.AddComponent <LayoutElement>(); resetLE.preferredWidth = resetButtonWidth; resetLE.flexibleWidth = 0; } //Material RenderQueue { var itemPanel = UIUtility.CreatePanel("ShaderRenderQueuePanel", contentList.transform); itemPanel.gameObject.AddComponent <CanvasGroup>(); itemPanel.gameObject.AddComponent <HorizontalLayoutGroup>().padding = padding; var label = UIUtility.CreateText("ShaderRenderQueueLabel", itemPanel.transform, ""); label.alignment = TextAnchor.MiddleLeft; label.color = Color.black; var labelLE = label.gameObject.AddComponent <LayoutElement>(); labelLE.preferredWidth = labelWidth; labelLE.flexibleWidth = labelWidth; InputField textBoxShaderRenderQueue = UIUtility.CreateInputField("ShaderRenderQueueInput", itemPanel.transform); textBoxShaderRenderQueue.text = "0"; var textBoxShaderRenderQueueLE = textBoxShaderRenderQueue.gameObject.AddComponent <LayoutElement>(); textBoxShaderRenderQueueLE.preferredWidth = textBoxWidth; textBoxShaderRenderQueueLE.flexibleWidth = 0; var reset = UIUtility.CreateButton($"ShaderRenderQueueResetButton", itemPanel.transform, "Reset"); var resetLE = reset.gameObject.AddComponent <LayoutElement>(); resetLE.preferredWidth = resetButtonWidth; resetLE.flexibleWidth = 0; } //Texture properties { var itemPanel = UIUtility.CreatePanel("TexturePanel", contentList.transform); itemPanel.gameObject.AddComponent <CanvasGroup>(); itemPanel.gameObject.AddComponent <HorizontalLayoutGroup>().padding = padding; var label = UIUtility.CreateText("TextureLabel", itemPanel.transform, ""); label.alignment = TextAnchor.MiddleLeft; label.color = Color.black; var labelLE = label.gameObject.AddComponent <LayoutElement>(); labelLE.preferredWidth = labelWidth; labelLE.flexibleWidth = labelWidth; Button exportButton = UIUtility.CreateButton($"TextureExportButton", itemPanel.transform, $"Export Texture"); var exportButtonLE = exportButton.gameObject.AddComponent <LayoutElement>(); exportButtonLE.preferredWidth = buttonWidth; exportButtonLE.flexibleWidth = 0; Button importButton = UIUtility.CreateButton($"TextureImportButton", itemPanel.transform, $"Import Texture"); var importButtonLE = importButton.gameObject.AddComponent <LayoutElement>(); importButtonLE.preferredWidth = buttonWidth; importButtonLE.flexibleWidth = 0; var reset = UIUtility.CreateButton($"TextureResetButton", itemPanel.transform, "Reset"); var resetLE = reset.gameObject.AddComponent <LayoutElement>(); resetLE.preferredWidth = resetButtonWidth; resetLE.flexibleWidth = 0; } //Offset and Scale { var itemPanel = UIUtility.CreatePanel("OffsetScalePanel", contentList.transform); itemPanel.gameObject.AddComponent <CanvasGroup>(); itemPanel.gameObject.AddComponent <HorizontalLayoutGroup>().padding = padding; var label = UIUtility.CreateText("OffsetScaleLabel", itemPanel.transform, ""); label.alignment = TextAnchor.MiddleLeft; label.color = Color.black; var labelLE = label.gameObject.AddComponent <LayoutElement>(); labelLE.preferredWidth = labelWidth; labelLE.flexibleWidth = labelWidth; Text labelOffsetX = UIUtility.CreateText("OffsetXText", itemPanel.transform, "Offset X"); labelOffsetX.alignment = TextAnchor.MiddleLeft; labelOffsetX.color = Color.black; var labelOffsetXLE = labelOffsetX.gameObject.AddComponent <LayoutElement>(); labelOffsetXLE.preferredWidth = labelXWidth; labelOffsetXLE.flexibleWidth = 0; InputField textBoxOffsetX = UIUtility.CreateInputField("OffsetXInput", itemPanel.transform); textBoxOffsetX.text = "0"; var textBoxOffsetXLE = textBoxOffsetX.gameObject.AddComponent <LayoutElement>(); textBoxOffsetXLE.preferredWidth = textBoxXYWidth; textBoxOffsetXLE.flexibleWidth = 0; Text labelOffsetY = UIUtility.CreateText("OffsetYText", itemPanel.transform, "Y"); labelOffsetY.alignment = TextAnchor.MiddleLeft; labelOffsetY.color = Color.black; var labelOffsetYLE = labelOffsetY.gameObject.AddComponent <LayoutElement>(); labelOffsetYLE.preferredWidth = labelYWidth; labelOffsetYLE.flexibleWidth = 0; InputField textBoxOffsetY = UIUtility.CreateInputField("OffsetYInput", itemPanel.transform); textBoxOffsetY.text = "0"; var textBoxOffsetYLE = textBoxOffsetY.gameObject.AddComponent <LayoutElement>(); textBoxOffsetYLE.preferredWidth = textBoxXYWidth; textBoxOffsetYLE.flexibleWidth = 0; //Scale Text labelScaleX = UIUtility.CreateText("ScaleXText", itemPanel.transform, "Scale X"); labelScaleX.alignment = TextAnchor.MiddleLeft; labelScaleX.color = Color.black; var labelScaleXLE = labelScaleX.gameObject.AddComponent <LayoutElement>(); labelScaleXLE.preferredWidth = labelXWidth; labelScaleXLE.flexibleWidth = 0; InputField textBoxScaleX = UIUtility.CreateInputField("ScaleXInput", itemPanel.transform); textBoxScaleX.text = "0"; var textBoxScaleXLE = textBoxScaleX.gameObject.AddComponent <LayoutElement>(); textBoxScaleXLE.preferredWidth = textBoxXYWidth; textBoxScaleXLE.flexibleWidth = 0; Text labelScaleY = UIUtility.CreateText("ScaleYText", itemPanel.transform, "Y"); labelScaleY.alignment = TextAnchor.MiddleLeft; labelScaleY.color = Color.black; var labelScaleYLE = labelScaleY.gameObject.AddComponent <LayoutElement>(); labelScaleYLE.preferredWidth = labelYWidth; labelScaleYLE.flexibleWidth = 0; InputField textBoxScaleY = UIUtility.CreateInputField("ScaleYInput", itemPanel.transform); textBoxScaleY.text = "0"; var textBoxScaleYLE = textBoxScaleY.gameObject.AddComponent <LayoutElement>(); textBoxScaleYLE.preferredWidth = textBoxXYWidth; textBoxScaleYLE.flexibleWidth = 0; var reset = UIUtility.CreateButton($"OffsetScaleResetButton", itemPanel.transform, "Reset"); var resetLE = reset.gameObject.AddComponent <LayoutElement>(); resetLE.preferredWidth = resetButtonWidth; resetLE.flexibleWidth = 0; } //Color properties { var itemPanel = UIUtility.CreatePanel("ColorPanel", contentList.transform); itemPanel.gameObject.AddComponent <CanvasGroup>(); itemPanel.gameObject.AddComponent <HorizontalLayoutGroup>().padding = padding; var label = UIUtility.CreateText("ColorLabel", itemPanel.transform, ""); label.alignment = TextAnchor.MiddleLeft; label.color = Color.black; var labelLE = label.gameObject.AddComponent <LayoutElement>(); labelLE.preferredWidth = labelWidth; labelLE.flexibleWidth = labelWidth; Text labelR = UIUtility.CreateText("ColorRText", itemPanel.transform, "R"); labelR.alignment = TextAnchor.MiddleLeft; labelR.color = Color.black; var labelRLE = labelR.gameObject.AddComponent <LayoutElement>(); labelRLE.preferredWidth = colorLabelWidth; labelRLE.flexibleWidth = 0; InputField textBoxR = UIUtility.CreateInputField("ColorRInput", itemPanel.transform); textBoxR.text = "0"; var textBoxRLE = textBoxR.gameObject.AddComponent <LayoutElement>(); textBoxRLE.preferredWidth = textBoxWidth; textBoxRLE.flexibleWidth = 0; Text labelG = UIUtility.CreateText("ColorGText", itemPanel.transform, "G"); labelG.alignment = TextAnchor.MiddleLeft; labelG.color = Color.black; var labelGLE = labelG.gameObject.AddComponent <LayoutElement>(); labelGLE.preferredWidth = colorLabelWidth; labelGLE.flexibleWidth = 0; InputField textBoxG = UIUtility.CreateInputField("ColorGInput", itemPanel.transform); textBoxG.text = "0"; var textBoxGLE = textBoxG.gameObject.AddComponent <LayoutElement>(); textBoxGLE.preferredWidth = textBoxWidth; textBoxGLE.flexibleWidth = 0; Text labelB = UIUtility.CreateText("ColorBText", itemPanel.transform, "B"); labelB.alignment = TextAnchor.MiddleLeft; labelB.color = Color.black; var labelBLE = labelB.gameObject.AddComponent <LayoutElement>(); labelBLE.preferredWidth = colorLabelWidth; labelBLE.flexibleWidth = 0; InputField textBoxB = UIUtility.CreateInputField("ColorBInput", itemPanel.transform); textBoxB.text = "0"; var textBoxBLE = textBoxB.gameObject.AddComponent <LayoutElement>(); textBoxBLE.preferredWidth = textBoxWidth; textBoxBLE.flexibleWidth = 0; Text labelA = UIUtility.CreateText("ColorAText", itemPanel.transform, "A"); labelA.alignment = TextAnchor.MiddleLeft; labelA.color = Color.black; var labelALE = labelA.gameObject.AddComponent <LayoutElement>(); labelALE.preferredWidth = colorLabelWidth; labelALE.flexibleWidth = 0; InputField textBoxA = UIUtility.CreateInputField("ColorAInput", itemPanel.transform); textBoxA.text = "0"; var textBoxALE = textBoxA.gameObject.AddComponent <LayoutElement>(); textBoxALE.preferredWidth = textBoxWidth; textBoxALE.flexibleWidth = 0; var reset = UIUtility.CreateButton($"ColorResetButton", itemPanel.transform, "Reset"); var resetLE = reset.gameObject.AddComponent <LayoutElement>(); resetLE.preferredWidth = resetButtonWidth; resetLE.flexibleWidth = 0; } //Float properties { var itemPanel = UIUtility.CreatePanel("FloatPanel", contentList.transform); itemPanel.gameObject.AddComponent <CanvasGroup>(); itemPanel.gameObject.AddComponent <HorizontalLayoutGroup>().padding = padding; var label = UIUtility.CreateText("FloatLabel", itemPanel.transform, ""); label.alignment = TextAnchor.MiddleLeft; label.color = Color.black; var labelLE = label.gameObject.AddComponent <LayoutElement>(); labelLE.preferredWidth = labelWidth; labelLE.flexibleWidth = labelWidth; Slider sliderFloat = UIUtility.CreateSlider("FloatSlider", itemPanel.transform); var sliderFloatLE = sliderFloat.gameObject.AddComponent <LayoutElement>(); sliderFloatLE.preferredWidth = sliderWidth; sliderFloatLE.flexibleWidth = 0; InputField textBoxFloat = UIUtility.CreateInputField("FloatInputField", itemPanel.transform); textBoxFloat.text = "0"; var textBoxFloatLE = textBoxFloat.gameObject.AddComponent <LayoutElement>(); textBoxFloatLE.preferredWidth = textBoxWidth; textBoxFloatLE.flexibleWidth = 0; var reset = UIUtility.CreateButton($"FloatResetButton", itemPanel.transform, "Reset"); var resetLE = reset.gameObject.AddComponent <LayoutElement>(); resetLE.preferredWidth = resetButtonWidth; resetLE.flexibleWidth = 0; } return(contentList.gameObject); }
// Token: 0x060132B3 RID: 78515 RVA: 0x004E2468 File Offset: 0x004E0668 public void SetReward(Goods r) { this.m_goods = r; this.m_goodsType = r.GoodsType; this.m_goodsId = r.Id; this.m_goodsCount = r.Count; this.m_iconImage.gameObject.SetActive(true); this.m_iconImage.transform.localScale = Vector3.one; this.m_iconImage.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetGoodsIconName(this.m_goodsType, this.m_goodsId)); this.m_iconImage.material = AssetUtility.Instance.GetAsset <Material>(UIUtility.GetGoodsIconMaterialName(this.m_goodsType, this.m_goodsId)); bool flag = UIUtility.IsGoodsHeroFragment(this.m_goodsType, this.m_goodsId); bool flag2 = UIUtility.IsGoodsGoblin(this.m_goodsType, this.m_goodsId); if (flag) { this.m_iconImage.transform.localScale = Vector3.one; } else if (flag2) { this.m_iconImage.transform.localScale = Vector3.one; } else if (this.m_goodsType == GoodsType.GoodsType_HeroSkin || this.m_goodsType == GoodsType.GoodsType_SoldierSkin) { this.m_iconImage.transform.localScale = Vector3.one; } else { this.m_iconImage.transform.localScale = Vector3.one * 0.7f; } int goodsRank = UIUtility.GetGoodsRank(this.m_goodsType, this.m_goodsId); if (this.m_crystalEffectGameObject != null) { this.m_crystalEffectGameObject.SetActive(this.m_goodsType == GoodsType.GoodsType_Crystal); } string goodsFrameName = UIUtility.GetGoodsFrameName(this.m_goodsType, this.m_goodsId); if (!string.IsNullOrEmpty(goodsFrameName)) { this.m_frameImage.gameObject.SetActive(true); this.m_frameImage.sprite = AssetUtility.Instance.GetSprite(goodsFrameName); if (this.m_ssrEffectGameObject != null) { this.m_ssrEffectGameObject.SetActive(UIUtility.IsRankSSR(goodsRank)); } if (this.m_ssrPieceEffectGameObject != null) { this.m_ssrPieceEffectGameObject.SetActive(false); } } else { this.m_frameImage.gameObject.SetActive(false); if (this.m_ssrEffectGameObject != null) { this.m_ssrEffectGameObject.SetActive(false); } if (this.m_ssrPieceEffectGameObject != null) { this.m_ssrPieceEffectGameObject.SetActive(flag && UIUtility.IsRankSSR(goodsRank)); } } if (this.m_countText != null) { this.m_countText.text = r.Count.ToString(); } if (this.m_nameText != null) { this.m_nameText.text = UIUtility.GetGoodsName(this.m_goodsType, this.m_goodsId); } if (this.m_haveGetGroupRoot != null) { this.m_haveGetGroupRoot.SetActive(false); } }
private void Awake() { UIUtility.AddEventListener(((Component)this.Btn_Yes).get_gameObject(), (UnityEvent)this.Btn_Yes.get_onClick(), new UIUtility.EventListener(this.OnClickButton)); UIUtility.AddEventListener(((Component)this.Btn_No).get_gameObject(), (UnityEvent)this.Btn_No.get_onClick(), new UIUtility.EventListener(this.OnClickButton)); }
// Token: 0x0600951B RID: 38171 RVA: 0x002ACBA4 File Offset: 0x002AADA4 public void Refresh() { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_Refresh_hotfix != null) { this.m_Refresh_hotfix.call(new object[] { this }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; ConfigDataEquipmentInfo equipmentInfo = this.m_equipmentInfoWrap.equipmentInfo; this.m_nameText.text = equipmentInfo.Name; this.m_itemIamge.sprite = AssetUtility.Instance.GetSprite(equipmentInfo.Icon); CommonUIStateController component = this.m_itemIamge.GetComponent <CommonUIStateController>(); if (this.m_equipmentInfoWrap.isUnlocked) { component.SetToUIState("Normal", false, true); } else { component.SetToUIState("Dark", false, true); } for (int i = 0; i < this.m_equipLimitContent.transform.childCount; i++) { this.m_equipLimitContent.transform.GetChild(i).gameObject.SetActive(false); } if (equipmentInfo.EquipCoditionDesc != string.Empty) { this.m_equipLimitGroupAnimation.SetToUIState("Unlimit", false, true); this.m_descEquipUnlimitText.text = equipmentInfo.EquipCoditionDesc; } else { List <int> armyIds = equipmentInfo.ArmyIds; if (armyIds.Count == 0) { this.m_equipLimitGroupAnimation.SetToUIState("Unlimit", false, true); this.m_descEquipUnlimitText.text = this.m_configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Msg_AllJobCanUse); } else if (armyIds[0] == -1) { this.m_equipLimitGroupAnimation.SetToUIState("CanNotUse", false, true); } else { this.m_equipLimitGroupAnimation.SetToUIState("EquipLimit", false, true); for (int j = 0; j < armyIds.Count; j++) { ConfigDataArmyInfo configDataArmyInfo = this.m_configDataLoader.GetConfigDataArmyInfo(armyIds[j]); if (j < this.m_equipLimitContent.transform.childCount) { Transform child = this.m_equipLimitContent.transform.GetChild(j); child.GetChild(0).GetComponent <Image>().sprite = AssetUtility.Instance.GetSprite(configDataArmyInfo.Icon); child.gameObject.SetActive(true); } else { GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.m_equipLimitContent.transform.GetChild(0).gameObject, this.m_equipLimitContent.transform, true); gameObject.transform.GetChild(0).GetComponent <Image>().sprite = AssetUtility.Instance.GetSprite(configDataArmyInfo.Icon); gameObject.SetActive(true); } } } } this.m_equipmentExplain.text = equipmentInfo.Desc; this.ClosePropDisplay(); this.SetEquipmentPropItem(equipmentInfo.Property1_ID, equipmentInfo.Property1_Value); this.SetEquipmentPropItem(equipmentInfo.Property2_ID, equipmentInfo.Property2_Value); if (equipmentInfo.SkillIds.Count == 0) { this.m_skillAnimation.SetToUIState("NoSkill", false, true); } else { this.m_skillAnimation.SetToUIState("HaveSkill", false, true); string text = null; ConfigDataSkillInfo configDataSkillInfo = this.m_configDataLoader.GetConfigDataSkillInfo(UIUtility.GetSkillIdFromEquipment(equipmentInfo, 1, ref text)); if (configDataSkillInfo != null) { this.m_skillContentAnimation.SetToUIState("Grey", false, true); if (equipmentInfo.SkillLevels.Count > 0) { if (equipmentInfo.SkillLevels[equipmentInfo.SkillLevels.Count - 1] > 1) { this.m_skillUnlockConditionText.text = string.Format(this.m_configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Msg_EnchantToLevel), equipmentInfo.SkillLevels[0]); } else { this.m_skillContentAnimation.SetToUIState("Normal", false, true); } } this.m_skillNameText.text = configDataSkillInfo.Name; this.m_skillDescText.text = configDataSkillInfo.Desc; ConfigDataHeroInfo configDataHeroInfo = this.m_configDataLoader.GetConfigDataHeroInfo(equipmentInfo.SkillHero); this.m_skillBelongText.gameObject.SetActive(configDataHeroInfo != null); this.m_skillBelongBGText.SetActive(configDataHeroInfo != null); if (configDataHeroInfo != null) { this.m_skillBelongText.text = configDataHeroInfo.Name + this.m_configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Equipment_SkillOwner); } } } }
protected override QState StateIdle(IQEvent qEvent) { if (qEvent.IsSignal(QSignals.Entry)) { _isRunState = false; _isIdleState = true; _isPauseState = false; _workcell.DisplayTitleMessage("System Idle"); if (HSTMachine.Workcell != null) { if (HSTMachine.Workcell.getPanelOperation() != null) { if (HSTMachine.Workcell.getPanelOperation().getOperationStatusPanel() != null) { UIUtility.Invoke(HSTMachine.Workcell.getPanelOperation().getOperationStatusPanel(), () => { HSTMachine.Workcell.getPanelOperation().getOperationMainPanel().labelOriginatorSignalName.Text = ""; HSTMachine.Workcell.getPanelOperation().getOperationMainPanel().labelOriginatorSignalSource.Text = ""; }); } } } } if (qEvent.IsSignal(QSignals.Exit)) { _isRunState = true; _isIdleState = false; _isPauseState = false; } if (qEvent.IsSignal(Active.SigStart)) { if (CommonFunctions.Instance.SystemInitializationCompleted) { _workcell.DisplayTitleMessage("System Run"); } if (HSTMachine.Workcell != null) { if (HSTMachine.Workcell.getPanelOperation() != null) { if (HSTMachine.Workcell.getPanelOperation().getOperationStatusPanel() != null) { UIUtility.Invoke(HSTMachine.Workcell.getPanelOperation().getOperationStatusPanel(), () => { HSTMachine.Workcell.getPanelOperation().getOperationMainPanel().getMeasurementTestUserControl().btnGetConversionBoardD.Enabled = false; HSTMachine.Workcell.getPanelOperation().getOperationMainPanel().getMeasurementTestUserControl().btnStartMeasurementTest.Enabled = false; HSTMachine.Workcell.getPanelOperation().getOperationMainPanel().getMeasurementTestUserControl().cboTabType.Enabled = false; HSTMachine.Workcell.getPanelOperation().getOperationStatusPanel().Enabled = false; HSTMachine.Workcell.getPanelOperation().getOperationModuleStatePanel().Enabled = false; HSTMachine.Instance.MainForm.getPanelNavigation().btnSetup.Enabled = false; HSTMachine.Instance.MainForm.getPanelNavigation().btnRecipe.Enabled = false; HSTMachine.Instance.MainForm.getPanelNavigation().btnDiagnostic.Enabled = false; }); } } } //lock (ServiceManager.ErrorHandler) { try { ServiceManager.ErrorHandler.AutoClearMessages(); Thread.Sleep(1000); } catch (Exception ex) { Console.Beep(); } } } return(base.StateIdle(qEvent)); }
private QState StateOutputTurnSectionReleaseCarrier(IQEvent qEvent) { LogStateInfo(_processName, System.Reflection.MethodBase.GetCurrentMethod().Name, qEvent); if (qEvent.IsSignal(SigStateJob)) { try { // allow turn table to settle before release to avoid boat hit the corner of the output conveyor. Thread.Sleep(HSTMachine.Workcell.SetupSettings.Delay.OutputTurnTableFullyStopDelay); _controller.InhibitOutputTurnStation(false); _controller.WaitOutputTurnStationPartCleared(); Thread.Sleep(HSTMachine.Workcell.SetupSettings.Delay.OutputTurnTableReleaseBoatDelay); //required to ensure boat is cleared from turn table _controller.InhibitOutputTurnStation(true); BoatLeavesOutputTurnStationProcessCycleTimeStopWatch.Stop(); if (HSTMachine.Workcell.HSTSettings.Install.EnableDebugLog) { CommonFunctions.Instance.LogProcessCycleTime("Boat Leaves Output Turn Station Process Cycle Time.csv", BoatLeavesOutputTurnStationProcessCycleTimeStopWatch.ElapsedTime); } Carrier currentCarrier; //remove the carrier from list (can remove at later stage if required) lock (CommonFunctions.Instance.InputCarriersLock) { currentCarrier = CommonFunctions.Instance.InputCarriers.Dequeue(); } if (CommonFunctions.Instance.OverallHGATestProcessCycleTimeStopWatch.Count > 0) { ProcessStopWatch PSW = CommonFunctions.Instance.OverallHGATestProcessCycleTimeStopWatch.First(); PSW.Stop(); CommonFunctions.Instance.LogProcessCycleTime("Overall HGA Test Process Cycle Time.csv", PSW.GetElapsedTime(), currentCarrier.CarrierID, PSW.GetStartTime(), PSW.GetStopTime()); if (!currentCarrier.IsPassThroughMode) { if (CommonFunctions.Instance.CarrierCycleTime != null) { CommonFunctions.Instance.CarrierCycleTime.TimeStampAtOutputTurnTable = DateTime.Now; if (CommonFunctions.Instance.CarrierCycleTimeQueue.Count > 0) { CarrierCycleTime FirstCarrierCycleTime = CommonFunctions.Instance.CarrierCycleTimeQueue.First(); CommonFunctions.Instance.CarrierCycleTime.OverallProcessCycleTimeSpan = CommonFunctions.Instance.CarrierCycleTime.TimeStampAtOutputTurnTable.Subtract(FirstCarrierCycleTime.TimeStampAtOutputTurnTable); CommonFunctions.Instance.CarrierCycleTimeQueue.Enqueue(CommonFunctions.Instance.CarrierCycleTime); CommonFunctions.Instance.CarrierCycleTimeQueue.Dequeue(); } else { CommonFunctions.Instance.CarrierCycleTime.OverallProcessCycleTimeSpan = new TimeSpan(0); CommonFunctions.Instance.CarrierCycleTimeQueue.Enqueue(CommonFunctions.Instance.CarrierCycleTime); } CommonFunctions.Instance.CarrierCycleTime.LogHGACount(); double CycleTimeElapsed = ((CommonFunctions.Instance.CarrierCycleTime.OverallProcessCycleTimeSpan.Hours * 3600) + (CommonFunctions.Instance.CarrierCycleTime.OverallProcessCycleTimeSpan.Minutes * 60) + CommonFunctions.Instance.CarrierCycleTime.OverallProcessCycleTimeSpan.Seconds + (CommonFunctions.Instance.CarrierCycleTime.OverallProcessCycleTimeSpan.Milliseconds / 1000.0)); if (CycleTimeElapsed > 0.0) { HSTMachine.Workcell.LoadCounter.CycleTime = CycleTimeElapsed; } } } CommonFunctions.Instance.OverallHGATestProcessCycleTimeStopWatch.Dequeue(); if (HSTMachine.Instance.MainForm.getPanelCommand().buttonRun.Enabled == false) { if (HSTMachine.Workcell != null) { if (HSTMachine.Workcell.getPanelOperation() != null) { if (HSTMachine.Workcell.getPanelOperation().getOperationStatusPanel() != null) { UIUtility.Invoke(HSTMachine.Workcell.getPanelOperation().getOperationMainPanel(), () => { HSTMachine.Workcell.getPanelOperation().getOperationMainPanel().getProductionCounterUserControl().txtSystemUPH.Text = HSTMachine.Workcell.LoadCounter.UPHString; HSTMachine.Workcell.getPanelOperation().getOperationMainPanel().getProductionCounterUserControl().txtSystemUPH2.Text = HSTMachine.Workcell.LoadCounter.UPH2String; HSTMachine.Workcell.getPanelOperation().getOperationMainPanel().getProductionCounterUserControl().txtSystemCycleTime.Text = HSTMachine.Workcell.LoadCounter.CycleTimeString; HSTMachine.Workcell.getPanelOperation().getOperationMainPanel().getProductionCounterUserControl().txtProcessedHGACount.Text = HSTMachine.Workcell.LoadCounter.ProcessedHGACountString; HSTMachine.Workcell.getPanelOperation().getOperationMainPanel().getProductionCounterUserControl().txtSamplingCounter.Text = HSTMachine.Workcell.LoadCounter.GetCurrentSamplingNumber.ToString("F2"); HSTMachine.Workcell.getPanelOperation().getOperationMainPanel().getProductionCounterUserControl().textBoxWRBrigeFailure.Text = HSTMachine.Workcell.LoadCounter.LastWRBridgePercentage.ToString("F2"); HSTMachine.Workcell.LoadCounter.Save(); }); } } } } } TransitionTo(StateOutputTurnSectionTurnBackward); } catch (Exception ex) { ButtonList btnlst = new ButtonList(ErrorButton.Retry, ErrorButton.Stop, ErrorButton.NoButton); TransitionToErrorState(btnlst, ex); } return(null); } return(stateRun); }
// Token: 0x06011DCA RID: 73162 RVA: 0x0049DDD8 File Offset: 0x0049BFD8 public void UpdateMailInfoList(List <Mail> mailInfoList, Mail selectedMail = null, bool needReSetScrollView = false) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_UpdateMailInfoListList ` 1MailBoolean_hotfix != null) { this.m_UpdateMailInfoListList ` 1MailBoolean_hotfix.call(new object[] { this, mailInfoList, selectedMail, needReSetScrollView }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; foreach (MailItemUIController mailItemUIController in this.m_itemUICtrlList) { mailItemUIController.gameObject.SetActive(false); } ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext; for (int i = 0; i < mailInfoList.Count; i++) { Mail mail = mailInfoList[i]; MailItemUIController mailItemUIController2; if (i >= this.m_itemUICtrlList.Count) { GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.m_mailItemPrefab); PrefabControllerCreater.CreateAllControllers(gameObject); gameObject.transform.SetParent(this.m_mailItemPrefab.transform.parent, false); mailItemUIController2 = gameObject.GetComponent <MailItemUIController>(); mailItemUIController2.EventOnMailItemButtonClick += this.OnMailItemButtonClick; this.m_itemUICtrlList.Add(mailItemUIController2); } else { mailItemUIController2 = this.m_itemUICtrlList[i]; } mailItemUIController2.UpdateMailInfo(mail, mail == selectedMail); } int num = projectLPlayerContext.CanAutoGetMailAttachment(); this.m_getAllButton.gameObject.SetActive(num == 0 || num == -500); if (needReSetScrollView) { this.ReSetScrollViewToTop(); } int num2 = 6; if (this.m_mailListPointBgContent.transform.childCount >= mailInfoList.Count + num2) { UIUtility.SetGameObjectChildrenActiveCount(this.m_mailListPointBgContent, mailInfoList.Count + num2); } else { List <GameObject> list = new List <GameObject>(); int num3 = mailInfoList.Count - this.m_mailListPointBgContent.transform.childCount + num2; for (int j = 0; j < num3; j++) { GameObject gameObject2 = UnityEngine.Object.Instantiate <GameObject>(this.m_mailListPointItem); gameObject2.SetActive(true); gameObject2.transform.SetParent(this.m_mailListPointBgContent.transform, false); list.Add(gameObject2); } } }
public void DownloadCountToStringTest(int num, string expected) { var s = UIUtility.NumberToString(num, CultureInfo.InvariantCulture); // force '.' decimal separator Assert.Equal(expected, s); }
protected override HtmlElement CreateDOMElementForDisplayMode(string displayMode) { string alt = string.IsNullOrEmpty(Properties.Alt) ? Properties.LabelText : Properties.Alt; alt = CUIUtility.SafeString(alt); switch (displayMode) { case "Small": // Create DOM elements _elmSmall = new Span(); _elmSmall.ClassName = "ms-cui-cbx"; _elmSmall.SetAttribute("mscui:controltype", ControlType); _elmSmallCheckboxInput = new Input(); _elmSmallCheckboxInput.Type = "checkbox"; _elmSmallCheckboxInput.ClassName = "ms-cui-cbx-input"; _elmSmallCheckboxInput.Id = _id + "-Small-checkbox"; if (string.IsNullOrEmpty(Properties.ToolTipTitle)) { _elmSmallCheckboxInput.Title = alt; } _elmSmallCheckboxInput.SetAttribute("role", AriaRole); Utility.SetAriaTooltipProperties(Properties, _elmSmallCheckboxInput); // Set up event handlers AttachEvents(_elmSmallCheckboxInput, null); //Build DOM Structure _elmSmall.AppendChild(_elmSmallCheckboxInput); return(_elmSmall); case "Medium": // Create DOM elements _elmMedium = new Span(); _elmMedium.ClassName = "ms-cui-cbx"; _elmMedium.SetAttribute("mscui:controltype", ControlType); _elmMediumCheckboxInput = new Input(); _elmMediumCheckboxInput.Type = "checkbox"; _elmMediumCheckboxInput.ClassName = "ms-cui-cbx-input"; _elmMediumCheckboxInput.Id = _id + "-Medium-checkbox"; if (string.IsNullOrEmpty(Properties.ToolTipTitle)) { _elmMediumCheckboxInput.Title = alt; } _elmMediumCheckboxInput.SetAttribute("role", AriaRole); Utility.SetAriaTooltipProperties(Properties, _elmMediumCheckboxInput); bool hasLabel = false; if (!string.IsNullOrEmpty(Properties.LabelText)) { _elmMediumLabel = new MSLabel(); if (BrowserUtility.InternetExplorer7) { _elmMediumLabel.SetAttribute("htmlFor", _id + "-Medium-checkbox"); } else { _elmMediumLabel.SetAttribute("for", _id + "-Medium-checkbox"); } UIUtility.SetInnerText(_elmMediumLabel, Properties.LabelText); hasLabel = true; } // Set up event handlers AttachEvents(_elmMediumCheckboxInput, _elmMediumLabel); // Build DOM Structure _elmMedium.AppendChild(_elmMediumCheckboxInput); if (hasLabel) { _elmMedium.AppendChild(_elmMediumLabel); } return(_elmMedium); default: EnsureValidDisplayMode(displayMode); return(null); } }
public override void Init() { base.Init(); msgWindowArgs = args as MessageWindowArgs; if (msgWindowArgs == null) { msgWindowArgs = new MessageWindowArgs(); } okBtn = uiTransform.Find("ButtonOK").gameObject; cancelBtn = uiTransform.Find("ButtonCaccel").gameObject; ok2Btn = uiTransform.Find("ButtonOK2").gameObject; msgText = uiTransform.Find("TextMessage").gameObject; UIUtility.SetText(msgText, msgWindowArgs.messageText); if (msgWindowArgs.btnNumber == 2) { ok2Btn.SetActive(false); okBtn.SetActive(true); cancelBtn.SetActive(true); UIUtility.RegisterClickedEvent( okBtn, () => { WindowManager.Instance.GoBack(); if (msgWindowArgs.onOkClicked != null) { msgWindowArgs.onOkClicked(); } }); UIUtility.RegisterClickedEvent( cancelBtn, () => { WindowManager.Instance.GoBack(); if (msgWindowArgs.onCancelClicked != null) { msgWindowArgs.onCancelClicked(); } }); } else { ok2Btn.SetActive(true); okBtn.SetActive(false); cancelBtn.SetActive(false); UIUtility.RegisterClickedEvent( ok2Btn, () => { if (msgWindowArgs.onOkClicked != null) { msgWindowArgs.onOkClicked(); } WindowManager.Instance.GoBack(); }); } }
internal static (BlueprintFeature, BlueprintFeature) Create(String mysteryDescription, BlueprintFeature classSkillFeat) { var revelations = new List <BlueprintFeature>() { CreateChannel(), CreateCombatHealer(), CreateDelayAffliction(), CreateEnergyBody(), CreateEnhancedCures(), CreateHealingHands(), CreateLifeLink(), CreateLifeSense(), CreateSafeCuring(), CreateSpiritBoost() }; var skill1 = StatType.SkillAthletics; var skill2 = StatType.SkillLoreNature; var description = new StringBuilder(mysteryDescription).AppendLine(); description.AppendLine(string.Format(RES.LifeMysteryProgressionDescription_info, UIUtility.GetStatText(skill1), UIUtility.GetStatText(skill2))); foreach (var r in revelations) { description.AppendLine(string.Format(RES.SingleLineDescription_info, r.Name)); } var mystery = Helpers.CreateProgression("MysteryLifeProgression", RES.LifeMysteryProgressionName_info, description.ToString(), "a2c3c801deb84bc9bab6bd35e5290d5d", Helpers.GetIcon("d5847cad0b0e54c4d82d6c59a3cda6b0"), // channel energy // a79013ff4bcd4864cb669622a29ddafb UpdateLevelUpDeterminatorText.Group, AddClassSkillIfHasFeature.Create(skill1, classSkillFeat), AddClassSkillIfHasFeature.Create(skill2, classSkillFeat)); mystery.Classes = oracleArray; var spells = Bloodlines.CreateSpellProgression(mystery, new String[] { "f6f95242abdfac346befd6f4f6222140", // remove sickness (should be: detect undead) "e84fc922ccf952943b5240293669b171", // lesser restoration "e7240516af4241b42b2cd819929ea9da", // neutralize poison "f2115ac1148256b4ba20788f7e966830", // restoration "d5847cad0b0e54c4d82d6c59a3cda6b0", // breath of life "5da172c4c89f9eb4cbb614f3a67357d3", // heal "fafd77c6bfa85c04ba31fdc1c962c914", // greater restoration "867524328b54f25488d371214eea0d90", // mass heal //FireSpells.meteorSwarm.AssetGuid, // if miracle does not work (should be: true resurrection) //Spells.MassResurrectionId, // true rez //"bd623ae7179a4d19a40b977ffca1b84g" //true rez WishSpells.miracle.AssetGuid, // miracle (should be: true resurrection) }); var entries = new List <LevelEntry>(); for (int level = 1; level <= 9; level++) { entries.Add(Helpers.LevelEntry(level * 2, spells[level - 1])); } var finalRevelation = CreateFinalRevelation(); entries.Add(Helpers.LevelEntry(20, finalRevelation)); mystery.LevelEntries = entries.ToArray(); mystery.UIGroups = Helpers.CreateUIGroups(new List <BlueprintFeatureBase>(spells) { finalRevelation }); var revelation = Helpers.CreateFeatureSelection("MysteryLifeRevelation", RES.LifeRevelationFeatureName_info, mystery.Description, "6949da6445394dabbfb327c000706122", null, FeatureGroup.None, mystery.PrerequisiteFeature()); revelation.Mode = SelectionMode.OnlyNew; revelation.SetFeatures(revelations); return(mystery, revelation); }
/// <summary> /// Called when settings are refreshed. /// </summary> protected override void OnRefreshSettings() { if (_settingsObject == null) { return; } SettingsConverter.CopyConfiguration(_settingsObject, ref _editableObject); DisableReadonly(_editableObject); int selectedListViewIndex = -1; if (_cfgListView.SelectedIndices.Count > 0) { selectedListViewIndex = _cfgListView.SelectedIndices[0]; } Clear(); if (_settingsObject == null) { return; } PropertyInfo[] propertyInfos = _editableObject.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance); List <KeyValuePair <string, object> > selectableList = new List <KeyValuePair <string, object> >(); foreach (PropertyInfo t in propertyInfos) { if (t == null) { continue; } if (t.PropertyType.IsPrimitive || t.PropertyType.IsValueType || t.PropertyType == typeof(string)) { continue; } object value = t.GetValue(_editableObject, null); if (value == null) { continue; } selectableList.Add(new KeyValuePair <string, object>(t.Name, value)); } UIUtility.Invoke(this, () => { btnSave.Enabled = true; foreach (KeyValuePair <string, object> kv in selectableList) { _cfgListView.Items.Add(CreateListViewItem(kv.Key, kv.Value)); } if (selectedListViewIndex > -1) { _cfgListView.Items[selectedListViewIndex].Selected = true; } }); }
protected void InitUI() { if (ContextMenu != null) { return; } if (CustomBase.Instance == null) { return; } UIUtility.Init(nameof(KK_Plugins)); ContextMenu = UIUtility.CreateNewUISystem("ContextMenu"); ContextMenu.GetComponent <CanvasScaler>().referenceResolution = new Vector2(1920f, 1080f); ContextMenu.transform.SetParent(CustomBase.Instance.transform); ContextMenu.sortingOrder = 900; ContextMenuCanvasGroup = ContextMenu.GetOrAddComponent <CanvasGroup>(); SetMenuVisibility(false); ContextMenuPanel = UIUtility.CreatePanel("Panel", ContextMenu.transform); ContextMenuPanel.color = new Color(0.5f, 0.5f, 0.5f, 0.5f); ContextMenuPanel.transform.SetRect(0.05f, 0.05f, UIWidth, UIHeight); UIUtility.AddOutlineToObject(ContextMenuPanel.transform, Color.black); var scrollRect = UIUtility.CreateScrollView("ContextMenuWindow", ContextMenuPanel.transform); scrollRect.transform.SetRect(0f, 0f, 1f, 1f, marginSize, marginSize, 0.5f - marginSize, -marginSize); scrollRect.gameObject.AddComponent <Mask>(); scrollRect.content.gameObject.AddComponent <VerticalLayoutGroup>(); scrollRect.content.gameObject.AddComponent <ContentSizeFitter>().verticalFit = ContentSizeFitter.FitMode.PreferredSize; scrollRect.verticalScrollbar.GetComponent <RectTransform>().offsetMin = new Vector2(scrollOffsetX, 0f); scrollRect.viewport.offsetMax = new Vector2(scrollOffsetX, 0f); scrollRect.movementType = ScrollRect.MovementType.Clamped; scrollRect.GetComponent <Image>().color = rowColor; { var contentItem = UIUtility.CreatePanel("BlacklistContent", scrollRect.content.transform); contentItem.gameObject.AddComponent <LayoutElement>().preferredHeight = panelHeight; contentItem.gameObject.AddComponent <Mask>(); contentItem.color = rowColor; var itemPanel = UIUtility.CreatePanel("BlacklistPanel", contentItem.transform); itemPanel.color = rowColor; itemPanel.gameObject.AddComponent <CanvasGroup>(); itemPanel.gameObject.AddComponent <HorizontalLayoutGroup>().padding = padding; BlacklistButton = UIUtility.CreateButton("BlacklistButton", itemPanel.transform, "Hide this item"); BlacklistButton.gameObject.AddComponent <LayoutElement>(); var text = BlacklistButton.GetComponentInChildren <Text>(); text.resizeTextForBestFit = false; text.fontSize = 26; } { var contentItem = UIUtility.CreatePanel("BlacklistModContent", scrollRect.content.transform); contentItem.gameObject.AddComponent <LayoutElement>().preferredHeight = panelHeight; contentItem.gameObject.AddComponent <Mask>(); contentItem.color = rowColor; var itemPanel = UIUtility.CreatePanel("BlacklistModPanel", contentItem.transform); itemPanel.color = rowColor; itemPanel.gameObject.AddComponent <CanvasGroup>(); itemPanel.gameObject.AddComponent <HorizontalLayoutGroup>().padding = padding; BlacklistModButton = UIUtility.CreateButton("BlacklistModButton", itemPanel.transform, "Hide all items from this mod"); BlacklistModButton.gameObject.AddComponent <LayoutElement>(); var text = BlacklistModButton.GetComponentInChildren <Text>(); text.resizeTextForBestFit = false; text.fontSize = 26; } { var contentItem = UIUtility.CreatePanel("InfoContent", scrollRect.content.transform); contentItem.gameObject.AddComponent <LayoutElement>().preferredHeight = panelHeight; contentItem.gameObject.AddComponent <Mask>(); contentItem.color = rowColor; var itemPanel = UIUtility.CreatePanel("InfoPanel", contentItem.transform); itemPanel.color = rowColor; itemPanel.gameObject.AddComponent <CanvasGroup>(); itemPanel.gameObject.AddComponent <HorizontalLayoutGroup>().padding = padding; InfoButton = UIUtility.CreateButton("InfoButton", itemPanel.transform, "Print item info"); InfoButton.gameObject.AddComponent <LayoutElement>(); var text = InfoButton.GetComponentInChildren <Text>(); text.resizeTextForBestFit = false; text.fontSize = 26; } { var contentItem = UIUtility.CreatePanel("FilterContent", scrollRect.content.transform); contentItem.gameObject.AddComponent <LayoutElement>().preferredHeight = panelHeight; contentItem.gameObject.AddComponent <Mask>(); contentItem.color = rowColor; var itemPanel = UIUtility.CreatePanel("FilterPanel", contentItem.transform); itemPanel.gameObject.AddComponent <CanvasGroup>(); itemPanel.gameObject.AddComponent <HorizontalLayoutGroup>().padding = padding; itemPanel.color = rowColor; var label = UIUtility.CreateText("FilterText", itemPanel.transform, "Displaying:"); label.color = Color.white; label.resizeTextForBestFit = false; label.fontSize = 26; label.alignment = TextAnchor.MiddleCenter; var labelLE = label.gameObject.AddComponent <LayoutElement>(); labelLE.preferredWidth = 20f; labelLE.flexibleWidth = 20f; FilterDropdown = UIUtility.CreateDropdown("FilterDropdown", itemPanel.transform); FilterDropdown.transform.SetRect(0f, 0f, 0f, 1f, 0f, 0f, 100f); Text captionText = FilterDropdown.captionText; captionText.transform.SetRect(0f, 0f, 1f, 1f, 0f, 2f, -15f, -2f); captionText.resizeTextForBestFit = false; captionText.fontSize = 26; captionText.alignment = TextAnchor.MiddleCenter; FilterDropdown.itemText.fontStyle = FontStyle.Bold; FilterDropdown.options.Clear(); FilterDropdown.options.Add(new Dropdown.OptionData("Filtered List")); FilterDropdown.options.Add(new Dropdown.OptionData("Hidden Items")); FilterDropdown.options.Add(new Dropdown.OptionData("All Items")); FilterDropdown.value = 0; FilterDropdown.captionText.text = "Filtered List"; var dropdownEnabledLE = FilterDropdown.gameObject.AddComponent <LayoutElement>(); dropdownEnabledLE.preferredWidth = 30; dropdownEnabledLE.flexibleWidth = 30; FilterDropdown.onValueChanged.AddListener(value => { ChangeListFilter((ListVisibilityType)value); SetMenuVisibility(false); }); } }
private void FrmClientCertificateList_Load(object sender, EventArgs e) { //set title lblMenu.Text = programName; this.Text = "[" + programID + "] " + programName; uIUtility = new UIUtility(dgvList, Insertable, Copyable, Modifiable, dummyColumns); uIUtility.CheckPagination(btnFirst, btnPrev, btnNext, btnLast, lblcurrentPage.Text, lblTotalPages.Text); uIUtility.ResetCheckBoxSize(); //adjust checkbox sizes uIUtility.DummyTable(); // add dummy table to merge columns uIUtility.DisableAutoSort(); //disable autosort PopulateDropdowns(); //Theme this.pTitle.BackColor = Properties.Settings.Default.JimugoBgColor; this.lblMenu.ForeColor = Properties.Settings.Default.jimugoForeColor; try { this.Font = Properties.Settings.Default.jimugoFont; } catch (Exception) { } this.dgvList.ColumnHeadersDefaultCellStyle.BackColor = Properties.Settings.Default.GridHeaderColor; this.dgvList.ColumnHeadersDefaultCellStyle.ForeColor = Properties.Settings.Default.GridHeaderFontColor; rdoAll.Checked = true; #region FromRegisterCompleteNotificationScreen if (fy != null) { uIUtility.MetaData.Offset = 0; try { uIUtility.MetaData.Limit = int.Parse(cboLimit.SelectedValue.ToString()); } catch (Exception) { uIUtility.MetaData.Limit = 0; } try { fy = txtFY.Text; company_no_box = txtCompanyNoBox.Text; client_certificate_no = txtClientCertificateNo.Text; if (rdoAll.Checked) { distributionStatus = rdoAll.Text; } if (rdoProcessing.Checked) { distributionStatus = rdoProcessing.Text; } if (optComplete.Checked) { distributionStatus = optComplete.Text; } if (!uIUtility.IsInModifyMode()) { BindGrid(); } } catch (Exception) { } } #endregion }
private void StaminaFull() { UIUtility.SystemMessage((string)null, LocalizedText.Get("sys.STAMINAFULL"), (UIUtility.DialogResultEvent)(go => {}), (GameObject)null, false, -1); }
internal static (BlueprintFeature, BlueprintFeature) Create(String mysteryDescription, BlueprintFeature classSkillFeat) { var skill1 = StatType.SkillPerception; var skill2 = StatType.SkillKnowledgeArcana; var mystery = Helpers.CreateFeatureSelection("MysteryDragonSelection", "Dragon Mystery", $"{mysteryDescription}\n" + "Oracles who draw their power from the mysterious and primal might of dragons are usually solitary folk. They are deep thinkers and often quick of wit, but prideful and equally quick-tempered.\n" + "Upon selecting this mystery, the oracle must select an energy type (acid, cold, electricity, or fire) to be her associated element, which impacts several revelations.\n" + $"Class skills: {UIUtility.GetStatText(skill1)}, {UIUtility.GetStatText(skill2)}", "aec53bfbee334a0e93b90a283d4e308d", Helpers.GetIcon("da48f9d7f697ae44ca891bfc50727988"), // Blood of Dragons selection UpdateLevelUpDeterminatorText.Group); var classSkills = new BlueprintComponent[] { AddClassSkillIfHasFeature.Create(skill1, classSkillFeat), AddClassSkillIfHasFeature.Create(skill2, classSkillFeat) }; BlueprintProgression acid, cold, electric, fire; mystery.SetFeatures( acid = CreateMysteryForEnergy(mystery, classSkills, DamageEnergyType.Acid, SpellDescriptor.Acid, "8e339ab3898fdd14b879753eaaae933d", "3d77ee3fc4913c44b9df7c5bbcdc4906"), // copper dragon acid breath, protection from acid cold = CreateMysteryForEnergy(mystery, classSkills, DamageEnergyType.Cold, SpellDescriptor.Cold, "cd36514cf1f38f84a977a265cec113ae", "021d39c8e0eec384ba69140f4875e166"), // silver dragon cold breath, protection from cold electric = CreateMysteryForEnergy(mystery, classSkills, DamageEnergyType.Electricity, SpellDescriptor.Electricity, "f97e345b9f474764fae2b7eff1c1a1c7", "e24ce0c3e8eaaaf498d3656b534093df"), // bronze dragon elecric breath, protection from electric fire = CreateMysteryForEnergy(mystery, classSkills, DamageEnergyType.Fire, SpellDescriptor.Fire, "2a711cd134b91d34ab027b50d721778b", "3f9605134d34e1243b096e1f6cb4c148")); // gold dragon fire breath, protection from fire var energyFeats = mystery.Features; var revelations = new List <BlueprintFeature> { CreateBreathWeapon(energyFeats), CreateDragonMagic(), CreateDragonSenses(), CreateFormOfTheDragon(), CreatePresenceOfDragons(), CreateScaledToughness(), CreateTailSwipe(), CreateWingsOfTheDragon(), }; var description = new StringBuilder(mystery.Description).AppendLine(); description.AppendLine("An oracle with the dragon mystery can choose from any of the following revelations:"); foreach (var r in revelations) { description.AppendLine($"• {r.Name}"); } revelations.AddRange(new BlueprintFeature[] { CreateDragonResistanceToEnergy(acid, DamageEnergyType.Acid, "fedc77de9b7aad54ebcc43b4daf8decd"), // resist acid CreateDragonResistanceToEnergy(cold, DamageEnergyType.Cold, "5368cecec375e1845ae07f48cdc09dd1"), // resist cold CreateDragonResistanceToEnergy(electric, DamageEnergyType.Electricity, "90987584f54ab7a459c56c2d2f22cee2"), // resist electric CreateDragonResistanceToEnergy(fire, DamageEnergyType.Fire, "ddfb4ac970225f34dbff98a10a4a8844"), // resist fire CreateTalonsOfTheDragon(acid, DamageEnergyType.Acid, "b522759a265897b4f8f7a1a180a692e4"), // acid (copper) CreateTalonsOfTheDragon(cold, DamageEnergyType.Cold, "c7d2f393e6574874bb3fc728a69cc73a"), // cold (silver) CreateTalonsOfTheDragon(electric, DamageEnergyType.Electricity, "7e0f57d8d00464441974e303b84238ac"), // electricity (bronze) CreateTalonsOfTheDragon(fire, DamageEnergyType.Fire, "6c67ef823db8d7d45bb0ef82f959743d"), // fire (gold) }); description.AppendLine($"• Draconic Resistances"); description.AppendLine($"• Talons of the Dragon"); var descriptionStr = description.ToString(); mystery.SetDescription(descriptionStr); foreach (var choice in mystery.Features) { choice.SetDescription(descriptionStr); } var revelation = Helpers.CreateFeatureSelection("MysteryDragonRevelation", "Dragon Revelation", mystery.Description, "b5bff56fe6cc4ca192df65f5ced050c9", null, FeatureGroup.None, mystery.PrerequisiteFeature()); revelation.Mode = SelectionMode.OnlyNew; revelations.Add(UndoSelection.Feature.Value); revelation.SetFeatures(revelations); return(mystery, revelation); }
protected override HtmlElement CreateDOMElementForDisplayMode(string displayMode) { string forId = Properties.ForId; string label = Properties.LabelText; switch (displayMode) { case "Medium": if (!string.IsNullOrEmpty(forId)) { _elmDefault = new MSLabel(); if (BrowserUtility.InternetExplorer7) { _elmDefault.SetAttribute("htmlFor", forId); } else { _elmDefault.SetAttribute("for", forId); } } else { _elmDefault = new Span(); } _elmDefault.SetAttribute("mscui:controltype", ControlType); _elmDefault.ClassName = "ms-cui-ctl-small ms-cui-fslb"; if (!string.IsNullOrEmpty(Properties.Image16by16)) { _elmDefaultIcon = new Image(); Span elmDefaultIconCont = Utility.CreateClusteredImageContainerNew( ImgContainerSize.Size16by16, Properties.Image16by16, Properties.Image16by16Class, _elmDefaultIcon, true, false, Properties.Image16by16Top, Properties.Image16by16Left); Span elmDefaultIconContainer = new Span(); elmDefaultIconContainer.ClassName = "ms-cui-ctl-iconContainer"; elmDefaultIconContainer.AppendChild(elmDefaultIconCont); _elmDefault.AppendChild(elmDefaultIconContainer); } _elmDefaultLabel = new Span(); _elmDefaultLabel.ClassName = "ms-cui-ctl-mediumlabel"; if (!string.IsNullOrEmpty(label)) { UIUtility.SetInnerText(_elmDefaultLabel, label); } _elmDefault.AppendChild(_elmDefaultLabel); return(_elmDefault); case "Small": if (!string.IsNullOrEmpty(forId)) { _elmSmall = new MSLabel(); if (BrowserUtility.InternetExplorer7) { _elmSmall.SetAttribute("htmlFor", forId); } else { _elmSmall.SetAttribute("for", forId); } } else { _elmSmall = new Span(); } _elmSmall.SetAttribute("mscui:controltype", ControlType); _elmSmall.ClassName = "ms-cui-ctl-small ms-cui-fslb"; if (string.IsNullOrEmpty(Properties.Image16by16)) { throw new ArgumentNullException("Image16by16", "Small display mode must have an icon set"); } _elmSmallIcon = new Image(); Span elmSmallIconCont = Utility.CreateClusteredImageContainerNew( ImgContainerSize.Size16by16, Properties.Image16by16, Properties.Image16by16Class, _elmSmallIcon, true, false, Properties.Image16by16Top, Properties.Image16by16Left); if (!string.IsNullOrEmpty(label)) { _elmSmallIcon.Alt = label; } Span elmSmallIconContainer = new Span(); elmSmallIconContainer.ClassName = "ms-cui-ctl-iconContainer"; elmSmallIconContainer.AppendChild(elmSmallIconCont); _elmSmall.AppendChild(elmSmallIconContainer); return(_elmSmall); default: EnsureValidDisplayMode(displayMode); break; } return(null); }
/// <summary> /// 繪製轉場圖片 /// </summary> /// <param name="_step">繪製完後要進入的腳本位置</param> /// <param name="sceneName">Scene名稱</param> private static void DrawSlidePic(int _step) { GameObject parent; switch (KK_FBIOpenUp.nowGameMode) { case KK_FBIOpenUp.GameMode.Studio: parent = GameObject.Find("StudioScene/Canvas Main Menu"); break; case KK_FBIOpenUp.GameMode.MainGame: parent = GameObject.Find("ActionScene/UI/ActionMenuCanvas/ModeAnimation"); break; case KK_FBIOpenUp.GameMode.Maker: parent = GameObject.Find("CustomScene/CustomRoot/FrontUIGroup/CustomUIGroup/CvsCoordinateType/redBagBtn"); break; //FreeH死都不成功,放棄 //case KK_FBIOpenUp.GameMode.FreeH: // parent = GameObject.Find("CommonSpace"); // break; default: parent = GameObject.FindObjectsOfType <GameObject>()[0]; //Not tested break; } GameObject gameObject = new GameObject(); gameObject.transform.SetParent(parent.transform, false); gameObject.SetActive(false); if (null != shiftPicture) { GameObject.Destroy(shiftPicture.Transform.parent.gameObject); shiftPicture.image = null; shiftPicture.video = null; shiftPicture = null; } shiftPicture = new ShiftPicture(); //如果影片不存在,用熊吉代替 bool noVideoFallback = _step == 20 && null == KK_FBIOpenUp.videoPath; if (noVideoFallback) { _step = 2; } switch (_step) { case 1: //小學生真是太棒了 shiftPicture.type = ShiftPicture.Type.picture; shiftPicture.image = UIUtility.CreateImage("", gameObject.transform, Extension.Extension.LoadNewSprite("KK_FBIOpenUp.Resources.saikodaze.jpg", 800, 657)); shiftPicture.image.rectTransform.sizeDelta = new Vector2(Screen.height / 1.5f * 800 / 657, Screen.height / 1.5f); Right2Center(); break; case 2: //熊吉逮捕 shiftPicture.type = ShiftPicture.Type.picture; shiftPicture.image = UIUtility.CreateImage("", gameObject.transform, Extension.Extension.LoadNewSprite("KK_FBIOpenUp.Resources.Kumakichi.jpg", 640, 480)); shiftPicture.image.rectTransform.sizeDelta = new Vector2(Screen.height / 1.5f * 640 / 480, Screen.height / 1.5f); Left2Center(); break; case 10: //幼女退光線 shiftPicture.type = ShiftPicture.Type.picture; shiftPicture.image = UIUtility.CreateImage("", gameObject.transform, Extension.Extension.LoadNewSprite("KK_FBIOpenUp.Resources.beam.png", 700, 700)); shiftPicture.image.rectTransform.sizeDelta = new Vector2(Screen.height / 1.25f, Screen.height / 1.25f); Right2Center(); break; case 20: //FBI Open Up影片 shiftPicture.type = ShiftPicture.Type.video; shiftPicture.video = UIUtility.CreateRawImage("", gameObject.transform); shiftPicture.video.rectTransform.sizeDelta = new Vector2(Screen.height / 1.5f, Screen.height / 1.5f); UnityEngine.Video.VideoPlayer videoPlayer = gameObject.AddComponent <UnityEngine.Video.VideoPlayer>(); AudioSource audioSource = gameObject.AddComponent <AudioSource>(); videoPlayer.playOnAwake = false; audioSource.playOnAwake = false; videoPlayer.renderMode = UnityEngine.Video.VideoRenderMode.APIOnly; //videoPlayer.url= "../UserData/audio/FBI.mp4"; videoPlayer.url = KK_FBIOpenUp.videoPath; //Set Audio Output to AudioSource videoPlayer.audioOutputMode = UnityEngine.Video.VideoAudioOutputMode.AudioSource; //Assign the Audio from Video to AudioSource to be played videoPlayer.EnableAudioTrack(0, true); videoPlayer.SetTargetAudioSource(0, audioSource); Logger.LogDebug($"{videoPlayer.url}"); videoPlayer.isLooping = true; //先把他移到螢幕外啟用,否則未啟用無法Prepare,而直接啟用會出現白色畫面 shiftPicture.Transform.position = new Vector3(-2 * Screen.width, Screen.height / 2); gameObject.SetActive(true); videoPlayer.Prepare(); videoPlayer.prepareCompleted += (source) => { ///TODO 這實際上沒有辦法真的catch到錯誤,待修 if (videoPlayer.texture == null) { Logger.LogError("Video not found"); GameObject.Destroy(shiftPicture.Transform.parent.gameObject); shiftPicture.video = null; shiftPicture = null; _step = 0; return; } shiftPicture.video.texture = videoPlayer.texture; videoTimer = 2; videoPlayer.Play(); audioSource.Play(); //影片太大聲QQ audioSource.volume = KK_FBIOpenUp.videoVolume; Left2Center(); }; break; } //如果影片不存在,用熊吉代替 if (noVideoFallback) { _step = 20; } step = _step; Logger.LogDebug("Draw Slide Pic"); void Right2Center() { //Right To Center shiftPicture.Transform.position = new Vector3(Screen.width + shiftPicture.Width / 2, Screen.height / 2); shiftPicture.targetPosition = new Vector3(Screen.width / 2, Screen.height / 2); gameObject.SetActive(true); } void Left2Center() { //Left To Center shiftPicture.Transform.position = new Vector3(-1 * (Screen.width + shiftPicture.Width / 2), Screen.height / 2); shiftPicture.targetPosition = new Vector3(Screen.width / 2, Screen.height / 2); gameObject.SetActive(true); } }
private QState StatePickHGAZDown(IQEvent qEvent) { LogStateInfo(_processName, System.Reflection.MethodBase.GetCurrentMethod().Name, qEvent); if (qEvent.IsSignal(SigStateJob) || qEvent.IsSignal(_sigTimeout)) { try { if (_controller.IsSafeToMoveDown(false)) { OutputEEMovesDownToPrecisorNestPickPositionProcessCycleTimeStopWatch.Start(); OutputEEDownToPrecisorNestPositionTravellingTimeStopWatch.Start(); bool isUp = (_controller.IncomingCarrier.HGATabType == HGAProductTabType.Up); _controller.PickHGAMoveDown(isUp); HSTMachine.Workcell.Process.PrecisorStationProcess.Controller.TurnOffVaccuumChannels(); Thread.Sleep(HSTMachine.Workcell.SetupSettings.Delay.VacuumOffAtPrecisorBeforeOutputEEPick);//original value 250 OutputEEDownToPrecisorNestPositionTravellingTimeStopWatch.Stop(); if (HSTMachine.Workcell != null) { if (HSTMachine.Workcell.getPanelOperation() != null) { if (HSTMachine.Workcell.getPanelOperation().getOperationStatusPanel() != null) { UIUtility.Invoke(HSTMachine.Workcell.getPanelOperation().getOperationStatusPanel(), () => { HSTMachine.Workcell.getPanelOperation().getOperationStatusPanel().labelOutputDownToPrecisorNestPositionTravellingTime.Text = OutputEEDownToPrecisorNestPositionTravellingTimeStopWatch.ElapsedTime.ToString(); }); } } } OutputEEMovesDownToPrecisorNestPickPositionProcessCycleTimeStopWatch.Stop(); if (HSTMachine.Workcell.HSTSettings.Install.EnableDebugLog) { CommonFunctions.Instance.LogProcessCycleTime("Output EE Moves Down To Precisor Nest Pick Position Process Cycle Time.csv", OutputEEMovesDownToPrecisorNestPickPositionProcessCycleTimeStopWatch.ElapsedTime); if (CommonFunctions.Instance.PrecisorNestStabilityAtOutputStationProcessCycleTimeStopWatch.Count > 0) { ProcessStopWatch PSW = CommonFunctions.Instance.PrecisorNestStabilityAtOutputStationProcessCycleTimeStopWatch.First(); PSW.Stop(); CommonFunctions.Instance.LogProcessCycleTime("Precisor Nest Stability At Output Station Process Cycle Time.csv", PSW.GetElapsedTime(), PSW.CarrierID, PSW.GetStartTime(), PSW.GetStopTime()); CommonFunctions.Instance.PrecisorNestStabilityAtOutputStationProcessCycleTimeStopWatch.Dequeue(); } } OutputEEPicksUpHGAFromPrecisorNestProcessCycleTimeStopWatch.Start(); TransitionTo(statePickHGACheckVacuumAndMoveUp); } else { //lai: reduce from 200 march12-2016 _qTimer.FireIn(new TimeSpan(0, 0, 0, 0, 150), new QEvent(_sigTimeout)); return(null); } } catch (Exception ex) { ButtonList btnlst = new ButtonList(ErrorButton.OK, ErrorButton.NoButton, ErrorButton.NoButton); TransitionToErrorState(btnlst, ex); } return(null); } return(stateRun); }
public override void OnActivate(int pinID) { switch (pinID) { case 10: if (!string.IsNullOrEmpty(this.parentName)) { this.parent = GameObject.Find(this.parentName); if (Object.op_Equality((Object)this.parent, (Object)null)) { DebugUtility.LogWarning("can not found gameObject:" + this.parentName); } } string text = LocalizedText.Get(this.Text); if (this.richTag) { text = LocalizedText.ReplaceTag(text); } string yesText = !string.IsNullOrEmpty(this.yesText) ? this.yesText : (string)null; string noText = !string.IsNullOrEmpty(this.noText) ? this.noText : (string)null; this.winGO = !string.IsNullOrEmpty(this.Title) ? UIUtility.ConfirmBoxTitle(LocalizedText.Get(this.Title), text, new UIUtility.DialogResultEvent(this.OnClickOK), new UIUtility.DialogResultEvent(this.OnClickCancel), this.parent, this.systemModal, this.systemModalPriority, yesText, noText) : UIUtility.ConfirmBox(text, new UIUtility.DialogResultEvent(this.OnClickOK), new UIUtility.DialogResultEvent(this.OnClickCancel), this.parent, this.systemModal, this.systemModalPriority, yesText, noText); if (Object.op_Inequality((Object)this.winGO, (Object)null) && this.unscaledTime) { Animator component = (Animator)this.winGO.GetComponent <Animator>(); if (Object.op_Inequality((Object)component, (Object)null)) { component.set_updateMode((AnimatorUpdateMode)2); } } this.ActivateOutputLinks(100); break; case 11: if (Object.op_Equality((Object)this.winGO, (Object)null)) { break; } if (string.IsNullOrEmpty(this.Title)) { Win_Btn_DecideCancel_FL_C btnDecideCancelFlC = !Object.op_Equality((Object)this.winGO, (Object)null) ? (Win_Btn_DecideCancel_FL_C)this.winGO.GetComponent <Win_Btn_DecideCancel_FL_C>() : (Win_Btn_DecideCancel_FL_C)null; this.winGO = (GameObject)null; if (Object.op_Inequality((Object)btnDecideCancelFlC, (Object)null)) { btnDecideCancelFlC.BeginClose(); } } else { Win_Btn_YN_Title_Flx winBtnYnTitleFlx = !Object.op_Equality((Object)this.winGO, (Object)null) ? (Win_Btn_YN_Title_Flx)this.winGO.GetComponent <Win_Btn_YN_Title_Flx>() : (Win_Btn_YN_Title_Flx)null; this.winGO = (GameObject)null; if (Object.op_Inequality((Object)winBtnYnTitleFlx, (Object)null)) { winBtnYnTitleFlx.BeginClose(); } } this.ActivateOutputLinks(101); break; } }
private QState StatePerformCleaningWithDycem(IQEvent qEvent) { LogStateInfo(_processName, System.Reflection.MethodBase.GetCurrentMethod().Name, qEvent); if (qEvent.IsSignal(SigRecover)) { if (errorMessage != null) { ErrorButton response = (ErrorButton)(((QEvent)qEvent).EventObject); switch (response) { case ErrorButton.Reject: // Reject, treat as bad carrier { Log.Info(this, "{0}, ProcessName:{1}, StatePerformCleaningWithDycem, Carrier rejected by user", LoggerCategory.StateTransition, _processName); PublishSignal(new QEvent(HSTWorkcell.SigOutputEEDycemCleaningComplete)); TransitionTo(stateWaitForPrecisorReadyForPick); } break; default: errorMessage = null; System.Windows.Forms.MessageBox.Show(string.Format("Unhandled Button: {0}", response.ToString()), response.ToString()); return(null); } return(null); } } if (qEvent.IsSignal(SigStateJob)) { try { for (int i = 0; i < HSTMachine.Workcell.HSTSettings.Install.TotalNumberOfOutputEETouchingOnDycem; i++) { Log.Info(this, "{0}, ProcessName:{1}, StateName:StatePerformCleaningWithDycem, Move Output EE to touch on Dycem. Cycle {2}", LoggerCategory.StateTransition, _processName, qEvent.QSignal.ToString(), i + 1); // move to touch on dycem _controller.DoJobMoveZToDycem(false); Thread.Sleep(HSTMachine.Workcell.HSTSettings.Install.OutputEETouchingOnDycemDuration * 1000); // move to EE pick height Log.Info(this, "{0}, ProcessName:{1}, StateName:StatePerformCleaningWithDycem, Move Output EE up to pick height. Cycle {2}", LoggerCategory.StateTransition, _processName, qEvent.QSignal.ToString(), i + 1); _controller.DoJobMoveZToPick(true, false); HSTMachine.Workcell.DycemCleaningCounter.OutputEEDycemCleaningCount += 1; } _controller.DoJobMoveZToPark(false, false); if (HSTMachine.Workcell != null) { if (HSTMachine.Workcell.getPanelOperation() != null) { if (HSTMachine.Workcell.getPanelOperation().getOperationModuleStatePanel() != null) { UIUtility.Invoke(HSTMachine.Workcell.getPanelOperation().getOperationModuleStatePanel(), () => { HSTMachine.Workcell.getPanelOperation().getOperationModuleStatePanel().getDycemCleaningCounterUserControl().txtOutputEECleanCount.Text = HSTMachine.Workcell.DycemCleaningCounter.OutputEEDycemCleaningCountString; HSTMachine.Workcell.DycemCleaningCounter.Save(); }); } } } PublishSignal(new QEvent(HSTWorkcell.SigOutputEEDycemCleaningComplete)); TransitionTo(stateWaitForPrecisorReadyForPick); } catch (Exception ex) { ButtonList btnlst = new ButtonList(ErrorButton.Retry, ErrorButton.Reject, ErrorButton.NoButton); TransitionToErrorState(btnlst, ex); } return(null); } return(stateRun); }
// Token: 0x0600F1B3 RID: 61875 RVA: 0x00403518 File Offset: 0x00401718 public void RefreshCurrencyDisplay(int position, GoodsType currencyType) { if (position != 0) { if (position != 1) { if (position == 2) { this.m_currency3Icon.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetGoodsIconName(currencyType, -1)); this.m_currency3CountText.text = UIUtility.GetCurrencyCount(currencyType).ToString(); this.m_currency3AddButton.onClick.RemoveAllListeners(); this.m_currency3AddButton.onClick.AddListener(delegate() { if (this.EventOnAddButtonClick != null) { this.EventOnAddButtonClick(currencyType); } }); this.m_currency3AddButton.gameObject.SetActive(false); this.m_currency3Obj.SetActive(true); } } else { this.m_currency2Icon.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetGoodsIconName(currencyType, -1)); this.m_currency2CountText.text = UIUtility.GetCurrencyCount(currencyType).ToString(); this.m_currency2AddButton.onClick.RemoveAllListeners(); this.m_currency2AddButton.onClick.AddListener(delegate() { if (this.EventOnAddButtonClick != null) { this.EventOnAddButtonClick(currencyType); } }); this.m_currency2AddButton.gameObject.SetActive(false); this.m_currency2Obj.SetActive(true); } } else { this.m_currency1Icon.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetGoodsIconName(currencyType, -1)); this.m_currency1CountText.text = UIUtility.GetCurrencyCount(currencyType).ToString(); this.m_currency1AddButton.onClick.RemoveAllListeners(); this.m_currency1AddButton.onClick.AddListener(delegate() { if (this.EventOnAddButtonClick != null) { this.EventOnAddButtonClick(currencyType); } }); this.m_currency1AddButton.gameObject.SetActive(false); this.m_currency1Obj.SetActive(true); } }