Apex Part 2 - Adding Commands to an MVVM Application

by Dave 15. May 2012 13:28

In Part 2 of my video tutorial series on using Apex I show you how you can add commands to an MVVM application. Commands let you rapidly add functionality to a ViewModel, whilst still maintaining separation from UI.

A CodeProject article to accompany this video will be published shortly.

Tags: , ,

Apex Part 1 - Getting Started with the Apex SDK

by Dave 23. April 2012 11:20

Create an MVVM application in minutes with the new Apex SDK!

The video below shows this in action, see what you think.

There is also an accompanying article that describes what's going on. As always, would love to hear feedback!

http://www.codeproject.com/Articles/371217/Apex-Part-1-Create-Your-First-MVVM-Application

Tags: , , ,

Come on MS - Improve MFC

by Dave 19. April 2012 14:47

Loads of developers still use MFC. OK - if you're writing a new project, MFC would not be a great choice. But what if you're maintaining a 1.5 million line MFC app? 

MFC support in Visual Studio has barely improved since VC++ 6.0 - in fact its got worse. Their cursory attempt to show an effort by adding support for the Ribbon Control with the MFC feature pack was not enough. Why can we still not properly use tab controls in the dialog editor?

Those who use MFC are probably supporting big enterprise applications - for a long time now we've been neglected. Please vote for more MFC support in Visual Studio Uservoice below:

http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2782934-improve-mfc

Will they listen? Chances are not - unless lots of people vote. But I'd really like to see some effort on this, it's a technology still used by many.

It would be interesting to see a survey of enterprise applications - and what they're written in. It'd be interesting to then compare this to how well MS support that platform. MS will put lots of efforts into what they think that developers should be using - but how well are they supporting their real customers who are creating real products?

Tags: ,

Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies.

by Dave 16. April 2012 13:40

Are you getting the error below when working with Silverlight projects?

Could not load file or assembly 'System.Windows, Version=2.0.5.0, 
Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or
one of its dependencies.

It's a bit of an odd one. The solution that works for me is to re-register System.Core and System.Windows in the GAC. Use the commands below.

32 Bit System

"C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\gacutil" /i "C:\Program Files\Microsoft Silverlight\4.1.10111.0\System.Core.dll"
"C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\gacutil" /i "C:\Program Files\Microsoft Silverlight\4.1.10111.0\System.Windows.dll"  

64 Bit System

"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\gacutil" /i "C:\Program Files\Microsoft Silverlight\4.1.10111.0\System.Core.dll"
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\gacutil" /i "C:\Program Files\Microsoft Silverlight\4.1.10111.0\System.Windows.dll"  

So far I am yet to understand why this happens - if anyone can shed any light please comment!

Tags: ,

Create Item Templates in Visual Studio

by Dave 13. April 2012 12:14

Part 3 of my series on extending Visual Studio is now available on the CodeProject:

http://www.codeproject.com/Articles/365680/Extending-Visual-Studio-Part-3-Item-Templates

In this article we look at how to create new Item Templates in Visual Studio.

Tags: , ,

Embedding a Console in a C# application

by Dave 28. February 2012 11:14

I have uploaded a new article on the CodeProject - embedding a Console in a C# Application. Here's a screenshot of the control in use:

As always, comments and suggestions are more than welcome - you can find the article here: http://www.codeproject.com/Articles/335909/Embedding-a-Console-in-a-C-Application

Tags: ,

Disabling Constraints with a Stored Procedure in Oracle

by Dave 24. February 2012 12:05

Sometimes you need to disable constraints on a Oracle Database. Why might this be? Well image the situation that you are exporting data into an intermediate schema, you only want to import data from a certain date range and due to this you have only a subset of the records. You need this subset for analysis but you don't care about referential integrity - in fact if it is on then constraints will be violated. How can we do this?

Here's a stored procedure that disables constraints for tables owned by 'UserName1' or 'UserName2':

CREATE OR REPLACE PROCEDURE extraction.sp_PrepExtractionDatabase 
AUTHID CURRENT_USER
IS 
    v_Statement VARCHAR(5000);
BEGIN  
    FOR const in (CURSOR c_Constraints IS
      SELECT constraint_name, table_name, owner
      FROM ALL_CONSTRAINTS
      WHERE owner IN ('UserName1', 'UserName2')) LOOP
      v_Statement := 'ALTER TABLE ' || const.owner 
|| '.' || const.table_name || ' DISABLE CONSTRAINT '
|| const.constraint_name;
      EXECUTE IMMEDIATE v_Statement;
    END LOOP;
END;
/

What's the key thing here? 'AUTHID CURRENT_USER'. Without this, running the query itself will work fine, but the stored procedure will find NOTHING in the ALL_CONSTRAINTS view. Run in the context of the current user and then the stored procedure will work fine.

Tags:

SharpGL 2.0

by Dave 22. February 2012 09:27

SharpGL 2.0 has been released - hit the codeplex site to get it: http://sharpgl.codeplex.com/

Some new features:

  • Full support for all OpenGL functions up to OpenGL 4.2
  • Full support for all commonly used OpenGL extensions
  • Support for WinForms applications
  • Support for WPF applications (without resorting to WinForms hosts)
  • A powerful scene graph including polygons, shaders, NURBs and more
  • Many sample applications as starting points for your own projects.
  • Visual Studio Extension with SharpGL project templates for WPF and WinForms.
And a few screenshots:
 
 The Radial Blur Sample

The New Project Types

WPF Support

Text Rendering

Tags:

Using imp or exp as a SYSDBA

by Dave 21. February 2012 13:06

One of the things that I regularly forget is the syntax for running imp or exp for Oracle and specifying a SYSDBA user. As a quick hint, here's the syntax:

imp '"sys/pass@TNS as sysdba"' FILE=file.exp

An easy thing to forget!

Tags:

SharpGL 2.0

by Dave 13. February 2012 09:59

SharpGL 2.0 will be released very shortly - in preparation I will be posting some pictures of some of the new samples, code snippets and more information. Watch this space!

Tags:

About Me

A Software Developer proficient in many languages and technologies, find out more by reading my Publications, checking out my Projects or viewing my Qualifictions.

I am also the secretary and co-founder of the charity Namaste - Children's Homes Nepal

Month List