Skip to content

Commit 6a88f0b

Browse files
committed
Added misc files and license, fixed readme.md
1 parent 2cec82f commit 6a88f0b

17 files changed

Lines changed: 1687 additions & 0 deletions

BuildProcessTemplates/DefaultTemplate.11.1.xaml

Lines changed: 543 additions & 0 deletions
Large diffs are not rendered by default.

BuildProcessTemplates/DefaultTemplate.xaml

Lines changed: 602 additions & 0 deletions
Large diffs are not rendered by default.

BuildProcessTemplates/LabDefaultTemplate.11.xaml

Lines changed: 208 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<Activity mc:Ignorable="sad" x:Class="TfsBuild.Process" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mtbc="clr-namespace:Microsoft.TeamFoundation.Build.Client;assembly=Microsoft.TeamFoundation.Build.Client" xmlns:mtbw="clr-namespace:Microsoft.TeamFoundation.Build.Workflow;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtbwt="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Tracking;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtvc="clr-namespace:Microsoft.TeamFoundation.VersionControl.Client;assembly=Microsoft.TeamFoundation.VersionControl.Client" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:sad="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:sad1="clr-namespace:System.Activities.Debugger;assembly=System.Activities" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:this="clr-namespace:TfsBuild;" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
2+
<x:Members>
3+
<x:Property Name="ConfigurationFolderPath" Type="InArgument(x:String)" />
4+
<x:Property Name="AgentSettings" Type="InArgument(mtbwa:AgentSettings)" />
5+
<x:Property Name="MSBuildArguments" Type="InArgument(x:String)" />
6+
<x:Property Name="MSBuildPlatform" Type="InArgument(mtbwa:ToolPlatform)" />
7+
<x:Property Name="DoNotDownloadBuildType" Type="InArgument(x:Boolean)" />
8+
<x:Property Name="LogFilePerProject" Type="InArgument(x:Boolean)" />
9+
<x:Property Name="SourcesSubdirectory" Type="InArgument(x:String)" />
10+
<x:Property Name="BinariesSubdirectory" Type="InArgument(x:String)" />
11+
<x:Property Name="TestResultsSubdirectory" Type="InArgument(x:String)" />
12+
<x:Property Name="RecursionType" Type="InArgument(mtvc:RecursionType)" />
13+
<x:Property Name="Verbosity" Type="InArgument(mtbw:BuildVerbosity)" />
14+
<x:Property Name="Metadata" Type="mtbw:ProcessParameterMetadataCollection" />
15+
<x:Property Name="SupportedReasons" Type="mtbc:BuildReason" />
16+
</x:Members>
17+
<this:Process.ConfigurationFolderPath>
18+
<InArgument x:TypeArguments="x:String" />
19+
</this:Process.ConfigurationFolderPath>
20+
<this:Process.AgentSettings>[New Microsoft.TeamFoundation.Build.Workflow.Activities.AgentSettings() With {.MaxWaitTime = New System.TimeSpan(4, 0, 0), .MaxExecutionTime = New System.TimeSpan(0, 0, 0), .TagComparison = Microsoft.TeamFoundation.Build.Workflow.Activities.TagComparison.MatchExactly }]</this:Process.AgentSettings>
21+
<this:Process.MSBuildArguments>
22+
<InArgument x:TypeArguments="x:String" />
23+
</this:Process.MSBuildArguments>
24+
<this:Process.MSBuildPlatform>[Microsoft.TeamFoundation.Build.Workflow.Activities.ToolPlatform.Auto]</this:Process.MSBuildPlatform>
25+
<this:Process.DoNotDownloadBuildType>[False]</this:Process.DoNotDownloadBuildType>
26+
<this:Process.LogFilePerProject>[False]</this:Process.LogFilePerProject>
27+
<this:Process.SourcesSubdirectory>
28+
<InArgument x:TypeArguments="x:String" />
29+
</this:Process.SourcesSubdirectory>
30+
<this:Process.BinariesSubdirectory>
31+
<InArgument x:TypeArguments="x:String" />
32+
</this:Process.BinariesSubdirectory>
33+
<this:Process.TestResultsSubdirectory>
34+
<InArgument x:TypeArguments="x:String" />
35+
</this:Process.TestResultsSubdirectory>
36+
<this:Process.RecursionType>[Microsoft.TeamFoundation.VersionControl.Client.RecursionType.OneLevel]</this:Process.RecursionType>
37+
<this:Process.Verbosity>[Microsoft.TeamFoundation.Build.Workflow.BuildVerbosity.Normal]</this:Process.Verbosity>
38+
<this:Process.Metadata>
39+
<mtbw:ProcessParameterMetadataCollection />
40+
</this:Process.Metadata>
41+
<this:Process.SupportedReasons>All</this:Process.SupportedReasons>
42+
<mva:VisualBasic.Settings>Assembly references and imported namespaces serialized as XML namespaces</mva:VisualBasic.Settings>
43+
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
44+
<Sequence.Variables>
45+
<Variable x:TypeArguments="mtbc:IBuildDetail" Name="BuildDetail" />
46+
</Sequence.Variables>
47+
<mtbwa:GetBuildDetail DisplayName="Get the Build" Result="[BuildDetail]" />
48+
<mtbwa:InvokeForReason DisplayName="Update Build Number for Triggered Builds" Reason="Triggered">
49+
<mtbwa:UpdateBuildNumber BuildNumberFormat="[&quot;$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)&quot;]" DisplayName="Update Build Number" />
50+
</mtbwa:InvokeForReason>
51+
<mtbwa:AgentScope DisplayName="Run On Agent" MaxExecutionTime="[AgentSettings.MaxExecutionTime]" MaxWaitTime="[AgentSettings.MaxWaitTime]" ReservationSpec="[AgentSettings.GetAgentReservationSpec()]">
52+
<mtbwa:AgentScope.Variables>
53+
<Variable x:TypeArguments="x:String" Name="buildDirectory" />
54+
</mtbwa:AgentScope.Variables>
55+
<mtbwa:GetBuildDirectory DisplayName="Get the Build Directory" Result="[buildDirectory]" />
56+
<If Condition="[Not String.IsNullOrEmpty(ConfigurationFolderPath)]" DisplayName="If Not String.IsNullOrEmpty(ConfigurationFolderPath)">
57+
<If.Then>
58+
<mtbwa:TfsBuild BinariesSubdirectory="[BinariesSubdirectory]" BuildDirectory="[buildDirectory]" CommandLineArguments="[MSBuildArguments]" ConfigurationFolderPath="[ConfigurationFolderPath]" DisplayName="Run TfsBuild for Configuration Folder" DoNotDownloadBuildType="[DoNotDownloadBuildType]" LogFilePerProject="[LogFilePerProject]" RecursionType="[RecursionType]" SourcesSubdirectory="[SourcesSubdirectory]" TestResultsSubdirectory="[TestResultsSubdirectory]" ToolPlatform="[MSBuildPlatform]" Verbosity="[Verbosity]" />
59+
</If.Then>
60+
</If>
61+
<If Condition="[BuildDetail.CompilationStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Unknown]" DisplayName="If CompilationStatus = Unknown">
62+
<If.Then>
63+
<mtbwa:SetBuildProperties CompilationStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Succeeded]" DisplayName="Set CompilationStatus to Succeeded" PropertiesToSet="CompilationStatus" />
64+
</If.Then>
65+
</If>
66+
<If Condition="[BuildDetail.TestStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Unknown]" DisplayName="If TestStatus = Unknown">
67+
<If.Then>
68+
<mtbwa:SetBuildProperties DisplayName="Set TestStatus to Succeeded" PropertiesToSet="TestStatus" TestStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Succeeded]" />
69+
</If.Then>
70+
</If>
71+
</mtbwa:AgentScope>
72+
<mtbwa:InvokeForReason Reason="CheckInShelveset">
73+
<mtbwa:CheckInGatedChanges DisplayName="Check In Gated Changes" />
74+
</mtbwa:InvokeForReason>
75+
</Sequence>
76+
</Activity>

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,14 @@
11
# DynamicTemplate
22
DynamicTemplate plugin for Open Live Writer
3+
4+
Originally written by Joe Cheng for Windows Live Writer, taken from http://wlwtemplate.codeplex.com/
5+
6+
To install, copy release to
7+
"<system_drive>:\Users\<username>\Local Settings\Application Data\OpenLiveWriter\app-<wlw_current_version>\plugins\"
8+
9+
or add string entry with path to release to registry
10+
HKEY_CURRENT_USER\SOFTWARE\OpenLiveWriter\PluginAssemblies
11+
12+
13+
Modified for Open Live Writer by Vlad, vlad@izne.com
14+

doc/web/index.htm

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
<html>
2+
3+
<head>
4+
<title>Dynamic Template plug-in for Windows Live Writer</title>
5+
<style type="text/css">
6+
body {
7+
font-family: Georgia;
8+
margin: 0;
9+
padding: 0;
10+
padding-bottom: 30px;
11+
}
12+
h1 {
13+
font-family: Arial, Helvetica, sans-serif;
14+
font-size: 16pt;
15+
}
16+
h3 {
17+
font-size: 16pt;
18+
color: #006699;
19+
}
20+
#header * {
21+
margin: 0;
22+
padding: 0;
23+
}
24+
#header {
25+
background-color: #006699;
26+
padding: 15px;
27+
margin-bottom: 30px;
28+
color: white;
29+
}
30+
@media screen {
31+
#header {
32+
padding-left: 100px;
33+
}
34+
#bodice {
35+
padding-left: 100px;
36+
width: 800px;
37+
}
38+
}
39+
#download {
40+
float: right;
41+
background-color: #CCFF99;
42+
padding: 15px;
43+
border: 1px solid #336600;
44+
margin-left: 5px;
45+
}
46+
#download a {
47+
font-weight: bold;
48+
}
49+
.infobox {
50+
padding: 1em;
51+
margin-left: 2em;
52+
margin-right: 2em;
53+
}
54+
.infobox a {
55+
font-weight: bold;
56+
}
57+
.warn {
58+
color: red;
59+
}
60+
.screencast {
61+
display: none;
62+
}
63+
</style>
64+
</head>
65+
66+
<body>
67+
68+
<div class="container">
69+
<div id="header">
70+
<h1>Dynamic Template Plugin for Windows Live Writer</h1>
71+
<p>by Joe Cheng
72+
<script type="text/javascript" language="javascript">
73+
var addr = "joecheng" + "." + "com";
74+
addr = "code@" + addr;
75+
document.write("&lt;");
76+
document.write(addr);
77+
document.write("&gt;");
78+
</script>
79+
</p>
80+
</div>
81+
<div id="bodice">
82+
<div id="download">
83+
<a href="http://www.codeplex.com/wlwtemplate/Release/ProjectReleases.aspx">
84+
Download Now</a><br>
85+
<span style="font-size: 0.8em">from CodePlex</span></div>
86+
<div class="main">
87+
<p><strong>Dynamic Template</strong> is a powerful plugin for Windows
88+
Live Writer. You can use templates to easily insert oft-used snippets
89+
of HTML or text.</p>
90+
<p>Or you can write templates that are powerful enough to be considered
91+
&quot;mini-plugins&quot; in their own right, while being radically simpler to
92+
write and distribute than traditional Windows Live Writer plugins.
93+
If you have ever written a PHP, JSP, or ASP page, you already have a
94+
good idea of how to write these kind of templates!</p>
95+
<h3>For example?</h3>
96+
<p><strong>Level 1 - Plain HTML:</strong> Let&#39;s start with the
97+
simplest possible scenario: you just want to insert the same snippet
98+
of HTML into your posts on a regular basis, and you don&#39;t want to
99+
have to leave Writer to do it. For this example, imagine you want to
100+
&quot;Powered by Windows Live Writer&quot; at the bottom of your posts.
101+
<a href="screencasts/level1.swf">Watch Example 1.</a> (All videos linked
102+
from this page are very short Flash movies, created using
103+
<a href="http://www.jingproject.com">Jing</a>.)</p>
104+
<p><strong>Level 2 - HTML + Code:</strong> OK, that&#39;s useful, but
105+
it&#39;s been <a href="http://www.codeplex.com/wlwTextTemplate">done
106+
before</a>. What sets my plugin apart is that dynamic templates can
107+
contain snippets of C# code, like an ASP page! For this next
108+
example, imagine you&#39;re an Engadget blogger, liveblogging the latest Steve Jobs keynote (like
109+
<a href="http://www.engadget.com/2007/06/11/steve-jobs-live-from-wwdc-2007/">
110+
this one</a>). Every second counts, and the time spent inserting the
111+
little timestamp is time wasted. Let&#39;s write a template to automate
112+
that. <a href="screencasts/level2.swf">Watch Example 2.</a></p>
113+
<p><strong>Level 3 - Using Selection:</strong> It&#39;s much easier to
114+
come up with useful scenarios once we introduce the ability to
115+
access what&#39;s currently selected in Windows Live Writer. Just use
116+
the built-in variable <tt>_selection</tt> in your template. This is
117+
incredibly useful for adding HTML formatting that isn&#39;t included
118+
with Windows Live Writer out of the box--for example, small caps.
119+
<a href="screencasts/level3.swf">Watch Example 3.</a> Or here&#39;s a
120+
cool idea: take whatever text you&#39;ve entered into Writer, and treat
121+
it as HTML. <a href="screencasts/level3a.swf">Watch Example 4</a>.</p>
122+
<p><strong>Level 4 - Taking Input:</strong> Alright, that&#39;s cool,
123+
but what really makes things interesting is when you start asking
124+
the user for information. How about a template for highlighting text
125+
in a color of the user&#39;s choice? <a href="screencasts/level4a.swf">
126+
Watch Example 5.</a></p>
127+
<p>As you can see in Example 5, to ask for user input you just need
128+
to fill out a row in the Template Variables grid. The <em>Variable
129+
Name</em> is the name you will use to reference the value in your
130+
template—it must be a valid C# identifier. The <em>Data Type</em>
131+
affects both the type of that variable (Integer will be an <tt>int</tt>,
132+
Boolean will be a <tt>bool</tt>, etc.) and the appearance of the
133+
input dialog. The <tt>Label</tt> is the &quot;friendly name&quot; that will be
134+
displayed to the user in the input dialog.</p>
135+
<h3>Basic Syntax</h3>
136+
<p>Templates are primarily composed of HTML. You can embed C#
137+
statements using <tt>&lt;%</tt> and <tt>%&gt;</tt>. You can output C# expressions using <tt>&lt;%=</tt>
138+
and <tt>%&gt;</tt>. For example:</p>
139+
<code>&lt;% string currentTime = DateTime.Now.ToString(&quot;HH:mm:ss&quot;); %&gt;<br>
140+
&lt;b&gt;&lt;%= currentTime.ToUpper() %&gt;&lt;/b&gt;</code>
141+
<p>Note that expressions are not terminated with a semicolon, as
142+
that would make them a statement. Conversely, statements must be
143+
terminated with semicolon. If you get a confusing compile error when
144+
you try to save your template (like &quot;CS1026: ) expected&quot;), check for
145+
this first.</p>
146+
<h3>Built-in Functions and Variables</h3>
147+
<p>In Example 4 above, a function called <tt>HtmlDecode</tt>
148+
is used. That’s one of several built-in functions available to templates.
149+
The complete list follows:</p>
150+
<ul>
151+
<li><tt>HtmlEncode(string)</tt> </li>
152+
<li><tt>HtmlAttributeEncode(string)</tt> </li>
153+
<li><tt>HtmlDecode(string)</tt> </li>
154+
<li><tt>UrlEncode(string)</tt> </li>
155+
<li><tt>UrlPathEncode(string)</tt> </li>
156+
<li><tt>UrlDecode(string)</tt></li>
157+
</ul>
158+
<p>These pass straight through to the
159+
<a href="http://msdn2.microsoft.com/en-us/library/system.web.httputility_methods.aspx">
160+
corresponding methods on HttpUtility</a>.</p>
161+
<p>There’s also one built-in string variable, <tt>_selection</tt>. If
162+
the user has anything selected when the template is inserted, the HTML
163+
of the selection will be assigned to this variable (requires Windows
164+
Live Writer Beta 2 or later).</p>
165+
<h3>Sharing Templates</h3>
166+
<p>Templates are stored as .wlwtemplate files, in your Application
167+
Data\WLWTemplates directory. You can e-mail these files to anyone
168+
who has the plugin installed—simply double-clicking the file will
169+
bring up a template installation prompt.</p>
170+
<p>You can see the same prompt yourself by clicking on any of the
171+
samples below.</p>
172+
<h3>Samples</h3>
173+
<p>If you have the plugin installed, clicking on a link below will
174+
install the template.</p>
175+
<p><a href="templates/Abbreviation.wlwtemplate">Abbreviation</a>:
176+
Creates an abbreviation that shows a definition on mouse hover.
177+
Example: <abbr title="Windows Live Writer" style="border-bottom: navy 1px dotted">WLW</abbr>
178+
<br>
179+
<a href="templates/HTMLize.wlwtemplate">HTMLize</a>: Takes selected
180+
text and HTML-decodes it (as seen in the
181+
<a href="screencasts/level3a.swf">Example 4 video</a>).<br>
182+
<a href="templates/Repeat.wlwtemplate">Repeat</a>: Repeats a string
183+
multiple times.<br>
184+
</p>
185+
</div>
186+
</div>
187+
</div>
188+
189+
</body>
190+
191+
</html>

doc/web/screencasts/level1.swf

2.46 MB
Binary file not shown.

doc/web/screencasts/level2.swf

5.15 MB
Binary file not shown.

doc/web/screencasts/level3.swf

2.42 MB
Binary file not shown.

doc/web/screencasts/level3a.swf

1.98 MB
Binary file not shown.

0 commit comments

Comments
 (0)