Show
Ignore:
Timestamp:
18.02.2015 17:29:19 (5 years ago)
Author:
cct9
Message:

Reworking of pictureBox Paint event so it is using double-buffering correctly without background-erase issue

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • other-projects/fft-ddr/summer-2014/trunk/FFDDR/Form1.Designer.cs

    r29735 r29750  
    2929        private void InitializeComponent() 
    3030        { 
    31             this.mainScreen = new System.Windows.Forms.PictureBox(); 
    32             this.beatBox = new System.Windows.Forms.PictureBox(); 
    33             this.beatBox1 = new System.Windows.Forms.PictureBox(); 
    34             this.screen = new System.Windows.Forms.PictureBox(); 
    35             this.screen2 = new System.Windows.Forms.PictureBox(); 
    36             ((System.ComponentModel.ISupportInitialize)(this.mainScreen)).BeginInit(); 
    37             ((System.ComponentModel.ISupportInitialize)(this.beatBox)).BeginInit(); 
    38             ((System.ComponentModel.ISupportInitialize)(this.beatBox1)).BeginInit(); 
    39             ((System.ComponentModel.ISupportInitialize)(this.screen)).BeginInit(); 
    40             ((System.ComponentModel.ISupportInitialize)(this.screen2)).BeginInit(); 
     31            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FFDDR)); 
     32            this.mainScreen1 = new System.Windows.Forms.PictureBox(); 
     33            this.redLabel = new System.Windows.Forms.Label(); 
     34            this.blueLabel = new System.Windows.Forms.Label(); 
     35            this.greenLabel = new System.Windows.Forms.Label(); 
     36            this.yellowLabel = new System.Windows.Forms.Label(); 
     37            ((System.ComponentModel.ISupportInitialize)(this.mainScreen1)).BeginInit(); 
    4138            this.SuspendLayout(); 
    4239            //  
    43             // mainScreen 
     40            // mainScreen1 
    4441            //  
    45             this.mainScreen.Location = new System.Drawing.Point(417, 12); 
    46             this.mainScreen.Name = "mainScreen"; 
    47             this.mainScreen.Size = new System.Drawing.Size(292, 260); 
    48             this.mainScreen.TabIndex = 1; 
    49             this.mainScreen.TabStop = false; 
     42            this.mainScreen1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("mainScreen1.BackgroundImage"))); 
     43            this.mainScreen1.Location = new System.Drawing.Point(0, 0); 
     44            this.mainScreen1.Name = "mainScreen1"; 
     45            this.mainScreen1.Size = new System.Drawing.Size(1187, 561); 
     46            this.mainScreen1.TabIndex = 6; 
     47            this.mainScreen1.TabStop = false; 
    5048            //  
    51             // beatBox 
     49            // redLabel 
    5250            //  
    53             this.beatBox.Location = new System.Drawing.Point(-2, -3); 
    54             this.beatBox.Name = "beatBox"; 
    55             this.beatBox.Size = new System.Drawing.Size(67, 566); 
    56             this.beatBox.TabIndex = 2; 
    57             this.beatBox.TabStop = false; 
     51            this.redLabel.AutoSize = true; 
     52            this.redLabel.BackColor = System.Drawing.Color.Transparent; 
     53            this.redLabel.Font = new System.Drawing.Font("Moire", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 
     54            this.redLabel.ForeColor = System.Drawing.Color.Red; 
     55            this.redLabel.Location = new System.Drawing.Point(12, 37); 
     56            this.redLabel.Name = "redLabel"; 
     57            this.redLabel.Size = new System.Drawing.Size(29, 29); 
     58            this.redLabel.TabIndex = 7; 
     59            this.redLabel.Text = "0"; 
    5860            //  
    59             // beatBox1 
     61            // blueLabel 
    6062            //  
    61             this.beatBox1.Location = new System.Drawing.Point(1060, -3); 
    62             this.beatBox1.Name = "beatBox1"; 
    63             this.beatBox1.Size = new System.Drawing.Size(54, 566); 
    64             this.beatBox1.TabIndex = 3; 
    65             this.beatBox1.TabStop = false; 
     63            this.blueLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 
     64            this.blueLabel.AutoSize = true; 
     65            this.blueLabel.BackColor = System.Drawing.Color.Transparent; 
     66            this.blueLabel.Font = new System.Drawing.Font("Moire", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 
     67            this.blueLabel.ForeColor = System.Drawing.Color.Aqua; 
     68            this.blueLabel.Location = new System.Drawing.Point(1143, 37); 
     69            this.blueLabel.Name = "blueLabel"; 
     70            this.blueLabel.Size = new System.Drawing.Size(29, 29); 
     71            this.blueLabel.TabIndex = 8; 
     72            this.blueLabel.Text = "0"; 
    6673            //  
    67             // screen 
     74            // greenLabel 
    6875            //  
    69             this.screen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 
    70             this.screen.Location = new System.Drawing.Point(71, 12); 
    71             this.screen.Name = "screen"; 
    72             this.screen.Size = new System.Drawing.Size(330, 330); 
    73             this.screen.TabIndex = 4; 
    74             this.screen.TabStop = false; 
     76            this.greenLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 
     77            this.greenLabel.AutoSize = true; 
     78            this.greenLabel.BackColor = System.Drawing.Color.Transparent; 
     79            this.greenLabel.Font = new System.Drawing.Font("Moire", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 
     80            this.greenLabel.ForeColor = System.Drawing.Color.Lime; 
     81            this.greenLabel.Location = new System.Drawing.Point(1143, 489); 
     82            this.greenLabel.Name = "greenLabel"; 
     83            this.greenLabel.Size = new System.Drawing.Size(29, 29); 
     84            this.greenLabel.TabIndex = 9; 
     85            this.greenLabel.Text = "0"; 
    7586            //  
    76             // screen2 
     87            // yellowLabel 
    7788            //  
    78             this.screen2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 
    79             this.screen2.Location = new System.Drawing.Point(724, 12); 
    80             this.screen2.Name = "screen2"; 
    81             this.screen2.Size = new System.Drawing.Size(330, 330); 
    82             this.screen2.TabIndex = 5; 
    83             this.screen2.TabStop = false; 
     89            this.yellowLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 
     90            this.yellowLabel.AutoSize = true; 
     91            this.yellowLabel.BackColor = System.Drawing.Color.Transparent; 
     92            this.yellowLabel.Font = new System.Drawing.Font("Moire", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 
     93            this.yellowLabel.ForeColor = System.Drawing.Color.Yellow; 
     94            this.yellowLabel.Location = new System.Drawing.Point(12, 489); 
     95            this.yellowLabel.Name = "yellowLabel"; 
     96            this.yellowLabel.Size = new System.Drawing.Size(29, 29); 
     97            this.yellowLabel.TabIndex = 10; 
     98            this.yellowLabel.Text = "0"; 
    8499            //  
    85100            // FFDDR 
     
    87102            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 
    88103            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 
     104            this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); 
    89105            this.ClientSize = new System.Drawing.Size(1184, 561); 
    90             this.Controls.Add(this.screen2); 
    91             this.Controls.Add(this.screen); 
    92             this.Controls.Add(this.beatBox1); 
    93             this.Controls.Add(this.beatBox); 
    94             this.Controls.Add(this.mainScreen); 
     106            this.Controls.Add(this.yellowLabel); 
     107            this.Controls.Add(this.greenLabel); 
     108            this.Controls.Add(this.blueLabel); 
     109            this.Controls.Add(this.redLabel); 
     110            this.Controls.Add(this.mainScreen1); 
     111            this.DoubleBuffered = true; 
    95112            this.Name = "FFDDR"; 
    96113            this.Text = "FFDDR"; 
    97114            this.Load += new System.EventHandler(this.FFDDR_Load); 
    98             ((System.ComponentModel.ISupportInitialize)(this.mainScreen)).EndInit(); 
    99             ((System.ComponentModel.ISupportInitialize)(this.beatBox)).EndInit(); 
    100             ((System.ComponentModel.ISupportInitialize)(this.beatBox1)).EndInit(); 
    101             ((System.ComponentModel.ISupportInitialize)(this.screen)).EndInit(); 
    102             ((System.ComponentModel.ISupportInitialize)(this.screen2)).EndInit(); 
     115            this.Resize += new System.EventHandler(this.FFDDR_Resize); 
     116            ((System.ComponentModel.ISupportInitialize)(this.mainScreen1)).EndInit(); 
    103117            this.ResumeLayout(false); 
     118            this.PerformLayout(); 
    104119 
    105120        } 
     
    107122        #endregion 
    108123 
    109         private System.Windows.Forms.PictureBox mainScreen; 
    110         private System.Windows.Forms.PictureBox beatBox; 
    111         private System.Windows.Forms.PictureBox beatBox1; 
    112         private System.Windows.Forms.PictureBox screen; 
    113         private System.Windows.Forms.PictureBox screen2; 
     124        private System.Windows.Forms.PictureBox mainScreen1; 
     125        private System.Windows.Forms.Label redLabel; 
     126        private System.Windows.Forms.Label blueLabel; 
     127        private System.Windows.Forms.Label greenLabel; 
     128        private System.Windows.Forms.Label yellowLabel; 
    114129    } 
    115130}