private void fillListVersionReporte(String reportCollection) { reportsSources = EmbeddedResource.EmbeddedResource.getEmbeddedResources("Sistema_De_Administracion_De_Servicios.Reportes."+reportCollection,"rdlc"); reportsNames=EmbeddedResource.EmbeddedResource.getEmbeddedResourcesNames("Sistema_De_Administracion_De_Servicios.Reportes."+reportCollection,"rdlc",reportsSources); foreach (String s in reportsNames) { MetroTileItem item = new MetroTileItem(s); item.Text = s; item.TileSize = new System.Drawing.Size(180, 30); item.TitleTextAlignment = System.Drawing.ContentAlignment.MiddleCenter; this.itemPanelVersionReporte.Items.Add(item); } itemPanel1_ItemClick(itemPanelVersionReporte.Items[0], null); }
// Events private void TileOnClick(object sender, EventArgs eventArgs) { var metroTileItem = sender as MetroTileItem; if (metroTileItem != null) { var contact = metroTileItem.GetOwner() as Contact; if(contact == null) return; pSuggestions.Items.Clear(); SetStatusText(contact.ContactEntry.Name.FullName); var suggestions = _cm.GetFacebookContactSuggestion(contact.ContactEntry.Name); foreach (var suggestion in suggestions) { var tile = new MetroTileItem { Text = suggestion.name, Name = "tile" + suggestion.name }; tile.SetOwner(suggestion); //tile.Click += TileOnClick; SetDefaultTile(tile); tile.TileStyle.TextLineAlignment = eStyleTextAlignment.Center; tile.TileStyle.Font = new Font("Segoe UI", 16, FontStyle.Bold); pSuggestions.Items.Add(tile); } pSuggestions.Refresh(); } }
private void SetDefaultTile(MetroTileItem tile) { tile.TileStyle.TextLineAlignment = eStyleTextAlignment.Near; tile.TileStyle.Font = new Font("Segoe UI", 9, FontStyle.Regular); tile.TitleTextFont = new Font("Segoe UI", 15, FontStyle.Bold); tile.Style = eDotNetBarStyle.Metro; tile.TileColor = eMetroTileColor.Azure; }
private bool HasUnlinkedContacts() { pUnlinkedContacts.Items.Clear(); var contacts = _cm.GetGoogleUnlinkedContacts(); foreach (var contact in contacts) { var entry = contact.ContactEntry; var tile = new MetroTileItem { Text = ((entry.Phonenumbers.Count > 0) ? entry.Phonenumbers[0].Value : "") + "\n" + entry.Birthday + "\n" + ((entry.Emails.Count > 0) ? entry.Emails[0].Address : ""), TitleText = entry.Name.FullName, Name = "tile" + entry.Name.FamilyName }; tile.SetOwner(contact); tile.Click += TileOnClick; SetDefaultTile(tile); pUnlinkedContacts.Items.Add(tile); } return (contacts.Count > 0); }
/// <summary> /// Returns copy of the item. /// </summary> public override BaseItem Copy() { MetroTileItem objCopy = new MetroTileItem(m_Name); this.CopyToItem(objCopy); return objCopy; }
/// <summary> /// Copies the MetroTileItem specific properties to new instance of the item. /// </summary> /// <param name="copy">New ProgressBarItem instance.</param> internal void InternalCopyToItem(MetroTileItem copy) { CopyToItem(copy); }