Esempio n. 1
0
        private void treePostWindow_NodeMouseDoubleClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e)
        {
            if (e.Node.Tag.Equals("post"))
            {
                Post p = this._nodeToPost(this.treePostWindowMouseAt);
                if (p.ImagePath.Contains("http:")) return;

                using (Dialogs.frmDetailDialog d = new Scraper.Dialogs.frmDetailDialog())
                {
                    d.PostImage = this._getImage(p.ImagePath);
                    d.PostString = p.PostBody;
                    d.ShowDialog();
                }
            }
        }
Esempio n. 2
0
        private void treePostWindow_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
        {
            if (e.KeyChar == (char) Keys.Enter && this.treePostWindow.SelectedNode != null && "post".Equals(this.treePostWindow.SelectedNode.Tag))
            {
                Post p = this._nodeToPost(this.treePostWindow.SelectedNode);
                if (p.ImagePath.Contains("http:")) return;
                e.Handled = true;

                using (Dialogs.frmDetailDialog d = new Scraper.Dialogs.frmDetailDialog())
                {
                    d.PostImage = this._getImage(p.ImagePath);
                    d.PostString = p.PostBody;
                    d.ShowDialog();
                }
            }
        }