Exemplo n.º 1
0
        public GraphicalComponentUserControl()
        {
            _graphicalComponent = new GraphicalComponent();
            _dragProcessor      = new DragProcessor();

            InitializeComponent();
            /* Handlers for application state modifications from UI changes */
            Loaded      += (_, __) => OnLoaded();
            SizeChanged += (_, __) => OnSizeChanged();
        }
Exemplo n.º 2
0
        static public void Main(string[] args)
        {
            GraphicalComponent b1 = new Button(Color.Blue);
            //b1.affiche();
            GraphicalComponent b2 = new Button();

            //b2.affiche();
            b1.actif = false;
            GraphicalComponent m1 = new Menu();
            //m1.affiche();
            GraphicalComponent m2 = new Menu();
            GraphicalComponent m3 = new Menu();

            GraphicalComponent[] tab = new GraphicalComponent[] { b1, b2, m1, m2, m3 };
            foreach (GraphicalComponent elem in tab)
            {
                elem.affiche();
                elem.activer();
            }
        }