/// <summary> /// Initializes a new instance of the <see cref="ReportComponentBase"/> class with default settings. /// </summary> public ReportComponentBase() { border = new Border(); fill = new SolidFill(); hyperlink = new Hyperlink(this); bookmark = ""; exportable = true; flagUseFill = true; flagUseBorder = true; flagPreviewVisible = true; flagSerializeStyle = true; shiftMode = ShiftMode.Always; style = ""; evenStyle = ""; hoverStyle = ""; printOn = PrintOn.FirstPage | PrintOn.LastPage | PrintOn.OddPages | PrintOn.EvenPages | PrintOn.RepeatedBand | PrintOn.SinglePage; beforePrintEvent = ""; afterPrintEvent = ""; afterDataEvent = ""; clickEvent = ""; cursor = Cursors.Default; mouseMoveEvent = ""; mouseUpEvent = ""; mouseDownEvent = ""; mouseEnterEvent = ""; mouseLeaveEvent = ""; backlight = false; SetFlags(Flags.CanGroup, true); if (BaseName.EndsWith("Object")) { BaseName = ClassName.Substring(0, ClassName.Length - 6); } }
private void InsertionSort(dynamic array) { arr = (Array)array; dynamic watch = System.Diagnostics.Stopwatch.StartNew(); for (int i = 0; i < arr.Count - 1; ++i) { for (int j = i + 1; j > 0; --j) { if (arr[j - 1] > arr[j]) { arr.Swap(j - 1, j); } } } watch.Stop(); long time = watch.ElapsedMilliseconds; StatusStripChange change = ChangeStatusStrip; statusStrip1.Invoke((Action)(() => change($"Insertion sorted. Time elapsed: { time.ToString()} ms"))); PrintOn p = PrintOnArr; label1.Invoke(p); }
private void SelectionSort(dynamic array) { arr = (Array)array; dynamic watch = System.Diagnostics.Stopwatch.StartNew(); int min; for (int i = 0; i < arr.Count - 1; ++i) { min = i; for (int j = i + 1; j < arr.Count; ++j) { if (arr[min] > arr[j]) { min = j; } } arr.Swap(i, min); } watch.Stop(); long time = watch.ElapsedMilliseconds; StatusStripChange change = ChangeStatusStrip; statusStrip1.Invoke((Action)(() => change($"Selection sorted. Time elapsed: { time.ToString()} ms"))); PrintOn p = PrintOnArr; label1.Invoke(p); }
public void QuickSortFinalStep() { dynamic watch = System.Diagnostics.Stopwatch.StartNew(); QuickSort(arr, 0, arr.Count - 1); watch.Stop(); long time = watch.ElapsedMilliseconds; StatusStripChange change = ChangeStatusStrip; statusStrip1.Invoke((Action)(() => change($"Quick sorted. Time elapsed: { time.ToString()} ms"))); PrintOn p = PrintOnArr; label1.Invoke(p); }
private void MergeSortFinalStep() { dynamic watch = System.Diagnostics.Stopwatch.StartNew(); arr = MergeSort(arr); watch.Stop(); long time = watch.ElapsedMilliseconds; StatusStripChange change = ChangeStatusStrip; statusStrip1.Invoke((Action)(() => change($"Merge sorted. Time elapsed: { time.ToString()} ms"))); PrintOn p = PrintOnArr; label1.Invoke(p); }