protected virtual void tsBtnLuu_Click(object sender, EventArgs e) { _displayFlag = DisplayFlag.Normal; UpdateData(); EnableItems(); dgView.Invalidate(); }
protected override ViewResult View(string viewName, string masterName, object model) { DisplayFlag displayFlag = 0; if (HttpContext.Request["displayFlag"] != null) { displayFlag = (DisplayFlag)int.Parse(HttpContext.Request["displayFlag"]); } if (HttpContext.Request["BIARedirectedDialogUrl"] != null) { HttpContext.Response.AddHeader("BIARedirectedDialogUrl", HttpContext.Request["BIARedirectedDialogUrl"]); } /* if (HttpContext.Request["DialogRefreshPartialView"] != null) * { * viewName = HttpContext.Request["DialogRefreshPartialView"]; * return PartialViewConverter.Convert(base.PartialView(viewName, model)); * }*/ if ((displayFlag & DisplayFlag.Popup) == DisplayFlag.Popup) { ViewResult myView = base.View(viewName, masterName, model); myView.MasterName = "~/Views/Shared/_Layout_Dialog.cshtml"; //Request.Add("BIACurrentDialogUrl", Url.Action(viewName)); return(myView); } return(base.View(viewName, masterName, model)); }
protected virtual void tsBtnSua_Click(object sender, EventArgs e) { if (_displayFlag == DisplayFlag.Update) { _displayFlag = DisplayFlag.Normal; } else { _displayFlag = DisplayFlag.Update; } EnableItems(); }
protected override ViewResult View(string viewName, string masterName, object model) { DisplayFlag displayFlag = 0; if (HttpContext.Request["BIANetDialogDisplayFlag"] != null) { displayFlag = (DisplayFlag)int.Parse(HttpContext.Request["BIANetDialogDisplayFlag"]); } if (HttpContext.Request["BIANetDialogRedirectedUrl"] != null) { HttpContext.Response.AddHeader("BIANetDialogRedirectedUrl", HttpContext.Request["BIANetDialogRedirectedUrl"]); } if (HttpContext.Request["BIANetDialogRedirect"] != null) { HttpContext.Response.AddHeader("BIANetDialogRedirect", HttpContext.Request["BIANetDialogRedirect"]); } /* if (HttpContext.Request["DialogRefreshPartialView"] != null) * { * viewName = HttpContext.Request["DialogRefreshPartialView"]; * return PartialViewConverter.Convert(base.PartialView(viewName, model)); * }*/ if (displayFlag == DisplayFlag.Popup) { ViewResult myView = base.View(viewName, masterName, model); myView.MasterName = BIA.Net.Common.BIASettingsReader.GetDialogLayout("Popup"); //Request.Add("BIACurrentDialogUrl", Url.Action(viewName)); return(myView); } else if (displayFlag == DisplayFlag.Content) { ViewResult myView = base.View(viewName, masterName, model); myView.MasterName = Common.BIASettingsReader.GetDialogLayout("Content"); //Request.Add("BIACurrentDialogUrl", Url.Action(viewName)); return(myView); } else if (displayFlag == DisplayFlag.MainPageContent) { ViewResult myView = base.View(viewName, masterName, model); myView.MasterName = Common.BIASettingsReader.GetDialogLayout("MainPageContent"); //Request.Add("BIACurrentDialogUrl", Url.Action(viewName)); return(myView); } return(base.View(viewName, masterName, model)); }
protected void SectionSprite(DisplayFlag flags) { serializedObject.Update(); MadGUI.PropertyField(visible, "Visible"); if ((flags & DisplayFlag.WithoutMaterial) == 0) { MadGUI.PropertyField(texture, "Texture", MadGUI.ObjectIsSet); MadGUI.Indent(() => { MadGUI.PropertyFieldVector2(textureRepeat, "Repeat"); MadGUI.PropertyFieldVector2(textureOffset, "Offset"); }); } MadGUI.PropertyField(tint, "Tint"); if ((flags & DisplayFlag.WithoutSize) == 0) { if (GUILayout.Button(new GUIContent("Resize To Texture", "Resizes this sprite to match texture size"))) { var sprite = target as MadSprite; MadUndo.RecordObject2(sprite, "Resize To Texture"); sprite.ResizeToTexture(); EditorUtility.SetDirty(sprite); } } MadGUI.PropertyField(pivotPoint, "Pivot Point"); MadGUI.PropertyField(guiDepth, "GUI Depth"); if ((flags & DisplayFlag.WithoutFill) == 0) { MadGUI.PropertyField(fillType, "Fill Type"); EditorGUILayout.Slider(fillValue, 0, 1, "Fill Value"); if (sprite.fillType == MadSprite.FillType.RadialCCW || sprite.fillType == MadSprite.FillType.RadialCW) { MadGUI.PropertyFieldSlider(radialFillOffset, -1, 1, "Offset"); MadGUI.PropertyFieldSlider(radialFillLength, 0, 1, "Length"); } } serializedObject.ApplyModifiedProperties(); }
protected override RedirectToRouteResult RedirectToAction(string actionName, string controllerName, RouteValueDictionary routeValues) { DisplayFlag displayFlag = 0; if (HttpContext.Request["displayFlag"] != null) { displayFlag = (DisplayFlag)int.Parse(HttpContext.Request["displayFlag"]); } if (displayFlag != 0) { //Test if we are returned to parent Page string dialogUrlParent = null; if (HttpContext.Request["dialogUrlParent"] != null) { dialogUrlParent = ((string)HttpContext.Request["dialogUrlParent"]).ToLower(); } if (!string.IsNullOrEmpty(dialogUrlParent)) { UrlHelper u = new UrlHelper(this.ControllerContext.RequestContext); string url = UniformizeUrl(u.Action(actionName, controllerName, routeValues)); string full_url = UniformizeUrl(HttpContext.Request.Url.Scheme + "://" + HttpContext.Request.Url.Authority + u.Action(actionName, controllerName, routeValues)); string[] dialogUrlsParent = dialogUrlParent.Split(';'); foreach (string urlPa in dialogUrlsParent) { string uniformizedUrlParent = UniformizeUrl(urlPa); if (url.Equals(uniformizedUrlParent) || full_url.Equals(uniformizedUrlParent)) //if (urlPa.Contains(url)) { return(base.RedirectToAction("CloseDialog", "DialogBasicAction", null)); } } } //Not parent page continue if (routeValues == null) { routeValues = new RouteValueDictionary(); } routeValues.Add("displayFlag", (int)displayFlag); routeValues.Add("BIARedirectedDialogUrl", Url.Action(actionName, routeValues)); } return(base.RedirectToAction(actionName, controllerName, routeValues)); }
private void btnPhanQuyen_Click(object sender, EventArgs e) { _displayFlag = DisplayFlag.PhanQuyen; DisplayItems(); }
protected void SectionSprite(DisplayFlag flags) { serializedObject.Update(); GUIDepthCheck(); MadGUI.PropertyField(panel, "Panel", MadGUI.ObjectIsSet); EditorGUILayout.Space(); MadGUI.PropertyField(visible, "Visible"); if ((flags & DisplayFlag.WithoutMaterial) == 0) { MadGUI.PropertyFieldEnumPopup(inputType, "Input Type"); MadGUI.Indent(() => { switch (sprite.inputType) { case MadSprite.InputType.SingleTexture: MadGUI.PropertyField(texture, "Texture", MadGUI.ObjectIsSet); MadGUI.Indent(() => { MadGUI.PropertyFieldVector2(textureRepeat, "Repeat"); MadGUI.PropertyFieldVector2(textureOffset, "Offset"); }); break; case MadSprite.InputType.TextureAtlas: MadGUI.PropertyField(textureAtlas, "Texture Atlas", MadGUI.ObjectIsSet); if (sprite.textureAtlas != null) { MadAtlasUtil.AtlasField(textureAtlasSpriteGUID, sprite.textureAtlas, "Sprite", this); } break; default: Debug.LogError("Unknown input type: " + sprite.inputType); break; } }); } MadGUI.PropertyField(hasPremultipliedAlpha, "Has Pre-Alpha"); MadGUI.PropertyField(tint, "Tint"); EditorGUILayout.Space(); if ((flags & DisplayFlag.WithoutSize) == 0) { EditorGUILayout.Space(); GUI.backgroundColor = Color.yellow; if (GUILayout.Button(new GUIContent("Resize To Texture", "Resizes this sprite to match texture size"))) { MadUndo.RecordObject2(sprite, "Resize To Texture"); sprite.ResizeToTexture(); EditorUtility.SetDirty(sprite); } GUI.backgroundColor = Color.white; EditorGUILayout.Space(); } EditorGUILayout.Space(); MadGUI.PropertyField(pivotPoint, "Pivot Point"); if (sprite.pivotPoint == MadSprite.PivotPoint.Custom) { MadGUI.Indent(() => { MadGUI.PropertyFieldVector2(customPivotPoint, "Custom Pivot Point"); }); } MadGUI.PropertyField(guiDepth, "GUI Depth"); EditorGUILayout.Space(); if ((flags & DisplayFlag.WithoutFill) == 0) { MadGUI.PropertyField(fillType, "Fill Type"); EditorGUILayout.Slider(fillValue, 0, 1, "Fill Value"); if (sprite.fillType == MadSprite.FillType.RadialCCW || sprite.fillType == MadSprite.FillType.RadialCW) { MadGUI.PropertyFieldSlider(radialFillOffset, -1, 1, "Offset"); MadGUI.PropertyFieldSlider(radialFillLength, 0, 1, "Length"); } } if (showLiveBounds) { GUILayout.Label("Sprite Border", "HeaderLabel"); EditorGUILayout.Space(); if (sprite.CanDraw()) { FieldLiveBounds(); } else { MadGUI.Info("More settings will be available when the sprite texture or atlas is set."); } } serializedObject.ApplyModifiedProperties(); }
private void btnThongKe_Click(object sender, EventArgs e) { _displayFlag = DisplayFlag.ThongKe; DisplayForm(); }
private void btnNhapKho_Click(object sender, EventArgs e) { _displayFlag = DisplayFlag.NhapKho; DisplayForm(); }
private void button3_Click(object sender, EventArgs e) { _displayFlag = DisplayFlag.DatHang; DisplayForm(); }
private void btnBanHang_Click(object sender, EventArgs e) { _displayFlag = DisplayFlag.BanHang; DisplayForm(); }
private void btnLoaiKhacHang_Click(object sender, EventArgs e) { _displayFlag = DisplayFlag.LoaiKhachHang; DisplayItems(); }
private void btnDanhMuc_Click(object sender, EventArgs e) { _displayFlag = DisplayFlag.DanhMucSP; FrmQuanLySanPham_Load(sender, e); }
private void btnNhanVien_Click(object sender, EventArgs e) { _displayFlag = DisplayFlag.NhanVien; DisplayItems(); }
private void btnPhieuQuaTang_Click(object sender, EventArgs e) { _displayFlag = DisplayFlag.PhieuQuaTang; DisplayItems(); }
private void btnTangHangThe_Click(object sender, EventArgs e) { _displayFlag = DisplayFlag.NhaCungCap; DisplayItems(); }
private void btnDanhMucSP_Click(object sender, EventArgs e) { _displayFlag = DisplayFlag.DanhMucSP; SetColorButtons(); DisplayItems(); }
private void btnSanPham_Click(object sender, EventArgs e) { _displayFlag = DisplayFlag.SanPham; SetColorButtons(); DisplayItems(); }
private void btnNhomHang_Click(object sender, EventArgs e) { _displayFlag = DisplayFlag.NhomHang; SetColorButtons(); DisplayItems(); }
private void btnNhomHang_Click(object sender, EventArgs e) { _displayFlag = DisplayFlag.NhomHang; FrmQuanLySanPham_Load(sender, e); }
private void btnPhieuChi_Click(object sender, EventArgs e) { _displayFlag = DisplayFlag.PhieuChi; DisplayForm(); }
private void btnInMaVach_Click(object sender, EventArgs e) { _displayFlag = DisplayFlag.InMaVach; FrmQuanLySanPham_Load(sender, e); }
protected void SectionSprite(DisplayFlag flags) { serializedObject.Update(); GUIDepthCheck(); MadGUI.PropertyField(panel, "Panel", MadGUI.ObjectIsSet); EditorGUILayout.Space(); MadGUI.PropertyField(visible, "Visible"); if ((flags & DisplayFlag.WithoutMaterial) == 0) { MadGUI.PropertyFieldEnumPopup(inputType, "Input Type"); MadGUI.Indent(() => { switch (sprite.inputType) { case MadSprite.InputType.SingleTexture: MadGUI.PropertyField(texture, "Texture", MadGUI.ObjectIsSet); MadGUI.Indent(() => { MadGUI.PropertyFieldVector2(textureRepeat, "Repeat"); MadGUI.PropertyFieldVector2(textureOffset, "Offset"); }); break; case MadSprite.InputType.TextureAtlas: MadGUI.PropertyField(textureAtlas, "Texture Atlas", MadGUI.ObjectIsSet); if (sprite.textureAtlas != null) { MadAtlasUtil.AtlasField(textureAtlasSpriteGUID, sprite.textureAtlas, "Sprite"); } break; default: Debug.LogError("Unknown input type: " + sprite.inputType); break; } }); } MadGUI.PropertyField(hasPremultipliedAlpha, "Has Pre-Alpha"); MadGUI.PropertyField(tint, "Tint"); EditorGUILayout.Space(); if ((flags & DisplayFlag.WithoutSize) == 0) { EditorGUILayout.Space(); GUI.backgroundColor = Color.yellow; if (GUILayout.Button(new GUIContent("Resize To Texture", "Resizes this sprite to match texture size"))) { MadUndo.RecordObject2(sprite, "Resize To Texture"); sprite.ResizeToTexture(); EditorUtility.SetDirty(sprite); } GUI.backgroundColor = Color.white; EditorGUILayout.Space(); } EditorGUILayout.Space(); MadGUI.PropertyField(pivotPoint, "Pivot Point"); if (sprite.pivotPoint == MadSprite.PivotPoint.Custom) { MadGUI.Indent(() => { MadGUI.PropertyFieldVector2(customPivotPoint, "Custom Pivot Point"); }); } MadGUI.PropertyField(guiDepth, "GUI Depth"); EditorGUILayout.Space(); if ((flags & DisplayFlag.WithoutFill) == 0) { MadGUI.PropertyField(fillType, "Fill Type"); EditorGUILayout.Slider(fillValue, 0, 1, "Fill Value"); if (sprite.fillType == MadSprite.FillType.RadialCCW || sprite.fillType == MadSprite.FillType.RadialCW) { MadGUI.PropertyFieldSlider(radialFillOffset, -1, 1, "Offset"); MadGUI.PropertyFieldSlider(radialFillLength, 0, 1, "Length"); } } if (showLiveBounds) { GUILayout.Label("Sprite Border", "HeaderLabel"); EditorGUILayout.Space(); if (sprite.CanDraw()) { FieldLiveBounds(); } else { MadGUI.Info("More settings will be available when the sprite texture or atlas is set."); } } serializedObject.ApplyModifiedProperties(); }