public InputBox(RconCommandParameter parameter, ServerSession session)
 {
     if (parameter.Type == "bool")
     {
         this.CreateBoolSelectionField();
     }
     else if (parameter.GetterToUse == null)
     {
         this.CreateInputField(parameter.Type, "");
     }
     else
     {
         string[] data = new string[0];
         if (session.GetData(parameter.GetterToUse, out data))
         {
             if (data.Length == 1)
             {
                 this.CreateInputField(parameter.Type, data[0]);
             }
             else
             {
                 this.CreateSelectionField(data);
             }
         }
         else
         {
             this.CreateInputField(parameter.Type, "");
         }
     }
 }
        private void CreateAndBindInputField(
            RconCommandParameter parameter,
            ServerSession serverSession)
        {
            WrapPanel wrapPanel1 = new WrapPanel();

            wrapPanel1.Orientation         = Orientation.Vertical;
            wrapPanel1.HorizontalAlignment = HorizontalAlignment.Left;
            WrapPanel wrapPanel2 = wrapPanel1;
            Label     label1     = new Label();

            label1.Padding = new Thickness(0.0, 5.0, 5.0, 5.0);
            label1.Content = (object)parameter.Hint;
            Label label2 = label1;

            wrapPanel2.Children.Add((UIElement)label2);
            InputBox inputBox = new InputBox(parameter, serverSession);

            wrapPanel2.Children.Add((UIElement)inputBox.ControlBox);
            DockPanel.SetDock((UIElement)wrapPanel2, Dock.Top);
            this.ParameterDockPanel.Children.Add((UIElement)wrapPanel2);
            this.ParameterToUserInput.Add(parameter, inputBox);
            if (this.m_elementToFocus != null)
            {
                return;
            }
            this.m_elementToFocus = (UIElement)inputBox.ControlBox;
        }