黄学彪
2021-01-28 1fcf2302f79f9cbea5ef17c3688311ed65cfabb4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
using Shared;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
 
namespace HDL_ON.Stan
{
    /// <summary>
    /// 本地缓存文件夹列表的界面
    /// </summary>
    public class HideOptionDirectoryListForm : EditorCommonForm
    {
        #region ■ 变量声明___________________________
 
        #endregion
 
        #region ■ 初始化_____________________________
 
        /// <summary>
        /// 画面显示(底层会固定调用此方法,借以完成画面创建)
        /// </summary>
        public void ShowForm()
        {
            //设置头部信息
            base.SetTitleText("文件夹列表");
 
            //初始化中部信息
            this.InitMiddleFrame();
        }
 
        /// <summary>
        /// 初始化中部信息
        /// </summary>
        private void InitMiddleFrame()
        {
            var listView = new VerticalListControl(8);
            listView.BackgroundColor = 0xffffffff;
            listView.Height = bodyFrameLayout.Height;
            bodyFrameLayout.AddChidren(listView);
 
            //查看全部文件
            var row2 = new FrameRowControl(listView.rowSpace / 2);
            listView.AddChidren(row2);
            row2.AddLeftCaption("查看全部文件", 278);
            row2.AddRightArrow();
 
            row2.ButtonClickEvent += (sender, e) =>
            {
                var form = new HideOptionSearchAllFile();
                form.AddForm(Shared.IO.FileUtils.RootPath);
            };
 
            listView.AdjustRealHeight(Application.GetRealHeight(8));
        }
 
        private void AddRowControl(VerticalListControl listView, string directory, string directoryValue, bool addLine)
        {
            if (System.IO.Directory.Exists(directoryValue) == false)
            {
                return;
            }
            var row1 = new FrameRowControl(listView.rowSpace / 2);
            listView.AddChidren(row1);
            row1.AddLeftCaption(directory, 278);
            row1.AddRightArrow();
            if (addLine == true)
            {
                row1.AddBottomLine();
            }
 
            row1.ButtonClickEvent += (sender, e) =>
            {
                var form = new HideOptionSearchAllFile();
                form.AddForm(directoryValue);
            };
        }
 
        #endregion
 
        #region ■ 一般方法___________________________
 
        #endregion
    }
}