public static bool ShowUntyped(Type type, ref object value, string title = null, string text = null, string labelText = null, string format = null, string unitText = null, Window owner = null) { ValueLineBox vlb = new ValueLineBox(); vlb.Title = title ?? SelectorMessage.ChooseAValue.NiceToString(); vlb.tb.Text = text ?? SelectorMessage.PleaseChooseAValueToContinue.NiceToString(); vlb.valueLine.Type = type; if (labelText == null) { Common.SetLabelVisible(vlb.valueLine, false); } else { vlb.valueLine.LabelText = labelText; } vlb.valueLine.Format = format; vlb.valueLine.UnitText = unitText; vlb.valueLine.Value = value; vlb.Owner = owner; if (vlb.ShowDialog() == true) { value = vlb.valueLine.Value; return(true); } return(false); }
private void AddColumn(QueryToken token) { if (!AllowChangeColumns) { return; } string result = token.NiceName(); if (ValueLineBox.Show <string>(ref result, SearchMessage.NewColumnSName.NiceToString(), SearchMessage.ChooseTheDisplayNameOfTheNewColumn.NiceToString(), SearchMessage.Name.NiceToString(), null, null, Window.GetWindow(this))) { ClearResults(); AddListViewColumn(new Column(token, result)); } }
private void renameMenu_Click(object sender, RoutedEventArgs e) { if (!AllowChangeColumns) { return; } SortGridViewColumnHeader gvch = GetHeaderColumnHeader(sender); string result = gvch.RequestColumn.DisplayName; if (ValueLineBox.Show <string>(ref result, SearchMessage.NewColumnSName.NiceToString(), SearchMessage.ChooseTheDisplayNameOfTheNewColumn.NiceToString(), SearchMessage.Name.NiceToString(), null, null, Window.GetWindow(this))) { gvch.RequestColumn.DisplayName = result; gvch.Content = result; } }
public ValueLineBoxAutomationPeer(ValueLineBox valueLineBox) : base(valueLineBox) { }