public void LoadServices()
        {
            var encodeNames = PluginServiceProvider.GetServiceNamesByType("Encode");

            foreach (var name in encodeNames)
            {
                var item = new ListItem
                {
                    Text = name,
                    Tag  = PluginServiceProvider.GetService(name)
                };
                _encodeItem.Add(item);
            }

            var convertName = PluginServiceProvider.GetServiceNamesByType("Decode");

            foreach (var name in convertName)
            {
                var item = new ListItem
                {
                    Text = name,
                    Tag  = PluginServiceProvider.GetService(name)
                };
                _decodeItem.Add(item);
            }
        }
Exemple #2
0
        void Init()
        {
            var label1 = new Label
            {
                Text = "Welcome to",
                Font = new Font(FontFamilies.Monospace, 30)
            };
            var labelTitle = new Label
            {
                Text = "Altman3",
                Font = new Font(FontFamilies.Monospace, 60)
            };

            var layout = new PixelLayout();

            layout.Add(label1, new Point(70, 50));
            layout.Add(labelTitle, new Point(100, 120));

            var logo = PluginServiceProvider.GetService("ToFingerBinary");

            if (logo != null)
            {
                var rnd = new Random();
                var par = new PluginParameter();
                par.AddParameter("str", rnd.Next(1, 1023));
                var ret = logo(par);
                var tmp = new Label
                {
                    Text = ret,
                    Font = new Font(FontFamilies.Monospace, 10)
                };
                layout.Add(tmp, new Point(300, 220));
            }

            Content = layout;
        }