private void RootOnMouseLeftButtonUp(object sender, MouseButtonEventArgs args)
        {
            Series series = ((SeriesTitleLabel)DataContext).Series;


            if (!(series is IChartElementPropertyAble))
            {
                return;
            }

            if (series is Indicator)
            {
                Indicator ind = (Indicator)series;

                ind.ShowParametersDialog();
                return;
            }

            IChartElementPropertyAble    propertyAble = (IChartElementPropertyAble)series;
            List <IChartElementProperty> properties   = new List <IChartElementProperty>(propertyAble.Properties);
            PropertiesDialog             dialog       = new PropertiesDialog(propertyAble.Title, properties)
            {
#if WPF
                Owner = series._chartPanel._chartX.OwnerWindow,
#endif
                Background = series._chartPanel._chartX.LineStudyPropertyDialogBackground
            };

#if SILVERLIGHT
            dialog.Show();
#endif
#if WPF
            dialog.ShowDialog();
#endif
        }
Exemplo n.º 2
0
        internal void LsContextMenuChoose(int menuId)
        {
            switch (menuId)
            {
            case 0:     //properties
                if (ContextAbleLineStudy.LineStudy != null)
                {
                    IChartElementPropertyAble propertyAble = ContextAbleLineStudy.LineStudy;

                    List <IChartElementProperty> properties = new List <IChartElementProperty>(propertyAble.Properties);
                    PropertiesDialog             dialog     = new PropertiesDialog(propertyAble.Title, properties)
                    {
#if WPF
                        Owner = ContextAbleLineStudy.Chart.OwnerWindow,
#endif
                        Background = ContextAbleLineStudy.Chart.LineStudyPropertyDialogBackground
                    };

#if SILVERLIGHT
                    //dialog.Show(Dialog.DialogStyle.ModalDimmed);
                    dialog.Show();
#endif
#if WPF
                    dialog.ShowDialog();
#endif
                }
                break;

            case 1:     //delete
                ContextAbleLineStudy.Chart.RemoveObject(ContextAbleLineStudy.LineStudy);
                break;
            }
        }
        private void RootOnMouseLeftButtonUp(object sender, MouseButtonEventArgs args)
        {
            Series series = ((SeriesTitleLabel)DataContext).Series;

            //if (!(series is IChartElementPropertyAble)) return;

            if (series is Indicator)
            {
                Indicator ind = (Indicator)series;

                //07-06-2012 - Comentado por Felipe, inveertido pelo bloco abaixo
                //ind.ShowParametersDialog();

                ind.FireEditIndicator(ind);


                //fim da alteração

                return;
            }
            else
            {
                series.FireEditSerie(series);

                return;
            }

            IChartElementPropertyAble    propertyAble = (IChartElementPropertyAble)series;
            List <IChartElementProperty> properties   = new List <IChartElementProperty>(propertyAble.Properties);
            PropertiesDialog             dialog       = new PropertiesDialog(propertyAble.Title, properties)
            {
#if WPF
                Owner = series._chartPanel._chartX.OwnerWindow,
#endif
                Background = series._chartPanel._chartX.LineStudyPropertyDialogBackground
            };

#if SILVERLIGHT
            dialog.Show();
#endif
#if WPF
            dialog.ShowDialog();
#endif
        }
Exemplo n.º 4
0
        ///<summary>
        /// Shows the internal properties dialog
        ///</summary>
        public void ShowPropertiesWindow()
        {
            IChartElementPropertyAble propertyAble = this;

            List <IChartElementProperty> properties = new List <IChartElementProperty>(propertyAble.Properties);
            PropertiesDialog             dialog     = new PropertiesDialog(propertyAble.Title, properties)
            {
#if WPF
                Owner = _chartX.OwnerWindow,
#endif
                Background = _chartX.LineStudyPropertyDialogBackground
            };

#if SILVERLIGHT
            //dialog.Show(Dialog.DialogStyle.ModalDimmed);
            dialog.Show();
#endif
#if WPF
            dialog.ShowDialog();
#endif
        }