private void SQLQueryActivity_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.OemPlus) { NewInput newInput = new NewInput(); newInput.Canceled = true; newInput.ShowDialog(); if (newInput.Canceled == false) { Type_ = newInput.Type; if (Type_ == "System.String") { List <String> list = new List <string>(); list.Add(newInput.Value); GenericStringArguments stringArguments = new GenericStringArguments { Name = newInput.InputName, Type = Type_, Value = list }; InputStringArguments.Add(stringArguments); } TheGrid.RowDefinitions.Add(new RowDefinition()); var expressionTextBox = new System.Activities.Presentation.View.ExpressionTextBox(); TheGrid.Children.Add(expressionTextBox); expressionTextBox.HintText = newInput.InputName; Grid.SetRow(expressionTextBox, TheGrid.RowDefinitions.Count - 1); } } }
private void ActivityDesigner_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.OemPlus) { NewInput newInput = new NewInput(); newInput.Canceled = true; newInput.ShowDialog(); if (newInput.Canceled == false) { Inputs inputs = new Inputs { Name = newInput.InputName, Type = Type.GetType(newInput.Type, true), Value = newInput.Value }; inputsList.Add(inputs); ArrayList arr = new ArrayList() { "dfsf", "yjthty" }; ModelItem itemsarray = itemstextbox.Expression; Console.WriteLine(itemstextbox.DefaultValue); string content = ((System.Windows.FrameworkElement)itemstextbox.Content).ToolTip.ToString(); content = content.Substring(0, content.Length - 1) + @""",hi""" + "}"; itemstextbox.DefaultValue = itemstextbox.DefaultValue.Substring(0, itemstextbox.DefaultValue.Length - 1) + @""",hi""" + "}"; ((System.Windows.FrameworkElement)itemstextbox.Content).ToolTip = content; TheGrid.RowDefinitions.Add(new RowDefinition()); var expressionTextBox = new System.Activities.Presentation.View.ExpressionTextBox(); TheGrid.Children.Add(expressionTextBox); expressionTextBox.HintText = newInput.InputName; Grid.SetRow(expressionTextBox, TheGrid.RowDefinitions.Count - 1); } } }