DllEntryClass.cs 2.28 KB
Newer Older
Pascal Bigot committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
using System.Drawing;
using CommonLib;

namespace Blinker
{
    public class DllEntryClass : IDllControlInterface
    {
        // changes ici l'identifiant unique de la DLL
        public const uint DLL_Control_ID = 200;
Pascal Bigot committed
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

#if BUILD_LANG
#if TEST_LANG
        static Lang m_SingLangSys = new Lang(true, true);
#else
        static Lang m_SingLangSys = new Lang(true, false);
#endif
#else
        static Lang m_SingLangSys = new Lang();
#endif
        public static Lang LangSys
        {
            get { return m_SingLangSys; }
        }

        string m_CurLang;
        public string CurrentLang
        {
            get { return m_CurLang; }
            set 
            {
                m_CurLang = value;
Pascal Bigot committed
37
                if (!LangSys.InitDone)
Pascal Bigot committed
38
                    LangSys.Initialize(Cste.STR_DEV_LANG, m_CurLang, "CtrlBlinker");
Pascal Bigot committed
39 40
                else
                    LangSys.ChangeLangage(value);
Pascal Bigot committed
41 42 43
            }
        }

Pascal Bigot committed
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
        public DllEntryClass()
        {
            BlinkerRes.InitializeBitmap();
        }

        public uint DllID
        {
            get
            {
                return DLL_Control_ID;
            }
        }

        public BTControl CreateBTControl()
        {
            return new BTDllBlinkerControl();
        }

        public BTControl CreateBTControl(InteractiveControl iCtrl)
        {
            return new BTDllBlinkerControl(iCtrl);
        }
        public BTControl CreateCommandBTControl()
        {
            return new BlinkerCmdControl();
        }

        public InteractiveControl CreateInteractiveControl()
        {
            return new InteractiveBlinkerDllControl();
        }

        public Size ToolWindSize
        {
            get
            {
                // modifiez ici la taille que le control aura dans la fenêtre d'outil
                return new Size(130, 30);
            }
        }

        public string DefaultControlName
        {
            get
            {
                // modifiez ici le nom par défaut de l'objet lors de sa création
                return "Blinker";
            }
        }

    }
}