示例#1
0
        public void LoadUserControl()
        {
            switch (MainConfig.ShowView)
            {
            case ShowView.SmallView:
                panelMain.Controls.Clear();
                SmallView smallView = new SmallView();
                panelMain.Controls.Add(smallView);
                break;

            case ShowView.LargeView:
                panelMain.Controls.Clear();
                LargeView largeView = new LargeView();
                panelMain.Controls.Add(largeView);
                break;

            case ShowView.DetailView:
                panelMain.Controls.Clear();
                DetailView detailView = new DetailView();
                panelMain.Controls.Add(detailView);
                break;

            case ShowView.ListView:
                panelMain.Controls.Clear();
                ListView listView = new ListView();
                panelMain.Controls.Add(listView);
                break;

            default:
                break;
            }
        }
示例#2
0
        private void CreateSmallView(string path)
        {
            Size      panelSize = panelShowView.Size;
            Size      imageSize = new Size(16 * 10, 9 * 10);
            SmallView smallView = new SmallView(path, panelSize, imageSize);

            panelShowView.Controls.Add(smallView);
        }