Example #1
0
        internal void SaveSettings(PaneSettings ps)
        {
            SetMappedItem(ps.GridLineItem);
            SaveAxisSettings(ps.XAxis, XAxis);
            SaveAxisSettings(ps.X2Axis, X2Axis);
            SaveAxisSettings(ps.YAxis, YAxis);
            SaveAxisSettings(ps.Y2Axis, Y2Axis);

            foreach (LogGraphCurveItem item in CurveList)
            {
                ItemSettings settings = new ItemSettings();

                settings.ID = item.ItemID;
                settings.AssignedToX2Axis = item.IsX2Axis;
                settings.AssignedToY2Axis = item.IsY2Axis;
                settings.ShowSymbol       = item.Symbol.IsVisible;
                settings.Color            = item.Color.ToArgb();
                settings.DrawInfinitely   = item.DrawInfinitely;
                ps.Items.Add(settings);
            }

            ps.Threshold = m_Threshold?.Location.Y.ToString();

            m_HasChanged = false;
        }
Example #2
0
        public static void PushModalDialog(Window window, string windowId)
        {
            window.PushModal();
            if (string.IsNullOrEmpty(windowId))
            {
                return;
            }

            WindowSettings settings = WindowSettings.GetByWindowId(windowId);

            if (settings == null)
            {
                return;
            }

            window.Resize(settings.Width, settings.Height);
            foreach (Paned pane in ComponentHelper.GetChildWidgetsByType <Paned> (window))
            {
                PaneSettings pair = settings.Panes.FirstOrDefault(p => p.Name == pane.Name);
                if (pair != null)
                {
                    pane.Position = pair.Position;
                }
            }

            ColumnSerializer.LoadColumnSettings(window, settings);
        }
Example #3
0
        internal void LoadSettings(PaneSettings ps)
        {
            ps.GridLineItem = m_MappedItem;
            LoadAxisSettings(ps.XAxis, XAxis);
            LoadAxisSettings(ps.X2Axis, X2Axis);
            LoadAxisSettings(ps.YAxis, YAxis);
            LoadAxisSettings(ps.Y2Axis, Y2Axis);

            foreach (ItemSettings item in ps.Items)
            {
                item.ID = FixItemID(item.ID);
                CheckedItems.RaiseListChangedEvents = false;
                CheckedItems.Add(item.ID);
                CheckedItems.RaiseListChangedEvents = true;
                LogGraphCurveItem logitem = AddCuveItem(item.ID, Color.FromArgb(item.Color));

                logitem.IsX2Axis         = item.AssignedToX2Axis;
                logitem.IsY2Axis         = item.AssignedToY2Axis;
                logitem.Symbol.IsVisible = item.ShowSymbol;
                logitem.DrawInfinitely   = item.DrawInfinitely;
            }

            SetThreshold((string.IsNullOrWhiteSpace(ps.Threshold) ? null : (double?)double.Parse(ps.Threshold)));

            m_HasChanged = false;
            AxisChange();
        }
Example #4
0
        internal void SaveSettings(PageSettings pageSettings)
        {
            pageSettings.IsSynchronizeXAxes = m_Graph.IsSynchronizeXAxes;
            pageSettings.IsSynchronizeYAxes = m_Graph.IsSynchronizeYAxes;

            foreach (LogGraphPane pane in m_Graph.MasterPane.PaneList)
            {
                PaneSettings ps = new PaneSettings();
                ps.Name = pane.Title.Text;

                pane.SaveSettings(ps);

                pageSettings.Panes.Add(ps);
            }
            m_HasChanged = false;
        }