Archive for October, 2008

Comments 1 Comment »

Ik heb de afgelopen 2 dagen aan een klein tooltje gewerkt om wat tekortkomingen van de normale SendTo Email Recipient weg te werken.

De reden dat de titel begint met Outlook is dat het alleen met de volledige Outlook werkt, en dan heb ik het nog niet (NOG NIET! Dat komt nog) met een versie < Office 12 (Office 2007) heb getest.

Als je de installatie uitvoert nestelt het zich in de Send To map (Kopiëren naar in een Nederlandse Windows).

En dan kan je dat gewoon op een map doen, en hij zal alle bestanden in die map kopieren naar een nieuwe mail (recursive, dus gij opent alle onderliggende mappen, en daar in ook weer alle onderliggende mappen…).

Ook maakt hij gewoon een HTML emailtje aan, ipv een stom tekst emailtje.

Ook vraagt hij niet om foto’s te verkleinen, want met het huidig internet is dat echt niet nodig.

Hieronder vind je de code (meer is het niet, buiten wat resources), het project vind je hier (rar), en de gecompileerde installer vind je hier:

using System;
using System.Collections.Generic;
using System.IO;
using Outlook = Microsoft.Office.Interop.Outlook;

namespace OutlookSendToExtended
{
	///

	/// This class creates the mail, adds the files,
	/// and provides a function to display the emailwindow
	///
	/// Main method defined below
	/// 

	class OutlookSendToExtendedMain
	{
		#region Private vars

		///

		/// Holder for the Application entity
		/// 

		private Outlook.Application outlook;

		///

		/// Holder for the mail entity
		/// 

		private Outlook.MailItem mailItem;

		#endregion

		#region Constructor(s)

		///

		/// Constructor
		/// 

		///
array of files/folders
		public OutlookSendToExtendedMain(string[] args)
		{
			//create a new application
			this.outlook = new Outlook.Application();

			//create new emailitem
			this.mailItem = (Outlook.MailItem)outlook.CreateItem(Outlook.OlItemType.olMailItem);

			//loop over the fixed args
			foreach (string fixedArg in this.FixArgs(args))
			{
				//add the attachment
				mailItem.Attachments.Add(fixedArg, Outlook.OlAttachmentType.olOLE, 1, fixedArg);
			}

			//to be implemented
			//mailItem.SendUsingAccount
		}

		#endregion

		#region Methods

		///

		/// Enumerates over the args, expanding the folders in it
		/// 

		///
array of files/folders
		/// array of files
		private string[] FixArgs(string[] args)
		{
			List fixedArgs = new List();

			//loop
			foreach (string arg in args)
			{
				//if it is a directory
				if (Directory.Exists(arg))
				{
					try
					{
						//join the dirs and files
						List listOfAll = new List();

						listOfAll.AddRange(Directory.GetFiles(arg));
						listOfAll.AddRange(Directory.GetDirectories(arg));

						//recursive call
						fixedArgs.AddRange(this.FixArgs(listOfAll.ToArray()));
					}
					catch (Exception)
					{
						//to much exceptions to catch, catch the base.
						//what can we do? maybe talk to user.
						//thinking about this
					}
				}
				else
				{
					//it is a file, add it
					fixedArgs.Add(arg);
				}
			}

			//return the array
			return fixedArgs.ToArray();
		}

		public void DisplayEmail()
		{
			//display the email
			this.mailItem.Display(false);
		}

		#endregion

		#region Static methods

		///

		/// Entrypoint
		/// 

		///
array of files/folders to be attached
		static void Main(string[] args)
		{
			if (args.Length != 0)
				(new OutlookSendToExtendedMain(args)).DisplayEmail();

			return;
		}

		#endregion
	}
}

Even een toelichting bij de Setup: er is een PostBuildEvent gedefinieerd, die wat doet met WiRunSQL.vbs (tooltje om de database van een MSI aan te passen).

Hij voegt DISABLEADVTSHORTCUTS toe met value 1 in de Property tabel.

Waarom? Omdat ik een shortcut maak in de SendTo folder, en aangezien Advertised Shortcuts daar niet werken, moeten we dit afzetten. Dit is de enige manier hiervoor, Visual Studio bied hier geen interface voor aan.

Meer info over Advertised shortcuts vind je hier.

Commentaar? Betere manieren? Laat het me weten bij de comments :)

Comments No Comments »

RaProducts heeft een zeer interessant programma: JavaRa, voor het eenvoudig updaten van Java, en daarbij oudere versies verwijderen, aangezien de installer dit niet vanzelf doet :) .

Kijk uit bij de installatie van de JRE, want die wilt standaard OpenOffice installer op je systeem kopieren.

Comments 2 Comments »

Als je een project maakt, en je wilt een kleinere database hebben in de plaats van een MSSQL database (mdf) kan je altijd overwegen een sdf (Compact edition).

Helaas kan je niet standaard LINQ to SQL klassen gebruiken dan (dbml).

Daarvoor kan je wel dit tooltje gebruiken, en de klassen genereren.
linq to sql

Hier volgt wat je in de verschillende textboxen moet invullen, kan je even gemakkelijk copy/pasten.

Title: Make &Linq classes for Database
Command: %vsspv_windows_sdk_dir%\bin\SqlMetal.exe
Arguments: $(ItemPath) /dbml:DataClasses$(ItemFileName).dbml /pluralize /context:DataContext$(ItemFileName)
InitialDirectory: $(ItemDir)

Dan ga je in je project op een .sdf staan, doe je tools > beneden ‘Make Linq classes for Database’, en dan doe je rechtermuisknop op je project > add extisting item > (alle files laten weergeven) > dubbelklik op de dbml.

That’s it, nu kan je eender waar in je project dit doen:

DataContextFuel dataContextFuel = new DataContextFuel(DataLayer.Properties.Settings.Default.FuelConnectionString);

Natuurlijk wel aanpassen voor jouw context he :)

Comments 2 Comments »

And shepherds we shall be, for thee my Lord for thee, power hath descended forth from thy hand, that our feet may swiftly carry out thy command. We shall flow a river forth to thee, and teeming with souls shall it ever be. In nomine Patris, et Filii, et Spiritus Sancti.

headless horseman worksheets

letters requesting endorsements

multiplication printable worksheets

form letters template

hope center for youth texas

mass ufo sightings

letter holder decorative

sample acceptance job letter

examples of written warning letters

ufo news sceptical enquierer

words used for letters of alphabet

old missing goverment plane ufo

mission statement worksheet

four seasons maui day of hope

astronaught aliens

memorial letter sent after death

scooby doo worksheets for children

payson utah ufo wierd happenings

reading worksheets grade 1

stop forclosure hardship letter

fraction worksheets grade5

berkley wellness letter

fasfa worksheets

beginning worksheets for high school readers

language arts worksheet

without hope

ertes letter a print

beef o brady's hope mills nc

letter g sign

vowel print letter practice sheets

letter de scrambler

sample letter to credit reporting agencies

hope cestrone

fables arnold lobel worksheet

ghetto bubble letters

hope dream wish

paranoid personality disorder hopes

annual lease value worksheet

fourth of july independence day worksheets

physics themed movies worksheet

ufo contact from pleiades

alphabet soup wall letters

legal resident aliens

scale drawings worksheets furniture

dressage movements ten letters

cognitive behavioral depression worksheet

funny letter from boy scout

city of hope uae

september hope

ufo clode encounters diamond

phoenics printables

atom printable

printable brackets 2009 basketball

stand-ins printable

printable marriage certificates

free printable travel games for kids

printable english garden

free printable coupons for cesar canine

reading printables for halloween

printable divine office bookmarks

printable applebees coupon

printable english skill sheets

printable taget

printable map pacific islands

star printable

geoboard printable

printable volleyball line up sheets

free printable coloring pages sport

printable diego button

free printable online maths crossword puzzles

printable humorous fiction stories eighth grade

printable blank bracket forms

new years printable

printable novelitys

printable computer monitor calendars

thomas printable

asia printables

printable gothic stationary

printable summer memory game

digital audio cd-r injet printable hub

free printable last will and testament

clip art printable business check

printable timeline

printable millimeter scales

free printable christmas letterheads

free printable quizes

caterpillar printables

tornado photos printable

printable question mark sign

estimation printables

printable offer

printable pet vaccine record

earthweek printable

printable frame

tj maxx printable coupon

free printable dollhouse miniatures

autozone printable

kenken printable

third grade printable worksheets

printable daytime sequencing worksheet

printable callanders

printable elevation maps

winnie the pooh printables page

picasso printable

anime printable

barn printables

printable calenda

hpc mmal card printable version

olympia sports store printable coupons

printables money for kids

printable teen devotional

kinder printable

kids math problems printables

punctuation printables

free printable worksheets for books

employment printables

printable ohio state buckeye logo

free printable activities about chi

printable coloring pages of fish

free printable colorful calenders

printable julian date calendar

printable walmart application

printable country songs

printable cardboard

printable picture of car racing flags

printable story groundhogs day

free printable dragon pictures to color

proctor gamble printable coupons

printable frames for scrapbooking

target 10 off printable in-store coupon

free printable first then

free printable 5-day planner

soup and hand printable coupon

printable facts mardi gras

printable radiation signs

printable map pikeville ky

chinese new year printables for kids

printable manuscript writing sheets for abcs

printable coupon for atkins morning bar

printable pattern of a rose

a printable redneck diploma

kindgergarten printables

naming objects printables

printable alphabet dot to dot

printable tanglewords

lowes printable coupon wow

printable coloring mandalas pages

printable picture of niagara falls

starbucks frappuccino 4 pk printable coupon

printable soduku

michael jacksons printable photos

domino printables

printable ant activities

conservation printables

kohler printable coupons

printables art

printable ncaa

brown bear brown bear printables

pharmacy coupons retail printable

disney printable pumpkin patterns

printable cooking border writing paper

printable invitations

printable t-shirt

printable fruit

printable fantasy football draft sheet

printable ab workout

nebraska printables

free printable graduation cards

printable advanced english grammar exercises

printable list sms and text lingo

printable good manners pictures for kids

bible character word search printable

printable address albels

printable golf gift certificate template

print custom printable coupons

free printable pre-algebra worksheets

printable label

printable coloring pages of water

religious easter printables for kids

printable preschool biting activities

printable piano worksheets

printable do not enter signs

printable coupons gander mountain

printable superbowl square pool grids

jonathan mccoy n-word printable

party city printable coupon april

printable notepaper

fchristian printables

free printable business card templates

taco johns printable coupons

colorwheel printables

hidden picture printables

printable layouts

printable travel checklist

printable coloring pages of spongebob

printable brain

ups printable logo

printable camo

printable sign in sheet

pentominoes printables