Changeset 13977

Show
Ignore:
Timestamp:
06/15/08 08:05:30 (5 years ago)
Author:
poolmmjp
Message:

view内のリンククリック時に、ページを移動するのではなくメニューが開くようにした。

Location:
lang/csharp/MMMMB/MMMMB
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/csharp/MMMMB/MMMMB/MiniBlogView.Designer.cs

    r11290 r13977  
    3939            this.browserPanel = new System.Windows.Forms.Panel(); 
    4040            this.filterPanel = new System.Windows.Forms.Panel(); 
     41            this.notifyInput = new System.Windows.Forms.TextBox(); 
     42            this.allowInput = new System.Windows.Forms.TextBox(); 
     43            this.denyInput = new System.Windows.Forms.TextBox(); 
     44            this.notifyInputLabel = new System.Windows.Forms.Label(); 
     45            this.allowInputLabel = new System.Windows.Forms.Label(); 
     46            this.denyInputLabel = new System.Windows.Forms.Label(); 
     47            this.filterCheck = new System.Windows.Forms.CheckBox(); 
    4148            this.panel = new System.Windows.Forms.Panel(); 
    42             this.filterCheck = new System.Windows.Forms.CheckBox(); 
    43             this.denyInputLabel = new System.Windows.Forms.Label(); 
    44             this.denyInput = new System.Windows.Forms.TextBox(); 
    45             this.allowInput = new System.Windows.Forms.TextBox(); 
    46             this.allowInputLabel = new System.Windows.Forms.Label(); 
    47             this.notifyInput = new System.Windows.Forms.TextBox(); 
    48             this.notifyInputLabel = new System.Windows.Forms.Label(); 
    4949            this.browserPanel.SuspendLayout(); 
    5050            this.filterPanel.SuspendLayout(); 
     
    120120            this.browser.Size = new System.Drawing.Size(377, 274); 
    121121            this.browser.TabIndex = 0; 
     122            this.browser.Navigating += new System.Windows.Forms.WebBrowserNavigatingEventHandler(this.browser_Navigating); 
    122123            //  
    123124            // browserPanel 
     
    147148            this.filterPanel.TabIndex = 0; 
    148149            //  
    149             // panel 
    150             //  
    151             this.panel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
    152                         | System.Windows.Forms.AnchorStyles.Left) 
    153                         | System.Windows.Forms.AnchorStyles.Right))); 
    154             this.panel.Controls.Add(this.browserPanel); 
    155             this.panel.Controls.Add(this.filterPanel); 
    156             this.panel.Location = new System.Drawing.Point(0, 104); 
    157             this.panel.Name = "panel"; 
    158             this.panel.Size = new System.Drawing.Size(381, 303); 
    159             this.panel.TabIndex = 8; 
     150            // notifyInput 
     151            //  
     152            this.notifyInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     153                        | System.Windows.Forms.AnchorStyles.Right))); 
     154            this.notifyInput.Location = new System.Drawing.Point(56, 75); 
     155            this.notifyInput.Name = "notifyInput"; 
     156            this.notifyInput.Size = new System.Drawing.Size(318, 19); 
     157            this.notifyInput.TabIndex = 6; 
     158            //  
     159            // allowInput 
     160            //  
     161            this.allowInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     162                        | System.Windows.Forms.AnchorStyles.Right))); 
     163            this.allowInput.Location = new System.Drawing.Point(56, 50); 
     164            this.allowInput.Name = "allowInput"; 
     165            this.allowInput.Size = new System.Drawing.Size(318, 19); 
     166            this.allowInput.TabIndex = 4; 
     167            this.allowInput.TextChanged += new System.EventHandler(this.filterInput_TextChanged); 
     168            //  
     169            // denyInput 
     170            //  
     171            this.denyInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     172                        | System.Windows.Forms.AnchorStyles.Right))); 
     173            this.denyInput.Location = new System.Drawing.Point(56, 25); 
     174            this.denyInput.Name = "denyInput"; 
     175            this.denyInput.Size = new System.Drawing.Size(318, 19); 
     176            this.denyInput.TabIndex = 2; 
     177            this.denyInput.TextChanged += new System.EventHandler(this.filterInput_TextChanged); 
     178            //  
     179            // notifyInputLabel 
     180            //  
     181            this.notifyInputLabel.AutoSize = true; 
     182            this.notifyInputLabel.Location = new System.Drawing.Point(3, 78); 
     183            this.notifyInputLabel.Name = "notifyInputLabel"; 
     184            this.notifyInputLabel.Size = new System.Drawing.Size(47, 12); 
     185            this.notifyInputLabel.TabIndex = 5; 
     186            this.notifyInputLabel.Text = "通知(&N):"; 
     187            //  
     188            // allowInputLabel 
     189            //  
     190            this.allowInputLabel.AutoSize = true; 
     191            this.allowInputLabel.Location = new System.Drawing.Point(3, 53); 
     192            this.allowInputLabel.Name = "allowInputLabel"; 
     193            this.allowInputLabel.Size = new System.Drawing.Size(47, 12); 
     194            this.allowInputLabel.TabIndex = 3; 
     195            this.allowInputLabel.Text = "許可(&A):"; 
     196            //  
     197            // denyInputLabel 
     198            //  
     199            this.denyInputLabel.AutoSize = true; 
     200            this.denyInputLabel.Location = new System.Drawing.Point(3, 28); 
     201            this.denyInputLabel.Name = "denyInputLabel"; 
     202            this.denyInputLabel.Size = new System.Drawing.Size(47, 12); 
     203            this.denyInputLabel.TabIndex = 1; 
     204            this.denyInputLabel.Text = "拒否(&D):"; 
    160205            //  
    161206            // filterCheck 
     
    170215            this.filterCheck.CheckedChanged += new System.EventHandler(this.filterCheck_CheckedChanged); 
    171216            //  
    172             // denyInputLabel 
    173             //  
    174             this.denyInputLabel.AutoSize = true; 
    175             this.denyInputLabel.Location = new System.Drawing.Point(3, 28); 
    176             this.denyInputLabel.Name = "denyInputLabel"; 
    177             this.denyInputLabel.Size = new System.Drawing.Size(47, 12); 
    178             this.denyInputLabel.TabIndex = 1; 
    179             this.denyInputLabel.Text = "拒否(&D):"; 
    180             //  
    181             // denyInput 
    182             //  
    183             this.denyInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    184                         | System.Windows.Forms.AnchorStyles.Right))); 
    185             this.denyInput.Location = new System.Drawing.Point(56, 25); 
    186             this.denyInput.Name = "denyInput"; 
    187             this.denyInput.Size = new System.Drawing.Size(318, 19); 
    188             this.denyInput.TabIndex = 2; 
    189             this.denyInput.TextChanged += new System.EventHandler(this.filterInput_TextChanged); 
    190             //  
    191             // allowInput 
    192             //  
    193             this.allowInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    194                         | System.Windows.Forms.AnchorStyles.Right))); 
    195             this.allowInput.Location = new System.Drawing.Point(56, 50); 
    196             this.allowInput.Name = "allowInput"; 
    197             this.allowInput.Size = new System.Drawing.Size(318, 19); 
    198             this.allowInput.TabIndex = 4; 
    199             this.allowInput.TextChanged += new System.EventHandler(this.filterInput_TextChanged); 
    200             //  
    201             // allowInputLabel 
    202             //  
    203             this.allowInputLabel.AutoSize = true; 
    204             this.allowInputLabel.Location = new System.Drawing.Point(3, 53); 
    205             this.allowInputLabel.Name = "allowInputLabel"; 
    206             this.allowInputLabel.Size = new System.Drawing.Size(47, 12); 
    207             this.allowInputLabel.TabIndex = 3; 
    208             this.allowInputLabel.Text = "許可(&A):"; 
    209             //  
    210             // notifyInput 
    211             //  
    212             this.notifyInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    213                         | System.Windows.Forms.AnchorStyles.Right))); 
    214             this.notifyInput.Location = new System.Drawing.Point(56, 75); 
    215             this.notifyInput.Name = "notifyInput"; 
    216             this.notifyInput.Size = new System.Drawing.Size(318, 19); 
    217             this.notifyInput.TabIndex = 6; 
    218             //  
    219             // notifyInputLabel 
    220             //  
    221             this.notifyInputLabel.AutoSize = true; 
    222             this.notifyInputLabel.Location = new System.Drawing.Point(3, 78); 
    223             this.notifyInputLabel.Name = "notifyInputLabel"; 
    224             this.notifyInputLabel.Size = new System.Drawing.Size(47, 12); 
    225             this.notifyInputLabel.TabIndex = 5; 
    226             this.notifyInputLabel.Text = "通知(&N):"; 
     217            // panel 
     218            //  
     219            this.panel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
     220                        | System.Windows.Forms.AnchorStyles.Left) 
     221                        | System.Windows.Forms.AnchorStyles.Right))); 
     222            this.panel.Controls.Add(this.browserPanel); 
     223            this.panel.Controls.Add(this.filterPanel); 
     224            this.panel.Location = new System.Drawing.Point(0, 104); 
     225            this.panel.Name = "panel"; 
     226            this.panel.Size = new System.Drawing.Size(381, 303); 
     227            this.panel.TabIndex = 8; 
    227228            //  
    228229            // MiniBlogView 
  • lang/csharp/MMMMB/MMMMB/MiniBlogView.cs

    r13604 r13977  
    344344            filterThread.Start(); 
    345345        } 
     346 
     347        private void browser_Navigating(object sender, WebBrowserNavigatingEventArgs e) 
     348        { 
     349            if (e.Url.Scheme != "about" && e.Url.Scheme != "javascript") 
     350            { 
     351                e.Cancel = true; 
     352                ShowLinkMenu(e.Url.ToString()); 
     353            } 
     354        } 
     355 
     356        private void ShowLinkMenu(string url) 
     357        { 
     358            ContextMenuStrip menu = new ContextMenuStrip(); 
     359            ToolStripItem open = new ToolStripMenuItem("�J��(&O)"); 
     360            open.Click += new EventHandler(delegate(object sender, EventArgs e) 
     361            { 
     362                Process.Start(url); 
     363            }); 
     364            menu.Items.Add(open); 
     365            ToolStripItem copy = new ToolStripMenuItem("URL ��s�[(&C)"); 
     366            copy.Click += new EventHandler(delegate(object sender, EventArgs e) 
     367            { 
     368                Clipboard.SetText(url); 
     369            }); 
     370            menu.Items.Add(copy); 
     371            menu.Show(browser, browser.PointToClient(Cursor.Position)); 
     372        } 
    346373    } 
    347374}