public override bool CreateUX()
        {
            if (!mIsUXInitCalled)
            {
                mIsUXInitCalled = true;

                mMyDashboard = NMI.AddDashboard(MyBaseThing, new TheDashboardInfo(MyBaseEngine, "My Demo Plugin Screen with Things"));

                var         tFlds = NMI.CreateEngineForms(MyBaseThing, TT.GetSafeThingGuid(MyBaseThing, "MYNAME"), "List of $safeitemrootname$", null, 20, 0x0F, 0xF0, NMI.GetNodeForCategory(), "REFFRESHME", true, new e$safeitemrootname$DeviceTypes(), e$safeitemrootname$DeviceTypes.cdeThingDeviceTypeA);
                TheFormInfo tForm = tFlds["Form"] as TheFormInfo;
                tForm.AddButtonText = "Add new $safeitemrootname$";

                NMI.RegisterEngine(MyBaseEngine); //Registers this engine and its resources with the C-DEngine
                mIsUXInitialized = true;
            }
            return(true);
        }
Ejemplo n.º 2
0
        public override bool CreateUX()
        {
            if (!mIsUXInitCalled)
            {
                mIsUXInitCalled = true;
                mMyDashboard    = NMI.AddDashboard(MyBaseThing, new TheDashboardInfo(MyBaseEngine, "My Sample Plugin Screens"));

                var tFlds   = TheNMIEngine.AddStandardForm(MyBaseThing, "Welcome to my Sample Page");
                var tMyForm = tFlds["Form"] as TheFormInfo;

                NMI.AddSmartControl(MyBaseThing, tMyForm, eFieldType.SingleEnded, 2, 2, 0, "My Sample Value Is", "SampleProperty", new nmiCtrlSingleEnded()
                {
                    ParentFld = 1
                });
                NMI.AddSmartControl(MyBaseThing, tMyForm, eFieldType.BarChart, 3, 2, 0, "My Sample Value Bar", "SampleProperty", new nmiCtrlBarChart()
                {
                    ParentFld = 1, MaxValue = 255, TileHeight = 2, IsVertical = true, Foreground = "blue"
                });

                NMI.AddAboutButton4(MyBaseThing, mMyDashboard, null, true);
                mIsUXInitialized = true;
            }
            return(true);
        }