internal void Show() { // force SetDockContainerVisible to do the work Visible = false; BarUtilities.SetDockContainerVisible(this, true); Activate(); }
private void item1_Click(object sender, EventArgs e) { try { ButtonItem btn = (ButtonItem)sender; if (GigSpace.Client.Username != btn.Name && btn.Name.Length > 3) { if (GigSpace.Client.AddUser(btn.Name)) { ButtonItem item = new ButtonItem(); item.Image = GIG_CLIENT.Properties.Resources.my_friends; item.Text = btn.Name; item.Name = btn.Name; item.ButtonStyle = eButtonStyle.ImageAndText; item.Click += new EventHandler(item_Click); itemPanel1.Items.Add(item); GigSpace.Client.MyAccount.Friends.Add(btn.Name); ToastNotification.ToastMargin = new DevComponents.DotNetBar.Padding(20); // Increase margin for the toast // Show toast 1 second after the form is shown BarUtilities.InvokeDelayed(new MethodInvoker(delegate { ToastNotification.Show(this, btn.Name + " a étè ajoutè a votre liste d'amis avec succès.", null, 3000, eToastGlowColor.Orange, eToastPosition.BottomCenter); }), 1000); GigSpace.MainForm.Refresh(); } } } catch (Exception ex) { GigSpace.LogError(ex); } }
private Bar GetFirstDocumentBar() { foreach (Bar b in dotNetBarManager1.Bars) { if (b.DockSide == eDockSide.Document && b.Visible) { return(b); } } // If no documents bars found, create new one m_UniqueBarCount++; Bar bar = BarUtilities.CreateDocumentBar(); bar.DockTabClosing += new DockTabClosingEventHandler(barDocuments_DockTabClosing); bar.Name = "barDocuments" + m_UniqueBarCount.ToString(); dockSite1.GetDocumentUIManager().Dock(bar); return(bar); }
internal void Hide() { BarUtilities.SetDockContainerVisible(this, false); }