本文整理汇总了C#中Panel.Show方法的典型用法代码示例。如果您正苦于以下问题:C# Panel.Show方法的具体用法?C# Panel.Show怎么用?C# Panel.Show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Panel
的用法示例。
在下文中一共展示了Panel.Show方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoginOK_Click
private void LoginOK_Click(object sender, EventArgs e)
{
Panel Panel = new Panel();
Panel.Show();
Program.Start1.Hide();
this.Close();
}
示例2: Gosc_Click
private void Gosc_Click(object sender, EventArgs e)
{
Panel Panel = new Panel();
Program.Start1.Hide();
Panel.MOcenyGroup.Enabled = false;
Panel.DaneGroup.Enabled = false;
Panel.POcenaGroup.Enabled = false;
Panel.PanelTabControl.SelectedTab = Panel.TabZespoly;
Panel.Show();
}
示例3: btnEntrar_Click
private void btnEntrar_Click(object sender, EventArgs e)
{
if (tbxUser.Text == "admin" && tbxPass.Text == "admin")
{
Panel panel = new Panel();
panel.Show();
tbxPass.Text = String.Empty;
tbxUser.Text = String.Empty;
}
else
{
lblPassIncorrect.Text = "Verifique el usuario y contraseña";
}
}
示例4: Button1Click
void Button1Click(object sender, EventArgs e)
{
if (textBox1.Text == usuario && textBox2.Text == contraseña)
{
MessageBox.Show("Bienvenido al sistema");
Panel p= new Panel();
p.Show();
this.Visible = false;
}
else {
MessageBox.Show("Usuario o contraseña incorrectos");
}
}
示例5: button2_Click
private void button2_Click(object sender, EventArgs e)
{
form1 = new Panel();
form1.FormClosing += (s, es) => Close();
Hide();
form1.Show();
form1.Focus();
}
示例6: ConfigureDisplayPanel
/// <summary>
/// Configure the watch user controls required to display the specified <paramref name="workset"/> and then add these to the specified
/// <paramref name="displayPanel"/>.
/// </summary>
/// <param name="workset">The workset that is to be used to configure the watch user controls.</param>
/// <param name="displayPanel">The <c>Panel</c> to which the configured watch user controls are to be added.</param>
/// <param name="watchControlSize">The size to make each watch user control.</param>
/// <remarks>This method uses the <c>UserControl</c> class to: (a) layout and initialize all of the controls required to display the watch variables
/// associated with the specified worset and (b) add these to the tabpage/panel associated with the display.
/// </remarks>
protected void ConfigureDisplayPanel(Workset_t workset, Panel displayPanel, VariableControlSize_t watchControlSize)
{
// Skip, if the Dispose() method has been called.
if (IsDisposed)
{
return;
}
// Clear the panel to which the controls are to be added.
displayPanel.Hide();
displayPanel.Controls.Clear();
// Instantiate the watch control jagged array.
m_WatchControls = new WatchControl[workset.Column.Length][];
for (int columnIndex = 0; columnIndex < workset.Column.Length; columnIndex++)
{
m_WatchControls[columnIndex] = new WatchControl[workset.Column[columnIndex].OldIdentifierList.Count];
}
// Create a separate panel for each display column.
Panel[] panelColumn = new Panel[workset.Column.Length];
for (int columnIndex = 0; columnIndex < workset.Column.Length; columnIndex++)
{
panelColumn[columnIndex] = new Panel();
panelColumn[columnIndex].AutoSize = true;
panelColumn[columnIndex].Location = new Point(columnIndex * (watchControlSize.Size.Width + watchControlSize.Margin.Horizontal), 0);
m_WatchControlLayout.WriteColumnHeaders(workset.Column[columnIndex].HeaderText, panelColumn[columnIndex], watchControlSize);
m_WatchControlLayout.ConfigureWatchControls(m_WatchControls[columnIndex], panelColumn[columnIndex], watchControlSize,
workset.Column[columnIndex].OldIdentifierList);
// Do not add the panel to the controls associated with the 'displayPanel' parameter if the last column of the workset does not contain any watch
// variables AND no header text is defined. This ensures that the horizontal scroll bar is not displayed.
if ((columnIndex == workset.Column.Length - 1) &&
(workset.Column[columnIndex].OldIdentifierList.Count == 0) &&
(workset.Column[columnIndex].HeaderText.Equals(string.Empty)))
{
break;
}
else
{
displayPanel.Controls.Add(panelColumn[columnIndex]);
}
}
displayPanel.Show();
}
示例7: UserCheck
/*Inny sposob na logowanie (uboższy bo nie zwraca ID klienta, co nie pozwala rozkminic kto jest zalogowany - wiec nie do wykorzystania, ale narazie niech lezy)
public bool UserCheck()
{
string ConnectionString = "Server=(localdb)\\Projects;Database=Proba;Trusted_Connection=True;";
SqlConnection Conn = new SqlConnection(ConnectionString);
Conn.Open();
CheckUser = "SELECT Id, Imie, Nazwisko " +
"FROM Pracownik " +
"WHERE Imie = '" + LoginBox.Text + "'" +
"AND Nazwisko = '" + HasloBox.Text + "'";
SqlCommand DataCmd = new SqlCommand(CheckUser, Conn);
SqlDataReader Data = DataCmd.ExecuteReader();
if (Data.HasRows)
{
Data.Close();
Conn.Close();
return true;
}
else
{
Data.Close();
Conn.Close();
return false;
}
}
*/
private void LoginOK_Click(object sender, EventArgs e)
{
pictureBox1.Enabled = true;
pictureBox1.Visible = true;
Application.DoEvents();
LoginOK.Enabled = false;
LoginAnuluj.Enabled = false;
LoginBox.Enabled = false;
HasloBox.Enabled = false;
Program.ID_zalogowanego = DaneLogowania();
if (Program.ID_zalogowanego != 0)
{
pictureBox1.Visible = false;
pictureBox1.Enabled = false;
LoginOK.Enabled = true;
LoginAnuluj.Enabled = true;
pictureBox1.Visible = false;
pictureBox1.Enabled = false;
Panel Panel = new Panel();
Panel.Show();
Panel.Dane_uzytkownika_Show();
Program.Start1.Hide();
this.Close();
}
else
{
MessageBox.Show("Błędny Login i/lub Hasło");
HasloBox.Clear();
pictureBox1.Visible = false;
pictureBox1.Enabled = false;
LoginOK.Enabled = true;
LoginAnuluj.Enabled = true;
LoginBox.Enabled = true;
HasloBox.Enabled = true;
}
}
示例8: Gosc_Click
private void Gosc_Click(object sender, EventArgs e)
{
Panel Panel = new Panel();
Program.Start1.Hide();
Panel.Show();
}
示例9: Execute
public static void Execute(Atom parent)
{
var code = new Div ();
new Div (d=>{
d.ClassName="bs-docs-example";
UI.CreateContainer( d, ct=>{
UI.CreateRowFluid(ct, r=>{
new Div(r, sp=>{
sp.ClassName="span5";
var p1 =CreatePanel("Apps");
new Div(pi=>{
pi.ClassName="c-icons";
pi.Append("<style>img {height: 40px;} .c-icon {height: 95px;}</style>");
foreach( var app in GetApps()){
new ImgPicture(pi, img=>{
img.Img.Src=app.Icon;
img.Text=app.Title;
img.Clicked+= (e) =>{e.PreventDefault(); app.Title.LogInfo();};
});
}
p1.Add(pi);
});
var p2 =CreatePanel("Demo");
var color = new TextField();
var bb = new Button("Change background");
bb.Clicked+= (e) => p2.Body.Style.BackgroundColor= color.Value;
var bc = new Button("collapse");
bc.Clicked+= (e) => p2.Collapse();
p2.Add(color);
p2.Add(bb);
p2.Add(bc);
sp.JQuery.Append(p1).Append(p2);
});
new Div(r, sp=>{
sp.ClassName="span5";
var p1 =CreatePanel("El Coyote");
new Div( cy=>{
cy.ClassName="span2";
new Image(cy,i=>{
i.Src="img/coyote.jpg";
i.Style.Height="100px";
});
p1.Add(cy);
});
new Div( cy=>{
cy.ClassName="span10";
cy.Append(@"<i><b>El <a href='https://es.wikipedia.org/wiki/Coyote' title='Coyote' target='_blank'>Coyote</a> y el <a href='https://es.wikipedia.org/wiki/Geococcyx_californianus' title='Geococcyx californianus' target='_blank'>Correcaminos</a></b></i> (<i><b>Wile E. Coyote</b> and the <b>Road Runner</b></i>) son los personajes de una serie <a href='https://es.wikipedia.org/wiki/Estados_Unidos' title='Estados Unidos' target='_blank'>estadounidense</a> de <a href='https://es.wikipedia.org/wiki/Dibujos_animados' title='Dibujos animados' target='_blank'>dibujos animados</a> creada en el año de <a href='https://es.wikipedia.org/wiki/1949' title='1949' target='_blank'>1949</a> por el animador <a href='https://es.wikipedia.org/wiki/Chuck_Jones' title='Chuck Jones' target='_blank'>Chuck Jones</a> para <a href='https://es.wikipedia.org/wiki/Warner_Brothers' title='Warner Brothers' target='_blank'>Warner Brothers</a>. Chuck Jones se inspiró para crear a estos personajes en un libro de <a href='https://es.wikipedia.org/wiki/Mark_Twain' title='Mark Twain' target='_blank'>Mark Twain</a>, titulado <i>Roughin It</i>, en el que Twain denotaba que los coyotes hambrientos podrían cazar un correcaminos.
<a href='https://es.wikipedia.org/wiki/El_Coyote_y_el_Correcaminos' title='Coyote' target='_blank'>El Coyote (wikipedia)</a> ");
p1.Add(cy);
});
var p2 =CreatePanel("Table");
var tb = new Table<App>("title");
tb.Load(GetApps());
p2.Add(tb);
sp.JQuery.Append(p1).Append(p2);
});
});
});
var wn=1;
new Button(d, bt=>{
bt.Text="Window I";
bt.Clicked+=evt=>{
new Panel( new PanelOptions{Overlay=true}){
Caption="Window " +(wn++).ToString(),
Left=(wn*5).ToString()+"px",
Top=(wn*15).ToString()+"px",
Width="300px",
Height="100px",
}.Show();
};
});
//.........这里部分代码省略.........
示例10: ConfigureDisplayPanel
/// <summary>
/// Configure the watch user controls required to display the specified <paramref name="workset"/> and then add these to the specified
/// <paramref name="displayPanel"/>.
/// </summary>
/// <param name="workset">The workset that is to be used to configure the watch user controls.</param>
/// <param name="displayPanel">The <c>Panel</c> to which the configured watch user controls are to be added.</param>
/// <param name="watchControlSize">The size to make each watch user control.</param>
/// <remarks>This method uses the <c>UserControl</c> class to: (a) layout and initialize all of the controls required to display the watch variables
/// associated with the specified worset and (b) add these to the tabpage/panel associated with the display.
/// </remarks>
protected void ConfigureDisplayPanel(Workset_t workset, Panel displayPanel, VariableControlSize_t watchControlSize)
{
// Skip, if the Dispose() method has been called.
if (IsDisposed)
{
return;
}
// Clear the panel to which the controls are to be added.
displayPanel.Hide();
displayPanel.Controls.Clear();
// Instantiate the watch control jagged array.
m_WatchControls = new WatchControl[workset.Column.Length][];
for (int columnIndex = 0; columnIndex < workset.Column.Length; columnIndex++)
{
m_WatchControls[columnIndex] = new WatchControl[workset.Column[columnIndex].OldIdentifierList.Count];
}
// Create a separate panel for each display column.
Panel[] panelColumn = new Panel[workset.Column.Length];
for (int columnIndex = 0; columnIndex < workset.Column.Length; columnIndex++)
{
panelColumn[columnIndex] = new Panel();
panelColumn[columnIndex].AutoSize = true;
panelColumn[columnIndex].Location = new Point(columnIndex * (watchControlSize.Size.Width + watchControlSize.Margin.Horizontal), 0);
m_WatchControlLayout.WriteColumnHeaders(workset.Column[columnIndex].HeaderText, panelColumn[columnIndex], watchControlSize);
m_WatchControlLayout.ConfigureWatchControls(m_WatchControls[columnIndex], panelColumn[columnIndex], watchControlSize,
workset.Column[columnIndex].OldIdentifierList);
displayPanel.Controls.Add(panelColumn[columnIndex]);
}
displayPanel.Show();
}