Пример #1
0
        private void MainWindow_Load(object sender, EventArgs e)
        {
            DefaultLayout defaultForm = new DefaultLayout(this.CurrentUser, this, "SELECT * FROM default_view");

            defaultForm.MdiParent = this;
            defaultForm.Show();
        }
Пример #2
0
 public AddElement(User user, MainWindow parent, DefaultLayout senderForm = null)
 {
     this.currentUser = user;
     this.senderForm  = senderForm;
     this.parent      = parent;
     InitializeComponent();
     RefreshAuthors();
     RefreshCategories();
 }
Пример #3
0
        private void generalViewToolStripMenuItem_Click(object sender, EventArgs e)
        {
            bool isOpen = false;

            foreach (Form form in this.MdiChildren)
            {
                if (form is DefaultLayout && form.Text == "General")
                {
                    this.ActivateMdiChild(form);
                    form.BringToFront();
                    isOpen = true;
                }
            }
            if (!isOpen)
            {
                DefaultLayout defaultForm = new DefaultLayout(this.currentUser, this, "SELECT * FROM default_view");
                defaultForm.MdiParent = this;
                defaultForm.Show();
            }
        }