src/Misc/EFTools/EntityDesign/UI/Views/Dialogs/NewFunctionImportDialog.cs
// <summary>
//     Helper method to determine what should be displayed in the return type view cell.
//     if both source and target text are not null, we display: "source->target".
// </summary>
Helper method to determine what should be displayed in the return type view cell.
if both source and target text are not null, we display: "source->target".
Helper method to determine what should be displayed in the return type view cell . if both source and target text are not null we display : " source - > target " .
private static string GetReturnTypeListViewCellText(bool isUpdateMode, string sourceText, string targetText)
        {
            if (String.IsNullOrEmpty(sourceText)
                && String.IsNullOrEmpty(targetText))
            {
                return String.Empty;
            }
            else if (isUpdateMode)
            {
                if (String.Compare(sourceText, targetText, StringComparison.CurrentCulture) != 0)
                {
                    return String.Format(
                        CultureInfo.CurrentCulture
                        , DialogsResource.NewFunctionImportDialog_ReturnTypeListViewItemChange, sourceText, targetText);
                }
                else
                {
                    return targetText;
                }
            }
            else
            {
                if (!string.IsNullOrEmpty(targetText))
                {
                    return targetText;
                }
                else if (!string.IsNullOrEmpty(sourceText))
                {
                    return sourceText;
                }
            }
            return String.Empty;
        }
private static string GetReturnTypeListViewCellText ( bool isUpdateMode , string sourceText , string targetText ) { if ( String . IsNullOrEmpty ( sourceText ) && String . IsNullOrEmpty ( targetText ) ) { return String . Empty ; } else if ( isUpdateMode ) { if ( String . Compare ( sourceText , targetText , StringComparison . CurrentCulture ) != 0 ) { return String . Format ( CultureInfo . CurrentCulture , DialogsResource . NewFunctionImportDialog_ReturnTypeListViewItemChange , sourceText , targetText ) ; } else { return targetText ; } } else { if ( ! string . IsNullOrEmpty ( targetText ) ) { return targetText ; } else if ( ! string . IsNullOrEmpty ( sourceText ) ) { return sourceText ; } } return String . Empty ; }
Helper method to determine what should be displayed in the return type view cell.
Helper method to determine what should be displayed in the return type view cell .
// if both strings are not null and different, we need to display in the following format (string1)->string2 // return either one of them
isUpdateMode
bool
sourceText
string
targetText
string