private void IndivisualResult_Resize(object sender, EventArgs e) { label1.Height = (int)(this.Height * 0.6); label2.Height = (int)(this.Height * 0.2); label3.Height = (int)(this.Height * 0.2); label1.Font = new Font("맑은고딕", ViewList.AutoFontSize(label1), FontStyle.Bold); label2.Font = new Font("맑은고딕", ViewList.AutoFontSize(label2), FontStyle.Bold); label3.Font = new Font("맑은고딕", ViewList.AutoFontSize(label3), FontStyle.Bold); }
private void ViewRank_Resize(object sender, EventArgs e) { SuspendLayout(); label1.Width = label2.Width = label3.Width = label4.Width = (int)Math.Truncate(this.Width * 0.25); List <float> fonts = new List <float> { ViewList.AutoFontSize(label1), ViewList.AutoFontSize(label2), ViewList.AutoFontSize(label3), ViewList.AutoFontSize(label4) }; float font = fonts.Min(); label1.Font = label2.Font = label3.Font = label4.Font = new Font("맑은고딕", font); ResumeLayout(); }
private void ResultALL_Resize(object sender, EventArgs e) { panel1.Height = (int)(this.Height * 0.2); label1.Width = (int)(this.Width * 0.1); label1.Font = new Font("맑은고딕", ViewList.AutoFontSize(label1), FontStyle.Bold); panel2.SuspendLayout(); foreach (ViewRank vr in viewRanks) { vr.Height = (int)(panel2.Height * 0.125); } panel2.ResumeLayout(); }
private void RankingLabel_TextChanged(object sender, EventArgs e) // 랭킹 갱신시 폰트 크기 조절 { ((Label)sender).Font = new Font("맑은고딕", ViewList.AutoFontSize(((Label)sender)), FontStyle.Bold); }
private void Movechallenge_Resize(object sender, EventArgs e) { label1.Font = new Font("맑은고딕", (38 * (float)(this.Width * 0.0011) > 0) ? (38 * (float)(this.Width * 0.0011)) : (1), FontStyle.Bold); pictureBox1.Location = new Point(0, label1.Height); pictureBox1.Size = new Size(label1.Width, this.Height - label1.Height); int locx, locy; locx = (int)(pictureBox1.Width * 0.1); pictureBox2.Location = new Point(locx, pictureBox1.Location.Y + (int)(pictureBox1.Height * 0.25)); pictureBox3.Location = new Point(locx, pictureBox1.Location.Y + (int)(pictureBox1.Height * 0.5)); pictureBox4.Location = new Point(locx, pictureBox1.Location.Y + (int)(pictureBox1.Height * 0.75)); int pic1size = 80 + (int)((pictureBox3.Location.Y - pictureBox2.Location.Y - pictureBox2.Height) * 0.5); pictureBox2.Size = pictureBox3.Size = pictureBox4.Size = new Size(pic1size, pic1size); locx = pictureBox2.Location.X + pictureBox2.Width; locy = (int)(pictureBox2.Height * 0.25); rank1label.Location = new Point(locx, pictureBox2.Location.Y + locy); rank2label.Location = new Point(locx, pictureBox3.Location.Y + locy); rank3label.Location = new Point(locx, pictureBox4.Location.Y + locy); rank1label.Size = rank2label.Size = rank3label.Size = new Size(pictureBox1.Width - rank1label.Location.X - 10, (int)(pic1size * 0.5)); rank1label.Font = rank2label.Font = rank3label.Font = new Font("맑은고딕", ViewList.AutoFontSize(rank1label), FontStyle.Bold); panel1.SuspendLayout(); panel1.Location = new Point(label1.Width, label1.Location.Y); panel1.Size = new Size(this.Width - label1.Width, this.Height - GameEnd.Height); viewarray.ForEach(x => x.Height = panel1.Height / 8); panel1.ResumeLayout(); }
private void label1_TextChanged(object sender, EventArgs e) // 텍스트 변경시마다 폰트 크기 조절 { label1.Font = new Font("맑은고딕", ViewList.AutoFontSize(label1), FontStyle.Bold); }
private void Pacer_Resize(object sender, EventArgs e) { // movechallenge용 label1.Font = new Font("맑은고딕", (38 * (float)(this.Width * 0.0011) > 0) ? (38 * (float)(this.Width * 0.0011)) : (1), FontStyle.Bold); /* * label1은 movechallenge에서 타이머가 수동으로 폰트조절했기때문에 임시로 해놈 * label들은 autosize 속성 = false 한 후 size 수동 조절 후 autofontsize 하면 됩니다. */ pictureBox1.Location = new Point(0, label1.Height); pictureBox1.Size = new Size(label1.Width, this.Height - label1.Height); int locx, locy; locx = (int)(pictureBox1.Width * 0.1); pictureBox2.Location = new Point(locx, pictureBox1.Location.Y + (int)(pictureBox1.Height * 0.25)); pictureBox3.Location = new Point(locx, pictureBox1.Location.Y + (int)(pictureBox1.Height * 0.5)); pictureBox4.Location = new Point(locx, pictureBox1.Location.Y + (int)(pictureBox1.Height * 0.75)); int pic1size = 80 + (int)((pictureBox3.Location.Y - pictureBox2.Location.Y - pictureBox2.Height) * 0.5); pictureBox2.Size = pictureBox3.Size = pictureBox4.Size = new Size(pic1size, pic1size); locx = pictureBox2.Location.X + pictureBox2.Width; locy = (int)(pictureBox2.Height * 0.25); rank1label.Location = new Point(locx, pictureBox2.Location.Y + locy); rank2label.Location = new Point(locx, pictureBox3.Location.Y + locy); rank3label.Location = new Point(locx, pictureBox4.Location.Y + locy); rank1label.Size = rank2label.Size = rank3label.Size = new Size(pictureBox1.Width - rank1label.Location.X - 10, (int)(pic1size * 0.5)); rank1label.Font = rank2label.Font = rank3label.Font = new Font("맑은고딕", ViewList.AutoFontSize(rank1label), FontStyle.Bold); }