Example #1
0
        public GraphWindow(GraphSettings defaultGraphSettings) : base(defaultGraphSettings.Title)
        {
            this.defaultGraphSettings = defaultGraphSettings;

            ID = defaultGraphSettings.Title;

            if (GraphSettings.FromFile(GraphSettingsFilePath, out graphSettings) == false)
            {
                graphSettings = defaultGraphSettings.Clone();
            }

            InitializeComponent();

            Name = defaultGraphSettings.Title;
            Text = defaultGraphSettings.Title;

            graph.ShowLegend   = graphSettings.ShowLegend;
            graph.AxesRange    = graphSettings.AxesRange;
            graph.YAxisLabel   = graphSettings.YAxisLabel;
            graph.LockXMouse   = true;
            graph.ZoomFromXMin = graph.LockXMouse;
            graph.Rolling      = true;

            graph.Traces.AddRange(defaultGraphSettings.Traces);
        }