Files
Groupware/SubProject/FCOMMON/Util_Farpoint.cs
chikyun.kim 6b374123fd 181210 chi NR구매등록시 이미지 표시 및 추가 기능
NR구매목록에서 권한 없는 사람이 더블클릭으로 편집할 수 있는 버그 수정
2018-12-10 12:29:18 +09:00

44 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace FCOMMON
{
public static partial class Util
{
public static void FPColSizeAuto(FarPoint.Win.Spread.FpSpread fp)
{
fp.ActiveSheet.DataAutoSizeColumns = true;
for (int i = 0; i < fp.ActiveSheet.Rows.Count; i++)
fp.ActiveSheet.SetRowHeight(i, 25);
}
public static void FPCollSizeReset(FarPoint.Win.Spread.FpSpread fp)
{
foreach (FarPoint.Win.Spread.Column col in fp.ActiveSheet.Columns)
{
col.Width = 100;
}
}
public static void FPColsizeSave(FarPoint.Win.Spread.FpSpread dv, string fn)
{
arUtil.INIHelper ini = new arUtil.INIHelper(fn);
foreach (FarPoint.Win.Spread.Column col in dv.ActiveSheet.Columns)
ini.set_Data("colsize", "index_" + col.Index.ToString(), col.Width.ToString());
ini.Flush();
}
public static void FPColSizeLoad(ref FarPoint.Win.Spread.FpSpread dv, string fn)
{
if (System.IO.File.Exists(fn) == false) return;
arUtil.INIHelper ini = new arUtil.INIHelper(fn);
foreach (FarPoint.Win.Spread.Column col in dv.ActiveSheet.Columns)
{
var width = ini.get_Data("colsize", "index_" + col.Index.ToString(), "0");
col.Width = float.Parse(width);
}
}
}
}