Exemple #1
0
        /// <summary>
        /// Handles the Copy decimal info menu-item.
        /// </summary>
        /// <param name="sender"><c><see cref="it_Copy_dec"/></c></param>
        /// <param name="e"></param>
        void Click_copy_decimal(object sender, EventArgs e)
        {
            string info = HenchControl.GetMasterText();

            if (!String.IsNullOrEmpty(info))
            {
                Clipboard.SetText(info);
            }
            else
            {
                Clipboard.Clear();
            }
        }
Exemple #2
0
        /// <summary>
        /// Handles the Copy binary info menu-item.
        /// </summary>
        /// <param name="sender"><c><see cref="it_Copy_bin"/></c></param>
        /// <param name="e"></param>
        void Click_copy_binary(object sender, EventArgs e)
        {
            string info = HenchControl.GetMasterText();

            if (!String.IsNullOrEmpty(info))
            {
                info = Convert.ToString(Int32.Parse(info), 2).PadLeft(32, '0');
                Clipboard.SetText(info);
            }
            else
            {
                Clipboard.Clear();
            }
        }
Exemple #3
0
        /// <summary>
        /// Handles the Copy hexadecimal info menu-item.
        /// </summary>
        /// <param name="sender"><c><see cref="it_Copy_hex"/></c></param>
        /// <param name="e"></param>
        void Click_copy_hexadecimal(object sender, EventArgs e)
        {
            string info = HenchControl.GetMasterText();

            if (!String.IsNullOrEmpty(info))
            {
                info = Int32.Parse(info).ToString("x8").Insert(0, "0x");
                Clipboard.SetText(info);
            }
            else
            {
                Clipboard.Clear();
            }
        }