protected override void FormLoad() { base.FormLoad(); DateTime now = DateTime.Now; DateTime lastMonth = now.AddMonths(-1); this.ApplyStartDateEdit.EditValue = new DateTime(lastMonth.Year, lastMonth.Month, lastMonth.Day); this.ApplyEndDateEdit.EditValue = new DateTime(now.Year, now.Month, now.Day); #region ApplyUseTypeComboBox this.ApplyUseTypeComboBox.DataSource = EnumTool.GetDataSource(typeof(ApplyUseTypes)); this.ApplyUseTypeComboBox.SelectedIndex = 1; #endregion #region ApplyUseDeptComboBox DataTable deptDataTable = _Proxy.GetAllDepts(); DataRow allDeptRow = deptDataTable.NewRow(); allDeptRow["Code"] = "all"; allDeptRow["Desc"] = "所有"; deptDataTable.Rows.InsertAt(allDeptRow, 0); this.ApplyUseDeptComboBox.DataSource = deptDataTable; this.ApplyUseDeptComboBox.SelectedIndex = 0; #endregion this.gvApplyUseTypeEdit.DataSource = EnumTool.GetDataSource(typeof(ApplyUseTypes)); }
protected override void FormLoad() { this.ApplyUseTypeComboBox.DataSource = EnumTool.GetDataSource(typeof(Enums.ApplyUseTypes)); this.ApplyUseTypeComboBox.SelectedIndex = 1; this.UserComboBox.DataSource = proxy.GetEmployees(); this.ApplicantComboBox.DataSource = proxy.GetEmployees(); this.ApplyDeptComboBox.DataSource = proxy.GetAllDepts(); this.gvUnitEdit.DataSource = proxy.GetUnitList(); if (formmode == frmmodetype.add) { ApplyUseOrder = new T_ApplyUseOrder() { ApplyUseNo = proxy.GetLatestApplyUseOrderIndex(), Register = Global.UserNo, RegisterDesc = Global.UserName }; _ApplyUseOrderDetails = new List <T_ApplyUseOrderDetail>(); } else { _ApplyUseOrderDetails = proxy.GetApplyUserOrderDetails(ApplyUseOrder.ApplyUseNo); } SetData(); }
public void SwitchTool(EnumTool targetToolType) { if (this.Mesh == null) return; AbstractTool targetTool = null; switch (targetToolType) { case EnumTool.View : targetTool = new ToolView(Width, Height); break; case EnumTool.VertexByPoint: targetTool = new ToolVertexByPoint( Width, Height, this.Mesh); break; case EnumTool.VertexByCicle: targetTool = new ToolVertexByCircle( Width, Height, this.Mesh); break; case EnumTool.VertexByRectangle: targetTool = new ToolVertexByRectangle( Width, Height, this.Mesh); break; case EnumTool.VertexByCurve: targetTool = new ToolPointByCurve( Width, Height, this.Mesh); break; case EnumTool.EdgeByCicle: targetTool = new ToolEdgeByCircle( Width, Height, this.Mesh); break; case EnumTool.EdgeByRectangle: targetTool = new ToolEdgeByRectangle( Width, Height, this.Mesh); break; case EnumTool.EdgeByCurve: targetTool = new ToolEdgeByCurve(Width, Height, this.Mesh); break; case EnumTool.EdgeByPoint: targetTool = new ToolEdgeByPoint( Width, Height, this.Mesh); break; case EnumTool.FaceByCicle: targetTool = new ToolFaceByCircle( Width, Height, this.Mesh); break; case EnumTool.FaceByRectangle: targetTool = new ToolFaceByRectangle( Width, Height, this.Mesh); break; case EnumTool.FaceByPoint: targetTool = new ToolFaceByPoint( Width, Height, this.Mesh); break; case EnumTool.PointMove: targetTool = new ToolMovePoint( Width, Height, this.Mesh); break; case EnumTool.PointSingleMove: targetTool = new ToolMoveSinglePoint(Width, Height, this.Mesh); break; } this.Tool = targetTool; this.tool.Changed += new AbstractTool.ChangedEventHandlerTool(tool_ChangedTool); }
protected override void FormLoad() { base.FormLoad(); DateTime now = DateTime.Now; DateTime lastMonth = now.AddMonths(-1); this.ApplyStartDateEdit.EditValue = new DateTime(lastMonth.Year, lastMonth.Month, lastMonth.Day); this.ApplyEndDateEdit.EditValue = new DateTime(now.Year, now.Month, now.Day); #region POTypeComboBox //DataTable poTypeDataTable = EnumTool.GetDataSource(typeof(POTypes)); //DataRow allPoTypeRow = poTypeDataTable.NewRow(); //allPoTypeRow["Code"] = "all"; //allPoTypeRow["Desc"] = "所有"; //poTypeDataTable.Rows.InsertAt(allPoTypeRow, 0); this.POTypeComboBox.DataSource = EnumTool.GetDataSource(typeof(POTypes)); this.POTypeComboBox.SelectedIndex = 1; #endregion #region ApplyDeptComboBox DataTable deptDataTable = _Proxy.GetAllDepts(); DataRow allDeptRow = deptDataTable.NewRow(); allDeptRow["Code"] = "all"; allDeptRow["Desc"] = "所有"; deptDataTable.Rows.InsertAt(allDeptRow, 0); this.ApplyDeptComboBox.DataSource = deptDataTable; this.ApplyDeptComboBox.SelectedIndex = 0; #endregion this.gvPOTypeEdit.DataSource = EnumTool.GetDataSource(typeof(POTypes)); this.gvArrivalstatusEdit.DataSource = EnumTool.GetDataSource(typeof(ArrivalStatus)); this.gvPOStatusEdit.DataSource = EnumTool.GetDataSource(typeof(POStatus)); this.gvPaymentStatusEdit.DataSource = EnumTool.GetDataSource(typeof(PaymentStatus)); this.barAdd.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; this.barEdit.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; this.barDelete.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; this.barbtn1.Glyph = global::MEMS.Client.MRP.Properties.Resources.showtestreport_16x16; this.barbtn1.LargeGlyph = global::MEMS.Client.MRP.Properties.Resources.showtestreport_32x32; this.barbtn1.Caption = "审批"; this.barbtn1.Enabled = false; this.barbtn1.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; this.barbtn2.Glyph = global::MEMS.Client.MRP.Properties.Resources.showtestreport_16x16; this.barbtn2.LargeGlyph = global::MEMS.Client.MRP.Properties.Resources.showtestreport_32x32; this.barbtn2.Caption = "撤销审批"; this.barbtn2.Enabled = false; this.barbtn2.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; this.barbtn3.Glyph = global::MEMS.Client.MRP.Properties.Resources.show_16x16; this.barbtn3.LargeGlyph = global::MEMS.Client.MRP.Properties.Resources.show_32x32; this.barbtn3.Caption = "查看"; this.barbtn3.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; }
private void btnQuery_Click(object sender, EventArgs e) { dgvInfo.Rows.Clear(); if (cboStatus.SelectedIndex != 0) { switch (cboStatus.Text) { case "等待开奖": Status = 2; break; case "开奖中": Status = 0; break; case "等待派彩": Status = -2; break; case "未中奖": Status = -1; break; case "中奖": Status = 1; break; } } if (cboGame.SelectedIndex != 0) { GameId = (int)cboGame.SelectedValue; } if (!int.TryParse(txtBetId.Text, out BetId)) { BetId = 0; } var list = GameDAL.GetBetList(StaticInfo.Account.Id, dtStart.Value, dtEnd.Value, Status, GameId, BetId, cbZH.Checked); lblTotal.Text = string.Format("投注:{0} RMB,中奖:{1} RMB", list.Sum(n => n.BetMoney), list.Sum(n => n.BackMoney)); foreach (var item in list) { var r = dgvInfo.Rows[dgvInfo.Rows.Add()]; r.Cells[0].Value = item.Accounts.AccountName; r.Cells[1].Value = item.LotteryOpenInfo.Lotterys.LotteryName; r.Cells[2].Value = MyTool.GetLotteryPlayList(item.LotteryOpenInfo.Lotterys.LotteryType)[item.BetPlayTypeCode - 1].LotteryPlayName; r.Cells[3].Value = item.CreateTime.ToString(); r.Cells[4].Value = item.LotteryOpenInfo.Expect; r.Cells[5].Value = "否"; r.Cells[6].Value = item.BetMoney; r.Cells[7].Value = item.BackMoney; r.Cells[8].Value = EnumTool.GetBetResultType(item.ResultType); r.Cells[9].Value = "查看"; r.Cells[9].Tag = item.Id; } }
public ArrivalWindow() { InitializeComponent(); DateTime now = DateTime.Now; this.SelectedDateEdit.EditValue = new DateTime(now.Year, now.Month, now.Day); this.ArrivalStatusComboBox.DataSource = EnumTool.GetDataSource(typeof(ArrivalStatus)); this.ArrivalStatusComboBox.SelectedIndex = 1; }
/// <summary> /// Gets the break sound either by the tool or by the block if the tool does not have a break sound. /// </summary> /// <param name="tool">The Tool used.</param> /// <returns>The resulting sound</returns> public AssetLocation GetBreakSound(EnumTool tool) { BlockSounds toolSounds; ByTool.TryGetValue(tool, out toolSounds); if (toolSounds?.Break != null) { return(toolSounds.Break); } return(Break); }
/// <summary> /// Gets the hit sound either by the tool or by the block if the tool does not have a hit sound. /// </summary> /// <param name="tool"></param> /// <returns></returns> public AssetLocation GetHitSound(EnumTool tool) { BlockSounds toolSounds; ByTool.TryGetValue(tool, out toolSounds); if (toolSounds?.Hit != null) { return(toolSounds.Hit); } return(Hit); }
private void DrawAnimInfo(AType type, Dictionary <string, UnitAnimInfo> anims) { string key = EnumTool.Description(type); if (!anims.ContainsKey(key)) { anims.Add(key, new UnitAnimInfo(key)); } UnitAnimInfo info = anims[key]; EditorGUILayout.BeginVertical(); GUILayout.Toggle(true, string.Format("{0} 数据", info.Title), "dragtab"); int Count = info.List.Count; string[] names = AnimNames.ToArray(); List <int> reduce = new List <int>(); for (int i = 0; i < Count; i++) { GUILayout.BeginHorizontal(); string title = " "; if (i == 0) { title = "动作组:"; } GUILayout.Label(title, GUILayout.Width(80)); GUILayout.Button(info.List[i], "button"); if (GUILayout.Button("-", GUILayout.Width(24))) { reduce.Add(i); } int index = EditorGUILayout.Popup(title, StrTool.IndexOfToStr(names, info.List[i]), names); if (index != -1) { info.List[i] = names[index]; } GUILayout.EndHorizontal(); } if (reduce.Count > 0) { for (int i = 0; i < reduce.Count; i++) { info.List.RemoveAt(reduce[i]); } } if (GUILayout.Button("+")) { info.List.Add(string.Empty); } EditorGUILayout.EndVertical(); }
public override void LoadConfig(JsonObject taskConfig, JsonObject aiConfig) { base.LoadConfig(taskConfig, aiConfig); if (taskConfig["movespeed"] != null) { moveSpeed = taskConfig["movespeed"].AsFloat(0.02f); } if (taskConfig["tool"] != null) { tool = (EnumTool)Enum.Parse(typeof(EnumTool), taskConfig["tool"].AsString("Knife"), true); } }
protected override void FormLoad() { this.POTypeComboBox.DataSource = EnumTool.GetDataSource(typeof(Enums.POTypes)); this.BuyerComboBox.DataSource = proxy.GetEmployees(); this.ApplicantComboBox.DataSource = proxy.GetEmployees(); this.ApplyDeptComboBox.DataSource = proxy.GetAllDepts(); this.gvUnitEdit.DataSource = proxy.GetUnitList(); this.gvPODetails.CellValueChanged += (o, e) => { if (e.Column.Name == "Quantity" || e.Column.Name == "Price") { CalAmount(); } }; if (formmode == frmmodetype.add) { DateTime now = DateTime.Now; DateTime nextWeek = now.AddDays(7); this.DmdArrivalDateEdit.Text = (new DateTime(nextWeek.Year, nextWeek.Month, nextWeek.Day)).ToString("yyyy-MM-dd"); this.ApplyDateEdit.Text = (new DateTime(now.Year, now.Month, now.Day)).ToString("yyyy-MM-dd"); PO = new T_PurchaseOrder() { pono = proxy.GetLatestPOIndex(), register = Global.UserNo, registerdesc = Global.UserName, arrivalstatus = (int)ArrivalStatus.未到货, paymentstatus = (int)PaymentStatus.未付款, postatus = (int)POStatus.编制, potype = (int)POTypes.销售订单, amount = 0 }; _PODetails = new List <T_PurchaseOrderDetail>(); } else { this.DmdArrivalDateEdit.Text = PO.demandarrivaldate; this.ApplyDateEdit.Text = PO.applydate; _PODetails = proxy.GetPODetailList(PO.pono); } SetData(); }
/// <summary> /// 初始化Http请求 /// </summary> /// <param name="httpMethod">Http动词</param> /// <param name="url">地址</param> protected HttpRequestBase(HttpMethod httpMethod, string url) { if (string.IsNullOrWhiteSpace(url)) { throw new ArgumentNullException(nameof(url)); } // System.Text.Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); _url = url; _httpMethod = httpMethod; _params = new Dictionary <string, object>(); _contentType = EnumTool.GetDescription <HttpContentType>(HttpContentType.FormUrlEncoded); _cookieContainer = new CookieContainer(); _timeout = new TimeSpan(0, 0, 30); _headers = new Dictionary <string, string>(); _encoding = System.Text.Encoding.UTF8; }
private void FrmBetInfo_Load(object sender, EventArgs e) { var info = LotteryBetInfoDAL.GetBetInfoById(betInfoId); lblId.Text = info.Id.ToString(); lblName.Text = info.Accounts.AccountName; lblOpenNo.Text = info.LotteryOpenInfo.Expect; lblBackMoney.Text = "¥" + info.BackMoney; lblBetMoney.Text = "¥" + info.BetMoney; lblbetTime.Text = info.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"); lblBetTimes.Text = info.BetTimes + "倍"; lblBetUnit.Text = info.BetUnit + "注"; lblOpenNum.Text = info.LotteryOpenInfo.OpenCode; lblPercent.Text = info.GetBackPercent.ToString(); lblStatus.Text = EnumTool.GetBetResultType(info.ResultType); lblText.Text = string.Format("[{0}]{1}", MyTool.GetLotteryPlayList(info.LotteryOpenInfo.Lotterys.LotteryType)[info.BetPlayTypeCode - 1].LotteryPlayName, info.BetNum.Length > 17 ? info.BetNum.Substring(0, 17) : info.BetNum); lblWinUnit.Text = info.WinUnit + "注"; txtNum.Text = info.BetNum; lblGameName.Text = info.LotteryOpenInfo.Lotterys.LotteryName; }
public void SwitchTool(EnumTool targetToolType) { if (this.Mesh == null) { return; } AbstractTool targetTool = null; switch (targetToolType) { case EnumTool.View: targetTool = new ToolView(Width, Height); break; case EnumTool.VertexByPoint: targetTool = new ToolVertexByPoint(Width, Height, this.Mesh); break; case EnumTool.VertexByCicle: targetTool = new ToolVertexByCircle(Width, Height, this.Mesh); break; case EnumTool.VertexByRectangle: targetTool = new ToolVertexByRectangle(Width, Height, this.Mesh); break; case EnumTool.VertexByCurve: targetTool = new ToolPointByCurve(Width, Height, this.Mesh); break; case EnumTool.EdgeByCicle: targetTool = new ToolEdgeByCircle(Width, Height, this.Mesh); break; case EnumTool.EdgeByRectangle: targetTool = new ToolEdgeByRectangle(Width, Height, this.Mesh); break; case EnumTool.EdgeByCurve: targetTool = new ToolEdgeByCurve(Width, Height, this.Mesh); break; case EnumTool.EdgeByPoint: targetTool = new ToolEdgeByPoint(Width, Height, this.Mesh); break; case EnumTool.FaceByCicle: targetTool = new ToolFaceByCircle(Width, Height, this.Mesh); break; case EnumTool.FaceByRectangle: targetTool = new ToolFaceByRectangle(Width, Height, this.Mesh); break; case EnumTool.FaceByPoint: targetTool = new ToolFaceByPoint(Width, Height, this.Mesh); break; case EnumTool.PointMove: targetTool = new ToolMovePoint(Width, Height, this.Mesh); break; case EnumTool.PointSingleMove: targetTool = new ToolMoveSinglePoint(Width, Height, this.Mesh); break; } this.Tool = targetTool; this.tool.Changed += new AbstractTool.ChangedEventHandlerTool(tool_ChangedTool); }
public CashierColxnCrudVM(ICashierColxnsRepo repository, ITenantDBsDir appArguments) : base(repository, appArguments) { Leases.SetItems(GetSortedLeases()); BillCodes.SetItems(EnumTool.List <BillCode>()); }
private void tool_Click(object sender, EventArgs e) { EnumTool tool = (EnumTool)((ToolStripMenuItem)sender).Tag; ToolPool.Instance.SwitchTool(tool); }
/// <summary> /// 设置内容类型 /// </summary> /// <param name="contentType">内容类型</param> public TRequest ContentType(HttpContentType contentType) { return(ContentType(EnumTool.GetDescription <HttpContentType>(contentType))); }