private void frmMain_Load(object sender, EventArgs e) { frmMain.storage.Load(); if (frmMain.storage.StorageObject == null) { frmMain.storage.StorageObject = new ClientUserSettings(); frmMain.storage.Save(); } this.uC_Grid_Consultas2.Populate(DateTime.Now); currentControl = this.uC_Grid_Consultas2; try { ClinicaMerced.Backend.lic.chk(); } catch (TechnicalException te) { if (te.ErrorId != "101") { navBarControl1.Enabled = false; this.currentControl.Enabled = false; } MessageBox.Show(te.Message, te.Source, MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning); this.Text = this.Text + " " + te.Message; } //LoadAuthenticationForm(); }
void AddContronToPannel(Xtra_UC_Base ctrl, object obj) { //if (ctrl == null) //{ // string type = ctrl.AccessibleDescription; // ctrl = (Xtra_UC_Base)Fwk.HelperFunctions.ReflectionFunctions.CreateInstance(type); //} if (!this.splitContainer1.Panel2.Contains(ctrl)) { currentControl = ctrl; ctrl.Populate(obj); this.splitContainer1.Panel2.Controls.Add(ctrl); ctrl.Location = new System.Drawing.Point(0, 0); ctrl.Dock = System.Windows.Forms.DockStyle.Fill; } ctrl.BringToFront(); }