热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

CodeSmith使用总结下拉列表和文件夹对话框属性

上一篇有点短了,因为实在没有什么可说的,这一篇会多一点。O(∩_∩)O~一、下拉列表关于如何在CodeSmith中创建一个下拉列表的属性框其实很简单,是要使用C#中的枚举就行了,看

上一篇有点短了,因为实在没有什么可说的,这一篇会多一点。Times New Roman";‘>O(>∩Times New Roman";‘>_>∩Times New Roman";‘>)O~

一、下拉列表

关于如何在宋体"; font-size: 10.5pt; font-weight: bold; mso-spacerun: "yes";‘>CodeSmith宋体"; font-size: 10.5pt; font-weight: normal; mso-spacerun: "yes";‘>中创建一个下拉列表的属性框其实很简单,是要使用Times New Roman";‘>C#>中的枚举就行了,看操作。

首先定义一个枚举,跟定义方法一样,也要包含在Times New Roman"; font-size: 10.5pt; font-style: normal; font-weight: normal; mso-spacerun: "yes"; mso-shading: #ffffff;‘><Times New Roman"; font-size: 10.5pt; font-style: normal; font-weight: normal; mso-spacerun: "yes"; mso-shading: #ffffff;‘>scriptTimes New Roman"; font-size: 10.5pt; font-style: normal; font-weight: normal; mso-spacerun: "yes"; mso-shading: #ffffff;‘> Times New Roman"; font-size: 10.5pt; font-style: normal; font-weight: normal; mso-spacerun: "yes"; mso-shading: #ffffff;‘>runatTimes New Roman"; font-size: 10.5pt; font-style: normal; font-weight: normal; mso-spacerun: "yes"; mso-shading: #ffffff;‘>="template">宋体"; font-size: 10.5pt; font-style: normal; font-weight: normal; mso-spacerun: "yes"; mso-shading: #ffffff;‘>……Times New Roman"; font-size: 10.5pt; font-style: normal; font-weight: normal; mso-spacerun: "yes"; mso-shading: #ffffff;‘>Times New Roman"; font-size: 10.5pt; font-style: normal; font-weight: normal; mso-spacerun: "yes"; mso-shading: #ffffff;‘>scriptTimes New Roman"; font-size: 10.5pt; font-style: normal; font-weight: normal; mso-spacerun: "yes"; mso-shading: #ffffff;‘>>宋体"; font-size: 10.5pt; font-style: normal; font-weight: normal; mso-spacerun: "yes"; mso-shading: #ffffff;‘>标签中,代码语法就是我们在定义模板的时候选择的语法,这里我用的是宋体"; font-size: 10.5pt; font-style: normal; font-weight: normal; mso-spacerun: "yes"; mso-shading: #ffffff;‘>C#>,如下:

<Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>scriptTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>runatTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="template">

///Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>

///Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> 定义一个下拉列表的枚举

///Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>

publicTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>enumTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> CollectionTypeEnum 

{

OneTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>, 

TwoTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>, 

Three,

Four,

Five

}

Times New Roman"; font-size: 10.5pt; font-style: normal; font-weight: normal; mso-spacerun: "yes"; mso-shading: #ffffff;‘>scriptTimes New Roman"; font-size: 10.5pt; font-style: normal; font-weight: normal; mso-spacerun: "yes"; mso-shading: #ffffff;‘>>

Like This>,我们就定义好了一个枚举了。接下来就是我们在定义属性的时候,类型选择这个枚举。

<%Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>@Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>PropertyTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>NameTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘>DTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>ropDownList"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>TypeTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="CollectionTypeEnum"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>DefaultTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘>OneTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>DescriptionTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>=">这是一个下拉列表框"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>%>

编译一下就能看见效果了。

bubuko.com,布布扣src="https://img8.php1.cn/3cdc5/1e789/b64/31ef22ad3d07f472.jpeg"> 

调用的时候就像普通属性一样就行Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘><%=DropDownList %>宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘>。

二、文件夹对话框

好了,定义好了下拉列表框后我们就开始下一个内容,文件夹对话框。

文件夹对话框有两种定义方式,一种是普通定义的那种,另一种就是用代码定义,不过我经常用第一种,谁让他简单呢。

首先我们要引用两个命名空间Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>System.Windows.Forms.Design宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘>和Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>System.Drawing.Design宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘>如下:

<%Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>@Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>ImportTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>NamespaceTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="System.Windows.Forms.Design"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> %>

<%Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>@Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>ImportTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>NamespaceTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="System.Drawing.Design"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> %>

接下来只要在定义属性的时候,类型选择Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>FolderNameEditor宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘>就行了

<%Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>@Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>PropertyTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>NameTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="Test1"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>TypeTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="String"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>EditorTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="FolderNameEditor"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>EditorBaseTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="UITypeEditor"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>OptionalTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="False"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> %>

当然你也可以写全了,全路径如下:

<%Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>@Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>PropertyTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>NameTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="Test2"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>TypeTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="String"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>EditorTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="System.Windows.Forms.Design.FileNameEditor"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>EditorBaseTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="System.Drawing.Design.UITypeEditor"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>OptionalTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="False"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> %>

编译一下就能看见了

bubuko.com,布布扣src="https://img8.php1.cn/3cdc5/1e789/b64/93be49d8ea8a86cf.jpeg"> 

第二种方法也要引用命名空间,然后不添加属性标签,直接在代码中写出来。具体代码如下:



#region 定义一个弹出选择文件夹获取路径的属性
private string _outputDirectory = String.Empty;
///


/// 调用文件夹对话框
///

[Editor(typeof(System.Windows.Forms.Design.FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[Optional, NotChecked]
[DefaultValue(
"")]
///
/// 属性名
///

public string OutputDirectory
{
get
{
return _outputDirectory;
}
set
{
if (value.EndsWith("\\")) value = value.Substring(0, value.Length -1);
_outputDirectory
= value;
}
}
#endregion

 

用这种方法的好处是如果我们要处理路径,在输出前处理就可以了,不用再单另的写代码了。呵呵

这里有一点Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>FolderNameEditor宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘>是文件夹,那么相应的Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>FileNameEditor宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘>就是文件了。

取值方法如同正常属性一样。

示例模板:

<%Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>-- 

Name: >测试模板4

Author: GodFinal

Description: 

--Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>%>

<%Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>@Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>TemplateTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>LanguageTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="C#"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>TargetLanguageTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="C#"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>DescriptionTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>=""Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> %>

 

<%Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>@Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>PropertyTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>NameTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="DropDownList"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>TypeTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="CollectionTypeEnum"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>DefaultTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="One"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>DescriptionTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>=">这是一个下拉列表框"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>%>

 

<%Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>@Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>ImportTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>NamespaceTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="System.Windows.Forms.Design"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> %>

<%Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>@Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>ImportTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>NamespaceTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="System.Drawing.Design"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> %>

 

<%Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>@Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>PropertyTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>NameTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="OutputDirectory1"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>TypeTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="String"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>EditorTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="FolderNameEditor"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>EditorBaseTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="UITypeEditor"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>OptionalTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="False"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> %>

 

<%Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>@Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>PropertyTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>NameTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="OutputDirectory2"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>TypeTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="String"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>EditorTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="System.Windows.Forms.Design.FileNameEditor"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>EditorBaseTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="System.Drawing.Design.UITypeEditor"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>OptionalTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="False"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> %>

 

<%=DropDownList %>

 

<%=OutputDirectory%>

 

<%=OutputDirectory1%>

 

<%=OutputDirectory2%>

<Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>scriptTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>runatTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>="template">

///Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>

///Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> 定义一个下拉列表的枚举

///Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>

publicTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>enumTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> CollectionTypeEnum 

{

    One, 

  Times New Roman";‘>Two, 

  Times New Roman";‘>Three,

  Times New Roman";‘>Four,

  Times New Roman";‘>Five

}

 

#regionTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> 定义一个弹出选择文件夹对话框获取路劲的属性

privateTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>stringTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> _outputDirectory = String.Empty;

///Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>

///Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> 调用文件夹对话框

///Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>

[Editor(Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>typeofTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>(System.Windows.Forms.Design.FolderNameEditor), Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>typeofTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>(System.Drawing.Design.UITypeEditor))] 

[Optional, NotChecked]

[DefaultValue(Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>""Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>)]

///Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>

///Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> 属性名

///Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>

publicTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>stringTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> OutputDirectory

    Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>get

    {

        Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>returnTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> _outputDirectory;

    }

    Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>set

    {

        Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>ifTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘> (value.EndsWith(Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>"\\"Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>)) value = value.Substring(0, value.Length -1);

        _outputDirectory = value;

    } 

}

#endregion

Times New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>scriptTimes New Roman"; font-size: 10.5pt; mso-spacerun: "yes";‘>>

最终结果:

bubuko.com,布布扣src="https://img8.php1.cn/3cdc5/1e789/b64/b60ceb4322e6f01f.jpeg"> 

bubuko.com,布布扣src="https://img8.php1.cn/3cdc5/1e789/b64/5ce7509c5d337950.jpeg"> 


推荐阅读
  • 本文讨论了如何优化解决hdu 1003 java题目的动态规划方法,通过分析加法规则和最大和的性质,提出了一种优化的思路。具体方法是,当从1加到n为负时,即sum(1,n)sum(n,s),可以继续加法计算。同时,还考虑了两种特殊情况:都是负数的情况和有0的情况。最后,通过使用Scanner类来获取输入数据。 ... [详细]
  • 本文介绍了使用Java实现大数乘法的分治算法,包括输入数据的处理、普通大数乘法的结果和Karatsuba大数乘法的结果。通过改变long类型可以适应不同范围的大数乘法计算。 ... [详细]
  • HDU 2372 El Dorado(DP)的最长上升子序列长度求解方法
    本文介绍了解决HDU 2372 El Dorado问题的一种动态规划方法,通过循环k的方式求解最长上升子序列的长度。具体实现过程包括初始化dp数组、读取数列、计算最长上升子序列长度等步骤。 ... [详细]
  • 知识图谱——机器大脑中的知识库
    本文介绍了知识图谱在机器大脑中的应用,以及搜索引擎在知识图谱方面的发展。以谷歌知识图谱为例,说明了知识图谱的智能化特点。通过搜索引擎用户可以获取更加智能化的答案,如搜索关键词"Marie Curie",会得到居里夫人的详细信息以及与之相关的历史人物。知识图谱的出现引起了搜索引擎行业的变革,不仅美国的微软必应,中国的百度、搜狗等搜索引擎公司也纷纷推出了自己的知识图谱。 ... [详细]
  • 本文介绍了lua语言中闭包的特性及其在模式匹配、日期处理、编译和模块化等方面的应用。lua中的闭包是严格遵循词法定界的第一类值,函数可以作为变量自由传递,也可以作为参数传递给其他函数。这些特性使得lua语言具有极大的灵活性,为程序开发带来了便利。 ... [详细]
  • CSS3选择器的使用方法详解,提高Web开发效率和精准度
    本文详细介绍了CSS3新增的选择器方法,包括属性选择器的使用。通过CSS3选择器,可以提高Web开发的效率和精准度,使得查找元素更加方便和快捷。同时,本文还对属性选择器的各种用法进行了详细解释,并给出了相应的代码示例。通过学习本文,读者可以更好地掌握CSS3选择器的使用方法,提升自己的Web开发能力。 ... [详细]
  • 本文介绍了OC学习笔记中的@property和@synthesize,包括属性的定义和合成的使用方法。通过示例代码详细讲解了@property和@synthesize的作用和用法。 ... [详细]
  • 本文主要解析了Open judge C16H问题中涉及到的Magical Balls的快速幂和逆元算法,并给出了问题的解析和解决方法。详细介绍了问题的背景和规则,并给出了相应的算法解析和实现步骤。通过本文的解析,读者可以更好地理解和解决Open judge C16H问题中的Magical Balls部分。 ... [详细]
  • Mac OS 升级到11.2.2 Eclipse打不开了,报错Failed to create the Java Virtual Machine
    本文介绍了在Mac OS升级到11.2.2版本后,使用Eclipse打开时出现报错Failed to create the Java Virtual Machine的问题,并提供了解决方法。 ... [详细]
  • 在说Hibernate映射前,我们先来了解下对象关系映射ORM。ORM的实现思想就是将关系数据库中表的数据映射成对象,以对象的形式展现。这样开发人员就可以把对数据库的操作转化为对 ... [详细]
  • 1,关于死锁的理解死锁,我们可以简单的理解为是两个线程同时使用同一资源,两个线程又得不到相应的资源而造成永无相互等待的情况。 2,模拟死锁背景介绍:我们创建一个朋友 ... [详细]
  • 后台获取视图对应的字符串
    1.帮助类后台获取视图对应的字符串publicclassViewHelper{将View输出为字符串(注:不会执行对应的ac ... [详细]
  • 《数据结构》学习笔记3——串匹配算法性能评估
    本文主要讨论串匹配算法的性能评估,包括模式匹配、字符种类数量、算法复杂度等内容。通过借助C++中的头文件和库,可以实现对串的匹配操作。其中蛮力算法的复杂度为O(m*n),通过随机取出长度为m的子串作为模式P,在文本T中进行匹配,统计平均复杂度。对于成功和失败的匹配分别进行测试,分析其平均复杂度。详情请参考相关学习资源。 ... [详细]
  • 开发笔记:加密&json&StringIO模块&BytesIO模块
    篇首语:本文由编程笔记#小编为大家整理,主要介绍了加密&json&StringIO模块&BytesIO模块相关的知识,希望对你有一定的参考价值。一、加密加密 ... [详细]
  • 原文地址:https:www.cnblogs.combaoyipSpringBoot_YML.html1.在springboot中,有两种配置文件,一种 ... [详细]
author-avatar
小鱼儿r6K2
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有