Example #1
0
 private void KeyDownEvent(MultiBarTrack multiBar, double minValue, double maxValue)
 {
     if (minValue == double.MinValue)
     {
         if (maxValue == double.MaxValue)
         {
             return;
         }
         else
         {
             multiBar.SetValues(new double[] { maxValue });
         }
     }
     else
     {
         if (maxValue == double.MaxValue)
         {
             multiBar.SetValues(new double[] { minValue });
         }
         else
         {
             multiBar.SetValues(new double[] { minValue, maxValue });
         }
     }
 }
Example #2
0
        void quickValue_Click(object sender, EventArgs e)
        {
            object[]      obj = (sender as ToolStripMenuItem).Tag as object[];
            MultiBarTrack bar = obj[0] as MultiBarTrack;

            Double[] values = obj[1] as Double[];
            bar.MinEndPointValue = values[0];
            bar.MaxEndPointValue = values[1];
        }
Example #3
0
 private void KeyDownEvent(MultiBarTrack MultiBar, double value, double nextValue)
 {
     //_isExcuteArgumentValueChangedEvent = true;
     if (nextValue == double.MinValue)
     {
         MultiBar.SetValues(new double[] { value });
     }
     else
     {
         MultiBar.SetValues(new double[] { value, nextValue });
     }
     btnOK_Click(null, null);
     //_isExcuteArgumentValueChangedEvent = false;
 }
Example #4
0
 private void SetEndPoint(MultiBarTrack bar)
 {
     using (frmSetEndpointValue frm = new frmSetEndpointValue(bar.MinEndPointValue, bar.MaxEndPointValue))
     {
         frm.Location = Control.MousePosition;
         if (frm.Location.X + frm.Width > Screen.GetBounds(this).Width)
         {
             frm.Location = new Point(Screen.GetBounds(this).Width - frm.Width, Control.MousePosition.Y);
         }
         if (frm.ShowDialog(bar) == DialogResult.OK)
         {
             bar.MinEndPointValue = frm.MinValue;
             bar.MaxEndPointValue = frm.MaxValue;
         }
     }
     this.Refresh();
 }
Example #5
0
        void mnuSetEndpointValue_Click(object sender, EventArgs e)
        {
            MultiBarTrack bar = (sender as ToolStripMenuItem).Tag as MultiBarTrack;

            SetEndPoint(bar);
        }