本文整理汇总了C#中System.Windows.Forms.Panel.Show方法的典型用法代码示例。如果您正苦于以下问题:C# Panel.Show方法的具体用法?C# Panel.Show怎么用?C# Panel.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.Panel
的用法示例。
在下文中一共展示了Panel.Show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: boxshow
void boxshow(Panel p)
{
foreach (Control x in Controls)
{
if (x.Name.StartsWith("box_"))
x.Hide();
}
p.Show();
}
示例2: Embed
public static void Embed(Panel p, Form f)
{
p.Controls.Clear(); // delete all child controls in panel
f.FormBorderStyle = FormBorderStyle.None;
f.TopLevel = false;
f.Visible = true;
f.Dock = DockStyle.Fill;
p.Controls.Add(f);//add new form into panel
p.Show(); // show panel
}
示例3: StratergySquare
public StratergySquare(Control parent, Point location)
{
DrawNum = 0;
_pObj = new Panel();
_pObj.Size = new Size(40, 40);
_pObj.BackColor = Color.Gray;
_pObj.Parent = parent;
_pObj.Location = location;
_pObj.AutoSize = true;
_pObj.Show();
_pObj.Click += _pObj_Click;
IsGlowing = false;
}
示例4: expandPanel
private void expandPanel(Panel panelName, Label l, PictureBox pb)
{
if (panelName.Visible == true)
{
panelName.Hide();
l.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(207)))), ((int)(((byte)(207)))), ((int)(((byte)(207)))));
rotateImage(pb, RotateFlipType.Rotate90FlipX);
}
else
{
panelName.Show();
l.ForeColor = System.Drawing.Color.Coral;
rotateImage(pb, RotateFlipType.Rotate90FlipX);
}
}
示例5: modifyTenantToolStripMenuItem_Click
private void modifyTenantToolStripMenuItem_Click(object sender, EventArgs e)
{
Panel display = new Panel();
Presentation.UpdateTenant tenant = new Presentation.UpdateTenant();
tenant.BringToFront();
tenant.TopLevel = false;
tenant.Visible = true;
tenant.FormBorderStyle = FormBorderStyle.None;
tenant.Dock = DockStyle.Fill;
display.Controls.Add(tenant);
display.Size = panel1.Size;
panel1.Controls.Add(display);
display.Show();
display.BringToFront();
tenant.Show();
}
示例6: AboutGUI
public AboutGUI()
{
this.Width = 415;
this.Height = 345;
this.Text = "About";
this.FormBorderStyle = FormBorderStyle.FixedSingle;
this.StartPosition = FormStartPosition.CenterParent;
this.ControlBox = false;
Panel frame = new Panel();
frame.BorderStyle = BorderStyle.FixedSingle;
frame.Left = 15;
frame.Width = 380;
frame.Top = 15;
frame.Height = 258;
frame.Show();
this.Controls.Add( frame );
Label about = new Label();
//about.BackColor = System.Drawing.Color.Green;
about.Left = 2;
about.Width = frame.Width - 4;
about.Top = 2;
about.Height = frame.Height - 4;
about.Show();
frame.Controls.Add( about );
string a = "";
a += "This backgammon program is freeware and has been part of a Master thesis on intelligent game agents. The original program and its associated paper were composed by Mikael Heinze at Aalborg University Esbjerg in Denmark in the period 2nd February to 21st December 2004.\n\n";
a += "The programs purpose was to work as a problem/test domain for an adaptive and intelligent computer player named Fuzzeval based on fuzzy logic and fuzzy control. For evaluation purpose other computer players based on other principles has also been implemented. To configure an opponent (agent) one can select what decision module that is to be used for move and cube evaluation.\n\n";
a += "This is however a greatly improved version of this original backgammon program completed at the 26th of April 2005. This version includes a large range of new features, improvements and bug fixes. Examples are a stronger computer opponent named TD-NN 2 and implementation of the cube. It is however only the two TD-NN evaluators that in reality supports cube handling.\n\n";
a += "Happy playing.";
about.Text = a;
Button ok = new Button();
ok.Text = "OK";
ok.Left = 320;
ok.Top = 280;
ok.Click += new EventHandler(ok_Click);
ok.Show();
this.Controls.Add( ok );
}
示例7: DisplayGraphItem
void DisplayGraphItem(object sender, EventArgs e)
{
FormForDisplay TMPWin = new FormForDisplay();
Panel Pan = new Panel();
Pan.Show();
cExtendedList ListValue = new cExtendedList();
for (int Idx = 0; Idx < this.listViewForClassifHistory.Items.Count; Idx++)
{
// this.listViewForCellPopulations.Items[Idx];
ListValue.Add(double.Parse(this.listViewForClassifHistory.Items[Idx].SubItems[2].Text));
}
// ListValue.Name = this.dt.Columns[e.ColumnIndex].ColumnName;
cPanelHisto PanelHisto = new cPanelHisto(ListValue, eGraphType.LINE, eOrientation.HORIZONTAL);
TMPWin.Controls.Add(PanelHisto.WindowForPanelHisto.panelForGraphContainer);
TMPWin.Show();
}
示例8: seriousNamesComeOnRobert
private void seriousNamesComeOnRobert(string fileExt)
{
string path = @"C:\ProjectSnowshoes\User\" + Properties.Settings.Default.username[Properties.Settings.Default.whoIsThisCrazyDoge] + @"\Pictures";
for (int i = 0; i < Directory.GetFiles(path, fileExt, SearchOption.AllDirectories).Length; i++)
{
FileInfo fiInf = new FileInfo(Directory.GetFiles(path, fileExt, SearchOption.AllDirectories)[i]);
char[] separator = new char[] { '.' };
string str2 = fiInf.Name.Split(separator)[0];
Panel panel = new Panel();
panel.Show();
panel.BackColor = Color.Transparent;
panel.Left = 0;
panel.Width = 180;
panel.Height = 110;
panel.Margin = new Padding(10);
this.imagePanel.Controls.Add(panel);
PictureBox box = new PictureBox();
box.Show();
box.Width = 160;
box.Height = 90;
box.Left = 10;
box.BackgroundImage = Image.FromFile(fiInf.FullName);
box.BackgroundImageLayout = ImageLayout.Zoom;
panel.Controls.Add(box);
Label label = new Label();
label.Show();
label.Width = 170;
label.AutoEllipsis = true;
label.Height = 14;
label.TextAlign = ContentAlignment.MiddleCenter;
label.Font = new Font(Properties.Settings.Default.fontsOfScience[Properties.Settings.Default.whoIsThisCrazyDoge], 11f);
label.BackColor = Color.Transparent;
label.ForeColor = Color.DarkGray;
label.Left = 5;
label.Text = str2;
label.Top = 0x5d;
panel.Controls.Add(label);
panel.Click += (senderA, args) => Process.Start(fiInf.FullName);
box.Click += (senderA, args) => Process.Start(fiInf.FullName);
label.Click += (senderA, args) => Process.Start(fiInf.FullName);
}
}
示例9: HideAllPanelsBut
private void HideAllPanelsBut(Panel p1, Panel p2, Panel p3)
{
panelSidePlayers.Hide();
panelSideTournaments.Hide();
panelPlayer.Hide();
panelPlayerList.Hide();
panelTournament.Hide();
panelTournamentsList.Hide();
panelSearch.Hide();
panelTopSearch.Hide();
p1.Show();
p2.Show();
p3.Show();
}
示例10: Task
private void Task(Panel p1, int i,int count)
{
try
{
if (p1.InvokeRequired)
{
SetTextCallback d = new SetTextCallback(Task);
p1.Invoke(d, new Object[] { p1, i,count });
}
else
{
int w = ((PopupContent)panelContainer.Tag).Width;
int h = ((PopupContent)panelContainer.Tag).Height;
int left = ((PopupContent)panelContainer.Tag).TargetControl.FindForm().Width - w - 20;
int top = ((PopupContent)panelContainer.Tag).TargetControl.FindForm().Height - 40;
if (p1.Height >= h)
{
p1.SetBounds(left, top - h,w, h);
}
else
{
p1.SetBounds(left, top - i * (int)Convert.ToDouble(h / count), p1.Width, i * (int)Convert.ToDouble(h / count));
}
if (!p1.Visible)
{
p1.Show();
}
}
}
catch (Exception ex)
{
throw new Exception("Task函数执行错误");
}
}
示例11: Shadow
private void Shadow(Panel p1, int i,int count)
{
try
{
if (p1.InvokeRequired)
{
SetTextCallback d = new SetTextCallback(Shadow);
p1.Invoke(d, new Object[] { p1, i, count });
}
else
{
int w = ((PopupContent)panelContainer.Tag).Width;
int h = ((PopupContent)panelContainer.Tag).Height;
if (p1.Width >= w)
p1.Width = w;
else
p1.Width = i * (int)Convert.ToDouble(w / count);
if (p1.Height >= h)
p1.Height = h;
else
p1.Height = i * (int)Convert.ToDouble(h / count);
if (!p1.Visible)
{
p1.Show();
}
}
}
catch (Exception ex)
{
throw new Exception("ShowPanel函数执行错误");
}
}
示例12: ShowLayerPanel
private void ShowLayerPanel(Panel pnlShow) {
this.pnlMainLayerServer.Hide();
this.pnlStartPRoConLayer.Hide();
this.pnlAccountPrivileges.Hide();
this.m_blEditingPrivileges = false;
if (pnlShow == this.pnlMainLayerServer) {
this.lsvLayerAccounts.SelectedItems.Clear();
}
else if (pnlShow == this.pnlAccountPrivileges) {
this.m_blEditingPrivileges = true;
// Should be but still..
if (this.lsvLayerAccounts.SelectedItems.Count > 0) {
this.uscPrivileges.AccountName = this.lsvLayerAccounts.SelectedItems[0].Text;
}
if (this.lsvLayerAccounts.SelectedItems.Count > 0) {
CPrivileges spPrivs = (CPrivileges)this.lsvLayerAccounts.SelectedItems[0].SubItems[1].Tag;
this.uscPrivileges.Privileges = spPrivs;
}
else {
this.uscPrivileges.Privileges = new CPrivileges();
}
}
pnlShow.Show();
}
示例13: PanelDisplay
/*************************************************makes the panels appear/disappear***************************************************************/
private void PanelDisplay(Panel panel, ToolStripMenuItem toolStripMenuItem)
{
/*make the corresponding panel appear/disappear*/
if (panel.Visible == false)
{
toolStripMenuItem.Checked = true;
panel.Show();
}
else
{
panel.Hide();
toolStripMenuItem.Checked = false;
}
}
示例14: goGenerateTilesFriendship
private void goGenerateTilesFriendship()
{
String pathPlease = @"C:\ProjectSnowshoes\User\" + Properties.Settings.Default.username[Properties.Settings.Default.whoIsThisCrazyDoge] + @"\Space";
for (int i = 0; i < Directory.GetFiles(pathPlease,"*.*",SearchOption.TopDirectoryOnly).Length; i++) {
FileInfo fiInf = new FileInfo(Directory.GetFiles(pathPlease, "*.*", SearchOption.TopDirectoryOnly)[i]);
String fiInfStr = fiInf.Name;
String fiInfStillWIthExt = fiInfStr;
fiInfStr = fiInfStr.Split('.')[0];
// if (fiInfStillWIthExt != "desktop.ini" ||
if ((fiInf.Attributes & FileAttributes.Hidden) != FileAttributes.Hidden)
{
String panelname = "app" + i;
Panel app1 = new Panel();
app1.Show();
app1.BackColor = Color.Transparent;
app1.Width = 150;
app1.Height = 150;
app1.Margin = new Padding(20);
app1.BackgroundImageLayout = ImageLayout.Stretch;
iconMatch(Directory.GetFiles(pathPlease, "*.*", SearchOption.TopDirectoryOnly)[i]);
DoubleBufferManipulation.SetDoubleBuffered(app1);
spaceForIcons.Controls.Add(app1);
Panel turnip = new Panel();
turnip.Show();
turnip.BackColor = Color.Transparent;
turnip.Width = 150;
turnip.Height = 150;
turnip.BackgroundImageLayout = ImageLayout.Zoom;
IconManager areYouForRealRightNowLikeReallyRealVSWow = new IconManager();
app1.BackColor = Color.FromName(Properties.Settings.Default.custColor[Properties.Settings.Default.whoIsThisCrazyDoge]);
//app1.BackgroundImage = Properties.Resources._20pertrans_lighterGray;
turnip.BackgroundImage = areYouForRealRightNowLikeReallyRealVSWow.icoExtReturner(fiInf.FullName, fiInfStr, true);
DoubleBufferManipulation.SetDoubleBuffered(turnip);
app1.Controls.Add(turnip);
turnip.Left = 0;
turnip.Top = 0;
Label whatEvenIsThis = new Label();
whatEvenIsThis.BackColor = Color.Transparent;
whatEvenIsThis.Show();
/*ImageFactory imga = new ImageFactory();
Properties.Resources.TheOpacityIsAlmostReal.Save("C:\\ProjectSnowshoes\\loginbacktempAA.png");
imga.Load("C:\\ProjectSnowshoes\\loginbacktempAA.png");
imga.Tint(Color.FromName(Properties.Settings.Default.custColor[Properties.Settings.Default.whoIsThisCrazyDoge]));
whatEvenIsThis.BackgroundImage = imga.Image;*/
whatEvenIsThis.BackgroundImage = Image.FromFile("C:\\ProjectSnowshoes\\loginbacktempAA.png");
whatEvenIsThis.Width = 150;
whatEvenIsThis.Height = 40;
/* whatEvenIsThis.Text = Directory.GetFiles(pathPlease, "*.*", SearchOption.TopDirectoryOnly)[i];
FileInfo fiInf = new FileInfo(Directory.GetFiles(pathPlease, "*.*", SearchOption.TopDirectoryOnly)[i]);
String fiInfStr = fiInf.Name;
fiInfStr = fiInfStr.Split('.')[0]; */
whatEvenIsThis.AutoSize = false;
whatEvenIsThis.TextAlign = ContentAlignment.MiddleCenter;
whatEvenIsThis.Text = fiInfStr;
whatEvenIsThis.ForeColor = Color.White;
whatEvenIsThis.Font = new System.Drawing.Font(Properties.Settings.Default.fontsOfScience[Properties.Settings.Default.whoIsThisCrazyDoge], 10);
turnip.Controls.Add(whatEvenIsThis);
whatEvenIsThis.BringToFront();
DoubleBufferManipulation.SetDoubleBuffered(whatEvenIsThis);
whatEvenIsThis.Left = 0;
whatEvenIsThis.Top = 110;
/* app1.Click += hmThatIsAReallyInterestingActionWow;
turnip.Click += hmThatIsAReallyInterestingActionWow;
whatEvenIsThis.Click += hmThatIsAReallyInterestingActionWow; */
// Yes, I had to refer to StackOverflow in order to remember how to do this following portion.
// Yes, I'm doing that a lot.
// Yes, you and my doge are judging me harshly right now.
app1.Click += (sender, args) =>
{
System.Diagnostics.Process.Start(fiInf.FullName);
};
turnip.Click += (sender, args) =>
{
System.Diagnostics.Process.Start(fiInf.FullName);
};
whatEvenIsThis.Click += (sender, args) =>
//.........这里部分代码省略.........
示例15: newPlayerCombatantUIRow
private void newPlayerCombatantUIRow(int i)
{
Panel combatantPanel = new System.Windows.Forms.Panel();
Button combatantInfo = new System.Windows.Forms.Button();
Button healButton = new System.Windows.Forms.Button();
Button damageButton = new System.Windows.Forms.Button();
TextBox damageTextBox = new System.Windows.Forms.TextBox();
Label combatantHP = new System.Windows.Forms.Label();
Label combatantAC = new System.Windows.Forms.Label();
Label combatantName = new System.Windows.Forms.Label();
this.combatTab.Controls.Add(combatantPanel);
combatantPanel.SuspendLayout();
//
// combatantPanel
//
combatantPanel.Controls.Add(combatantInfo);
combatantPanel.Controls.Add(healButton);
combatantPanel.Controls.Add(damageButton);
combatantPanel.Controls.Add(damageTextBox);
combatantPanel.Controls.Add(combatantHP);
combatantPanel.Controls.Add(combatantAC);
combatantPanel.Controls.Add(combatantName);
combatantPanel.Name = "combatantPanel" + i;
combatantPanel.Parent = this.combatTab;
combatantPanel.Size = new System.Drawing.Size(714, 30);
combatantPanel.Location = new System.Drawing.Point(6, 31 + (i * ROW_HEIGHT));
combatantPanel.BorderStyle = BorderStyle.FixedSingle;
combatantPanel.TabIndex = 1;
combatantPanel.Show();
if (i % 2 == 1)
{
combatantPanel.BackColor = Color.LightBlue;
}
//
// combatantInfo
//
combatantInfo.Name = "combatantInfo" + i;
combatantInfo.Size = new System.Drawing.Size(28, 23);
combatantInfo.Location = new System.Drawing.Point(683, 2);
combatantInfo.TabIndex = 6;
combatantInfo.Text = "...";
combatantInfo.UseVisualStyleBackColor = true;
combatantInfo.Parent = combatantPanel;
combatantInfo.Show();
//
// healButton
//
healButton.Name = "healButton" + i;
healButton.Size = new System.Drawing.Size(19, 23);
healButton.Location = new System.Drawing.Point(600, 2);
healButton.TabIndex = 5;
healButton.Text = "+";
healButton.UseVisualStyleBackColor = true;
healButton.Parent = combatantPanel;
healButton.Show();
//
// damageButton
//
damageButton.Name = "damageButton" + i;
damageButton.Size = new System.Drawing.Size(19, 23);
damageButton.Location = new System.Drawing.Point(578, 2);
damageButton.TabIndex = 4;
damageButton.Text = "-";
damageButton.UseVisualStyleBackColor = true;
damageButton.Parent = combatantPanel;
damageButton.Show();
//
// damageTextBox
//
damageTextBox.Name = "damageTextBox" + i;
damageTextBox.Size = new System.Drawing.Size(45, 22);
damageTextBox.Location = new System.Drawing.Point(530, 2);
damageTextBox.TabIndex = 3;
damageButton.Parent = combatantPanel;
damageButton.Show();
//
// combatantHP
//
combatantHP.AutoSize = true;
combatantHP.Font = new System.Drawing.Font("Calibri", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
combatantHP.Name = "combatantHP" + i;
combatantHP.Size = new System.Drawing.Size(71, 23);
combatantHP.Location = new System.Drawing.Point(400, 2);
combatantHP.TabIndex = 2;
combatantHP.Text = String.Format("HP: {0}/{1}", GameManagement.playerCharacters[i].currentHitPoints, GameManagement.playerCharacters[i].hitPoints);
combatantHP.Parent = combatantPanel;
combatantHP.Show();
//
// combatantAC
//
combatantAC.AutoSize = true;
combatantAC.Font = new System.Drawing.Font("Calibri", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
//.........这里部分代码省略.........