Mount a drive in WinXP using Microsoft Freeware (yep, Free)

by sondlerd
AddThis Social Bookmark Button

14. July 2008 13:41

download the zip file and simply follow the instructions in the Readme.txt file in order to mount a drive using an ISO file without purchasing ISOBuster, Dameon or Alcohol.  This is a microsoft created windows app that is freely available but without support.  here is the link: http://download.microsoft.com/download/7/b/6/7b6abd84-7841-4978-96f5-bd58df02efa2/winxpvirtualcdcontrolpanel_21.exe  Make sure you save it in the %systemroot%\system32\drivers folder.

 Readme for Virtual CD-ROM Control Panel v2.0.1.1

THIS TOOL IS UNSUPPORT BY MICROSOFT PRODUCT SUPPORT SERVICES


System Requirements
===================
- Windows XP Home or Windows XP Professional

Installation instructions
=========================
1. Copy VCdRom.sys to your %systemroot%\system32\drivers folder.
2. Execute VCdControlTool.exe
3. Click "Driver control"
4. If the "Install Driver" button is available, click it. Navigate to the %systemroot%\system32\drivers folder, select VCdRom.sys, and click Open.
5. Click "Start"
6. Click OK
7. Click "Add Drive" to add a drive to the drive list. Ensure that the drive added is not a local drive. If it is, continue to click "Add Drive" until an unused drive letter is available.
8. Select an unused drive letter from the drive list and click "Mount".
9. Navigate to the image file, select it, and click "OK". UNC naming conventions should not be used, however mapped network drives should be OK.

You may now use the drive letter as if it were a local CD-ROM device. When you are finished you may unmount, stop, and remove the driver from memory using the driver control.

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Technorati Profile

by sondlerd
AddThis Social Bookmark Button

8. April 2008 12:43

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Launch of my new Website, www.Family-Christmas.com

by Admin
AddThis Social Bookmark Button

1. December 2007 20:56

I have recently launched my new website on November 15th 2007.  You can check it out at http://www.family-christmas.com/.  It is a FREE website that helps families and friends organize their gift exchange online.  This year, you don't have to pass around a stack of wish lists or worry about duplicate gifts, unwanted gifts, incorrect sizes, etc.

Each group member will have their own account. Wish lists for children can be administered by parents though the parent's account.  Group members have two lists, one private (the BuyList) and one that is seen by everybody else in the group (the WishList).  The idea is to have every member of the group create their own "WishList".  Then everybody browses the "WishLists" of other group members and when the appropriate gift is found, simply click on "Add to BuyList" next to the gift and nobody else can get that gift.  The gift is added to your private list of
gifts to get for others.  You simply print your "BuyList" and it makes holiday shopping easy and organized.  The cool thing is that the website keeps track of the availability of each gift without the gift owner knowing which gifts people are getting for them.  You can even create multiple groups, for example, you could have a family group and a friend group.  Additionally, you may create a subgroup. Subgroups may be a couple or a small family within a larger family group, such as "Mom and Dad" or "Tom, Carol & Baby Sue" within the "Smith Family" group.

There are three simple steps to get started:
1. Go to http://www.family-christmas.com/ and "Register" a new group. -you are now the group administrator.
2. Login and send your family and friends invitations to join your group.
3. Start adding gifts to your wish list

Check out this cool tutorial I put on YouTube, it describes the basic usage of the website.

 

 It is pretty cool, here are some screen shots:

 

 

 

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , ,

C# 2.0 | Projects

launch an OS associated application from C#

by sondlerd
AddThis Social Bookmark Button

12. September 2007 21:18

 

 Here is a snippet of code that will allow you to invoke the OS to launch the application associated with the OS file mapping.

this is C# 3.0 but mostly C#2.0 DLLs

using System.IO.FileInfo;
using System.IO.FileStream;

try

{

Diagram diagram = (Diagram)ListView.SelectedItem;

string tempFile = System.IO.Path.Combine(System.IO.Path.GetTempPath(), System.IO.Path.GetRandomFileName());

FileInfo fileInfo = new FileInfo(diagram.Filename);

tempFile += fileInfo.Extension;

FileStream fs = System.IO.File.Create(tempFile);

fs.Write(diagram.Diagram, 0, diagram.Diagram.Length); // diagram.Diagram here is a byte[] of the actually diagram object

fs.Close();

System.Diagnostics.
Process.Start(tempFile);

}

catch (System.ComponentModel.Win32Exception e)

{

//No application is associated with this file.

WorkbenchApplication.ShowMessageToUser("There is no application associated with this file extension.");

}

 

I did not write this code, a co worker, Marrio Matriccino found it and passed it onto me.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

General | C# 2.0 | C# | FileInfo | FileStream | File IO

ClickOnce Deployment Via Command Line with makecert

by sondlerd
AddThis Social Bookmark Button

11. September 2007 14:04

Basic steps for ClickOnce deployment via a network share (no .deploy files):

1.    Create the file structure: trunk3.0\Deployment\1.0.1.25\bin

2.    Copy all files from the build folder Debug\bin folder into the newly created trunk3.0\Deployment\1.0.1.25\bin

3.    Remember to copy the icon file into trunk3.0\Deployment\1.0.1.25\bin

4.    Remove all the junk in main and sub folders (.deploy, .vshost or .pdb)

5.    Delete the clientShell.application

6.    Open the visual studio command prompt to the root of the Deployment folder (cd C:\test\trunk3.0\Deployment\), change the version number to current version and run:

                 mage -New Application -ToFile 1.0.1.25\bin\ClientShell.manifest  -Version 1.0.1.25 -FromDirectory 1.0.1.25\bin\ -       TrustLevel FullTrust

7.    (Optional) If you do not have a pvk file and a Cert

             -make an x509 certificate and private key(using pa$$word as the password when prompted):     

                 makecert company_cert.cer -sv companyprikey.pvk -in CertBag   

             -make the Private Key Exchange (pvk) file for signing the application manifest:     

                  pvk2pfx.exe -pvk companyprikey.pvk -spc company_cert.cer -pfx companyPFX.pfx -po pa$$word

8.    Append the .deploy suffix onto all files except the manifest files (rememeber to change directories to the deploymen DIR cd C:\test\trunk3.0\Deployment\1.0.1.25\bin):

Change the file names to include the .deploy extension (must do this in sub folders also)
rename *.* *.*.deploy

Manifest file need to lose the .deploy extension:
rename *.manifest.deploy *.

9.    Sign the application manifest with your digital certificate (note: modapri.pfx must be in the   same dir or change it and specify below):

             mage -Sign 1.0.1.25\bin\ClientShell.manifest -CertFile companyPFX.pfx -Password pa$$word

10.  Generate the deployment manifest with a call to Mage.exe OR Update the existing Deployment Manifest (2nd and nth time for deployment) 

             For first time only: 

          mage -New Deployment -ToFile ClientShell.application -Name "ClientShell" -Version 1.0.1.25 -AppManifest 1.0.1.25\bin\ClientShell.manifest -providerUrl http://WebServerName/ApplicationName/ClientShell.application

     Update (For each updated deployment):

          mage -Update ClientShell.application -Version 1.0.1.25 -AppManifest 1.0.1.25\bin\ClientShell.manifest -Install true

11.  Sign the deployment manifest with your certificate:

         mage -Sign ClientShell.application -CertFile companyPFX.pfx -Password pa$$word

12.  Copy all of the files in the current directory—including the version folder and the \bin folder—to the deployment destination. This may be either a folder on a Web site or FTP site, a file share, or a CD.

 13. You are now ready to script the deployment into an MS Build script.

Be aware that if you create a certification on your server you can run into issues with your personal webserver due to expired certificates on your system.  I spent some amount of time finding the cause of this security issue.

Here is a screen shot of MageUI.exe
- you can pull it up via the Visual Studio command line with "mageui.exe"

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , , , ,

General | ClickOnce | makecert | msbuild | pvk2pfx | x509 certificate | mageui

Control Encapsilation in WPF - Image in a ListView

by sondlerd
AddThis Social Bookmark Button

30. August 2007 03:49

One really cool aspect of WPF is that controls can be encapsilated inside of other user controls.  For example you could have an image inside of a ComboBox.  I needed to place images inside of a ListView control.  It was pretty easy to implement but very difficult for me to actually figure out.

 I have a ListView that is bound to an generic list of objects, Products, in my example.  I would like to simply display the collums that are in the list.  In the first column I would like to display an image for the list item named "Active".  The data value of Active is a "Y" or "N" character.

I use the following ListView code to create the Listview shown below:

<ListView Name="productList">

  <ListView.View>

    <
GridView>

      <GridViewColumn Header="Active" CellTemplate="{StaticResource ActiveGraphic}" Width="50"/>

      <
GridViewColumn Header="Active" DisplayMemberBinding="{Binding Path=Active}"/>

      <GridViewColumn Header="Name" DisplayMemberBinding="{Binding Path=Name}" Width="100"/>

      <
GridViewColumn Header="ChainOfCustody" DisplayMemberBinding="{Binding Path=ChainOfCustody}" Width="225"/>

      <GridViewColumn Header="Created User Name" DisplayMemberBinding="{Binding Path=CreatedUser.UserName}" Width="125"/>

      </GridView>

  </ListView.View>

</ListView>

To create the Products Header, I used a Label inside of a StackPanel and used margins and the gradient brush.  I simply stuck it right on top of the ListView. Here is an image of the ListView from the code above:

Now, I want to display an image instead of that Y or N for Active.  Here is the solution I found:

Under the Resources section on the top of the control (mine just happens to be "UserControl") I created a DataTemplate called Active Graphic. This DataTemplate holds one object, a control wrapped in a StackPanel.  The control is simply an image that is specified in a ControlTemplate (see below).  The DataTemplate also uses a DataTrigger to evaluate which image should be displayed depending upon the value of Active.  The DataTrigger on this data template adjusts the depenency property Template on the control, simply changing which graphic to display depending upon the value in the DataTrigger.  When data is bound to the control, it does this for all of the items in the list.

 <UserControl.Resources>

  <DataTemplate x:Key="ActiveGraphic">

    <
StackPanel>

     <Control x:Name="icon" Template="{StaticResource addImage}" />

    </
StackPanel>

       <DataTemplate.Triggers>

          <
DataTrigger Binding="{Binding Path=Active}" Value="Y" >

          <Setter TargetName="icon" Property="Template" Value="{StaticResource addImage}"/>

      </
DataTrigger>

      <DataTrigger Binding="{Binding Path=Active}" Value="N" >

        <
Setter TargetName="icon" Property="Template" Value="{StaticResource deleteImage}" />

      </DataTrigger>

   </
DataTemplate.Triggers>

  </DataTemplate>

</
UserControl.Resources>

 The Setter specifies a TargetName (icon) and Property to set based upon value "Value".  The value property is linked to my control resources file in my WPF application via the {"StaticResource addImage"} binding.  Below is the code from that file, a simple control template that displays and image, specifying the "addImage" name or x:Key property of the control template.

<ControlTemplate x:Key="addImage"> <Image Source="Images/add.png" Width="17" Height="16" />

</ControlTemplate>

<ControlTemplate x:Key="deleteImage"> <Image Source="Images/delete.png" Width="17" Height="16" />

</ControlTemplate>

Now back in the ListView's GridView.View section.  I removed the simply Active GridViewCollumn and replaced it with this, one that uses the DataTemplate defined above with the CellTemplete property:

 

<GridViewColumn Header="Active" CellTemplate="{StaticResource ActiveGraphic}" Width="50"/>

Here is the updated Grid (I left the Active Flag in there so that I could verify the DataTrigger is working properly):

 

thanks to Corneliu's post here:  http://www.acorns.com.au/2007/6/25/Learning+WPF+Using+Convertors.aspx

Per Marin's reply from below...

The implementation:

In the code above, modify the control in the DataTemplate to include code to point the event "MouseEnter" to the event handler code that you write on the backend.  It will handle the deletion of the row in the ListView and then in the database...

  <DataTemplate x:Key="ActiveGraphic">

    <StackPanel>

     <Control x:Name="icon" Template="{StaticResource addImage}" MouseEnter="DeleteIcon_Click" />

    </StackPanel>      


then in your code behind you would have a method named

public void DeleteIcon_Click(object sender, MouseEventArgs e)
{
    // first check to make sure the mouse event was the left button
    if (e.LeftButton != MouseButtonState.Pressed)
                return;
    // remove the item from the list
    ((List<ItemType>)ListView.ItemsSource).Remove( ((ItemType)(FrameWorkElement)(sender)).DataContext);
    // update datastore with the change
    UpdateItemType();
  

 

Currently rated 3.7 by 3 people

  • Currently 3.666667/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

WPF

Bug in WPF ListView (Single Selection Mode)

by sondlerd
AddThis Social Bookmark Button

26. August 2007 12:04

I have found that there are some strange happenings with the ListView in WPF (as of 8/2007).  There seem to be some internal bugs dealing with internal selection properties.  I have the ListView selection mode set to single (SelectionMode="Single") and I although I cannot select more than one item using control or shift, when I return from an edit the ListView selects multiple items.

See how the SelectedItems has a count of 2 and SelectionMode is single:

 

 When the code returns to the application, it then proceeds to select multiple items:

This is a strange issue, obviously a ListView bug.

 Here is my work around, found by colleage Tom Sprows.  Simply set the selected item to multiple, clear the selected items, do the operation and set the selection mode back to single.

When the row is selected and a method that will perform some operation upon the selected item.  You must do the following:

1. Get the selected item from the ListView and set it to a local variable.
Product selectedProduct = listView.SelectedItem as Product;

2.  Set the Selection Mode to multiple
listView.SelectionMode = SelectionMode.Multiple;

3. Clear the selectedItems using the object.SelectedItems.Clear()
listView.SelectedItems.Clear();

4. Perform whatever operation you are going to perform on the selected item and when it returns, set the Datalist.SelectedItem back to the originally selected item.
PerformOperation(selectedProduct);
listView.SelectedItem = selectedProduct;

5. Set the Selection mode back to single
listView.SelectionMode = SelectionMode.Single;

 

 

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Powered by BlogEngine.NET 1.1.0.7
Theme by Mads Kristensen

Robert D. Sondles

Name of author Robert Sondles
is an independent software engineer operating under his company named Blueberry Island Media ltd. He started the company in 2003 and has been developing softare with .Net since 2002. He is located in Philadelphia, PA..

E-mail me Send mail

Calendar

<<  August 2008  >>
MoTuWeThFrSaSu
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567

View posts in large calendar

Recent comments

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

Sign in