.NET Customisation User Guide

.NET Customisation : How to Write a CAF Addin : Addins In TTY
using System;
using System.IO;
using System.Windows.Forms;
using Aveva.ApplicationFramework;
using Aveva.ApplicationFramework.Presentation;
using Aveva.Core.Database;
using Ps = Aveva.Core.Database.DbPseudoAttribute;
using NOUN = Aveva.Core.Database.DbElementTypeInstance;
namespace Aveva.Core.Tests.AddinTty
    /// <summary>
    /// Summary description for AddinTtyTest
    /// </summary>
    public class AddinTty : IAddinTty, IAddin
        /// <summary>
        /// Start the Addin
        /// </summary>
        /// <param name="serviceManager"></param>
        void IAddinTty.Start(ServiceManager serviceManager)
            // get uda attribute
            DbAttribute uda = DbAttribute.GetDbAttribute(":UDADDIN");
            if (uda != null)
                // Create instance of delegate containing method to evaluate
                Ps.GetStringDelegate dele =
new Ps.GetStringDelegate(AddinTtyValue);
                // and pass delegate instance to core.
                Ps.AddGetStringAttribute(uda, NOUN.EQUIPMENT, dele);
        void IAddinTty.Stop()
        String IAddinTty.Name
            get { return "AddinTty"; }
        String IAddinTty.Description
            get { return "AddinTty"; }
        // String delegate for UDA
        static private string AddinTtyValue(DbElement ele, DbAttribute att, DbQualifier qualifier)
            return "AddinTty";

1974 to current year. AVEVA Solutions Limited and its subsidiaries. All rights reserved.
AVEVA Logo