コード例 #1
0
        private string GetTransferFile()
        {
            GDTransferFile mfi        = _searchWindow.ModSelectionHandler.SelectedMod;
            bool           fileExists = !string.IsNullOrEmpty(mfi.Filename) && File.Exists(mfi.Filename);

            if (_settingsController.TransferAnyMod || !fileExists)
            {
                StashPicker picker = new StashPicker();
                if (picker.ShowDialog() == DialogResult.OK)
                {
                    return(picker.Result);
                }
                else
                {
                    Logger.Info(GlobalSettings.Language.GetTag("iatag_no_stash_abort"));
                    _setFeedback(GlobalSettings.Language.GetTag("iatag_no_stash_abort"));
                    _browser.ShowMessage(GlobalSettings.Language.GetTag("iatag_no_stash_abort"), "Error");

                    return(string.Empty);
                }
            }
            else
            {
                return(mfi.Filename);
            }
        }
コード例 #2
0
        public string GetTransferFile()
        {
            GDTransferFile mfi        = _searchWindow.ModSelectionHandler.SelectedMod;
            bool           fileExists = !string.IsNullOrEmpty(mfi.Filename) && File.Exists(mfi.Filename);

            if (!fileExists)
            {
                Logger.Warn($"The transfer file {mfi.Filename} does not exist, switching to stash picker");
            }


            if (_settingsService.GetPersistent().TransferAnyMod || !fileExists)
            {
                StashPicker picker = new StashPicker(_browser);
                if (picker.ShowDialog() == DialogResult.OK)
                {
                    return(picker.Result);
                }

                Logger.Info(RuntimeSettings.Language.GetTag("iatag_no_stash_abort"));
                _setFeedback(RuntimeSettings.Language.GetTag("iatag_no_stash_abort"));
                _browser.ShowMessage(RuntimeSettings.Language.GetTag("iatag_no_stash_abort"), UserFeedbackLevel.Danger);

                return(string.Empty);
            }

            return(mfi.Filename);
        }