/// <summary> /// Initialize a new data table /// </summary> /// <param name="AssociatedPropertyPage">The property page associated with the table</param> /// <param name="miniMap">The mini-map associated with the table</param> /// <param name="nMap">The network map associated with the table</param> /// <param name="violView">The violation view assocaited with the table</param> public MM_Data_Table(MM_Property_Page AssociatedPropertyPage, MM_Network_Map_DX nMap, MM_Violation_Viewer violView, MM_Mini_Map miniMap) { this.nMap = nMap; this.miniMap = miniMap; this.AssociatedPropertyPage = AssociatedPropertyPage; this.AllowUserToAddRows = false; this.AllowUserToResizeColumns = true; this.violView = violView; this.AllowUserToResizeRows = true; this.AllowUserToOrderColumns = true; if (MM_Server_Interface.Client != null) { this.EditMode = DataGridViewEditMode.EditProgrammatically; } else { this.EditMode = DataGridViewEditMode.EditOnEnter; this.CellValueChanged += new DataGridViewCellEventHandler(Data_Table_CellValueChanged); } this.DataError += new DataGridViewDataErrorEventHandler(Data_Table_DataError); this.BackgroundColor = Color.Black; this.DefaultCellStyle.BackColor = Color.Black; this.DefaultCellStyle.ForeColor = Color.White; this.RowHeadersVisible = false; this.AllowUserToResizeRows = false; }
/// <summary> /// Update with our new violation viewer, and set everything up. /// </summary> /// <param name="ViolViewer">The violation viewer</param> public void SetViolationViews(MM_Violation_Viewer ViolViewer) { this.violView = ViolViewer; foreach (ListViewItem l in this.lvSearch.Items) { MM_Element Elem = l.Tag as MM_Element; //If we have a violation, let's add it in. MM_AlarmViolation_Type WorstViol = Elem.WorstVisibleViolation(violView.ShownViolations, this.Parent); if (WorstViol != null) { l.ImageIndex = WorstViol.ViolationIndex; } } }
/// <summary> /// Assign the controls to the one-line viewer /// </summary> /// <param name="BaseElement">The base element, from which the Data Integration layer should query for parameters</param> /// <param name="nMap">The network map</param> /// <param name="BaseData">The base data</param> /// <param name="ViolViewer">The violation viewer associated with the one-line</param> /// <param name="DataSource">The active data source</param> public void SetControls(MM_Element BaseElement, MM_Network_Map_DX nMap, MM_DataSet_Base BaseData, MM_Violation_Viewer ViolViewer, MM_Data_Source DataSource) { //Assign our data connectors this.DataSource = DataSource; this.BaseData = BaseData; this.nMap = nMap; this.ViolViewer = ViolViewer; LoadOneLine(BaseElement, null); //Assign our events tsMain.ItemClicked += new ToolStripItemClickedEventHandler(tsMain_ItemClicked); btnSwapDetails.Visible = this.Parent is SplitterPanel; }
/// <summary> /// Create a new layer /// </summary> /// <param name="surface">The <see cref="Direct3DSurface"/> this layer belongs to.</param> /// <param name="name">The name of the layer.</param> /// <param name="order">The order of the layer</param> public MinimapLayer(Direct3DSurface surface, MM_Violation_Viewer violationViewer) : base(surface, "Minimap", 99999) { _violationViewer = violationViewer; var map = this.Surface as MM_Network_Map_DX; _coordinates = map.Coordinates; violationViewer.ViolationsChanged += (s, e) => _isDirty = true; // Hook events to update render state MM_Repository.ViewChanged += v => _isDirty = true; _coordinates.Panned += (center, newCenter) => _isDirty = true; _coordinates.Zoomed += (zoom, newZoom) => _isDirty = true; _coordinates.LassoDrawing += () => _isDirty = true; }
/// <summary> /// Assign controls to the search results window /// </summary> /// <param name="nMap">Network Map</param> /// <param name="violView">Violations view</param> /// <param name="miniMap">The mini-map</param> /// <param name="SearchText">Search Text</param> /// <param name="Parent">The parent builder</param> /// <param name="BaseData">The base data tables</param> /// <param name="ControlPressed">Whether the control button is pressed</param> /// <param name="viewSummary"></param> /// <param name="AltPressed">Whether the alt button is pressed</param> public bool SetControls(MM_Network_Map_DX nMap, MM_Violation_Viewer violView, MM_Mini_Map miniMap, String SearchText, MM_Form_Builder Parent, out MM_DataSet_Base BaseData, MM_Element_Summary viewSummary, bool ControlPressed, bool AltPressed) { MM_Repository.ViewChanged += new MM_Repository.ViewChangedDelegate(Repository_ViewChanged); this.nMap = nMap; this.miniMap = miniMap; this.violView = violView; this.viewSummary = viewSummary; ConfigureSearch(); this.txtSearch.Text = SearchText; this.SearchText = SearchText; bool Resp = PerformSearch(ControlPressed, AltPressed); BaseData = this.BaseData; return(Resp); }
/// <summary> /// Create a new property page /// </summary> public MM_Property_Page(MM_Network_Map_DX nMap, MM_Violation_Viewer violView, MM_Mini_Map miniMap) { this.nMap = nMap; this.violView = violView; this.miniMap = miniMap; DetermineDefaultStyle(); try { if (!Cef.IsInitialized) { Cef.Initialize(); } } catch (Exception ex) { MM_System_Interfaces.LogError(ex); } }
/// <summary> /// Create a new layer /// </summary> /// <param name="surface">The <see cref="Direct3DSurface"/> this layer belongs to.</param> public LineLayer(Direct3DSurface surface, MM_Violation_Viewer violationViewer) : base(surface, "LineLayer", 5) { _violationViewer = violationViewer; }
/// <summary> /// Assign the data integration layer to the control, and start the query /// </summary> public void SetControls() { tmrUpdate.Enabled = true; btnSpeech.Text = "Speech " + (Data_Integration.UseSpeech ? "ON" : "OFF"); MM_Violation_Viewer.SetListViewGroupColor(this.lvComm, Color.FromArgb(0x00cccccc)); }
/// <summary> /// Create a new layer /// </summary> /// <param name="surface">The <see cref="Direct3DSurface"/> this layer belongs to.</param> /// <param name="order">The order of the layer</param> public SubstationLayer(Direct3DSurface surface, MM_Violation_Viewer violationViewer) : base(surface, "SubstationLayer", 10) { _violationViewer = violationViewer; }