public ProxyRowInput(RowBinding <InPlaceEditor> binding, RowInput <TEditor> editorInput, RowBinding <TInert> inertBinding) : base(binding, new ExplicitTrigger <InPlaceEditor>(), null) { Debug.Assert(editorInput != null); Debug.Assert(inertBinding != null); _editorInput = editorInput; _inertBinding = inertBinding; _editorInput.InjectRowValidation(this); InertBinding.Seal(binding, 0); EditorBinding.Seal(binding, 1); }
private void LoadSchemeOfHall(int seatingCapacity, int placesInRowLimit) { RowInput.Clear(); PlaceInput.Clear(); int X = 6; int Y = 19; bool notEven = false; int leftPlaces = seatingCapacity % placesInRowLimit; if (leftPlaces != 0) { notEven = true; buttonArray = new Button[(seatingCapacity / placesInRowLimit) + 1][]; } else { buttonArray = new Button[seatingCapacity / placesInRowLimit][]; } for (int i = 0; i < buttonArray.Length; i++) { buttonArray[i] = new Button[placesInRowLimit]; if (i == buttonArray.Length - 1 && notEven) { buttonArray[i] = new Button[leftPlaces]; } for (int j = 0; j < buttonArray[i].Length; j++) { buttonArray[i][j] = new Button(); buttonArray[i][j].Size = new Size(30, 30); buttonArray[i][j].Name = (i + 1).ToString(); buttonArray[i][j].Text = (j + 1).ToString(); buttonArray[i][j].MouseClick += new MouseEventHandler(SelectedPlaceInHall); if (i == buttonArray.Length - 1 && notEven) { X += 35 * (placesInRowLimit - leftPlaces) / 2; notEven = false; } buttonArray[i][j].Location = new Point(X, Y); HallPlaces.Controls.Add(buttonArray[i][j]); X += 35; } Label rowLabel = new Label(); rowLabel.Size = new Size(40, 30); rowLabel.Location = new Point(35 * buttonArray[0].Length, Y); rowLabel.Text = "Ряд " + (i + 1) + " "; HallPlaces.Controls.Add(rowLabel); X = 6; Y += 40; } }
private void RowInput_TextChanged(object sender, TextChangedEventArgs e) { Regex rx = new Regex("[0-9]{1,3}"); Match res = rx.Match(RowInput.Text); if (res != null && res.Success && RowInput.Text.Length <= 3) { row = int.Parse(RowInput.Text); } else if (RowInput.Equals("")) { } else { error = new Window1(this); error.Activate(); error.Visibility = Visibility.Visible; RowInput.Text = ""; } }
internal static RowBinding <InPlaceEditor> AddToInPlaceEditor <TEditing, TInert>(RowInput <TEditing> editingInput, RowBinding <TInert> inertBinding) where TEditing : UIElement, new() where TInert : UIElement, new() { var result = new RowBinding <InPlaceEditor>(null); result.Input = new ProxyRowInput <TEditing, TInert>(result, editingInput, inertBinding); return(result); }
public void OnFlushed <T>(RowInput <T> rowInput, bool makeProgress, bool valueChanged) where T : UIElement, new() { BaseRowValidation.OnFlushed(this, makeProgress, valueChanged); }
public SOMRequest(RowInput[] inputs, SOMRules rules) { this.Inputs = inputs; this.Rules = rules; }