Browse Source

完成收藏夹

CaptB 4 months ago
parent
commit
049becd157
9 changed files with 289 additions and 444 deletions
  1. 5 13
      EdgeVoyager.csproj
  2. 1 1
      Form1.Designer.cs
  3. 82 97
      Form1.cs
  4. 61 11
      Form2.Designer.cs
  5. 40 42
      Form2.cs
  6. 3 0
      Form2.resx
  7. 97 116
      favoritesMenuItem.resx
  8. 0 63
      favoritesMenuItemIcon.Designer.cs
  9. 0 101
      favoritesMenuItemIcon.resx

+ 5 - 13
EdgeVoyager.csproj

@@ -8,8 +8,8 @@
     <ImplicitUsings>enable</ImplicitUsings>
     <ApplicationIcon>Resources\icons8_connection_status_on.ico</ApplicationIcon>
     <PackageIcon>icons8_connection_status_on_128.png</PackageIcon>
-    <AssemblyVersion>0.31.9.5</AssemblyVersion>
-    <FileVersion>0.31.9.5</FileVersion>
+    <AssemblyVersion>0.37.8.9</AssemblyVersion>
+    <FileVersion>0.37.8.9</FileVersion>
     <Copyright>©2025 LYKNS Corp. 保留部分权利。</Copyright>
     <Company>LYKNS Corporation</Company>
     <Description>LYKNS EdgeVoyager是一个新的个性化的浏览器
@@ -18,7 +18,6 @@
 
   <ItemGroup>
     <EmbeddedResource Remove="favoritesMenuItem.resx" />
-    <EmbeddedResource Remove="favoritesMenuItemIcon.resx" />
   </ItemGroup>
 
   <ItemGroup>
@@ -31,11 +30,9 @@
       <LastGenOutput>favoritesMenuItem.Designer.cs</LastGenOutput>
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
-    <Content Include="favoritesMenuItemIcon.resx">
-      <Generator>ResXFileCodeGenerator</Generator>
-      <LastGenOutput>favoritesMenuItemIcon.Designer.cs</LastGenOutput>
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Content>
+  </ItemGroup>
+
+  <ItemGroup>
     <Content Include="Resources\icons8_connection_status_on.ico" />
   </ItemGroup>
 
@@ -49,11 +46,6 @@
       <AutoGen>True</AutoGen>
       <DependentUpon>favoritesMenuItem.resx</DependentUpon>
     </Compile>
-    <Compile Update="favoritesMenuItemIcon.Designer.cs">
-      <DesignTime>True</DesignTime>
-      <AutoGen>True</AutoGen>
-      <DependentUpon>favoritesMenuItemIcon.resx</DependentUpon>
-    </Compile>
     <Compile Update="Properties\Resources.Designer.cs">
       <DesignTime>True</DesignTime>
       <AutoGen>True</AutoGen>

+ 1 - 1
Form1.Designer.cs

@@ -613,7 +613,7 @@
             MinimumSize = new Size(800, 600);
             Name = "Form1";
             Text = "LYKNS EdgeVoyager";
-            Enter += Form1_Enter;
+            Activated += Form1_Activated;
             statusStrip1.ResumeLayout(false);
             statusStrip1.PerformLayout();
             menuStrip1.ResumeLayout(false);

+ 82 - 97
Form1.cs

@@ -2,6 +2,7 @@ using System.Collections;
 using System.Diagnostics;
 using System.Resources;
 using System.Text;
+using System.Windows.Forms;
 using Microsoft.Web.WebView2.Core;
 
 namespace EdgeVoyager
@@ -30,8 +31,6 @@ namespace EdgeVoyager
         {
             await webView21.EnsureCoreWebView2Async(null);
             string resxFilePath = "favoritesMenuItem.resx";
-            string faviconUrl = await webView21.CoreWebView2.ExecuteScriptAsync("var link = document.querySelector('link[rel~=\"icon\"]') || document.querySelector('link[rel~=\"shortcut icon\"]');link ? link.href : '';");
-            byte[] iconData = await DownloadFaviconAsync(faviconUrl);
             using (ResXResourceReader reader = new ResXResourceReader(resxFilePath))
             {
                 foreach (DictionaryEntry entry in reader)
@@ -44,22 +43,6 @@ namespace EdgeVoyager
                         Tag = resourceValue
                     };
                     menuItem.Click += MenuItem_Click;
-                    string iconResxFilePath = "favoritesMenuItemIcon.resx";
-                    using (ResXResourceReader iconReader = new ResXResourceReader(iconResxFilePath))
-                    {
-                        foreach (DictionaryEntry iconEntry in iconReader)
-                        {
-                            if (iconEntry.Key.ToString() == resourceName)
-                            {
-                                using (MemoryStream ms = new MemoryStream(iconData))
-                                {
-                                    Image iconImage = Image.FromStream(ms);
-                                    menuItem.Image = iconImage;
-                                }
-                                break;
-                            }
-                        }
-                    }
                     收藏夹AToolStripMenuItem.DropDownItems.Add(menuItem);
                 }
             }
@@ -783,8 +766,6 @@ background-position: right top;
         private async void 添加到收藏夹ToolStripMenuItem_Click(object sender, EventArgs e)
         {
             string resxFilePath = "favoritesMenuItem.resx";
-            string faviconUrl = await webView21.CoreWebView2.ExecuteScriptAsync("var link = document.querySelector('link[rel~=\"icon\"]') || document.querySelector('link[rel~=\"shortcut icon\"]');link ? link.href : '';");
-            byte[] iconData = await DownloadFaviconAsync(faviconUrl);
             string title = await webView21.CoreWebView2.ExecuteScriptAsync("document.title;");
             string pageTitle = title.Trim('"');
             string pageUrl = webView21.CoreWebView2.Source.ToString();
@@ -802,68 +783,54 @@ background-position: right top;
             }
             if (!titleExists)
             {
-                using (ResXResourceWriter writer = new ResXResourceWriter(resxFilePath))
-                {
-                    writer.AddResource(pageTitle, pageUrl);
-                    writer.Generate();
-                }
-            }
-            using (ResXResourceReader reader = new ResXResourceReader(resxFilePath))
-            {
+                ResXResourceReader reader = new ResXResourceReader(resxFilePath);
+                Hashtable resources = new Hashtable();
                 foreach (DictionaryEntry entry in reader)
                 {
-                    if (entry.Key.ToString() == pageTitle)
-                    {
-                        titleExists = true;
-                        break;
-                    }
+                    resources.Add(entry.Key, entry.Value);
                 }
-            }
-            if (!titleExists)
-            {
+                reader.Close();
+
+                // 添加新的资源项
+                resources.Add(pageTitle, pageUrl);
+
+                // 写入到资源文件
                 using (ResXResourceWriter writer = new ResXResourceWriter(resxFilePath))
                 {
-                    writer.AddResource(pageTitle, iconData);
+                    foreach (DictionaryEntry entry in resources)
+                    {
+                        writer.AddResource(entry.Key.ToString(), entry.Value);
+                    }
                     writer.Generate();
                 }
-            }
-            ToolStripItem[] itemsToRemove = 收藏夹AToolStripMenuItem.DropDownItems.Cast<ToolStripItem>()
-                .SkipWhile(item => item != 收藏夹AToolStripMenuItem.DropDownItems["toolStripSeparator1"])
-                .ToArray();
-
-            foreach (var item in itemsToRemove)
-            {
-                收藏夹AToolStripMenuItem.DropDownItems.Remove(item);
-            }
-            using (ResXResourceReader reader = new ResXResourceReader(resxFilePath))
-            {
-                foreach (DictionaryEntry entry in reader)
+                for (int i = 0; i < 收藏夹AToolStripMenuItem.DropDownItems.Count; i++)
                 {
-                    string resourceName = entry.Key.ToString();
-                    string resourceValue = entry.Value.ToString();
-                    ToolStripMenuItem menuItem = new ToolStripMenuItem
+                    // 如果找到了toolStripSeparator10
+                    if (收藏夹AToolStripMenuItem.DropDownItems[i] is ToolStripSeparator &&
+                        收藏夹AToolStripMenuItem.DropDownItems[i].Name == "toolStripSeparator10")
                     {
-                        Text = resourceName,
-                        Tag = resourceValue
-                    };
-                    menuItem.Click += MenuItem_Click;
-                    string iconResxFilePath = "favoritesMenuItemIcon.resx";
-                    using (ResXResourceReader iconReader = new ResXResourceReader(iconResxFilePath))
-                    {
-                        foreach (DictionaryEntry iconEntry in iconReader)
+                        // 从toolStripSeparator10下方开始,删除所有按钮
+                        for (int j = 收藏夹AToolStripMenuItem.DropDownItems.Count - 1; j > i; j--)
                         {
-                            if (iconEntry.Key.ToString() == resourceName)
-                            {
-                                using (MemoryStream ms = new MemoryStream(iconData))
-                                {
-                                    Image iconImage = Image.FromStream(ms);
-                                    menuItem.Image = iconImage;
-                                }
-                                break;
-                            }
+                            收藏夹AToolStripMenuItem.DropDownItems.RemoveAt(j);
                         }
+                        break; // 找到并处理完毕后退出循环
+                    }
+                }
+                using (ResXResourceReader reader1 = new ResXResourceReader(resxFilePath))
+                {
+                    foreach (DictionaryEntry entry in reader1)
+                    {
+                        string resourceName = entry.Key.ToString();
+                        string resourceValue = entry.Value.ToString();
+                        ToolStripMenuItem menuItem = new ToolStripMenuItem
+                        {
+                            Text = resourceName,
+                            Tag = resourceValue
+                        };
+                        menuItem.Click += MenuItem_Click;
+                        收藏夹AToolStripMenuItem.DropDownItems.Add(menuItem);
                     }
-                    收藏夹AToolStripMenuItem.DropDownItems.Add(menuItem);
                 }
             }
         }
@@ -892,24 +859,58 @@ background-position: right top;
         {
             Form2 form2 = new Form2();
             form2.ShowDialog();
+            string resxFilePath = "favoritesMenuItem.resx";
+            for (int i = 0; i < 收藏夹AToolStripMenuItem.DropDownItems.Count; i++)
+            {
+                // 如果找到了toolStripSeparator10
+                if (收藏夹AToolStripMenuItem.DropDownItems[i] is ToolStripSeparator &&
+                    收藏夹AToolStripMenuItem.DropDownItems[i].Name == "toolStripSeparator10")
+                {
+                    // 从toolStripSeparator10下方开始,删除所有按钮
+                    for (int j = 收藏夹AToolStripMenuItem.DropDownItems.Count - 1; j > i; j--)
+                    {
+                        收藏夹AToolStripMenuItem.DropDownItems.RemoveAt(j);
+                    }
+                    break; // 找到并处理完毕后退出循环
+                }
+            }
+            using (ResXResourceReader reader1 = new ResXResourceReader(resxFilePath))
+            {
+                foreach (DictionaryEntry entry in reader1)
+                {
+                    string resourceName = entry.Key.ToString();
+                    string resourceValue = entry.Value.ToString();
+                    ToolStripMenuItem menuItem = new ToolStripMenuItem
+                    {
+                        Text = resourceName,
+                        Tag = resourceValue
+                    };
+                    menuItem.Click += MenuItem_Click;
+                    收藏夹AToolStripMenuItem.DropDownItems.Add(menuItem);
+                }
+            }
         }
 
-        private async void Form1_Enter(object sender, EventArgs e)
+        private void Form1_Activated(object sender, EventArgs e)
         {
             string resxFilePath = "favoritesMenuItem.resx";
-            string faviconUrl = await webView21.CoreWebView2.ExecuteScriptAsync("var link = document.querySelector('link[rel~=\"icon\"]') || document.querySelector('link[rel~=\"shortcut icon\"]');link ? link.href : '';");
-            byte[] iconData = await DownloadFaviconAsync(faviconUrl);
-            ToolStripItem[] itemsToRemove = 收藏夹AToolStripMenuItem.DropDownItems.Cast<ToolStripItem>()
-                .SkipWhile(item => item != 收藏夹AToolStripMenuItem.DropDownItems["toolStripSeparator1"])
-                .ToArray();
-
-            foreach (var item in itemsToRemove)
+            for (int i = 0; i < 收藏夹AToolStripMenuItem.DropDownItems.Count; i++)
             {
-                收藏夹AToolStripMenuItem.DropDownItems.Remove(item);
+                // 如果找到了toolStripSeparator10
+                if (收藏夹AToolStripMenuItem.DropDownItems[i] is ToolStripSeparator &&
+                    收藏夹AToolStripMenuItem.DropDownItems[i].Name == "toolStripSeparator10")
+                {
+                    // 从toolStripSeparator10下方开始,删除所有按钮
+                    for (int j = 收藏夹AToolStripMenuItem.DropDownItems.Count - 1; j > i; j--)
+                    {
+                        收藏夹AToolStripMenuItem.DropDownItems.RemoveAt(j);
+                    }
+                    break; // 找到并处理完毕后退出循环
+                }
             }
-            using (ResXResourceReader reader = new ResXResourceReader(resxFilePath))
+            using (ResXResourceReader reader1 = new ResXResourceReader(resxFilePath))
             {
-                foreach (DictionaryEntry entry in reader)
+                foreach (DictionaryEntry entry in reader1)
                 {
                     string resourceName = entry.Key.ToString();
                     string resourceValue = entry.Value.ToString();
@@ -919,22 +920,6 @@ background-position: right top;
                         Tag = resourceValue
                     };
                     menuItem.Click += MenuItem_Click;
-                    string iconResxFilePath = "favoritesMenuItemIcon.resx";
-                    using (ResXResourceReader iconReader = new ResXResourceReader(iconResxFilePath))
-                    {
-                        foreach (DictionaryEntry iconEntry in iconReader)
-                        {
-                            if (iconEntry.Key.ToString() == resourceName)
-                            {
-                                using (MemoryStream ms = new MemoryStream(iconData))
-                                {
-                                    Image iconImage = Image.FromStream(ms);
-                                    menuItem.Image = iconImage;
-                                }
-                                break;
-                            }
-                        }
-                    }
                     收藏夹AToolStripMenuItem.DropDownItems.Add(menuItem);
                 }
             }

+ 61 - 11
Form2.Designer.cs

@@ -28,35 +28,85 @@
         /// </summary>
         private void InitializeComponent()
         {
+            components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form2));
-            listBox1 = new ListBox();
+            listView1 = new ListView();
+            columnHeader1 = new ColumnHeader();
+            columnHeader2 = new ColumnHeader();
+            contextMenuStrip1 = new ContextMenuStrip(components);
+            copyMenuItem = new ToolStripMenuItem();
+            deleteMenuItem = new ToolStripMenuItem();
+            contextMenuStrip1.SuspendLayout();
             SuspendLayout();
             // 
-            // listBox1
+            // listView1
             // 
-            listBox1.Dock = DockStyle.Fill;
-            listBox1.FormattingEnabled = true;
-            listBox1.ItemHeight = 17;
-            listBox1.Location = new Point(0, 0);
-            listBox1.Name = "listBox1";
-            listBox1.Size = new Size(254, 441);
-            listBox1.TabIndex = 0;
+            listView1.CausesValidation = false;
+            listView1.Columns.AddRange(new ColumnHeader[] { columnHeader1, columnHeader2 });
+            listView1.ContextMenuStrip = contextMenuStrip1;
+            listView1.Dock = DockStyle.Fill;
+            listView1.GridLines = true;
+            listView1.HeaderStyle = ColumnHeaderStyle.Nonclickable;
+            listView1.LabelWrap = false;
+            listView1.Location = new Point(0, 0);
+            listView1.MultiSelect = false;
+            listView1.Name = "listView1";
+            listView1.ShowGroups = false;
+            listView1.Size = new Size(254, 441);
+            listView1.TabIndex = 0;
+            listView1.UseCompatibleStateImageBehavior = false;
+            listView1.View = View.Details;
+            // 
+            // columnHeader1
+            // 
+            columnHeader1.Text = "名称";
+            // 
+            // columnHeader2
+            // 
+            columnHeader2.Text = "地址";
+            // 
+            // contextMenuStrip1
+            // 
+            contextMenuStrip1.Items.AddRange(new ToolStripItem[] { copyMenuItem, deleteMenuItem });
+            contextMenuStrip1.Name = "contextMenuStrip1";
+            contextMenuStrip1.Size = new Size(125, 48);
+            // 
+            // copyMenuItem
+            // 
+            copyMenuItem.Name = "copyMenuItem";
+            copyMenuItem.Size = new Size(124, 22);
+            copyMenuItem.Text = "复制地址";
+            copyMenuItem.Click += copyMenuItem_Click;
+            // 
+            // deleteMenuItem
+            // 
+            deleteMenuItem.Name = "deleteMenuItem";
+            deleteMenuItem.Size = new Size(124, 22);
+            deleteMenuItem.Text = "删除";
+            deleteMenuItem.Click += deleteMenuItem_Click;
             // 
             // Form2
             // 
             AutoScaleDimensions = new SizeF(7F, 17F);
             AutoScaleMode = AutoScaleMode.Font;
             ClientSize = new Size(254, 441);
-            Controls.Add(listBox1);
+            Controls.Add(listView1);
             FormBorderStyle = FormBorderStyle.FixedToolWindow;
             Icon = (Icon)resources.GetObject("$this.Icon");
             Name = "Form2";
+            ShowInTaskbar = false;
             Text = "整理收藏夹";
+            contextMenuStrip1.ResumeLayout(false);
             ResumeLayout(false);
         }
 
         #endregion
 
-        private ListBox listBox1;
+        private ListView listView1;
+        private ColumnHeader columnHeader1;
+        private ColumnHeader columnHeader2;
+        private ContextMenuStrip contextMenuStrip1;
+        private ToolStripMenuItem copyMenuItem;
+        private ToolStripMenuItem deleteMenuItem;
     }
 }

+ 40 - 42
Form2.cs

@@ -16,63 +16,61 @@ namespace EdgeVoyager
 {
     public partial class Form2 : Form
     {
-        string resxFilePath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "favoritesMenuItem.resx");
         public Form2()
         {
             InitializeComponent();
-
-            // 使用ResXResourceReader读取资源文件
-            using (ResXResourceReader reader = new ResXResourceReader(resxFilePath))
+            ResXResourceReader rsxr = new ResXResourceReader("favoritesMenuItem.resx");
+            foreach (DictionaryEntry d in rsxr)
             {
-                // 遍历资源文件中的每一项
-                foreach (DictionaryEntry entry in reader)
-                {
-                    // 将项的名称添加到ListBox中
-                    listBox1.Items.Add(entry.Key.ToString());
-                }
+                ListViewItem item = new ListViewItem(d.Key.ToString());
+                item.SubItems.Add(d.Value.ToString());
+                listView1.Items.Add(item);
             }
-            ContextMenuStrip contextMenuStrip = new ContextMenuStrip();
-            ToolStripMenuItem deleteMenuItem = new ToolStripMenuItem("删除");
-            deleteMenuItem.Click += DeleteMenuItem_Click;
-            contextMenuStrip.Items.Add(deleteMenuItem);
-            listBox1.ContextMenuStrip = contextMenuStrip;
+            rsxr.Close();
         }
-        private void DeleteMenuItem_Click(object sender, EventArgs e)
+
+        private void copyMenuItem_Click(object sender, EventArgs e)
         {
-            ResXResourceReader reader = new ResXResourceReader(resxFilePath);
-            // 获取选中的项
-            if (listBox1.SelectedItem != null)
+            if (listView1.SelectedItems.Count > 0)
             {
-                string key = listBox1.SelectedItem.ToString();
-                ResXResourceWriter writer = new ResXResourceWriter(resxFilePath + ".temp");
+                ListViewItem selectedItem = listView1.SelectedItems[0];
+                string value = selectedItem.SubItems[1].Text;
+                Clipboard.SetText(value);
+            }
+        }
 
-                bool itemFound = false;
-                foreach (DictionaryEntry entry in reader)
+        private void deleteMenuItem_Click(object sender, EventArgs e)
+        {
+            if (listView1.SelectedItems.Count > 0)
+            {
+                ListViewItem selectedItem = listView1.SelectedItems[0];
+                string key = selectedItem.SubItems[0].Text;
+                ResXResourceReader rsxr = new ResXResourceReader("favoritesMenuItem.resx");
+                Dictionary<string, object> resources = new Dictionary<string, object>();
+                foreach (DictionaryEntry d in rsxr)
                 {
-                    if (entry.Key.ToString() != key)
+                    if (d.Key.ToString() != key)
                     {
-                        writer.AddResource(entry.Key.ToString(), entry.Value);
-                    }
-                    else
-                    {
-                        itemFound = true;
+                        resources.Add(d.Key.ToString(), d.Value);
                     }
                 }
-
-                reader.Close();
-                writer.Generate();
-                writer.Close();
-
-                if (itemFound)
+                rsxr.Close();
+                ResXResourceWriter rsxw = new ResXResourceWriter("favoritesMenuItem.resx");
+                foreach (var kvp in resources)
                 {
-                    File.Delete(resxFilePath);
-                    File.Move(resxFilePath + ".temp", resxFilePath);
+                    rsxw.AddResource(kvp.Key, kvp.Value);
                 }
-            }
-            listBox1.Items.Clear();
-            foreach (DictionaryEntry entry in reader)
-            {
-                listBox1.Items.Add(entry.Key.ToString());
+                rsxw.Generate();
+                rsxw.Close();
+                listView1.Items.Clear();
+                ResXResourceReader rsxr2 = new ResXResourceReader("favoritesMenuItem.resx");
+                foreach (DictionaryEntry d in rsxr2)
+                {
+                    ListViewItem item = new ListViewItem(d.Key.ToString());
+                    item.SubItems.Add(d.Value.ToString());
+                    listView1.Items.Add(item);
+                }
+                rsxr.Close();
             }
         }
     }

+ 3 - 0
Form2.resx

@@ -117,6 +117,9 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>

+ 97 - 116
favoritesMenuItem.resx

@@ -1,120 +1,101 @@
 <?xml version="1.0" encoding="utf-8"?>
 <root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
+	<!-- 
+		Microsoft ResX Schema
 
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
+		Version 1.3
+
+		The primary goals of this format is to allow a simple XML format 
+		that is mostly human readable. The generation and parsing of the 
+		various data types are done through the TypeConverter classes 
+		associated with the data types.
+
+		Example:
+
+		... ado.net/XML headers & schema ...
+		<resheader name="resmimetype">text/microsoft-resx</resheader>
+		<resheader name="version">1.3</resheader>
+		<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+		<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+		<data name="Name1">this is my long string</data>
+		<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+		<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+			[base64 mime encoded serialized .NET Framework object]
+		</data>
+		<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+			[base64 mime encoded string representing a byte array form of the .NET Framework object]
+		</data>
+
+		There are any number of "resheader" rows that contain simple 
+		name/value pairs.
+
+		Each data row contains a name, and value. The row also contains a 
+		type or mimetype. Type corresponds to a .NET class that support 
+		text/value conversion through the TypeConverter architecture. 
+		Classes that don't support this are serialized and stored with the 
+		mimetype set.
+
+		The mimetype is used for serialized objects, and tells the 
+		ResXResourceReader how to depersist the object. This is currently not 
+		extensible. For a given mimetype the value must be set accordingly:
+
+		Note - application/x-microsoft.net.object.binary.base64 is the format 
+		that the ResXResourceWriter will generate, however the reader can 
+		read any of the formats listed below.
+
+		mimetype: application/x-microsoft.net.object.binary.base64
+		value   : The object must be serialized with 
+			: System.Serialization.Formatters.Binary.BinaryFormatter
+			: and then encoded with base64 encoding.
+
+		mimetype: application/x-microsoft.net.object.soap.base64
+		value   : The object must be serialized with 
+			: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+			: and then encoded with base64 encoding.
+
+		mimetype: application/x-microsoft.net.object.bytearray.base64
+		value   : The object must be serialized into a byte array 
+			: using a System.ComponentModel.TypeConverter
+			: and then encoded with base64 encoding.
+	-->
+	
+	<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+		<xsd:element name="root" msdata:IsDataSet="true">
+			<xsd:complexType>
+				<xsd:choice maxOccurs="unbounded">
+					<xsd:element name="data">
+						<xsd:complexType>
+							<xsd:sequence>
+								<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+								<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+							</xsd:sequence>
+							<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+							<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+							<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+						</xsd:complexType>
+					</xsd:element>
+					<xsd:element name="resheader">
+						<xsd:complexType>
+							<xsd:sequence>
+								<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+							</xsd:sequence>
+							<xsd:attribute name="name" type="xsd:string" use="required" />
+						</xsd:complexType>
+					</xsd:element>
+				</xsd:choice>
+			</xsd:complexType>
+		</xsd:element>
+	</xsd:schema>
+	<resheader name="resmimetype">
+		<value>text/microsoft-resx</value>
+	</resheader>
+	<resheader name="version">
+		<value>1.3</value>
+	</resheader>
+	<resheader name="reader">
+		<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+	</resheader>
+	<resheader name="writer">
+		<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+	</resheader>
 </root>

+ 0 - 63
favoritesMenuItemIcon.Designer.cs

@@ -1,63 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     此代码由工具生成。
-//     运行时版本:4.0.30319.42000
-//
-//     对此文件的更改可能会导致不正确的行为,并且如果
-//     重新生成代码,这些更改将会丢失。
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace EdgeVoyager {
-    using System;
-    
-    
-    /// <summary>
-    ///   一个强类型的资源类,用于查找本地化的字符串等。
-    /// </summary>
-    // 此类是由 StronglyTypedResourceBuilder
-    // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
-    // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
-    // (以 /str 作为命令选项),或重新生成 VS 项目。
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class favoritesMenuItemIcon {
-        
-        private static global::System.Resources.ResourceManager resourceMan;
-        
-        private static global::System.Globalization.CultureInfo resourceCulture;
-        
-        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
-        internal favoritesMenuItemIcon() {
-        }
-        
-        /// <summary>
-        ///   返回此类使用的缓存的 ResourceManager 实例。
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager {
-            get {
-                if (object.ReferenceEquals(resourceMan, null)) {
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("EdgeVoyager.favoritesMenuItemIcon", typeof(favoritesMenuItemIcon).Assembly);
-                    resourceMan = temp;
-                }
-                return resourceMan;
-            }
-        }
-        
-        /// <summary>
-        ///   重写当前线程的 CurrentUICulture 属性,对
-        ///   使用此强类型资源类的所有资源查找执行重写。
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture {
-            get {
-                return resourceCulture;
-            }
-            set {
-                resourceCulture = value;
-            }
-        }
-    }
-}

+ 0 - 101
favoritesMenuItemIcon.resx

@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-	<!-- 
-		Microsoft ResX Schema
-
-		Version 1.3
-
-		The primary goals of this format is to allow a simple XML format 
-		that is mostly human readable. The generation and parsing of the 
-		various data types are done through the TypeConverter classes 
-		associated with the data types.
-
-		Example:
-
-		... ado.net/XML headers & schema ...
-		<resheader name="resmimetype">text/microsoft-resx</resheader>
-		<resheader name="version">1.3</resheader>
-		<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-		<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-		<data name="Name1">this is my long string</data>
-		<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-		<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-			[base64 mime encoded serialized .NET Framework object]
-		</data>
-		<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-			[base64 mime encoded string representing a byte array form of the .NET Framework object]
-		</data>
-
-		There are any number of "resheader" rows that contain simple 
-		name/value pairs.
-
-		Each data row contains a name, and value. The row also contains a 
-		type or mimetype. Type corresponds to a .NET class that support 
-		text/value conversion through the TypeConverter architecture. 
-		Classes that don't support this are serialized and stored with the 
-		mimetype set.
-
-		The mimetype is used for serialized objects, and tells the 
-		ResXResourceReader how to depersist the object. This is currently not 
-		extensible. For a given mimetype the value must be set accordingly:
-
-		Note - application/x-microsoft.net.object.binary.base64 is the format 
-		that the ResXResourceWriter will generate, however the reader can 
-		read any of the formats listed below.
-
-		mimetype: application/x-microsoft.net.object.binary.base64
-		value   : The object must be serialized with 
-			: System.Serialization.Formatters.Binary.BinaryFormatter
-			: and then encoded with base64 encoding.
-
-		mimetype: application/x-microsoft.net.object.soap.base64
-		value   : The object must be serialized with 
-			: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-			: and then encoded with base64 encoding.
-
-		mimetype: application/x-microsoft.net.object.bytearray.base64
-		value   : The object must be serialized into a byte array 
-			: using a System.ComponentModel.TypeConverter
-			: and then encoded with base64 encoding.
-	-->
-	
-	<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-		<xsd:element name="root" msdata:IsDataSet="true">
-			<xsd:complexType>
-				<xsd:choice maxOccurs="unbounded">
-					<xsd:element name="data">
-						<xsd:complexType>
-							<xsd:sequence>
-								<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-								<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-							</xsd:sequence>
-							<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
-							<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-							<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-						</xsd:complexType>
-					</xsd:element>
-					<xsd:element name="resheader">
-						<xsd:complexType>
-							<xsd:sequence>
-								<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-							</xsd:sequence>
-							<xsd:attribute name="name" type="xsd:string" use="required" />
-						</xsd:complexType>
-					</xsd:element>
-				</xsd:choice>
-			</xsd:complexType>
-		</xsd:element>
-	</xsd:schema>
-	<resheader name="resmimetype">
-		<value>text/microsoft-resx</value>
-	</resheader>
-	<resheader name="version">
-		<value>1.3</value>
-	</resheader>
-	<resheader name="reader">
-		<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-	</resheader>
-	<resheader name="writer">
-		<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-	</resheader>
-</root>