> 개발 도구 > composer > 본문

이름을 기준으로 작곡가 표시 및 숨기기 정보

藏色散人
풀어 주다: 2021-06-18 18:15:44
앞으로
1548명이 탐색했습니다.

다음 튜토리얼 칼럼인 composer에서는 이름을 기준으로 Composer를 표시하고 숨기는 방법을 소개하겠습니다. 필요한 친구들에게 도움이 되길 바랍니다!

이름을 기준으로 작곡가 표시 및 숨기기 정보

작곡가는 이름에 따라 표시하고 숨깁니다

    //主要设置 模型的显示与隐藏      
 private void TransmissionByData_AxSendSelectionChange(string domName, bool isVisible)
        {
            System.Threading.Tasks.Parallel.Invoke(() =>
              {
                  try
                  {
                      if (isVisible)
                      {
                          axDS3DVIAPlayerActiveX1.SetVisibility(CLitSelectionName(domName), CrActorVisibility.crAtvVisible, CrActorVisibility.crAtvKeepActorVisibility);
                      }
                      else
                      {
                          axDS3DVIAPlayerActiveX1.SetVisibility(CLitSelectionName(domName), CrActorVisibility.crAtvInvisible, CrActorVisibility.crAtvKeepActorVisibility);
                      }
                  }
                  catch (InvalidComObjectException e)
                  {
                      Console.WriteLine(e);
                  }
              });
        }
로그인 후 복사
 private string CLitSelectionName(string name)
        {
            return string.Format("<CLitSelection Name=&#39;&#39; ><CLitModifiable  Name=&#39;{0}&#39;/></CLitSelection>", name);
        }
        private void HightLightItem(string strId, AxDS3DVIAPlayerActiveX objPlayer)
        {
            try
            {
                objPlayer.SetPropertySet(
                    objPlayer.GetAllActorsOnFilter("<CLitPropertySet><Actor.Alpha Value=&#39;255&#39;/></CLitPropertySet>", false),
                    string.Format("<CLitPropertySet><Actor.Alpha Value=&#39;{0}&#39;/></CLitPropertySet>", strHightLightAlpha));
                objPlayer.SetPropertySet(
                    string.Format("<CLitSelection Name=&#39;&#39; Ident=&#39;-1&#39;><CLitModifiable Name=&#39;{0}&#39;/></CLitSelection>", strId),
                    "<CLitPropertySet><Actor.Alpha Value=&#39;255&#39;/></CLitPropertySet>");
            }
            catch (InvalidComObjectException e)
            {
                Console.WriteLine(e);
            }
        }
        private void HightLightAll(AxDS3DVIAPlayerActiveX objPlayer)
        {
            try
            {
                objPlayer.SetPropertySet(
                    objPlayer.GetAllActorsOnFilter(
                        string.Format("<CLitPropertySet><Actor.Alpha Value=&#39;{0}&#39;/></CLitPropertySet>", strHightLightAlpha),
                        true), "<CLitPropertySet><Actor.Alpha Value=&#39;255&#39;/></CLitPropertySet>");
            }
            catch (InvalidComObjectException e)
            {
                Console.WriteLine(e);
            }
        }
        private void SetPlayerSelections(string[] strItemKeys, AxDS3DVIAPlayerActiveX objPlayer)
        {
            try
            {
                string strSelection = "";
                if (strItemKeys.Length == 0)
                {
                    strSelection = "<CLitSelection Name=\"\" Ident=\"-1\"><CLitModifiable Name=\"\"/></CLitSelection>";
                }
                else
                {
                    strSelection = strItemKeys.Aggregate("<CLitSelection Name=\"\" Ident=\"-1\">", (current, t) => current + string.Format("<CLitModifiable Name=\"{0}\"/>", t));
                    strSelection += "</CLitSelection>";
                }
                objPlayer.Selection = strSelection;
            }
            catch (InvalidComObjectException e)
            {
                Console.WriteLine(e);
            }
        }
        //将Player的选择项聚焦
        private void SetPlayerSelectionsFocus(AxDS3DVIAPlayerActiveX objPlayer)
        {
            try
            {
                objPlayer.ZoomSelection();
            }
            catch (InvalidComObjectException e)
            {
                Console.WriteLine(e);
            }
        }
로그인 후 복사

다음번에는 잊어버리지 않도록 여기에 메모해 두세요...

위 내용은 이름을 기준으로 작곡가 표시 및 숨기기 정보의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

관련 라벨:
원천:cnblogs.com
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!