public static UnitViewModel Create(IMCostCenterRepository mCostCenterRepository) { UnitViewModel viewModel = new UnitViewModel(); viewModel.CostCenterList = FillHelper.GetCostCenters(mCostCenterRepository, null); return(viewModel); }
public static CashFormViewModel CreateCashFormViewModel(ITJournalRepository tJournalRepository, IMCostCenterRepository mCostCenterRepository, IMAccountRepository mAccountRepository) { CashFormViewModel viewModel = new CashFormViewModel(); viewModel.CostCenterList = FillHelper.GetCostCenters(mCostCenterRepository, "-Pilih Cost Center-"); //viewModel.AccountList = FillHelper.GetAccounts(mAccountRepository, "-Pilih Akun Kas-"); return(viewModel); }
public SiteMember(int userId) { DataRow dr = MemberManage.GetUserInfo(userId); if (dr != null) { FillHelper.Fill(dr, this); } }
public RealFormViewModel Create(IMCostCenterRepository mCostCenterRepository) { RealFormViewModel viewModel = new RealFormViewModel(); TReal r = new TReal(); viewModel.CostCenterList = FillHelper.GetCostCenters(mCostCenterRepository, "-Pilih Cost Center-"); viewModel.CostCenterList = FillHelper.GetMonths("-Pilih Bulan-"); viewModel.YearList = FillHelper.GetYears("-Pilih Tahun-"); return(viewModel); }
public TileEditor(TextureForm.TextureItem item) { InitializeComponent(); this.item = item; fillHelper = new FillHelper(item.Bitmap); foreach (TextureSet.Tile t in item.TextureSet) { tileList.Items.Add(new TileItem(t)); } }
public static void DrawQuad(FillHelper vertex, Rect v, Color32 c) { var r = new Vector2(TexUtility.blockFontIndex, 0); var z = new Vector2(); vertex.AddVert(new Vector3(v.xMin, v.yMin), c, z, r); vertex.AddVert(new Vector3(v.xMax, v.yMin), c, z, r); vertex.AddVert(new Vector3(v.xMax, v.yMax), c, z, r); vertex.AddVert(new Vector3(v.xMin, v.yMax), c, z, r); vertex.AddQuad(); }
public SiteMember(string userName) { if (string.IsNullOrEmpty(userName) == true) { throw new ArgumentException("loginName is null or empty"); } DataRow dr = MemberManage.GetUserInfo(userName); if (dr != null) { FillHelper.Fill(dr, this); } }
public override void ModifyMesh(Mesh mesh) { var input = GetComponent <TEXInput>(); if (!input.IsInteractable()) { return; } if (!(isActive = input.hasFocus) && idleColor.a < 1e-4f) { return; } if (!isHot && isBlinkTime) { return; } var logger = input.logger; var verts = new FillHelper(); var param = tex.drawingParams; var scale = param.scaleFactor; var start = input.selectionStart; var length = input.selectionLength; var links = tex.drawingContext.linkBoxRect; var color = (Color32)(isActive ? activeColor : idleColor); var blocks = logger.GetBlockMatches(start, length).ToArray(); verts.ReadMesh(mesh); if (links.Count == 0) { // no target to draw. guess it var offset = param.offset; DrawQuad(verts, new Rect(offset.x - cursorWidth, offset.y - lineDepth, cursorWidth * 2, lineHeight), color); } else if (blocks.Length == 0) { var i = input.selectionStart; var b = logger.GetBlockBefore(i); if (b.index == -1) { // nothing found var f = param.formulas[0]; Draw(verts, ExtractAreaOfLine(scale, f), input.selectionStart > 0); } else if (b.lineSeparator >= 0 && b.start == i) { // it's different int s, e; param.GetLineRange(b.lineSeparator, out s, out e); var f = param.formulas[s + e - 1]; Draw(verts, ExtractAreaOfLine(scale, f), true); } else if (b.length == 0 && b.start == i) { // placeholder DrawQuad(verts, links[b.index], color); } else if (i >= b.end) { // wait wait if (i != b.end && i == tex.text.Length) { var f = param.formulas[param.formulas.Count - 1]; Draw(verts, ExtractAreaOfLine(scale, f), true); } else { // draw things 'after' so offset by - 1 Draw(verts, links[b.index], true); } } else if (i >= b.start) { // wait wait var prev = logger.GetPrevious(b); if (prev.index != b.index && prev.end >= b.start) { Draw(verts, links[prev.index], true); } else { // draw things like usual Draw(verts, links[b.index], false); } } } else { // just simple block foreach (var b in blocks) { if (b.lineSeparator >= 0) { // newlines are not visible so... int s, e; param.GetLineRange(b.lineSeparator, out s, out e); var f = param.formulas[s + e - 1]; Draw(verts, ExtractAreaOfLine(scale, f), true); Draw(verts, links[b.index], true); } else { DrawQuad(verts, links[b.index], color); } } } verts.FillMesh(mesh, tex.drawingContext.calculateNormal); }
private void Draw(FillHelper verts, Rect r, bool onTheRight) { DrawQuad(verts, new Rect(r.x - cursorWidth + (onTheRight ? r.width : 0), r.y, cursorWidth * 2, r.height), isActive ? activeColor : idleColor); }