Esempio n. 1
0
        public LinkEntryEditor(LinkIndexBuilder parent, string title, string url)
            : this(parent)
        {
            txtTitle.Text = title;
            txtURL.Text = url;

            btnOk.Enabled = true;
        }
Esempio n. 2
0
        public LinkEntryEditor(LinkIndexBuilder parent, string title, string url)
            : this(parent)
        {
            txtTitle.Text = title;
            txtURL.Text   = url;

            btnOk.Enabled = true;
        }
Esempio n. 3
0
        public LinkEntryEditor(LinkIndexBuilder parent, string key, string title, string url)
            : this(parent)
        {
            //img.Image = image;
            Key = key;
            img.Image = parent.imglist.Images[key];
            txtTitle.Text = title;
            txtURL.Text = url;
            lblEdit.Visible = false;

            btnOk.Enabled = true;
        }
Esempio n. 4
0
        public LinkEntryEditor(LinkIndexBuilder parent, string key, string title, string url)
            : this(parent)
        {
            //img.Image = image;
            Key             = key;
            img.Image       = parent.imglist.Images[key];
            txtTitle.Text   = title;
            txtURL.Text     = url;
            lblEdit.Visible = false;

            btnOk.Enabled = true;
        }
Esempio n. 5
0
        private void menuActionInjectIndex_Click(object sender, EventArgs e)
        {
            ImageList imgs;

            ListViewItem[] rows;
            using (LinkIndexBuilder lib = new LinkIndexBuilder())
            {
                lib.ShowDialog();
                if (lib.Canceled)
                {
                    return;
                }

                imgs = lib.imglist;
                rows = lib.rows;
            }

            if (rows.Length < 1)
            {
                return;
            }

            List <string> keys  = new List <string>();
            LinkIndex     index = new LinkIndex();

            foreach (ListViewItem lvi in rows)
            {
                int i = -1;
                if (!keys.Contains(lvi.ImageKey) && imgs.Images.ContainsKey(lvi.ImageKey))
                {
                    keys.Add(lvi.ImageKey);
                    index.Images.Add(imgs.Images[lvi.ImageKey]);
                    i = index.Images.Count - 1;
                }
                if (i < 0)
                {
                    i = keys.IndexOf(lvi.ImageKey);
                }

                index.Rows.Add(new LinkIndexRow(i, lvi.SubItems[0].Text, lvi.SubItems[1].Text));
            }

            Provider prov = GetProvider();

            if (prov == null)
            {
                return;
            }

            provider = (SteganographyProvider)Activator.CreateInstance(prov.ProviderType, pngOriginal, false);
            Imprint(DataType.Index, index, DataType.Index, index);
        }
Esempio n. 6
0
        public LinkEntryEditor(LinkIndexBuilder parent)
        {
            this.parent = parent;

            InitializeComponent();

            img.Cursor = Cursors.Hand;
            lblEdit.Cursor = Cursors.Hand;

            lblEdit.Click += img_Click;

            KeyEventHandler handler = delegate (object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter && urlvalid && btnOk.Enabled) btnOk_Click(null, null); };
            txtTitle.KeyDown += handler;
            txtURL.KeyDown += handler;
        }
Esempio n. 7
0
        public LinkEntryEditor(LinkIndexBuilder parent)
        {
            this.parent = parent;

            InitializeComponent();

            img.Cursor     = Cursors.Hand;
            lblEdit.Cursor = Cursors.Hand;

            lblEdit.Click += img_Click;

            KeyEventHandler handler = delegate(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter && urlvalid && btnOk.Enabled)
                                                                                {
                                                                                    btnOk_Click(null, null);
                                                                                }
            };

            txtTitle.KeyDown += handler;
            txtURL.KeyDown   += handler;
        }