private void InitializationObjcet(string city, string cnname, string enname, string street) { City = new ComboValue<string>(AddressCity, city); CNName = new ComboValue<string>(AddressCNName, cnname); ENName = new ComboValue<string>(AddressENName, enname); ExactlyStreet = new ComboValue<string>(AddressExactlyStreet, street); }
private HashSet <UcionicaAssets> getUcionicaAssets() { HashSet <UcionicaAssets> rets = new HashSet <UcionicaAssets>(); foreach (object itemChecked in checkedListBox1.CheckedItems) { ComboValue item = ((ComboValue)itemChecked); rets.Add((UcionicaAssets)item.Value); } return(rets); }
private void CheckedListBox1_ItemCheck(object sender, ItemCheckEventArgs e) { ComboValue cv = (ComboValue)checkedListBox1.Items[e.Index]; if (e.NewValue == CheckState.Checked) { uAssets.Add((UcionicaAssets)cv.Value); } else { uAssets.Remove((UcionicaAssets)cv.Value); } initTabela(null, null); }
// popunjavanje cele forme private void popuniPolja() { checkedListBox1.Items.Clear(); textBoxID.Text = ucionica.ID; textBoxID.ReadOnly = true; numericUpDown1.Value = ucionica.BrRadnihMesta; // popunjavanje assets-a foreach (UcionicaAssets aset in Enum.GetValues(typeof(UcionicaAssets))) { bool check = ucionica.Assets.Contains(aset); ComboValue cv = new ComboValue(aset); checkedListBox1.Items.Add(cv, check); } // popunjavanje os-a richTextBox1.Text = ucionica.Opis; }
private void CheckedListBox1_ItemCheck(object sender, ItemCheckEventArgs e) { ComboValue cv = (ComboValue)checkedListBox1.Items[e.Index]; if (cv.Value.Equals(UcionicaAssets.windows) || cv.Value.Equals(UcionicaAssets.linux)) { if (e.NewValue == CheckState.Checked) { OS.Add((UcionicaAssets)cv.Value); } else { OS.Remove((UcionicaAssets)cv.Value); } popuniSoftvere(); } }
internal void FinishEdit() { if (!HasValidCell) { return; } long?nID = null; if (this.SelectedItem != null) { ComboValue currSel = (ComboValue)this.SelectedItem; nID = currSel.nValueID; } m_ParentList.FinishComboEdit(m_CurrentRow, m_CurrentCol, nID); m_CurrentCol = -1; m_CurrentRow = null; }
internal void SetComboSource(string strComboSource) { this.Items.Clear(); m_IDtoComboValue.Clear(); if (string.IsNullOrEmpty(strComboSource)) { return; } string[] aryCombo = strComboSource.Split(';'); if (aryCombo.Length % 2 != 0) { throw new ArgumentException("SetComboSource: String split resulted in odd number of splits."); } for (int i = 0; i < aryCombo.Length; i += 2) { string strID = aryCombo[i]; string strName = aryCombo[i + 1]; int nID; if (!int.TryParse(strID, out nID)) { throw new ArgumentException("SetComboSource: Invalid ID value found!"); } ComboValue temp = new ComboValue(nID, strName); if (m_IDtoComboValue.ContainsKey(nID)) { throw new InvalidOperationException("SetComboSource: Same ID encountered!"); } this.Items.Add(temp); m_IDtoComboValue.Add(nID, temp); } }
//备注 ,特殊要求 付款账户等 public void InitializationObjcet(string name, string fullname, string cnphone, string hkphone, string mail, int type, string county, int state, string meno) { Name = new ComboValue<string>(CustName, name); FullName = new ComboValue<string>(CustFullName, fullname); CNPhone = new ComboValue<string>(CustCNPhone, cnphone); HKPhone = new ComboValue<string>(CustHKPhone, hkphone); Mail = new ComboValue<string>(CustMail, mail); CustomerType = new ComboValue<int>(CustType, type); County = new ComboValue<string>(CustCounty, county); State = new ComboValue<int>(CustState, state); Meno = new ComboValue<string>(CustMeno, meno); }
private void InitializationObjcet(int oid, Booking bookingoid, DateTime pickupitem, Vehicle car, Driver driver, string mainpassager, Address starting, Address destination, string flight, int paystate, float quote, int settlement, Flow state) { ObjID = new ComboValue<int>(TripOid, oid); Booking = new ComboValue<Booking>(TripBookingOID, bookingoid); this.PickUpTime = new ComboValue<DateTime>(TripPickUpTime, pickupitem); this.Car = new ComboValue<Vehicle>(TripCar, car); this.Driver = new ComboValue<Driver>(TripDriver, driver); this.MainPassager = new ComboValue<string>(TripMainPassager, mainpassager); this.StartingAddress = new ComboValue<Address>(TripStartingAddress, starting); this.DestinationAddress = new ComboValue<Address>(TripDestinationAddress, destination); this.Settlement = new ComboValue<int>(TripSettlement, settlement); this.Quote = new ComboValue<float>(TripQuote, quote); this.PayState = new ComboValue<int>(TripPayState, paystate); this.State = new ComboValue<Flow>(TripState, state); this.Flight = new ComboValue<string>(TripFlightMsg, flight); }
private void InitUI() { #region MinValue m_MinValue = new DoubleInputValue(); m_MinValue.ControlName = "MinValue"; m_MinValue.Caption = "×îСֵ"; m_MinValue.ControlWidth = 150; m_MinValue.ControlHeight = 23; m_MinValue.MinValue = -1.7976931348623157E+308; m_MinValue.MaxValue = 1.7976931348623157E+308; #endregion #region MaxValue m_MaxValue = new DoubleInputValue(); m_MaxValue.ControlName = "MaxValue"; m_MaxValue.Caption = "×î´óÖµ"; m_MaxValue.ControlWidth = 150; m_MaxValue.ControlHeight = 23; m_MaxValue.MinValue = -1.7976931348623157E+308; m_MaxValue.MaxValue = 1.7976931348623157E+308; #endregion #region MinSize m_MinSize = new DoubleInputValue(); m_MinSize.ControlName = "MinSize"; m_MinSize.Caption = "·ûºÅ×îСֵ"; m_MinSize.ControlWidth = 150; m_MinSize.ControlHeight = 23; m_MinSize.MinValue = 1; m_MinSize.MaxValue = 1.7976931348623157E+308; #endregion #region MaxSize m_MaxSize = new DoubleInputValue(); m_MaxSize.ControlName = "MaxSize"; m_MaxSize.Caption = "·ûºÅ×î´óÖµ"; m_MaxSize.ControlWidth = 150; m_MaxSize.ControlHeight = 23; m_MaxSize.MinValue = 1; m_MaxSize.MaxValue = 1.7976931348623157E+308; #endregion #region SizeLevel m_SizeLevel = new IntegerInputValue(); m_SizeLevel.ControlName = "SizeLevel"; m_SizeLevel.Caption = "½¥±äµÈ¼¶"; m_SizeLevel.ControlWidth = 150; m_SizeLevel.ControlHeight = 23; m_SizeLevel.MinValue = 1; m_SizeLevel.MaxValue = 2147483647; #endregion #region Field m_Field = new ComboValue(); m_Field.ControlName = "Field"; m_Field.Caption = "½¥±ä×Ö¶Î"; m_Field.ControlWidth = 150; m_Field.ControlHeight = 23; m_Field.DropDownWidth = 150; FieldInfo[] fields = new FieldInfo[10]; for (int i = 0; i < 10; i++) { fields[i] = new FieldInfo(); fields[i].FieldName = "Field" + i.ToString(); fields[i].FieldDesc = "Field" + i.ToString(); fields[i].FieldType = "Field" + i.ToString(); } m_Field.Items = fields; #endregion #region ForeSymbol m_ForeSymbol = new SymbolValue(); m_ForeSymbol.ControlName = "ForeSymbol"; m_ForeSymbol.Caption = "Ç°¾°·ûºÅ"; m_ForeSymbol.ControlWidth = 100; m_ForeSymbol.ControlHeight = 40; #endregion }
private void InitializationObjcet(string cncardid, string encardid, string model, string owner, int state, int seats) { CNCardID = new ComboValue<string>(CarCNCardID, cncardid); HKCardID = new ComboValue<string>(CarHKCardID, encardid); Model = new ComboValue<string>(CarModel, model); Owner = new ComboValue<string>(CarOwner, owner); State = new ComboValue<int>(CarState, state); SeatCount = new ComboValue<int>(CarSeatCount, seats); }
private void InitializationObjcet(int oid, DateTime createtime, Client customer, int state) { ObjID = new ComboValue<int>(BookingOID, oid); CreateTime = new ComboValue<DateTime>(BookingCreateTime, createtime); Customer = new ComboValue<Modle.Client>(BookingCustomer, customer); State = new ComboValue<int>(BookingState, state); bookingorder = new List<Trip>(); }
public void InitializationObjcet(string name, string cnphoe, string hkphone, int state, DateTime regdate) { Name = new ComboValue<string>(DriverName, name); CNPhone = new ComboValue<string>(DriverCNPhone, cnphoe); HKPhone = new ComboValue<string>(DriverHKPhone, hkphone); State = new ComboValue<int>(DriverState, state); RegDate = new ComboValue<DateTime>(DriverRegDate, regdate); }
private void InitializationObjcet(Booking booking, Trip belongtrip, int flow, DateTime timemark) { BelongBooking = new ComboValue<Booking>(FlowBelongTripOId, booking); BelongTrip = new ComboValue<Trip>(FlowBelongTripOId, belongtrip); State = new ComboValue<int>(FlowState, flow); TimeMark = new ComboValue<DateTime>(FlowTimeMark, timemark); }
private void InitUI() { #region MinValue m_MinValue = new DoubleInputValue(); m_MinValue.ControlName = "MinValue"; m_MinValue.Caption = "最小值"; m_MinValue.ControlWidth = 150; m_MinValue.ControlHeight = 23; m_MinValue.MinValue = -1.7976931348623157E+308; m_MinValue.MaxValue = 1.7976931348623157E+308; #endregion #region MaxValue m_MaxValue = new DoubleInputValue(); m_MaxValue.ControlName = "MaxValue"; m_MaxValue.Caption = "最大值"; m_MaxValue.ControlWidth = 150; m_MaxValue.ControlHeight = 23; m_MaxValue.MinValue = -1.7976931348623157E+308; m_MaxValue.MaxValue = 1.7976931348623157E+308; #endregion #region ColorRamp m_ColorRamp = new ComboValue(); m_ColorRamp.ControlName = "ColorRamp"; m_ColorRamp.Caption = "颜色方案"; m_ColorRamp.ControlWidth = 150; m_ColorRamp.ControlHeight = 23; m_ColorRamp.DropDownWidth = 150; m_ColorRamp.Items = new ClassSymbology().GetColorScheme(150, 23, "").ToArray(); #endregion #region ColorLevel m_ColorLevel = new IntegerInputValue(); m_ColorLevel.ControlName = "ColorLevel"; m_ColorLevel.Caption = "渐变等级"; m_ColorLevel.ControlWidth = 150; m_ColorLevel.ControlHeight = 23; m_ColorLevel.MinValue = 1; m_ColorLevel.MaxValue = 2147483647; #endregion #region Field m_Field = new ComboValue(); m_Field.ControlName = "Field"; m_Field.Caption = "渐变字段"; m_Field.ControlWidth = 150; m_Field.ControlHeight = 23; m_Field.DropDownWidth = 150; FieldInfo[] fields = new FieldInfo[10]; for (int i = 0; i < 10; i++) { fields[i] = new FieldInfo(); fields[i].FieldName = "Field" + i.ToString(); fields[i].FieldDesc = "Field" + i.ToString(); fields[i].FieldType = "Field" + i.ToString(); } m_Field.Items = fields; #endregion #region ForeSymbol m_ForeSymbol = new SymbolValue(); m_ForeSymbol.ControlName = "ForeSymbol"; m_ForeSymbol.Caption = "前景符号"; m_ForeSymbol.ControlWidth = 100; m_ForeSymbol.ControlHeight = 40; #endregion }