Пример #1
0
 private void Change_SearchShow(ToolStripMenuItem item)
 {
     toolStripDropDownButton2.Image = item.Image;
     toolStripDropDownButton2.Text  = item.Text;
     toolStripDropDownButton2.Tag   = ((string)item.Tag).Split(new string[] { "</>" }, StringSplitOptions.None)[2];
     Mdb.SetOther("searchInfo", (string)item.Tag);
     comboBox1.Focus();
     comboBox1.SelectAll();
 }
Пример #2
0
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     //记住窗体位置
     Mdb.SetOther("isNormalForm", WindowState == FormWindowState.Normal ? "1" : "0");
     if (WindowState == FormWindowState.Normal)
     {
         Mdb.SetOther("formLeft", Left.ToString());
         Mdb.SetOther("formTop", Top.ToString());
         Mdb.SetOther("formWidth", Width.ToString());
         Mdb.SetOther("formHeight", Height.ToString());
     }
 }
Пример #3
0
 private void 收藏夹SToolStripMenuItem_Click(object sender, EventArgs e)
 {
     panel1.Visible = splitter1.Visible = 收藏夹SToolStripMenuItem.Checked;
     Mdb.SetOther("collectionStyle", 收藏夹SToolStripMenuItem.Checked ? "1" : "0");
     if (收藏夹SToolStripMenuItem.Checked)
     {
         收藏BToolStripMenuItem_DropDownOpening(null, null);
         Application.DoEvents();
         历史记录HToolStripMenuItem.Checked = false;
         panel1.Width = int.Parse(Mdb.GetOther("collectionWidth"));
         if (treeView1.Nodes.Count == 0)
         {
             for (int i = 3; i < 收藏BToolStripMenuItem.DropDownItems.Count; i++)
             {
                 string tag = (string)收藏BToolStripMenuItem.DropDownItems[i].Tag;
                 if (tag != "folder")
                 {
                     TreeNode node = new TreeNode(收藏BToolStripMenuItem.DropDownItems[i].Text, 2, 2);
                     node.Tag = tag;
                     treeView1.Nodes.Add(node);
                 }
                 else
                 {
                     TreeNode nodex = new TreeNode(收藏BToolStripMenuItem.DropDownItems[i].Text, 1, 1);
                     nodex.Tag = tag;
                     treeView1.Nodes.Add(nodex);
                     foreach (ToolStripMenuItem item in ((ToolStripMenuItem)收藏BToolStripMenuItem.DropDownItems[i]).DropDownItems)
                     {
                         TreeNode nodey = new TreeNode(item.Text, 2, 2);
                         nodey.Tag = item.Tag;
                         nodex.Nodes.Add(nodey);
                     }
                 }
             }
         }
         treeView1.BringToFront();
     }
 }
Пример #4
0
 private void 历史记录HToolStripMenuItem_Click(object sender, EventArgs e)
 {
     panel1.Visible = splitter1.Visible = 历史记录HToolStripMenuItem.Checked;
     Mdb.SetOther("collectionStyle", 历史记录HToolStripMenuItem.Checked ? "2" : "0");
     if (历史记录HToolStripMenuItem.Checked)
     {
         收藏夹SToolStripMenuItem.Checked = toolStripButton5.Checked = false;
         panel1.Width = int.Parse(Mdb.GetOther("collectionWidth"));
         if (treeView2.Nodes.Count == 0)
         {
             UrlHistoryWrapperClass.STATURLEnumerator enumerator = new UrlHistoryWrapperClass().GetEnumerator();
             while (enumerator.MoveNext())
             {
                 if (!string.IsNullOrEmpty(enumerator.Current.Title))
                 {
                     TreeNode node = new TreeNode(enumerator.Current.Title, 2, 2);
                     node.Tag = enumerator.Current.URL;
                     treeView2.Nodes.Add(node);
                 }
             }
         }
         treeView2.BringToFront();
     }
 }
Пример #5
0
 private void splitter1_SplitterMoved(object sender, SplitterEventArgs e)
 {
     Mdb.SetOther("collectionWidth", panel1.Width.ToString());
 }
Пример #6
0
 private void toolStripButton19_Click(object sender, EventArgs e)
 {
     toolStrip3.Dock = toolStrip3.Dock == DockStyle.Bottom ? DockStyle.Top : DockStyle.Bottom;
     Mdb.SetOther("taskbarStyle", toolStrip3.Dock == DockStyle.Top ? "top" : "bottom");
 }