Пример #1
0
        void GenerateRandomKnownColors()
        {
            Color color = CustomPallete.GetRandomColor();

            ((Telerik.WinControls.UI.RadButtonElement)(this._stone.RootElement.Children[0]))
            .BackColor = color;
            ((Telerik.WinControls.Primitives.FillPrimitive)(this._stone.RootElement.Children[0].Children[0]))
            .BackColor2 = color;
            ((Telerik.WinControls.Primitives.FillPrimitive)(this._stone.RootElement.Children[0].Children[0]))
            .BackColor3 = color;
            ((Telerik.WinControls.Primitives.FillPrimitive)(this._stone.RootElement.Children[0].Children[0]))
            .BackColor4 = color;
        }
Пример #2
0
        public FlatStone()
        {
            InitializeComponent();

            this.BackColor = CustomPallete.GetRandomColor();
            Thread.Sleep(20);
            Random randomX = new Random((int)DateTime.Now.Ticks);

            Thread.Sleep(190);
            Random randomY = new Random((int)DateTime.Now.Ticks);

            this.Location = new Point(randomX.Next(), randomY.Next());
        }