/// <summary> /// Given a map project item's path (URL) this method opens a map if it has not already been opened /// this method is important since some functionality like bookmarks are not accessible if the map /// has not been opened and activated /// </summary> /// <param name="url"></param> internal static async void OpenAndActivateMap(string url) { Map map = MapView.Active.Map; bool bAlreadyOpen = false; // if not null - it may be open if (map != null) { // see if its already open //IList<IMapPane> mapPanes = MappingModule.GetMapPanes(map); PaneCollection mapPanes = FrameworkApplication.Panes; if ((mapPanes != null) && (mapPanes.Count > 0)) { bAlreadyOpen = true; // activate the first one Pane pane = mapPanes[0] as Pane; if (pane != FrameworkApplication.Panes.ActivePane) { pane.Activate(); } } } // if not open - open it if (!bAlreadyOpen) { var mapItem = Project.Current.Items.FirstOrDefault(i => i.Path == url) as MapProjectItem; map = mapItem.GetMap(); await ProApp.Panes.CreateMapPaneAsync(map); } }
protected AutoHideStripBase(DockPanel panel) { m_dockPanel = panel; m_panesTop = new PaneCollection(panel, DockState.DockTopAutoHide); m_panesBottom = new PaneCollection(panel, DockState.DockBottomAutoHide); m_panesLeft = new PaneCollection(panel, DockState.DockLeftAutoHide); m_panesRight = new PaneCollection(panel, DockState.DockRightAutoHide); SetStyle(ControlStyles.OptimizedDoubleBuffer, value: true); SetStyle(ControlStyles.Selectable, value: false); }
protected AutoHideStripBase(UPlan.Frame.DockForm.DockPanel panel) { this.m_dockPanel = panel; this.m_panesTop = new PaneCollection(panel, DockState.DockTopAutoHide); this.m_panesBottom = new PaneCollection(panel, DockState.DockBottomAutoHide); this.m_panesLeft = new PaneCollection(panel, DockState.DockLeftAutoHide); this.m_panesRight = new PaneCollection(panel, DockState.DockRightAutoHide); base.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); base.SetStyle(ControlStyles.Selectable, false); this.InitMapState(); this.InitMapStatePanec(); }
protected AutoHideStripBase(DockPanel panel) { m_dockPanel = panel; m_panesTop = new PaneCollection(panel, DockState.DockTopAutoHide); m_panesBottom = new PaneCollection(panel, DockState.DockBottomAutoHide); m_panesLeft = new PaneCollection(panel, DockState.DockLeftAutoHide); m_panesRight = new PaneCollection(panel, DockState.DockRightAutoHide); SetStyle(ControlStyles.OptimizedDoubleBuffer, true); SetStyle(ControlStyles.Selectable, false); this.Font = ProjectAllocationConstant.ProjectAllocationFont; }
public ChartControl() { InitializeComponent(); visualSettings = new ChartVisualSettings(this); SetStyle((ControlStyles)0x22012, true); _chartFrame = new ChartFrame(); _panes = new PaneCollection(this); _interactivityTools = new InteractivityToolCollection(this); CreateStockSeries(); _window = new Window(this); candleRange = new CandleRange(StockSeries); Timeframe = new BarSettings(); Timeframe.Intervals.Add(60); //DoubleBuffered = true; }
public AutoHideStrip(DockPanel panel) { DockPanel = panel; PanesTop = new PaneCollection(panel, DockState.DockTopAutoHide); PanesBottom = new PaneCollection(panel, DockState.DockBottomAutoHide); PanesLeft = new PaneCollection(panel, DockState.DockLeftAutoHide); PanesRight = new PaneCollection(panel, DockState.DockRightAutoHide); SetStyle(ControlStyles.Selectable, false); SetStyle(ControlStyles.ResizeRedraw | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true); BackColor = SystemColors.ControlLight; }
public ChartControl() { InitializeComponent(); visualSettings = new ChartVisualSettings(this); SetStyle((ControlStyles)0x22012, true); _chartFrame = new ChartFrame(); _panes = new PaneCollection(this); _interactivityTools = new InteractivityToolCollection(this); CreateStockSeries(); _window = new Window(this); candleRange = new CandleRange(StockSeries); Timeframe = new BarSettings(); Timeframe.Intervals.Add(60); //DoubleBuffered = true; }
public WorksheetOptions() { Panes = new PaneCollection(); }