public void NewSet(object sender, NewSetEventArgs e)
        {
            try
            {
                tb_alg_name.Text = "";

                Struct = null;
                rc_graphic.SeriesMappings.Reset();
                rc_graphic.ItemsSource = null;

                cb_objetiveX.ItemsSource = null;
                cb_objetiveY.ItemsSource = null;

                if (e.NewSet != null)
                {
                    cb_objetiveX.ItemsSource       = e.NewSet.Attributes.Values;
                    cb_objetiveX.DisplayMemberPath = "Name";
                    cb_objetiveY.ItemsSource       = e.NewSet.Attributes.Values;
                    cb_objetiveY.DisplayMemberPath = "Name";

                    if (e.NewSet.Attributes.Values.Count > 0)
                    {
                        cb_objetiveX.SelectedIndex = 0;
                        att_x = (ClusterEnsemble.Attribute)cb_objetiveX.SelectedItem;
                        cb_objetiveY.SelectedIndex = 0;
                        att_y = (ClusterEnsemble.Attribute)cb_objetiveY.SelectedItem;
                    }
                    if (att_x != null && att_y != null)
                    {
                        rc_graphic.DefaultView.ChartArea.AxisX.Title = att_x.Name;
                        rc_graphic.DefaultView.ChartArea.AxisY.Title = att_y.Name;
                    }
                    TelerikUtils.SetAnimationsSettings(rc_graphic);
                }
            }
            catch (Exception _ex)
            {
                GeneralTools.Tools.WriteToLog(_ex);
            }
        }
Exemple #2
0
        public void UpdateSet(Set set)
        {
            try
            {
                sp_cboxs.Visibility = Visibility.Visible;

                Cb_objetive.ItemsSource       = null;
                Cb_objetive.ItemsSource       = set.Attributes.Values;
                Cb_objetive.DisplayMemberPath = "Name";

                if (set.Attributes.Values.Count > 0)
                {
                    Cb_objetive.SelectedIndex = Cb_objetive.Items.Count - 1;
                }
                ;

                TelerikUtils.SetAnimationsSettings(Rc_att);
            }
            catch (Exception _ex)
            {
                GeneralTools.Tools.WriteToLog(_ex);
            }
        }