private void MetroTileMenu_Click(object sender, EventArgs e)
 {
     try
     {
         MetroTile menuClick = (MetroTile)sender;
         MetroFramework.Forms.MetroForm oForm = new MetroFramework.Forms.MetroForm();
         string   dll       = "UI2";
         Assembly assCadena = Assembly.LoadFrom(AppDomain.CurrentDomain.BaseDirectory + dll + ".dll");
         oForm               = (MetroFramework.Forms.MetroForm)assCadena.CreateInstance("UI2.frm_" + menuClick.Name);
         oForm.MdiParent     = this;
         oForm.Dock          = DockStyle.Fill;
         oForm.StartPosition = FormStartPosition.CenterParent;
         oForm.BringToFront();
         oForm.WindowState           = FormWindowState.Maximized;
         oForm.MaximizeBox           = false;
         oForm.MinimizeBox           = false;
         ContenedorPrincipal.Visible = false;
         oForm.FormClosed           += OForm_FormClosed;
         oForm.Show();
     }
     catch (Exception ex)
     {
         //throw new Exception();
     }
 }
Ejemplo n.º 2
0
 private void MainScreen_Load(object sender, EventArgs e)
 {
     specialTextbox = SpecialTextbox.Instance;
     auth           = Authorization.Instance;
     MetroFramework.Forms.MetroForm form = Authorization.Instance.AdminForms(PersonelController.Instance.KullaniciTipiBul(Authorization.user))[0];
     form.MdiParent   = this;
     form.Dock        = DockStyle.Fill;//parent'in içini doldur
     form.WindowState = System.Windows.Forms.FormWindowState.Maximized;
     form.Show();
     string[] tabNames = Authorization.Instance.TabControlPageNames(PersonelController.Instance.KullaniciTipiBul(Authorization.user));
     foreach (string tabName in tabNames)
     {
         mTab.TabPages.Add(new TabPage(tabName));
     }
 }
Ejemplo n.º 3
0
        public void initializeBrowser(String url)
        {
            Cef.Initialize(new CefSettings());
            browser = new ChromiumWebBrowser(url);
            this.Controls.Add(browser);

            authWindow = new MetroFramework.Forms.MetroForm();
            authWindow.StartPosition = FormStartPosition.CenterScreen;
            authWindow.Height        = 800;
            authWindow.Width         = 500;
            authWindow.Show();
            browser.Width  = 500;
            browser.Height = 800;
            authWindow.Controls.Add(browser);
            //browser.Dock = DockStyle.Fill;

            //Event Handler
            browser.AddressChanged += onBrowserAddressChanged;
        }
Ejemplo n.º 4
0
        private void mTab_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (MdiChildren.Count() > 0) //eğer bir çocuk form açıksa
            {
                ActiveMdiChild.Close();  //açık olanı kapat
            }

            try
            {
                MetroFramework.Forms.MetroForm form = Authorization.Instance.AdminForms(PersonelController.Instance.KullaniciTipiBul(Authorization.user))[mTab.SelectedIndex];
                form.MdiParent   = this;
                form.Dock        = DockStyle.Fill;//parent'in içini doldur
                form.WindowState = System.Windows.Forms.FormWindowState.Maximized;
                form.Show();
            }
            catch
            {
                MessageBox.Show(mTab.SelectedIndex + " ");
            }
        }
Ejemplo n.º 5
0
 private void AbrirFormulario(string ruta)
 {
     try
     {
         MetroFramework.Forms.MetroForm oForm = new MetroFramework.Forms.MetroForm();
         string   dll       = "UI2";
         Assembly assCadena = Assembly.LoadFrom(AppDomain.CurrentDomain.BaseDirectory + dll + ".dll");
         oForm             = (MetroFramework.Forms.MetroForm)assCadena.CreateInstance(ruta);
         oForm.MdiParent   = Padre;
         oForm.FormClosed += OForm_FormClosed;
         //oForm.Dock = DockStyle.Fill;
         oForm.StartPosition = FormStartPosition.CenterParent;
         oForm.BringToFront();
         oForm.Show();
         pnlPrincipal.Visible = false;
     }
     catch (Exception ex)
     {
         //throw new Exception();
     }
 }
 private void BtnBack_Click(object sender, EventArgs e)
 {
     this.Dispose();
     form.Show();
 }
        private void btnAutonomous_Click(object sender, EventArgs e)
        {
            if (lstboxAutonomousChooser.SelectedItem == null || lstboxAutonomousChooser.SelectedItem.ToString().Length == 0) return;
            MetroFramework.Forms.MetroForm autoForm = new MetroFramework.Forms.MetroForm();
            MetroFramework.Controls.MetroPanel p = new MetroFramework.Controls.MetroPanel();
            p.Name = "panel";

            string[] autoParams = autonomousDict[lstboxAutonomousChooser.SelectedItem.ToString()];
            if (autoParams.Length < 2) return;
            for (int i = 1; i < autoParams.Length; i++)
            {
                MetroFramework.Controls.MetroLabel lbl = new MetroFramework.Controls.MetroLabel();
                lbl.Text = autoParams[i].Substring(0, autoParams[i].IndexOf(":"));
                lbl.Location = new Point(10, 30 + 30 * i);
                p.Controls.Add(lbl);
                Control c;
                string ControlText = autoParams[i].Substring(autoParams[i].IndexOf(":") + 1);
                switch (ControlText)
                {
                    case "TextBox":
                        c = new MetroFramework.Controls.MetroTextBox();
                        c.Size = new Size(100, lbl.Height);
                        break;
                    case "CheckBox":
                        c = new MetroFramework.Controls.MetroCheckBox();
                        break;
                    default:
                        MessageBox.Show("Unsupported Control");
                        return;
                }
                c.Location = new Point(10 + lbl.Width, 30 + 30 * i);
                p.Controls.Add(c);
            }
            p.Top = 55;
            p.Width = autoForm.Width;
            p.Height = autoForm.Height - p.Top;
            autoForm.Controls.Add(p);
            autoForm.Text = lstboxAutonomousChooser.SelectedItem.ToString();
            autoForm.PerformLayout();
            autoForm.Show();
            autoForm.FormClosing += autoForm_FormClosing;
        }
 private void metroTile1_Click(object sender, EventArgs e)
 {
     contactLense.Show();
     this.Close();
 }
 private void UI_DASHBOARD_FormClosed(object sender, FormClosedEventArgs e)
 {
     f.Show();
     f.ShowInTaskbar = true;
 }
Ejemplo n.º 10
0
 private void metroTile4_Click(object sender, EventArgs e)
 {
     this.Dispose();
     parent.Show();
 }