<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="http://www.phpclasses.org/rss1html.xsl"?>
<!-- Generated by: http://www.phpclasses.org/rsswriter $Revision: 1.12 $ -->
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/">
 <channel rdf:about="http://snipt.org">
  <description>Share source code on Twitter and the Web</description>
  <link>http://snipt.org/</link>
  <title>SniptBox for diogomoura | Snipt.org</title>
  <dc:date>Thu, 11 Mar 2010 05:47:16 -0500</dc:date>
  <image rdf:resource="http://snipt.org/wp-content/themes/motion/images/snipt_logo.jpg"/>
  <items>
   <rdf:Seq>
    <rdf:li rdf:resource="http://snipt.org/lXl"/>
    <rdf:li rdf:resource="http://snipt.org/Mkl"/>
   </rdf:Seq>
  </items>
 </channel>
 <image rdf:about="http://snipt.org/wp-content/themes/motion/images/snipt_logo.jpg">
  <url>http://snipt.org/wp-content/themes/motion/images/snipt_logo.jpg</url>
  <link>http://snipt.org/</link>
  <title>Snipt.org</title>
  <description>Share source code on Twitter and the Web</description>
 </image>
 <item rdf:about="http://snipt.org/lXl">
  <description>package br.com.diogomoura.components&#10;{&#10;&#9;import mx.collections.ArrayCollection;&#10;&#9;import mx.controls.AdvancedDataGrid;&#10;&#9;import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;&#10;&#10;&#9;public class MyAdvancedDataGrid extends AdvancedDataGrid&#10;&#9;{&#10;&#9;&#9;public var disabledDragColumns:ArrayCollection;&#10;&#9;&#9;&#10;&#9;&#9;override protected function isDraggingAllowed(draggedColumn:AdvancedDataGridColumn):Boolean {&#10;&#9;&#9;&#9;if(disabledDragColumns != null)&#10;&#9;&#9;&#9;&#9;return (!disabledDragColumns.contains(draggedColumn));&#10;&#9;&#9;&#9;else&#10;&#9;&#9;&#9;&#9;return true;&#10;&#9;&#9;}&#10;&#9;&#9;&#10;&#9;}&#10;}</description>
  <link>http://snipt.org/lXl</link>
  <title>MyAdvancedDataGrid</title>
  <dc:date/>
 </item>
 <item rdf:about="http://snipt.org/Mkl">
  <description>using System;&#10;using System.Collections.Generic;&#10;using System.Text;&#10;using System.Windows.Forms;&#10;&#10;namespace br.com.diogo.Controls {&#10;&#9;public class Right2LeftMaskTextBox : MaskedTextBox {&#10;&#10;&#9;&#9;public double Value {&#10;&#9;&#9;&#9;get {&#10;&#9;&#9;&#9;&#9;TextMaskFormat = MaskFormat.IncludeLiterals;&#10;&#9;&#9;&#9;&#9;string valorText = Text.Replace(\&amp;quot; \&amp;quot;, \&amp;quot;0\&amp;quot;);&#10;&#9;&#9;&#9;&#9;double valor = 0;&#10;&#9;&#9;&#9;&#9;double.TryParse(valorText, out valor);&#10;&#9;&#9;&#9;&#9;TextMaskFormat = MaskFormat.ExcludePromptAndLiterals;&#10;&#9;&#9;&#9;&#9;return valor;&#10;&#9;&#9;&#9;}&#10;&#9;&#9;}&#10;&#10;&#9;&#9;public override string Text {&#10;&#9;&#9;&#9;get {&#10;&#9;&#9;&#9;&#9;return base.Text;&#10;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;set {&#10;&#9;&#9;&#9;&#9;double valor = 0;&#10;&#9;&#9;&#9;&#9;double.TryParse(value, out valor);&#10;&#10;&#9;&#9;&#9;&#9;if (valor &amp;lt;= 0)&#10;&#9;&#9;&#9;&#9;&#9;base.Text = \&amp;quot;\&amp;quot;;&#10;&#9;&#9;&#9;&#9;else&#9;&#9;&#9;&#9;&#9;&#9;&#10;&#9;&#9;&#9;&#9;&#9;base.Text = value.Replace(\&amp;quot;.\&amp;quot;, \&amp;quot;\&amp;quot;).Replace(\&amp;quot;,\&amp;quot;, \&amp;quot;\&amp;quot;).PadLeft(Mask.Replace(\&amp;quot;.\&amp;quot;, \&amp;quot;\&amp;quot;).Replace(\&amp;quot;,\&amp;quot;, \&amp;quot;\&amp;quot;).Length, \&apos; \&apos;);&#10;&#9;&#9;&#9;}&#10;&#9;&#9;}&#10;&#10;&#9;&#9;protected override void OnKeyPress(KeyPressEventArgs e) {&#10;&#9;&#9;&#9;base.OnKeyPress(e);&#10;&#10;&#9;&#9;&#9;if (e.KeyChar &amp;gt;= 48 &amp;amp;&amp;amp; e.KeyChar &amp;lt;= 57) {&#10;&#9;&#9;&#9;&#9;int len = Mask.Replace(\&amp;quot;,\&amp;quot;, \&amp;quot;\&amp;quot;).Replace(\&amp;quot;.\&amp;quot;, \&amp;quot;\&amp;quot;).Length;&#10;&#9;&#9;&#9;&#9;SelectionStart = Mask.Length - 1;&#10;&#9;&#9;&#9;&#9;string valorNovo = Text.Trim() + e.KeyChar.ToString();&#10;&#9;&#9;&#9;&#9;Text = valorNovo.PadLeft(len, \&apos; \&apos;);&#10;&#9;&#9;&#9;}&#10;&#10;&#9;&#9;&#9;e.Handled = true;&#10;&#9;&#9;}&#10;&#10;&#9;&#9;protected override void OnKeyDown(KeyEventArgs e) {&#10;&#9;&#9;&#9;base.OnKeyDown(e);&#10;&#9;&#9;&#9;&#10;&#9;&#9;&#9;int len = Mask.Replace(\&amp;quot;,\&amp;quot;, \&amp;quot;\&amp;quot;).Replace(\&amp;quot;.\&amp;quot;, \&amp;quot;\&amp;quot;).Length;&#10;&#9;&#9;&#9;SelectionStart = Mask.Length;&#10;&#10;&#9;&#9;&#9;if (e.KeyData == Keys.Back) {&#10;&#9;&#9;&#9;&#9;string valorNovo = Text.Trim().Substring(0, Text.Trim().Length);&#10;&#9;&#9;&#9;&#9;Text = valorNovo.PadLeft(len, \&apos; \&apos;);&#10;&#9;&#9;&#9;}&#10;&#10;&#9;&#9;&#9;e.Handled = true;&#10;&#9;&#9;}&#10;&#10;&#9;&#9;protected override void OnKeyUp(KeyEventArgs e) {&#10;&#9;&#9;&#9;base.OnKeyUp(e);&#10;&#9;&#9;&#9;SelectionStart = Mask.Length;&#10;&#9;&#9;}&#10;&#9;}&#10;}</description>
  <link>http://snipt.org/Mkl</link>
  <title>Right2LeftMaskTextBox </title>
  <dc:date/>
 </item>
</rdf:RDF>