background preloader

Programação

Facebook Twitter

Automate Software using WPF UI Automation. Download source - 5.6 KB Introduction In that article, I will show you a funny magic tool which can install/uninstall software automatically. Actually my intension is to show the power of WPF UI Automation. I found UI automation as a replacement of basic application testing and automate anything which we need to make repeatedly. The article is just a sample work of how can we catch a window and follow entering and changing data in it. Background My recent development task is to automate server deployment for some of the products which are actually deploying regularly and wasting lots of time of the deployment engineers.

Deployment automation mainly includes making build, file copy/paste, start/stop services, setup virtual directory, and backup database, modify & run dbscripts, and so on. Steps To Do By automating the installation wizard, I will show some of the automation techniques. Step 1: Search the wizard window and click next button to be forwarded. Step 4: Close the wizard. Step 1. Data recovery - C# classes to undelete files. File Download.

KL

Assembly. C# - How to use DockStyle.Fill for standard controls in WPF. Seven Habits of Highly Effective Programmers | Technicat. As a software engineer, you might want any number of things out of your job - a steady paycheck, the opportunity to work on interesting projects, a springboard to the next better job, or maybe you just like hanging out with other programmers. But by "effective", I mean the ability to complete projects in a timely manner with the expected quality. After working on dozens of software releases, I believe the following practices will bring you there, and while they may involve sticking your neck out, I'd like to think they will also advance your professional reputation, career longevity, and personal satisfaction. Understand Your Requirements The first step in becoming an effective programmer is to ensure that you are spending your time wisely. Build Early Get a demonstrable system working as early as possible.

There is a classical school of thought that believes if you design everything up front, then all you have to do is write the code and you're done. Deliver Often Keep It Real Merge Often. C# - When to create your own IEnumerable class. Enumeration classes. A question came up on the ALT.NET message board asking whether Value Objects should be used across service boundaries. Of course, the conversation took several detours, eventually coming to the question, “what do you do about enumerations crossing service boundaries.” I’m still ignoring that question, but I’ve found different ways to represent enums in my model. Now, enums are just fine in lots of scenarios, but quite poor in others. There are other options I like to use when enumerations break down, and many times in the domain model, I go straight to the other option.

For example, I’ve seen quite a few models like this: public class Employee { public EmployeeType Type { get; set; } } public enum EmployeeType { Manager, Servant, AssistantToTheRegionalManager } The problem with a model like this is it tends to create lots of switch statements: There are a few problems with enumerations like this: Instead of an enumeration, I like to use an enumeration class.

Creating the enumeration class. C# - Regarding IE9 WebBrowser control. Qual o processo para se tornar MCT? Francisco, Apenas com o MCDST você já pode se tornar MCT, entretanto, você só poderá ministrar treinamentos para as certificações que você possui. Por exemplo, caso você seja somente MCDST, você não poderá ministrar o treinamento 2277, que é um dos treinamentos indicados para quem vai realizar a certificação 70-291, prova requerida para completar o MCSA.

O primeiro passo para se tornar MCT é o de adquirir uma Certificação Microsoft válida, como citei acima. Após isto, existem 2 maneiras para você se tornar MCT. Opção 1: Algum CPLS lhe recomenda como MCT. Esta opção é possível quando você já ministra algum treinamento em uma empresa que seja parceira da Microsoft na área de Learning Solutions. Opção 2: Realizando um treinamento presencial. Existe a opção de você realizar um treinamento presencial chamado "Train the Trainer", que possui duração de apenas 8 horas e é realizado normalmente aos sábados. Abraços!

Codeproject

Compress Zip files with Windows Shell API and C# Download demo project - 54 Kb Introduction This is a follow up article to the one that I wrote about decompressing Zip files. With this code you can use the Windows Shell API in C# to compress Zip files and do so without having to show the Copy Progress window shown above. Normally when you use the Shell API to compress a Zip file, it will show a Copy Progress window even when you set the options to tell Windows not to show it. To get around this, you move the Shell API code to a separate executable and then launch that executable using the .NET Process class being sure to set the process window style to 'Hidden'. Background Ever needed to compress Zip files and needed a better Zip than what comes with many of the free compression libraries out there? Using the code The following code shows how to use the Windows Shell API to compress a Zip file. Points of Interest It's free!

O pingüim comanda a casa | Quicaze. Automação residencial também roda Linux Conforme mencionei no artigo anterior, se você busca automatizar sua casa gastando o mínimo possível através de software livre, o Linux é uma boa opção. O mais consagrado dos sistemas operacionais gratuitos, regido pela , do qual falei anteriormente, envia comandos de seu computador para seus adaptadores X10, através da rede elétrica. Via prompt, ao executar o seguinte comando, é facilmente possível ligar a luz do quarto: Analogamente, basta enviar um comando para o adaptador X10 dimerizador reduzir a intensidade da iluminação no estúdio: É possível imaginarmos diversas formas de acionarmos o heyu.

Um servidor web pode hospedar uma interface simples que envie parâmetros para o programa, por exemplo. Definir um cenário é igualmente fácil. Quem apaga a luz é o Linux através do heyu Utilizar o festival é tão simples quanto passar como parâmetro para o programa o texto que você quer ouvir. A interface pode não agradar, mas o Minerva é poderoso. Untitled. #ifndef _PLAYERS_H_ #define _PLAYERS_H_ /* Some window messsages for Windows Media Player 9+, but in theory these could work for anything above WMP7 Reference: */ #define WMP_PLAY 18808 // Play/Pause Track (toggle) #define WMP_STOP 18809 // Stop #define WMP_PREV 18810 // Previous Track #define WMP_NEXT 18811 // Next track #define WMP_REV 18812 // Rewind (Only on video?)

Media Player Classic wm_command(s) | Geek's drafts. Media Player Classic comes with an embedded http server that enables you to control it using for instance your browser. To enable this feature, go to view->options then Player->Web Interface and check the Listen on port checkbox. Next go to your browser and type in the following url Basically the way it works is by calling the command.html and passing the wm_command parameter with the command value. To play/pause the video, start one and then call this url If you have an Android device, check out MPCCommander Following is the list of the available commands, as far as I know.