Esempio n. 1
0
        private void newToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            FrmTemplate frmTemplate = new FrmTemplate();

            frmTemplate.Name = "frmTemplate";
            if (exist(frmTemplate))
            {
                frmTemplate.MdiParent     = this;
                frmTemplate.StartPosition = FormStartPosition.CenterScreen;
                frmTemplate.Show();
            }
        }
Esempio n. 2
0
        private void 模板ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmTemplate frmTemplate = new FrmTemplate();

            frmTemplate.Name = "frmTemplate";
            frmTemplate.Show(Home.Instance.dockPanel1);
            if (exist(frmTemplate))
            {
                frmTemplate.MdiParent     = this;
                frmTemplate.StartPosition = FormStartPosition.CenterScreen;
                frmTemplate.Show();
            }
        }
Esempio n. 3
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if (gvTemplates.SelectedRows.Count > 0)
     {
         FrmTemplate frmTemplate = new FrmTemplate(gvTemplates.SelectedRows[0].Cells["RealName"].Value.ToString());
         frmTemplate.StartPosition = FormStartPosition.CenterScreen;
         frmTemplate.MdiParent     = this.MdiParent;
         frmTemplate.Show();
         this.Close();
     }
     else
     {
         MessageBox.Show("Select a template.", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }