Exemplo n.º 1
0
 protected virtual void OnLabelClicked(LabelClickedEventArgs e)
 {
     if (labelClicked != null)
     {
         labelClicked(this, e);
     }
 }
Exemplo n.º 2
0
 private void OnOpenWeb(object sender, LabelClickedEventArgs args)
 {
     try
     {
         using (Process.Start(args.LabelContent as string))
             ;
     }
     catch (Exception ex)
     {
         LogConfig.Output.Error((object)"Open web address failed.", ex);
     }
 }
Exemplo n.º 3
0
        private void CategoryAxis_LabelClicked(object sender, LabelClickedEventArgs e)
        {
            var datapoints = series.GetDataPoints(e.Position, e.Position, chart.SeriesBounds.Top, chart.SeriesBounds.Bottom);

            if (datapoints.Count > 0)
            {
                ChartModel data   = datapoints[0] as ChartModel;
                float      xPoint = (float)chart.ValueToPoint(chart.PrimaryAxis, e.Position);
                float      yPoint = (float)chart.ValueToPoint(chart.SecondaryAxis, data.YValue);

                tooltip.Show(xPoint, yPoint, true);
            }
        }
Exemplo n.º 4
0
 private void linkLabel_LeftClicked(object sender, LabelClickedEventArgs e)
 {
     foreach (PropertyDescriptor propertyDescriptor in PropertyGridUtilities.GetPropertyDescriptors(this._propertyItem.Instance))
     {
         if (propertyDescriptor.Name == this._displayName)
         {
             using (CompositeTask.Run(this._propertyItem.DiaplayName))
                 propertyDescriptor.ResetValue(this._propertyItem.Instance);
             this.ScenceSetValue();
             IPlayControl instance = this._propertyItem.Instance as IPlayControl;
             if (instance == null)
             {
                 break;
             }
             instance.Start();
             break;
         }
     }
 }
Exemplo n.º 5
0
        private void linkLabel_LeftClicked(object sender, LabelClickedEventArgs e)
        {
            PropertyDescriptorCollection propertyDescriptors = PropertyGridUtilities.GetPropertyDescriptors(this._propertyItem.Instance);

            foreach (PropertyDescriptor propertyDescriptor in propertyDescriptors)
            {
                if (propertyDescriptor.Name == this._displayName)
                {
                    using (CompositeTask.Run(this._propertyItem.DiaplayName))
                    {
                        propertyDescriptor.ResetValue(this._propertyItem.Instance);
                    }
                    this.ScenceSetValue();
                    IPlayControl playControl = this._propertyItem.Instance as IPlayControl;
                    if (playControl != null)
                    {
                        playControl.Start();
                    }
                    break;
                }
            }
        }