New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of ui
XML
<Target Name="UpdateWebConfig">
   <XmlUpdate XmlFileName="$(PackageDir)\$(WebApplicationName)\web.config"
              XPath="//*/compilation/@debug"
              Value="false"/>
 </Target>
 
by Petter Wigle   Yesterday @ 1:32am
8 Views
no comments
 
C#
using System;
using System.Runtime.InteropServices;
using System.Security;
 
public static class GuidUtil
{
   [SuppressUnmanagedCodeSecurity]
   [DllImport("rpcrt4.dll", SetLastError = true)]
   private static extern int UuidCreateSequential(out Guid value);
by kzu   August 01, 2010 @ 7:25pm
Tags: Guid, C#
129 Views
no comments
 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Html Template</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 
    <style type="text/css">
        .primary { background-color: green; }
        .secondary { background-color: blue; }
by jwwishart   June 16, 2010 @ 4:02pm
80 Views
no comments
 
C#
/// <summary>
/// Holds up the test execution for the given duration without blocking the UI thread.
/// </summary>
void UIPause(int sec)
{
    Storyboard PauseSB = new Storyboard() { Duration = new Duration(new TimeSpan(0, 0, sec)) };
    PauseSB.Completed += (sender, e) => { TestComplete(); };
    PauseSB.Begin();
}
91 Views
no comments
 
C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Collections.Specialized;
 
namespace WebControls
{
    /// <summary>
by Arjan   May 12, 2010 @ 4:34am
45 Views
no comments
 
XML
<PropertyGroup>
    <SolutionRootDir>$(MSBuildProjectDirectory)\..</SolutionRootDir>
    <ApplicationName>MyApp</ApplicationName>
    <WebApplicationName>$(ApplicationName).Web</WebApplicationName>
    <MSBuildCommunityTasksPath>$(SolutionRootDir)\BuildScripts\MSBuildCommunityTasks</MSBuildCommunityTasksPath>
    <WebProject>$(SolutionRootDir)\$(WebApplicationName)\$(WebApplicationName).csproj</WebProject>
    <PackageDir>$(SolutionRootDir)\Package</PackageDir>
    <Configuration>Release</Configuration>
  </PropertyGroup>
by Petter Wigle   May 09, 2010 @ 3:25am
60 Views
no comments
 
XML
<PropertyGroup>
    <SolutionRootDir>$(MSBuildProjectDirectory)\..</SolutionRootDir>
    <ApplicationName>MyApp</ApplicationName>
   <Version>0.0.1.0</Version>
    <Company>Active Solution AB</Company>
    <Copyright>Copyright © Active Solution AB 2010</Copyright>
</PropertyGroup>
<PropertyGroup Condition="'$(BUILD_NUMBER)' != ''">
    <Version>$(BUILD_NUMBER)</Version>
</PropertyGroup>
by Petter Wigle   May 09, 2010 @ 3:13am
128 Views
1 comments
 
C#
namespace Nowcom.Quicksilver.Patterns
{
    using System;
 
    public class Strategy<T,V>
    {
        public Predicate<T> Condition { get; private set; }
        public Func<T, V> Result { get; private set; }
 
        public Strategy(Predicate<T> condition, Func<T, V> result)
by Robert Kozak   April 21, 2010 @ 12:33pm
211 Views
no comments
 
C#
namespace Nowcom.Quicksilver
{
  public interface IMessage
  {
  }
}
 
namespace Nowcom.Quicksilver
{
    using System.ComponentModel.Composition;
196 Views
no comments
 
C#
/// <summary>
/// Return all properties from a type up to a specified base type in the inheritance hierarchy
/// </summary>
/// <param name="type">Type that will be examined</param>
/// <param name="baseType">Where to stop in the inheritance hierarchy. Must be a type that first parameter inherits from
/// </param>
/// <returns>A list of all found properties</returns>
public static List<PropertyInfo> GetAllProperties(Type type, Type baseType)
{
   List<PropertyInfo> properties = new List<PropertyInfo>();
143 Views
no comments
 
C#
<div id="toolbar-pane">
    <% 
        Toolbar
            .Create()
            .SetCorners(Corners.CornersType.top)
            .AddSet()
                .AddIconButton("btnOpen", "Open", "folder-open")
                .AddIconButton("btnSave", "Save", "disk")
                .AddIconButton("btnDelete", "Delete", "trash")
            .EndSet()
by andreabalducci   February 24, 2010 @ 2:22am
96 Views
no comments
 
XML
  <Target Name="AfterMerge">
  <ItemGroup>
    <JsFiles Include="$(TempBuildDir)\Scripts\infinitecarousel.js;$(TempBuildDir)\Scripts\jquery.autocomplete.js;$(TempBuildDir)\Scripts\core.js"/>
    <CssFiles Include="$(TempBuildDir)\Content\reset.css;$(TempBuildDir)\Content\infinitecarousel.css;$(TempBuildDir)\Content\Site.css" />
  </ItemGroup>
    
  <ReadLinesFromFile File="%(JsFiles.Identity)">
    <Output TaskParameter="Lines" 
            ItemName="jsLines"/>
  </ReadLinesFromFile>
by ArranM   February 16, 2010 @ 2:25pm
570 Views
no comments
 
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="jQueryBlockUi._Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> 
    <script type="text/javascript" src="http://malsup.com/jquery/block/jquery.blockUI.js?v2.28"></script>
</head>
<body>
by Elijah Manor   December 09, 2009 @ 10:48am
462 Views
no comments
 
Imports System.Text.RegularExpressions
 
Module Module1
 
    'http://learn.open.ac.uk/mod/oublog/viewpost.php?post=23031
    'www.ForkandBeard.co.uk
 
    Sub Main()
        Dim strUserNumbers As String()
        strUserNumbers = New String() { _
by Mitchell William Cooper   November 26, 2009 @ 5:28am
139 Views
no comments
 
Imports System.Text.RegularExpressions
 
Module Module1
 
    Sub Main()
        Dim strUserNumbers As String()
        strUserNumbers = New String() { _
              "H0W_BOvThemy84kies" _
              , "01543 MWC66" _
              , "8" _
by Mitchell William Cooper   November 26, 2009 @ 5:27am
111 Views
no comments
 
XML
<Import Project="$(MSBuildExtensionsPath32)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
<ItemGroup>
  <SourceFiles
    Include="$(SolutionDir)**/*.*"
    Exclude="$(SolutionDir)Package/**/*.*;$(SolutionDir)**/bin/**/*.*;$(SolutionDir)**/obj/**/*.*;$(SolutionDir)**/internal.proj;$(SolutionDir)**/*.*scc;$(SolutionDir)$(SolutionName).zip">
    <Visible>False</Visible>
  </SourceFiles>
</ItemGroup>
<Target Name="AfterBuild" Condition="'$(Configuration)'=='Release'" 
        Inputs="@(SourceFiles)" Outputs="$(SolutionDir)$(SolutionName).zip">
by Jim Lamb   November 03, 2009 @ 11:34am
Tags: MSBuild
121 Views
no comments
 
C#
using Microsoft.TeamFoundation.Build.Client;
 
// enumerate the build controllers and agents for the specified project collection
var tfs = TeamFoundationServerFactory.GetServer("http://tfserver:8080/tfs/DefaultCollection");
IBuildServer buildServer = (IBuildServer)tfs.GetService(typeof(IBuildServer));
 
var buildControllers = (IEnumerable<IBuildController>)buildServer.QueryBuildControllers(true);
 
foreach (IBuildController controller in buildControllers)
{
by Jim Lamb   October 29, 2009 @ 7:49pm
66 Views
no comments
 
C#
using Microsoft.TeamFoundation.Client;
using Microsoft.TeamFoundation.Build.Client;
 
namespace Microsoft.TeamFoundation.Sample
{
    class Program
    {
        static void Main(string[] args)
        {
            // replace this string with the URI to your team project collection
by Jim Lamb   October 28, 2009 @ 1:39pm
66 Views
no comments
 
C#
using System;
using System.Runtime.InteropServices;
 
 
/// <summary>
/// Class that encapsulates the Win32 function CLSIDFromString.  Idea taken from
/// http://stackoverflow.com/questions/104850/c-test-if-string-is-a-guid-without-throwing-exceptions/287877#287877
/// </summary>
public static class GuidHelper
{
by Jon Sagara   September 22, 2009 @ 9:46pm
Tags: Guid, TryParse, C#, .NET
127 Views
no comments
 
msbuild /p:Configuration=release
msbuild /p:Configuration=debug
msbuild 
 
msbuild <Solution>.sln /target:Clean
by Josh   September 15, 2009 @ 9:12am
Tags: msbuild, build
81 Views
no comments
 
properties { 
  
  # ****************  CONFIGURE **************** 
    $solution_name =         "Framework"
    $test_library =         "$solution_name.Test.dll"
  
    $libraries_to_merge =     "antlr3.runtime.dll", `
                    "ajaxcontroltoolkit.dll", `
                    "Castle.DynamicProxy2.dll", `
                    "Castle.Core.dll", `
by David R. Longnecker   September 08, 2009 @ 11:12am
301 Views
no comments
 
C#
private void RedirectToNextView(string previousView, ViewSettings viewSettings)
        {
            try
            {
                if( previousView == null )
                    // Fix HttpContext.Current.Request.ApplicationPath because doesn't work well whe application is in root directory
                    // when application is under root ApplicationPath returns "/"
                    // when application is under sub foder ApplicationPath returns "/sub folder"
                    // so remove end "/"
                    // see  http://weblogs.asp.net/dneimke/archive/2004/05/17/133116.aspx
by Fernando Claverino   August 08, 2009 @ 7:01pm
Tags: c#, uip block
170 Views
no comments
 
C#
  /// <summary>
  /// Generates a unique Id as string
  /// </summary>
  /// <returns></returns>
  public static string GenerateUniqueId()
  {
      byte[] bytes = Guid.NewGuid().ToByteArray();
      return StringUtils.Base36Encode(BitConverter.ToInt64(bytes, 0));            
  }
by Rick Strahl   July 09, 2009 @ 2:23pm
Tags: C#, Unique Id, Guid
105 Views
no comments
 
C#
List<long> list = new List<long>();
 
byte[] bytes = Guid.NewGuid().ToByteArray();
long val = BitConverter.ToInt64(bytes,0);
 
val.Dump();
val.ToString("x").Dump();
val.ToString("x").Length.Dump();
 
for(int i=0; i<1000000; i++) {
by Rick Strahl   July 09, 2009 @ 1:21pm
Tags: C#, Guid, Unique Id
79 Views
no comments
 
brought to you by:
West Wind Techologies


If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate