public void selectCard(CardFileData card) { cCard = card; lblCardTitle.Text = cCard.name; lblKeywords.Text = lblKeywordsDef + cCard.getKeywords(); txtCardContent.Text = cCard.text; lstAttachments.BeginUpdate(); lstAttachments.Clear(); ImageList lst = new ImageList(); lst.ImageSize = new Size(32, 32); lstAttachments.LargeImageList = lst; foreach (var s in cCard.getAttachmentFiles()) { ShellFile shellFile = ShellFile.FromFilePath(s); var bmp = shellFile.Thumbnail.SmallBitmap; //var bmp= icon.ToBitmap(); bmp.MakeTransparent(Color.Black); lst.Images.Add(s, bmp); //IOUtil.loadFileThumbnail(s); var i = new ListViewItem(IOUtil.deExtension(s), s); lstAttachments.Items.Add(i); } lstAttachments.Visible = lstAttachments.Items.Count != 0; lstAttachments.EndUpdate(); }
private void onDoneClicked() { card = new CardFileData(); card.creater = lblCreater.Text; card.name = txtName.Text; card.text = zut.zuwf.ListBox_MkString(lstKeywords, Localization.Settings.Symbol_Item_Seperator[0]); card.dateCreated = lblDate.Text; card.category = txtCategory.Text; card.chapterName = txtChapter.Text; foreach (var s in lstKeywords.Items) { card.keywords.Add(s.ToString().Trim()); } tree.addNewCard(card); }
public DialogNewCard(CardBoxTree tree) { InitializeComponent(); this.tree = tree; card = null; }