1910108 chi 열저장방식 변경(필드명으로 저장)
파트리스트 열 순서를 기존 사용 엑셀과 동일하게 정렬 파트리스트 적용부위 납기일 항목 추가 파트리스트 가져오기 메뉴에 적용부위, 납기일 항목 추가 파트리스트 내보내기 기능 - 파일명을 프로젝트 명으로 자동 입력
This commit is contained in:
@@ -1,29 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FPJ0000
|
||||
{
|
||||
public static class FPUtil
|
||||
{
|
||||
public static void ColsizeSave(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 ColSizeLoad(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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FPJ0000
|
||||
{
|
||||
public static class FPUtil
|
||||
{
|
||||
public static void ColsizeSave(FarPoint.Win.Spread.FpSpread dv, string fn)
|
||||
{
|
||||
arUtil.INIHelper ini = new arUtil.INIHelper(fn);
|
||||
foreach (FarPoint.Win.Spread.Column col in dv.ActiveSheet.Columns)
|
||||
{
|
||||
//열 필드명을 보고 저장하거나 번호로 저장한다
|
||||
var keyName = "index_" + col.Index.ToString();
|
||||
if (col.DataField != "") keyName = col.DataField;
|
||||
ini.set_Data("colsize", keyName, col.Width.ToString());
|
||||
}
|
||||
|
||||
ini.Flush();
|
||||
}
|
||||
public static void ColSizeLoad(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 strWidth = "100";
|
||||
if(col.DataField != "")
|
||||
{
|
||||
strWidth = ini.get_Data("colsize", col.DataField, ""); //필드명으로 읽어서 자료가 없다면 인덱스로 한다
|
||||
if (strWidth == "") strWidth = ini.get_Data("colsize", "index_" + col.Index.ToString(), "0");
|
||||
}
|
||||
else strWidth = ini.get_Data("colsize", "index_" + col.Index.ToString(), "0");
|
||||
col.Width = float.Parse(strWidth);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user