ACAT.Extensions.Default.FunctionalAgents.FileBrowserAgent.FileOperationConfirmScanner.handleDeleteFile C# (CSharp) Method

handleDeleteFile() private method

Gets confirmation whether the user wants to delete the file and closes the form
private handleDeleteFile ( ) : void
return void
        private void handleDeleteFile()
        {
            if (FInfo != null)
            {
                if (!DialogUtils.ConfirmScanner(PanelManager.Instance.GetCurrentForm(),
                                                string.Format(Resources.Delete0, FInfo.Name)))
                {
                    return;
                }
            }

            DeleteFile = true;
            Windows.CloseForm(this);
        }

Usage Example

Example #1
0
            /// <summary>
            /// Executes a command
            /// </summary>
            /// <param name="handled">true if it was handled</param>
            /// <returns>true on success</returns>
            public override bool Execute(ref bool handled)
            {
                handled = true;

                switch (Command)
                {
                case "CancelFileOperation":
                    _menu.commandDispatcher.Dispatch("CmdGoBack", ref handled);
                    break;

                case "OpenFile":
                    _menu.handleOpenFile();
                    break;

                case "DeleteFile":
                    _menu.handleDeleteFile();
                    break;

                default:
                    handled = false;
                    break;
                }

                return(true);
            }