private void btnGenerate_Click(object sender, EventArgs e) { var input = txtInput.Text; if (String.IsNullOrEmpty(input)) { MessageBox.Show("Vui lòng nhập vào chuỗi lập lịch!", "Cảnh báo", MessageBoxButton.OK, MessageBoxImage.Warning); } else { Process.Caculate(txtInput.Text); elementHost1.Child = GenerateWpfVisuals(); _gArea.GenerateGraph(true); _gArea.SetVerticesDrag(true, true); _zoomctrl.ZoomToFill(); txtSSResult.Text = Process.a; if (Process.result == true) { txtResult.Text = "Is Conflict Serializable"; txtSSResult.Text = Process.serialSchedule.ToUpper(); DrawDTGV(txtInput.Text, txtSSResult.Text); } else { txtResult.Text = "Is not Conflict Serializable"; DrawNullDTGV(); } } }
private void GraphAreaSetup(ref GraphAreaExample graphArea) { graphArea.SetVerticesDrag(true, true); graphArea.GenerateGraph(true, true); graphArea.SetVerticesMathShape(VertexShape.Rectangle); graphArea.SetEdgesDashStyle(EdgeDashStyle.Dash); graphArea.ShowAllEdgesArrows(false); graphArea.ShowAllEdgesLabels(true); }
private void but_generate_Click(object sender, EventArgs e) { edgeCollection.Clear(); wpfHost.Child = GenerateWpfVisuals(); _zoomctrl.ZoomToFill(); _gArea.GenerateGraph(true); _gArea.SetVerticesDrag(true, true); _zoomctrl.ZoomToFill(); //_gArea.SetEdgesHighlight(true, (GraphControlType)1); _gArea.RelayoutGraph(); _gArea.ShowAllEdgesArrows(false); isGraphReady = true; }
void CreateNewArea() { if (dg_Area != null) { dg_Area.GenerateGraphFinished -= dg_Area_GenerateGraphFinished; dg_Area.RelayoutFinished -= dg_Area_GenerateGraphFinished; } dg_Area.ClearLayout(); dg_Area.Dispose(); dg_Area = new GraphAreaExample { Name = "dg_Area", LogicCore = new LogicCoreExample(), Resources = new ResourceDictionary { Source = new Uri("/Templates/Debug/TestTemplates.xaml", UriKind.RelativeOrAbsolute) } }; dg_Area.SetVerticesDrag(true, true); dg_zoomctrl.Content = dg_Area; dg_Area.ShowAllEdgesLabels(false); }
private void but_generate_Click(object sender, EventArgs e) { _gArea.GenerateGraph(true); _gArea.SetVerticesDrag(true, true); _zoomctrl.ZoomToFill(); }