/// <summary>
        /// 注册一个插件
        /// </summary>
        public bool Register(IPlugin vPlug)
        {
            /*
            ListBoxItem item = new ListBoxItem();
            item.MouseDoubleClick += NewLoad;
            list1.Items.Add(vPlug.PlugName);*/
            try
            {
                this.regPluginList.Add(vPlug);//添加到已注册列表

                GridItem button = new GridItem("Image/fullbox_desk_clear.png", vPlug.PlugName);
                int pluNum = this.regPluginList.Count;
                int x = (pluNum - 1) % 6;
                int y = (pluNum - 1) / 6;
                AddToGrid(button, x, y);

                //----超出部分未处理

                return true;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
                return false;
            }
        }
 private void AddToGrid(GridItem item, int x, int y)
 {
     PluginGrid.Children.Add(item);
     item.SetValue(Grid.ColumnProperty, x);
     item.SetValue(Grid.RowProperty, y);
     item.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
     item.VerticalAlignment = System.Windows.VerticalAlignment.Center;
 }