Пример #1
0
 private void btnCopy_Click(object sender, EventArgs e)
 {
     try
     {
         Clipboard.SetText(lblBuyerAccount.Text);
         ClipboardPromptForm cpf = new ClipboardPromptForm("Âò¼ÒÕ˺Å", lblBuyerAccount.Text);
         cpf.Show(this.FindForm());
         cpf.Location = new Point(
             this.FindForm().Location.X + (this.FindForm().Width - cpf.Width) / 2,
             this.FindForm().Location.Y + (this.FindForm().Height - cpf.Height) / 2);
     }
     catch
     {
         ClipboardPromptForm cpf = new ClipboardPromptForm("¸´ÖÆÕ˺Åʧ°Ü:", lblBuyerAccount.Text);
         cpf.Show(this.FindForm());
         cpf.Location = new Point(
             this.FindForm().Location.X + (this.FindForm().Width - cpf.Width) / 2,
             this.FindForm().Location.Y + (this.FindForm().Height - cpf.Height) / 2);
     }
 }
Пример #2
0
        void btnSearchByRecipientPinyinName_Click(object sender, EventArgs e)
        {
            if (null == this.OnSearch)
            {
                return;
            }

            PdfPacketInfoEx ppi = (PdfPacketInfoEx)((Button)sender).Tag;

            if (!string.IsNullOrEmpty(ppi.ShipmentNumber))
            {
                Clipboard.SetText(ppi.ShipmentNumber);
                ClipboardPromptForm cpf = new ClipboardPromptForm("µ¥ºÅ", ppi.ShipmentNumber);
                cpf.Show(this);
                cpf.Location = new Point(this.Location.X + (this.Width - cpf.Width) / 2, this.Location.Y + (this.Height - cpf.Height) / 2);
                Application.DoEvents();
            }

            this.OnSearch(ppi.RecipientName.Replace(" ", string.Empty).Trim());
        }
Пример #3
0
        private void CopyShipmentNumberInfoToClipboard()
        {
            if (lvwPdfPacketInfos.SelectedItems.Count <= 0)
            {
                return;
            }

            PdfPacketInfoEx ppi = ((PdfPacketInfoListViewItem)lvwPdfPacketInfos.SelectedItems[0]).PacketInfo;

            string shipmentNumberInfo = string.Format("[{0}] {1}", Packet.GetPacketTypePrefix(ppi.Type), ppi.ShipmentNumber);

            SetCliboardText(shipmentNumberInfo);
            Application.DoEvents();
            ClipboardPromptForm cpf = new ClipboardPromptForm("单号", shipmentNumberInfo);

            cpf.Show(this);
            cpf.Location               = new Point(this.Location.X + (this.Width - cpf.Width) / 2, this.Location.Y + (this.Height - cpf.Height) / 2);
            lblClipboardPrompt.Text    = string.Format("单号<{0}>已复制到剪贴板", shipmentNumberInfo);
            lblClipboardPrompt.Visible = true;
            Application.DoEvents();
        }