Thursday, August 12, 2010

expertsnet.tk

Agora também podem aceder a este blog pelo endereço http://www.expertsnet.tk :)
que é muito mais fácil de memorizar :)

Tuesday, August 3, 2010

VPN windows XP error 721

Para ver em portugues veja mais abaixo neste post

English:

I have a VPN to my work, but recently stopped working giving the error 721 when trying to Connect ... I searched the net and some post talking about the port on the router or firewall, but had the firewall turned off and tested it with another computer on the same wireless network and it worked ...

After much research I discovered what caused this error.
To connect to some clients I use Cisco Systems VPN Client.
The VPN Client has an option that caused the error:)
Resolution:



Open the Cisco VPN Client -> Options-> Deselect the option Stateful Firewall (Always on).
I tested my VPN for work (VPN windows xp) and it worked!: D
The error occurred even be having the Cisco VPN Client running ..

Português:

Tenho uma ligação VPN para o meu trabalho, mas recentemente deixou de funcionar dando o erro 721 quando tentava connectar... Pesquisei na net e alguns post falavam sobre a porta no router ou firewall, mas tinha a firewall desligada e testei com outro computador na mesma rede wireless e funcionou..
Após muita pesquisa descobri o que causava este erro.
Para me conectar a alguns clientes eu utilizo o Cisco Systems VPN Client.
Este VPN Cliente tem uma opção que causava o erro :)

Resolução:

Abrir o Cisco VPN Client -> Options->Desseleccionar a opção Stateful Firewall(Always on) .
Testei a minha VPN para o trabalho (VPN do windows xp) e funcionou !!!:D
O erro acontecia mesmo ser ter o VPN Client da cisco a correr..

Monday, August 2, 2010

Mudar cor botão telerik silverlight (RadButton)

private void ChangeBackground(RadButton button, bool applyTemplate)



{


if (button != null)


{


Brush backgroundBrushRed = new SolidColorBrush(Colors.Red);


Brush backgroundBrushGreen = new SolidColorBrush(Colors.Green);


Brush borderBrush = new SolidColorBrush(Colors.Black);



//pegar a cor acrual do botão,temos que ir ao background converter para solidcolorBrush e dps
//ver a propriedade Color

if ((button.Background as SolidColorBrush).Color==Colors.Red)


button.Background = backgroundBrushGreen;


else

button.Background = backgroundBrushRed;






button.BorderBrush = borderBrush;


if (applyTemplate)


{






ControlTemplate template = button.Template;


button.Template = null;


button.Template = template;


button.ApplyTemplate();


}


}


}

silverlight ler controlos dentro de outros

Estava com um problema ao tentar aceder a controles (botões) dentro de outro controle. no meu caso o RadTileView da Telerik.
Tentei usar o seguinte comando:
     radTileView1.ChildrenOfType().ToList();

mas isto dava sempre vazio porque os elementos visuais não estavam renderizados..
logo é preciso fazer o seguinte:
this.Dispatcher.BeginInvoke(() =>
{
    lbtn = radTileAlunosList.ChildrenOfType().ToList();
    foreach (RadButton btn in lbtn)
   {
      btn.Background = new SolidColorBrush(Colors.Red);
   }
});

E pronto :D já esta :D