/// <summary> /// Handler when the Scan Button got clicked /// For example checking if scan is allowed and then statrting it /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void scanButton_Click(object sender, RibbonControlEventArgs e) { if (!AllowedToScan()) { return; } if (DataModel.Instance.CurrentWorkbook.PolicySettings.hasManualScans() || DataModel.Instance.CurrentWorkbook.Scenarios.Count > 0) { // SIFCore can't handle if it the documents is not saved. So if an inspection is started it is assured the file is saved somewhere. ScanHelper.SaveBefore(InspectionType.MANUAL); } else { ScanHelper.ScanUnsuccessful(Resources.tl_Ribbon_MessageNoPolicies); } }