Пример #1
0
        /// <summary> Executes the delete view sheet demo operation. </summary>
        ///
        /// <param name="sheetIndex"> The sheetIndex of the ViewSheet to delete. </param>
        ///
        /// <returns> true if it succeeds, false if it fails. </returns>
        private bool RunDeleteViewSheetDemo(int sheetIndex)
        {
            var sheetName = ViewSheets.GetViewSheetName(sheetIndex);

            if (string.IsNullOrEmpty(sheetName) && !this.ShowMessage($"Could not find a sheet at sheet index {sheetIndex}.", LocalizationStrings.Title, true))
            {
                return(false);
            }

            this.ShowMessage($"We'll now delete {sheetName} at sheet index {sheetIndex}.", LocalizationStrings.Title);
            return(ViewSheets.DeleteViewSheet(sheetIndex));
        }