Esempio n. 1
0
        private void ShowBytesCore(ViewPckItemImage selected, MethodInvoker closedCallBack, Point location)
        {
            if (bytesFrame != null)
            {
                bytesFrame.BringToFront();
            }
            else if (selected != null)
            {
                bytesFrame     = new Form();
                bytesText      = new RichTextBox();
                bytesText.Dock = DockStyle.Fill;
                bytesFrame.Controls.Add(bytesText);

                foreach (byte b in selected.Image.Bytes)
                {
                    bytesText.Text += b + " ";
                }

                bytesFrame.Closing += bClosing;
                bytesFrame.Closing += (s, e) => closedCallBack();
                bytesFrame.Location = location;
                bytesFrame.Text     = "Length: " + selected.Image.Bytes.Length;
                bytesFrame.Show();
            }
        }
Esempio n. 2
0
 public void ReloadBytesCore(ViewPckItemImage selected)
 {
     if (bytesFrame == null)
     {
         return;
     }
     if (selected != null && selected.Image != null)
     {
         bytesFrame.Text = "Length: " + selected.Image.Bytes.Length;
         bytesText.Clear();
         var text = string.Empty;
         foreach (byte b in selected.Image.Bytes)
         {
             text += b + " ";
         }
         bytesText.Text = text;
     }
     else
     {
         bytesFrame.Text = "";
         bytesText.Text  = "";
     }
 }
Esempio n. 3
0
 public static void ReloadBytes(ViewPckItemImage selected)
 {
     _instance.ReloadBytesCore(selected);
 }
Esempio n. 4
0
 public static void ShowBytes(ViewPckItemImage selected, MethodInvoker closedCallBack, Point location)
 {
     _instance.ShowBytesCore(selected, closedCallBack, location);
 }