Levelcode-IBRCAD/IBRCAD/frm_dashboard_home.cs

56 lines
1.6 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace IBRCAD
{
public partial class frm_dashboard_home : Form
{
public frm_dashboard_home()
{
InitializeComponent();
}
private void timer1_Tick(object sender, EventArgs e)
{
lblhora.Text = DateTime.Now.ToString("hh:mm:ss ");
lblFecha.Text = DateTime.Now.ToLongDateString();
}
private void lbl_more_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
frm_dashboardMore frm = new frm_dashboardMore();
frm_main_menu frm_Main_Menu = new frm_main_menu();
frm_Main_Menu.openChildForm(frm);
}
private Form activeForm = null;
public void openChildForm(Form childForm)
{
if (activeForm != null)
activeForm.Close();
activeForm = childForm;
childForm.TopLevel = false;
childForm.FormBorderStyle = FormBorderStyle.None;
childForm.Dock = DockStyle.Fill;
pn_show.Controls.Add(childForm);
pn_show.Tag = childForm;
childForm.BringToFront();
childForm.Show();
}//end openchildform
private void lbl_more_LinkClicked_1(object sender, LinkLabelLinkClickedEventArgs e)
{
this.openChildForm(new frm_dashboardMore());
}
}
}