Пример #1
0
        private void draw(Graphics g)
        {
            g.TranslateTransform(_initialX, _initialY);
            g.RotateTransform(_initialAngle);

            for (int i = 0; i < _cardsCount; i++)
            {
                Image im;
                if (_areBacks)
                {
                    im = CardGUIProvider.GetBack();
                }
                else
                {
                    im = CardGUIProvider.GetCardImage(_cards[i]);
                }

                _regions[i] = new Region(new Rectangle(0, 0, CardGUIProvider.ImageWidth, CardGUIProvider.ImageHeight));
                _regions[i].Transform(g.Transform);

                g.DrawImage(im, 0, 0);
                g.TranslateTransform(TRANSFORM_X, TRANSFORM_Y);
                g.RotateTransform(ANGLE);
            }

            for (int i = 0; i < _cardsCount - 1; i++)
            {
                _regions[i].Exclude(_regions[i + 1]);
            }
        }
Пример #2
0
        private void ButtonOKClick(object sender, EventArgs e)
        {
            Properties.Settings.Default.SouthName = _boxSouthName.Text;
            Properties.Settings.Default.NorthName = _boxNorthName.Text;
            Properties.Settings.Default.EastName  = _boxEastName.Text;
            Properties.Settings.Default.WestName  = _boxWestName.Text;

            Properties.Settings.Default.NorthDll = _comboAINorth.SelectedItem.ToString();
            Properties.Settings.Default.EastDll  = _comboAIEast.SelectedItem.ToString();
            Properties.Settings.Default.WestDll  = _comboAIWest.SelectedItem.ToString();

            if (_comboCards.SelectedItem != null)
            {
                if (Properties.Settings.Default.CardsDll != _comboCards.SelectedItem.ToString())
                {
                    Properties.Settings.Default.CardsDll = _comboCards.SelectedItem.ToString();
                    CardGUIProvider.Reload();
                }
                else
                {
                    Properties.Settings.Default.CardsDll = _comboCards.SelectedItem.ToString();
                }
            }

            Properties.Settings.Default.Speed = _trackSpeed.Value;

            Properties.Settings.Default.CapotRemovesDouble    = _checkCapotDouble.Checked;
            Properties.Settings.Default.ExtraPointsAreDoubled = _checkExtraDouble.Checked;

            Thread.CurrentThread.CurrentUICulture = _comboLanguage.SelectedItem as CultureInfo;
            Thread.CurrentThread.CurrentCulture   = Thread.CurrentThread.CurrentUICulture;

            Properties.Settings.Default.Culture = Thread.CurrentThread.CurrentUICulture.ToString();
            Properties.Settings.Default.Save();

            this.DialogResult = DialogResult.OK;
        }
Пример #3
0
 private void BelotGUIForm_Load(object sender, EventArgs e)
 {
     CardGUIProvider.Reload();
 }