Example #1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                string[] ttt = new ClearableListDataHelper().GetDomains();
                if (ttt != null)
                {
                    try
                    {
                        string tempFile         = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), "兼容性视图配置.ieviewconfig");
                        ClearableListObject clo = new ClearableListObject();
                        clo.WebSiteList.AddRange(ttt);
                        ClearableListObject.toFile(clo, tempFile);

                        MessageBox.Show("保存完成!路径:" + tempFile);
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show("保存失败!Ex:" + ex.ToString());
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("保存失败!Ex:" + ex.ToString());
            }
        }
Example #2
0
 private void btnRefresh_Click(object sender, EventArgs e)
 {
     try
     {
         lbxCurrent.Items.Clear();
         string[] ttt = new ClearableListDataHelper().GetDomains();
         if (ttt != null)
         {
             foreach (string t in ttt)
             {
                 lbxCurrent.Items.Add(t);
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("IE兼容性视图列表载入失败!Ex:" + ex.ToString());
     }
 }