using Shared;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace HDL_ON.Stan
{
///
/// 本地缓存文件夹列表的界面
///
public class HideOptionDirectoryListForm : EditorCommonForm
{
#region ■ 变量声明___________________________
#endregion
#region ■ 初始化_____________________________
///
/// 画面显示(底层会固定调用此方法,借以完成画面创建)
///
public void ShowForm()
{
//设置头部信息
base.SetTitleText("文件夹列表");
//初始化中部信息
this.InitMiddleFrame();
}
///
/// 初始化中部信息
///
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
}
}