Skip to content

Commit 13e64c9

Browse files
author
Saveen Reddy
committed
Added sample code
1 parent aa0558e commit 13e64c9

File tree

2 files changed

+227
-0
lines changed

2 files changed

+227
-0
lines changed

.gitignore

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
#################
2+
## Eclipse
3+
#################
4+
5+
*.pydevproject
6+
.project
7+
.metadata
8+
bin/
9+
tmp/
10+
*.tmp
11+
*.bak
12+
*.swp
13+
*~.nib
14+
local.properties
15+
.classpath
16+
.settings/
17+
.loadpath
18+
19+
# External tool builders
20+
.externalToolBuilders/
21+
22+
# Locally stored "Eclipse launch configurations"
23+
*.launch
24+
25+
# CDT-specific
26+
.cproject
27+
28+
# PDT-specific
29+
.buildpath
30+
31+
32+
#################
33+
## Visual Studio
34+
#################
35+
36+
## Ignore Visual Studio temporary files, build results, and
37+
## files generated by popular Visual Studio add-ons.
38+
39+
# User-specific files
40+
*.suo
41+
*.user
42+
*.sln.docstates
43+
*.tss
44+
*.nupkg
45+
46+
47+
# Build results
48+
[Dd]ebug/
49+
[Rr]elease/
50+
*_i.c
51+
*_p.c
52+
*.ilk
53+
*.meta
54+
*.obj
55+
*.pch
56+
*.pdb
57+
*.pgc
58+
*.pgd
59+
*.rsp
60+
*.sbr
61+
*.tlb
62+
*.tli
63+
*.tlh
64+
*.tmp
65+
*.vspscc
66+
.builds
67+
*.dotCover
68+
69+
## TODO: If you have NuGet Package Restore enabled, uncomment this
70+
packages/
71+
src/packages/Microsoft
72+
73+
74+
# Visual C++ cache files
75+
ipch/
76+
*.aps
77+
*.ncb
78+
*.opensdf
79+
*.sdf
80+
81+
# Visual Studio profiler
82+
*.psess
83+
*.vsp
84+
85+
# ReSharper is a .NET coding add-in
86+
_ReSharper*
87+
88+
# Installshield output folder
89+
[Ee]xpress
90+
91+
# DocProject is a documentation generator add-in
92+
DocProject/buildhelp/
93+
DocProject/Help/*.HxT
94+
DocProject/Help/*.HxC
95+
DocProject/Help/*.hhc
96+
DocProject/Help/*.hhk
97+
DocProject/Help/*.hhp
98+
DocProject/Help/Html2
99+
DocProject/Help/html
100+
101+
# Click-Once directory
102+
publish
103+
104+
# Others
105+
[Bb]in
106+
[Oo]bj
107+
sql
108+
TestResults
109+
*.Cache
110+
ClientBin
111+
stylecop.*
112+
~$*
113+
*.dbmdl
114+
Generated_Code #added for RIA/Silverlight projects
115+
116+
# Backup & report files from converting an old project file to a newer
117+
# Visual Studio version. Backup files are not needed, because we have git ;-)
118+
_UpgradeReport_Files/
119+
Backup*/
120+
UpgradeLog*.XML
121+
122+
123+
124+
############
125+
## Windows
126+
############
127+
128+
# Windows image file caches
129+
Thumbs.db
130+
131+
# Folder config file
132+
Desktop.ini
133+
134+
135+
#############
136+
## Python
137+
#############
138+
139+
*.py[co]
140+
141+
# Packages
142+
*.egg
143+
*.egg-info
144+
dist
145+
build
146+
eggs
147+
parts
148+
bin
149+
var
150+
sdist
151+
develop-eggs
152+
.installed.cfg
153+
154+
# Installer logs
155+
pip-log.txt
156+
157+
# Unit test / coverage reports
158+
.coverage
159+
.tox
160+
161+
#Translations
162+
*.mo
163+
164+
#Mr Developer
165+
.mr.developer.cfg
166+
167+
# Mac crap
168+
.DS_Store
169+
170+
!*.targets

Scripts/RTM_Countdown.ps1

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
Import-Module Visio
2+
New-VisioApplication
3+
$doc = New-VisioDocument
4+
5+
$basic_u = Open-VisioDocument basic_u.vss
6+
$master = Get-VisioMaster "Rectangle" $basic_u
7+
8+
$font = $doc.Fonts["Segoe UI"]
9+
$fontid = $font.ID
10+
11+
# This is a demo, so get some dates relative to the current date
12+
$date_today = Get-Date
13+
$date_today = $date_today.Date
14+
$lower_date = $date_today.AddDays(-3)
15+
$upper_date = $date_today.AddDays(4)
16+
$date_rtm = $date_today#.AddDays(2)
17+
18+
$width = 1.0
19+
$height = 1.0
20+
21+
# Perform the rendering
22+
$cur_date = $lower_date
23+
$n=0
24+
$y=4
25+
26+
$color_normal = "rgb(255,255,255)"
27+
$color_highlight = "rgb(255,0,0)"
28+
$color_target = "rgb(200,200,200)"
29+
30+
while ($cur_date -le $upper_date)
31+
{
32+
$x = ($n*$width) + (1.0 + ($width/2.0))
33+
$shape = New-VisioShape $master $x,$y
34+
$props = @{ "Width"=$width; "Height"= $height ; "Fillforegnd" = $color_normal ; "CharFont"=$fontid ; "CharSize" = "14pt"}
35+
$text = Get-Date $cur_date -format "M/d"
36+
37+
38+
if ($cur_date -eq $date_rtm)
39+
{
40+
$props["Fillforegnd"] = $color_target
41+
$text = $text + "`nRTM"
42+
}
43+
44+
if ($cur_date -eq $date_today)
45+
{
46+
$props["Fillforegnd"] = $color_highlight
47+
$text = $text + "`nTODAY"
48+
}
49+
50+
Set-VisioShapeCell $props
51+
52+
Set-VisioShapeText $text
53+
Write-Host $cur_date
54+
$n = $n +1
55+
$cur_date = $cur_date.AddDays(1)
56+
57+
}

0 commit comments

Comments
 (0)