示例#1
0
 private DataGridViewUserControl getActiveClanoviDataGridViewUserControl()
 {
     foreach (Control c in tabControl1.SelectedTab.Controls)
     {
         EkipeUserControl c2 = c as EkipeUserControl;
         if (c2 != null)
         {
             return(c2.ClanoviDataGridViewUserControl);
         }
     }
     return(null);
 }
示例#2
0
        private void initTab(int i, TabPage tabPage, RezultatskoTakmicenje rezTakmicenje)
        {
            EkipeUserControl ekipeUserControl = new EkipeUserControl();

            ekipeUserControl.Anchor   = this.ekipeUserControl1.Anchor;
            ekipeUserControl.Location = this.ekipeUserControl1.Location;
            ekipeUserControl.Size     = this.ekipeUserControl1.Size;
            ekipeUserControl.TabIndex = this.ekipeUserControl1.TabIndex;
            ekipeUserControl.EkipeDataGridViewUserControl.DataGridView.CellMouseClick +=
                new DataGridViewCellMouseEventHandler(DataGridView_CellMouseClick);
            ekipeUserControl.EkipeDataGridViewUserControl.DataGridView.MultiSelect   = false;
            ekipeUserControl.ClanoviDataGridViewUserControl.DataGridView.MultiSelect = false;

            tabPage.SuspendLayout();
            tabPage.Controls.Add(ekipeUserControl);
            tabPage.Location = this.tabPage1.Location;
            tabPage.Padding  = this.tabPage1.Padding;
            tabPage.Size     = this.tabPage1.Size;
            tabPage.TabIndex = i;
            tabPage.Text     = rezTakmicenje.NazivEkipnog;
            tabPage.UseVisualStyleBackColor = this.tabPage1.UseVisualStyleBackColor;
            tabPage.ResumeLayout(false);
        }