Inheritance: System.Windows.Forms.Form
Esempio n. 1
0
        public BelotGUIForm()
        {
            System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo( Properties.Settings.Default.Culture );
            System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo( Properties.Settings.Default.Culture );
            StringResources.Culture = new System.Globalization.CultureInfo( Properties.Settings.Default.Culture );

            InitializeComponent();

            #if DEBUG
            _panelEast.AreBacks = false;
            _panelNorth.AreBacks = false;
            _panelWest.AreBacks = false;
            #else
            _panelEast.AreBacks = true;
            _panelNorth.AreBacks = true;
            _panelWest.AreBacks = true;
            #endif

            this.SetStyle( ControlStyles.AllPaintingInWmPaint, true );
            this.SetStyle( ControlStyles.DoubleBuffer, true );
            this.SetStyle( ControlStyles.Opaque, false );
            this.SetStyle( ControlStyles.UserPaint, true );
            this.SetStyle( ControlStyles.Selectable, false );

            Font mistralBold = new Font( Properties.Settings.Default.MistralFont, FontStyle.Bold );
            _labelSouth.Font = mistralBold;
            _labelNorth.Font = mistralBold;
            _labelEast.Font = mistralBold;
            _labelWest.Font = mistralBold;
            _labelSouth.Text = Properties.Settings.Default.SouthName;
            _labelNorth.Text = Properties.Settings.Default.NorthName;
            _labelEast.Text = Properties.Settings.Default.EastName;
            _labelWest.Text = Properties.Settings.Default.WestName;

            _announceForm = new AnnounceForm();
            this.AddOwnedForm( _announceForm );

            _settingsForm = new SettingsForm();
            this.AddOwnedForm( _settingsForm );

            _resultsTable = new DataTable( "ResultsTable" );
            _resultsTable.Columns.Add( "We", typeof( int ) );
            _resultsTable.Columns.Add( "You", typeof( int ) );

            _resultForm = new ResultForm( _resultsTable );
            this.AddOwnedForm( _resultForm );

            _dealResultForm = new DealResultForm();
            this.AddOwnedForm( _dealResultForm );

            _combinationForm = new CombinationForm();
            this.AddOwnedForm( _combinationForm );

            _passedAnnouncesForm = new PassedAnnouncesForm( this );
            this.AddOwnedForm( _passedAnnouncesForm );
            _passedAnnouncesForm.Show();

            _panelSouth.CardClick += new CardClicked( Card_Click );
            _panelEast.CardClick += new CardClicked( Card_Click );
            _panelNorth.CardClick += new CardClicked( Card_Click );
            _panelWest.CardClick += new CardClicked( Card_Click );

            _animator = new CardAnimator( _animationCard );
            _animator.AnimationFinished += new AnimationFinishHandler( AnimationFinished );

            this.Paint += new PaintEventHandler( BelotGUIForm_Paint );
        }
Esempio n. 2
0
        public BelotGUIForm()
        {
            System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(Properties.Settings.Default.Culture);
            System.Threading.Thread.CurrentThread.CurrentCulture   = new System.Globalization.CultureInfo(Properties.Settings.Default.Culture);
            StringResources.Culture = new System.Globalization.CultureInfo(Properties.Settings.Default.Culture);

            InitializeComponent();


#if DEBUG
            _panelEast.AreBacks  = false;
            _panelNorth.AreBacks = false;
            _panelWest.AreBacks  = false;
#else
            _panelEast.AreBacks  = true;
            _panelNorth.AreBacks = true;
            _panelWest.AreBacks  = true;
#endif

            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.DoubleBuffer, true);
            this.SetStyle(ControlStyles.Opaque, false);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.SetStyle(ControlStyles.Selectable, false);


            Font mistralBold = new Font(Properties.Settings.Default.MistralFont, FontStyle.Bold);
            _labelSouth.Font = mistralBold;
            _labelNorth.Font = mistralBold;
            _labelEast.Font  = mistralBold;
            _labelWest.Font  = mistralBold;
            _labelSouth.Text = Properties.Settings.Default.SouthName;
            _labelNorth.Text = Properties.Settings.Default.NorthName;
            _labelEast.Text  = Properties.Settings.Default.EastName;
            _labelWest.Text  = Properties.Settings.Default.WestName;

            _announceForm = new AnnounceForm();
            this.AddOwnedForm(_announceForm);

            _settingsForm = new SettingsForm();
            this.AddOwnedForm(_settingsForm);

            _resultsTable = new DataTable("ResultsTable");
            _resultsTable.Columns.Add("We", typeof(int));
            _resultsTable.Columns.Add("You", typeof(int));

            _resultForm = new ResultForm(_resultsTable);
            this.AddOwnedForm(_resultForm);

            _dealResultForm = new DealResultForm();
            this.AddOwnedForm(_dealResultForm);

            _combinationForm = new CombinationForm();
            this.AddOwnedForm(_combinationForm);

            _passedAnnouncesForm = new PassedAnnouncesForm(this);
            this.AddOwnedForm(_passedAnnouncesForm);
            _passedAnnouncesForm.Show();

            _panelSouth.CardClick += new CardClicked(Card_Click);
            _panelEast.CardClick  += new CardClicked(Card_Click);
            _panelNorth.CardClick += new CardClicked(Card_Click);
            _panelWest.CardClick  += new CardClicked(Card_Click);

            _animator = new CardAnimator(_animationCard);
            _animator.AnimationFinished += new AnimationFinishHandler(AnimationFinished);

            this.Paint += new PaintEventHandler(BelotGUIForm_Paint);
        }