コード例 #1
0
        private void CopyToClipboard_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            try
            {
                UltimaPacketValue value = e.Parameter as UltimaPacketValue;

                if (value != null)
                {
                    Clipboard.SetText(value.ToString());
                }
            }
            catch (Exception ex)
            {
                App.Window.ShowNotification(NotificationType.Error, ex);
            }
        }
コード例 #2
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            UltimaPacketValue packetValue = value as UltimaPacketValue;

            if (packetValue != null)
            {
                UltimaPacket packet = packetValue.Object as UltimaPacket;

                if (packet != null)
                {
                    return(String.Format("{0} - {1}", packet.Ids, packet.Name));
                }
            }

            return("Packet Properties");
        }