05 November 2007

.net Additive versions

This morning I've seen a poster and a diagram that shows the .net additive structure


Now I undertand better what is 3.0 and 3.5, here is a link to a great poster of the namespaces. Always is interesting having diagrams like that, overall when people ask us and we are a bit lost.

29 October 2007

Visor de riesgo para Facturaplus

Buenas tardes, hoy toca en español, ya que el artículo va sobre facturaplus, tengo el 50% del trabajo listo, es lo que llamo visor de facturaplus, que permite ver en tiempo real (desarrollado en .net 2.0):

1.- Pendiente de Facturas, albaranes por cliente,vendedor.
2.- Ver estado de documentos sin importar la serie, filtrando por número.
3.- Buscar las facturas por importe.
4.- Permite tener de golpe para analizar, todos los clientes de un vendedor.




En la segunda parte es donde se incluyen los informes Crystal Reports:
1.- Pendiente de cobros por vendedor
2.- Ventas por año (comparativo)
3.- Comisiones (detalle de facturas)
4.- Histórico de artículos por cliente y vendedor

25 October 2007

AI has simmetry?

Hi everyone, Today I was playing with an article of Sacha Barber about "Sheeps and Wolves" or "Missioners and Cannibals" here and well might be coincidence might not, but graphically the algoritm makes me the next matrix:




Does anyone know why is simmetrical? I take the steps from the Barber's article and well it's a curious picture.

18 October 2007

Spry - Customize the MenuBar

After being dissappear for few months (making my commercial web, commercial apps...) being designing I have seen that in the Dreamweaver CS3 there's a interesting AJAX framework called SPRY, so here I saw an example and how to customize with images it:

Result:


How to:
1.- First of all add a MenuBar from the Insert toolbox-Spry



2.- After you add the MenuBar in the webpage, I remove the text and assign for each link a custom id:



3.- And now in a css file (linked to this), I customize simply to this:


Might be for dummies, but sometimes trying things we do it by the complex way.

23 July 2007

WPF Moving Controls in XYZ

The moment to create something like a game as NeoPets in WPF is coming, today I have made improvements using controls, here I show you how to add movement to the controls on runtime, I have add moving using the mouse and using the keyboard, download the source here
To do that, in the xaml file add to the button:

button keydown="OnKey" previewmousemove="OnMove"

And in the .cs add the next methods:

public void OnMove(object o, MouseEventArgs e)
{
if (e.LeftButton == MouseButtonState.Pressed)
{
b = (Button)o;
SetZ();
Canvas.SetZIndex(b, 99);
b.Margin = new Thickness(e.MouseDevice.GetPosition(null).X - b.Width / 2, e.MouseDevice.GetPosition(null).Y - b.Height/2, b.Margin.Right, b.Margin.Bottom);
}
}


and for using the keyboard:

public void OnKey(object o, KeyEventArgs e)
{
int delta = 20;
b = (Button)o;
SetZ();
Canvas.SetZIndex(b, 99);
switch (e.Key)
{
case Key.W:
b.Margin = new Thickness(b.Margin.Left, b.Margin.Top - delta, b.Margin.Right, b.Margin.Bottom);
break;
case Key.S:
b.Margin = new Thickness(b.Margin.Left, b.Margin.Top + delta, b.Margin.Right, b.Margin.Bottom);
break;
case Key.A:
b.Margin = new Thickness(b.Margin.Left - delta, b.Margin.Top, b.Margin.Right, b.Margin.Bottom);
break;
case Key.D:
b.Margin = new Thickness(b.Margin.Left + delta, b.Margin.Top, b.Margin.Right, b.Margin.Bottom);
break;
default:
break;
}
}


Apparently is easy, the matter about all of this, is that there's only few docs, so I hope you find this useful and encourage you to improve your apps (uis).

17 July 2007

Focusing (graphically talking) controls


Few days ago my nephew show me a web called neopets, and there I watched plenty of mini flash games, I was thinking on the possibilities on WPF and I decided to start playing with the effects on runtime, here I show you how to change on runtime the focus of a control:
Download sample here



using System.Windows.Media.Effects;
using System.Windows.Threading;
using System.Windows.Input;

...


BlurBitmapEffect blur;
Button b;

System.Timers.Timer t_1;
public void AutoFocus(object o, EventArgs e)
{
b = (Button)o;
blur = new BlurBitmapEffect();
b.BitmapEffect = blur;
blur.Radius=5;
t_1 = new System.Timers.Timer(1);
t_1.Elapsed +=new System.Timers.ElapsedEventHandler(OnTime);
t_1.Start();
}

...


void OnTime(object sender, System.Timers.ElapsedEventArgs e)
{
this.Dispatcher.Invoke(DispatcherPriority.Background, new DispatcherOperationCallback(delegate
{
if (blur.Radius > 0)
blur.Radius--;
else
t_1.Stop();
return null;
}), null);
}

...


public void AutoDifuse(object o, EventArgs e)
{
BlurBitmapEffect blur = new BlurBitmapEffect();
blur.Radius = 5;
((Button)o).BitmapEffect = blur;
}

...



The code is easy to understand, the only matter is the strange way to use a Timer, because if you try to ommit the Dispatcher.Invoke you will have threading problems. The rest I think is easy to understand. Tomorrow I'll show you how to move controls on runtime


13 July 2007

Solved the GridView Header

Just only an hour ago, I have solved the hard matter to customize the header, due to the matters with the xaml code inside an article here is the link to my comment with the code

The codeproject comment with the code is here

I hope you find it useful or a year of this decade (when you decide to use WPF)