コード例 #1
0
 /// <summary>
 /// Updates values of joints (angles) in joints dynamic list (expert block)
 /// </summary>
 private void UpdateJointsValues()
 {
     foreach (IO.Swagger.Model.Joint joint in joints.Joints)
     {
         LabeledInput     labeledInput     = GetJointInput(joint.Name);
         NumberFormatInfo numberFormatInfo = new NumberFormatInfo();
         numberFormatInfo.NumberDecimalSeparator = ".";
         labeledInput.SetValue(joint.Value.ToString(numberFormatInfo));
     }
 }
コード例 #2
0
        protected IActionResult CommonReplaces(string htmlName)
        {
            var html = this.getHtml.GetContent(htmlName);

            var script = TagHelper.ToHtml(HtmlHelper.GetBodyScript());

            html = html.Replace("{{script}}", script);
            var css = TagHelper.ToHtml(HtmlHelper.GetHeadCss());

            html = html.Replace("{{css}}", css);
            html = html.Replace("{{copyright}}", HtmlHelper.GetCopyRight());
            html = html.Replace("{{navbar}}", Navigation.GetNavbar());
            html = html.Replace("{{footernav}}", HtmlHelper.GetFooter());

            if (htmlName == HtmlFile.ContactUsHtml)
            {
                html = html.Replace("navbar navbar-primary navbar-transparent navbar-absolute", "navbar navbar-inverse navbar-fixed-top");
            }

            if (htmlName == HtmlFile.IndexHtml)
            {
                html = html.Replace("{{ManualRotatingCards}}", new ManualRotatingCard().ToHtml());
                html = html.Replace("{{table}}", new Table().ToHtml());
                html = html.Replace("{{Tooltips}}", Tooltip.Generate());
                html = html.Replace("{{Popovers}}", Popovers.Generate());
                html = html.Replace("{{buttons}}", Button.Generate());
                html = html.Replace("{{pickSizeButtons}}", XSmallButton.Generate());
                html = html.Replace("{{ColoredButton}}", ColoredButton.Generate());
                html = html.Replace("{{Input}}", LabeledInput.Generate());
                html = html.Replace("{{Checkbox}}", Checkbox.Generate());
                html = html.Replace("{{RadioButton}}", RadioButton.Generate());
                html = html.Replace("{{ToggleButton}}", ToggleButton.Generate());
                html = html.Replace("{{Dropdown}}", new Dropdown().ToHtml());
                html = html.Replace("{{Textarea}}", new Textarea().ToHtml());
                html = html.Replace("{{SelectPicker}}", new SingleSelect().ToHtml());
                html = html.Replace("{{MultipleSelect}}", new MultipleSelect().ToHtml());
                html = html.Replace("{{Tags}}", new HtmlTag().ToHtml());
            }

            if (htmlName == HtmlFile.ScheduleHtml)
            {
                html = html.Replace("{{ManualRotatingCards}}", new SchedulePage().ToHtml());
            }

            return(this.HtmlResult(html));
        }
コード例 #3
0
    /// <summary>
    /// Updates list of joints in expert block
    /// </summary>
    private void UpdateJointsList()
    {
        DestroyJointsFields();

        foreach (IO.Swagger.Model.Joint joint in joints.Joints)
        {
            LabeledInput labeledInput = Instantiate(GameManager.Instance.LabeledFloatInput, JointsDynamicList.transform).GetComponent <LabeledInput>();
            labeledInput.SetLabel(joint.Name, joint.Name);

            NumberFormatInfo numberFormatInfo = new NumberFormatInfo();
            numberFormatInfo.NumberDecimalSeparator = ".";
            labeledInput.SetValue(joint.Value.ToString(numberFormatInfo));
            //labeledInput.Input.placeholder.color = Color.white;
            // text object of TMP input cannot be accessed directly
            //labeledInput.Input.GetComponentsInChildren<TMPro.TextMeshProUGUI>()
            //      .First(c => c.gameObject.name == "Text").color = Color.white;
            labeledInput.SetDarkMode(false);
        }
    }
コード例 #4
0
    /// <summary>
    /// Updates values (angles) of joints in expert block
    /// </summary>
    public void UpdateJointsList()
    {
        foreach (RectTransform o in JointsDynamicList.GetComponentsInChildren <RectTransform>())
        {
            if (!o.gameObject.CompareTag("Persistent"))
            {
                Destroy(o.gameObject);
            }
        }

        foreach (IO.Swagger.Model.Joint joint in joints.Joints)
        {
            LabeledInput labeledInput = Instantiate(GameManager.Instance.LabeledFloatInput, JointsDynamicList.transform).GetComponent <LabeledInput>();
            labeledInput.SetLabel(joint.Name, joint.Name);

            NumberFormatInfo numberFormatInfo = new NumberFormatInfo();
            numberFormatInfo.NumberDecimalSeparator = ".";
            labeledInput.SetValue(joint.Value.ToString(numberFormatInfo));
        }
    }
コード例 #5
0
ファイル: HtmlUnitTest.cs プロジェクト: 188867052/Quartz.Web
 public void LabeledInputTest()
 {
     var modal = new LabeledInput();
     var a     = modal.ToHtml();
 }