- 프로젝트 만들기
- 개체 및 변수 참조
- 프로젝트 확장
NetLogic을 만들어 이미지 수정
필수 구성 요소
기본 외부 코드 편집기를 설정합니다. 기본 코드 편집기 설정 항목을 참조하십시오.
- NetLogic을 만들어 이미지를 숨기려면
- 프로젝트 보기에서MainWindow (type)를 마우스 오른쪽 버튼으로 클릭하고 을 선택합니다.
- NetLogic을 두 번 클릭합니다.외부 코드 편집기가 열립니다.
- NetLogic을 다음 코드로 바꿔 편집합니다. NetLogic 편집 항목을 참조하십시오.#region Using directives using System; using UAManagedCore; using OpcUa = UAManagedCore.OpcUa; using FTOptix.HMIProject; using FTOptix.Retentivity; using FTOptix.UI; using FTOptix.NativeUI; using FTOptix.CoreBase; using FTOptix.Core; using FTOptix.NetLogic; #endregion public class RuntimeNetLogic1 : BaseNetLogic { public override void Start() { // Insert code to be executed when the user-defined logic starts } public override void Stop() { // Insert code to be executed when the user-defined logic is stopped } [ExportMethod] public void replaceSVG() { // LogicObject.Owner is the button, so LogicObject.Owner is the MainWindow AdvancedSVGImage svgImage = LogicObject.Owner.Get<AdvancedSVGImage>("AdvancedSVGImage1"); string myXML = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\r\n<svg version=\"1.1\" id=\"Overall\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:space=\"preserve\" viewBox=\"0 0 300 300\">\r\n <g id=\"Box1\">\r\n <polygon style=\"fill:#CB8252;\" points=\"25,270 75,270 75,220 25,220\" transform=\"rotate(0, 20, 20)\"/>\r\n </g>\r\n</svg>\r\n"; //Update the SVG svgImage.SetImageContent(myXML); } }
- 코드를 저장합니다.
의견을 작성 부탁드립니다.