Ejemplo n.º 1
0
        private void buttonPendingPriceHelper_Click(object sender, EventArgs e)
        {
            Point location = ((Button)sender).Location;

            location.X -= 35;
            PriceHelpControl.ShowHelperControlAt(location, this, numericUpDownPendingPrice);
        }
        /// <summary>
        /// Show the control at a given location.
        /// </summary>
        /// <param name="referenceControl">The control to use as location reference, must have parent to add this to.</param>
        public static void ShowHelperControlAt(Point location, Control parentControl, NumericUpDown sourceNumericControl)
        {
            if (sourceNumericControl.Enabled == false)
            {
                return;
            }

            PriceHelpControl control = new PriceHelpControl(sourceNumericControl);
            parentControl.Controls.Add(control);
            control.Location = location;
            control.BringToFront();
            control.Focus();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Show the control at a given location.
        /// </summary>
        /// <param name="referenceControl">The control to use as location reference, must have parent to add this to.</param>
        public static void ShowHelperControlAt(Point location, Control parentControl, NumericUpDown sourceNumericControl)
        {
            if (sourceNumericControl.Enabled == false)
            {
                return;
            }

            PriceHelpControl control = new PriceHelpControl(sourceNumericControl);

            parentControl.Controls.Add(control);
            control.Location = location;
            control.BringToFront();
            control.Focus();
        }
Ejemplo n.º 4
0
 private void buttonOpeningPricePriceHelper_Click(object sender, EventArgs e)
 {
     PriceHelpControl.ShowHelperControlAt(((Button)sender).Location, this, numericUpDownPendingPrice);
 }
Ejemplo n.º 5
0
 private void buttonTakeProfitPriceHelper_Click(object sender, EventArgs e)
 {
     PriceHelpControl.ShowHelperControlAt(((Button)sender).Location, this, numericUpDownTakeProfit);
 }