Beispiel #1
0
        private void SearchButton_Click(object sender, EventArgs e)
        {
            frmMain.MainPanel.Controls.Clear();
            UserSearchResultForm searchResultForm = new UserSearchResultForm(frmMain, ButtonState, SearchBox.Text);

            searchResultForm.TopLevel = false;
            searchResultForm.Dock     = DockStyle.Fill;
            frmMain.MainPanel.Controls.Add(searchResultForm);
            searchResultForm.Tag = true;
            searchResultForm.Show();
        }
Beispiel #2
0
 private void ReturnButton_Click(object sender, EventArgs e)
 {
     if (ReturnButton.Tag != null)
     {
         if ((int)ReturnButton.Tag == 1)
         {
             MainPanel.Controls.Clear();
             UserSearchForm searchForm = new UserSearchForm(this);
             searchForm.TopLevel = false;
             searchForm.Dock     = DockStyle.Fill;
             MainPanel.Controls.Add(searchForm);
             searchForm.Show();
             ReturnButton.Tag = null;
         }
         else if ((int)ReturnButton.Tag == 2)
         {
             MainPanel.Controls.Clear();
             UserSearchResultForm searchResultForm = new UserSearchResultForm(this, 0, "");
             searchResultForm.TopLevel = false;
             searchResultForm.Dock     = DockStyle.Fill;
             MainPanel.Controls.Add(searchResultForm);
             searchResultForm.Tag = false;
             searchResultForm.Show();
             ReturnButton.Tag = 1;
         }
         else if ((int)ReturnButton.Tag == 3)
         {
             MainPanel.Controls.Clear();
             UserForm userForm = new UserForm(this);
             userForm.TopLevel = false;
             userForm.Dock     = DockStyle.Fill;
             MainPanel.Controls.Add(userForm);
             userForm.Show();
         }
     }
 }