Exemplo n.º 1
0
 private void InformationPanel_Load(object sender, EventArgs e)
 {
     foreach (var text in _textList)
     {
         RichText.SelectionFont = new Font(Font.Name, Font.Size, FontStyle.Bold);
         RichText.AppendText(text.Key + " :");
         RichText.SelectionFont = new Font(Font.Name, Font.Size, FontStyle.Regular);
         RichText.AppendText(" " + text.Value + Environment.NewLine + Environment.NewLine);
     }
 }
Exemplo n.º 2
0
        private void txtTarget_Drop(object sender, DragEventArgs e)
        {
            if (e.Data.GetDataPresent(DataFormats.FileDrop))
            {
                // Note that you can have more than one file.
                string file = (string)e.Data.GetData(DataFormats.FileDrop);

                // Assuming you have one file that you care about, pass it off to whatever
                // handling code you have defined.

                RichText.AppendText(file);
                //((TextBlock)sender).Text = (string)e.Data.GetData(DataFormats.Text);
            }
        }