/// <param name="domainOntologyService">Serviciul ontologiei domeniului ataşat.</param> public DomainOntologyServiceForm(DomainOntologyService domainOntologyService) { InitializeComponent(); this.domainOntologyService = domainOntologyService; this.visualizer = null; this.nudPort.Value = DomainOntologyServiceSettings.Default.LISTENING_PORT; this.Bounds = DomainOntologyServiceSettings.Default.BOUNDS; this.splitContainerTop.SplitterDistance = DomainOntologyServiceSettings.Default.SEPARATOR_FUNCTIONALITIES_PROPERTIES; this.splitContainerBottom.SplitterDistance = DomainOntologyServiceSettings.Default.SEPARATOR_PROPERTIES_TERMS; //this.lbFunctionality.Items.AddRange(this.domainOntologyService.functionalities); //this.btnListen_Click(null, null); }
/// <param name="visualizer">Obiectul cu funcționalitatea efectivă</param> public GraphicVisualizerForm(Visualizer visualizer) { InitializeComponent(); this.visualizer = visualizer; this.zedGraph.GraphPane.Title.IsVisible = false; this.zedGraph.GraphPane.XAxis.Title.IsVisible = false; this.zedGraph.GraphPane.XAxis.MajorGrid.IsVisible = true; this.zedGraph.GraphPane.XAxis.MinorGrid.IsVisible = true; this.zedGraph.GraphPane.YAxis.Title.IsVisible = false; this.zedGraph.GraphPane.YAxis.MajorGrid.IsVisible = true; this.zedGraph.GraphPane.Y2Axis.MajorGrid.IsVisible = true; this.zedGraph.GraphPane.Y2Axis.IsVisible = true; this.zedGraph.GraphPane.YAxis.Scale.Max = 1.2; this.zedGraph.GraphPane.Y2Axis.Scale.Max = 1.3; this.zedGraph.GraphPane.Legend.Position = ZedGraph.LegendPos.Top; }
/// <summary> /// Indică apăsarea butonului de reinnoire a ontologiilor. /// Reinnoieste ontlogiile. /// </summary> private void btnUpdateOnt_Click(object sender, EventArgs e) { this.lbFunctionality.Items.Clear(); this.lbProperties.Items.Clear(); this.lbTerms.Items.Clear(); if (this.visualizer != null) { this.visualizer.closeMe(); this.visualizer = null; } this.domainOntologyService.updateFunctionalities(this.txtAdressUDDI.Text); if (this.domainOntologyService.lastError != null) { MessageBox.Show(this.domainOntologyService.lastError, "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { this.lbFunctionality.Items.AddRange(this.domainOntologyService.functionalities); } }
/// <summary> /// Indică selectarea altei proprietăţi a funcţionalităţii selectate. /// Afişează termenii proprietăţii selectate şi încarcă fereastra de vizualizare a termenilor. /// </summary> private void lbProperties_SelectedIndexChanged(object sender, EventArgs e) { if (this.lbProperties.SelectedIndex >= 0) { this.lbTerms.Items.Clear(); Property property = this.lbProperties.SelectedItem as Property; this.lbTerms.Items.AddRange(property.terms); if (this.visualizer != null) { this.visualizer.closeMe(); } this.visualizer = new Visualizer(property.name, -1, this.Height, this.Left + this.Width, this.Top, null); this.visualizer.addProperty(property, System.Drawing.Color.Green, System.Drawing.Color.Blue, true); } }
/// <summary> /// Indică închiderea vizualizării grafice a formei termenului din cerere. /// Reîmprospătează fereastra. /// </summary> private void graphicVisualizer_Close(object sender, FormClosedEventArgs e) { this.btnPreviewShape.Enabled = true; this.visualizer = null; }
/// <summary> /// Indică apăsarea butonului pentru vizualizarea grafică a formei termenului din cerere. /// Deschide o astfel de vizualizare. /// </summary> private void btnPreviewShape_Click(object sender, EventArgs e) { this.btnPreviewShape.Enabled = false; Property property = this.currentFunctionality.properties[this.tcProperties.SelectedIndex]; this.visualizer = new Visualizer(property.name, this.Width, -1, this.Left, this.Top + this.Height, new FormClosedEventHandler(this.graphicVisualizer_Close)); this.visualizer.addProperty(property, System.Drawing.Color.FromArgb(100, System.Drawing.Color.Green), System.Drawing.Color.FromArgb(50, System.Drawing.Color.Blue), true); Term term = this.propertyTabPageStates[this.tcProperties.SelectedIndex].customTerm; if (term != null) { term = new Term("Request", term.start, term.left, term.right, term.end); this.visualizer.addTerm(term, System.Drawing.Color.FromArgb(200, System.Drawing.Color.Red), false, true, this.visualUpdateShape); } }