示例#1
0
        private void UpdateGraph()
        {
            // Update Axis of MyModel
            string selectItem = GraphVar.SelectedItem.ToString();
            var    axisSet    = gc.GetAxisTitle(selectItem);

            mvm.UpdateAxis(axisSet);

            // DataPoint update
            mvm.InitializeSeries();
            var listDic  = post.ListDic;
            var addListX = listDic[axisSet.AxisX];

            // Set DataPoint to MyModel
            foreach (var yItem in axisSet.AxisY.Split(','))
            {
                var addListY  = listDic[yItem];
                var addSeries = post.ToDataSet(addListX, addListY);
                mvm.AddMainSeries(addSeries, yItem);
            }

            // Update Plotmodel
            PlotWindow.Model = mvm.MyModel;
            PlotWindow.InvalidatePlot(true);
        }
        private void OpenPlotWindow(object sender, Avalonia.Interactivity.RoutedEventArgs e)
        {
            var viewModel = (MainWindowViewModel)((Window)this.VisualRoot).DataContext;
            var window    = new PlotWindow(viewModel);

            window.Show((Window)this.VisualRoot);
        }
示例#3
0
        public static void OutPlot(string msg, IEnumerable <PlotInfo> list, IEnumerable <double> guideLines = null)
        {
            if (list is null)
            {
                return;
            }

            PlotWindow.Create(msg, list, guideLines);
        }
 public void Execute(object parameter)
 {
     this.BeeAlgorithm.CreateMethod();
     PlotWindow x = new PlotWindow
     {
         DataContext = this.BeeAlgorithm
     };
     x.Show();
 }
示例#5
0
        public void Undock()
        {
            App.Current.Dispatcher.Invoke(() =>
            {
                var context = HideCurrent();

                if (context != null)
                {
                    var window = new PlotWindow {
                        DataContext = context
                    };
                    window.Show();
                }
            });
        }
示例#6
0
        public void UndockAny(Object obj)
        {
            var context = ConvertToViewModel(obj);

            if (context != null)
            {
                App.Current.Dispatcher.Invoke(() =>
                {
                    if (Object.ReferenceEquals(context, _contexts.LastOrDefault()))
                    {
                        Undock();
                    }
                    else if (_contexts.Remove(context))
                    {
                        var window = new PlotWindow {
                            DataContext = context
                        };
                        window.Show();
                    }
                });
            }
        }
示例#7
0
        private void BtnTestPlot_Click(object sender, RoutedEventArgs e)
        {
            PlotWindow plot = new PlotWindow(selectedStat);

            plot.Show();
        }