.net

Custom Control VS Dynamic TemplateField checkbox

Hi , I work on a custom server control that contains two grids with dynamic templatefield checkbox , the 1st one binded by SqlDataSource, the 2nd grid filled with selected rows in the 1st grid, all is clear, the 2nd grid filled appropriatly but when a button(out of the custom control) click event fired the grid disappear , Second an...

How to change an attribute of a public variable from outside the class

Sorry about the title, I don't think I could explain it right: This is a simplified example class, this is working ok. (I also have a Save() method) public class busItem { public Item vItem; public busItem(int pItem_Id) { DBDataContext db = new DBDataContext(); Item vItemQue...

When should I be using IDisposable, is it ever wrong to use it? What about Dispose Chaining?

I'm really looking for some best practice wisdom. So here are the questions, I'll add more if people leave comments. Feel free to answer some or all of these questions. When SHOULD I use IDisposable? Only when I have unmanaged resources? What variations of the dispose pattern are there and why do they vary? What are common unmanaged ...

Simple XOR (PHP & C#)

hey all, is it possible to have some sort of very simple reversible encryption in php that can be reversed using C# Winforms? thank you ...

CQRS, DDD synching reporting database

We are trying CQRS and DDD and event sourcing. Let's say I have a customer update an email address, which fires out CustomerUpdatesEmailAddress Event, this goes through to my operational (write DB) and updates the tables. Our system is designed such there is an ETL process that runs which takes operational data and updates the database (...

How to run a method in a separate AppDomain?

Hi geeks~ :) In my scenario, I want to execute a method in a separate AppDomain. How many different ways could I take to achieve this? Especially, I have the following question: Can I load an assembly into AppDomain A and execute its method in AppDomain B? It seems I achieve this with AppDomain.DoCallBack Method and CrossAppDomainDe...

Is there a way to have the close window button (X) call a method before actually closing the window?

In a windows form project in C#/.net/Visual Studio 2010, if someone hits the close window button, I want to disable some other things in the program as a consequence. Is there a method call for hitting "X" that I can extend? ...

Add COM 32 to VB.NET

How can I add a COM DLL to A VB.NET project? ...

[DotNet Framework] Install every version or latest version is enough?

Hi I'm very confused with dotnet framework installation. Even though I've installed the latest version (4.0), some dotnet framework-based programs told me that I need to install version 1.1 or 2.0. So, I'm curious to know whether I need to install every version of DotNet framework so that every kind of such program can run. Does it ...

Why does Java permit interfaces to have static readonly fields while .NET interfaces cannot?

I faced with a sample code in Java and it brought me a question. Java sample code is: ... public interface CLibrary extends Library { CLibrary INSTANCE = (CLibrary) Native.loadLibrary((Platform.isWindows() ? "msvcrt" : "c"), CLibrary.class); void printf(String format, Object... args); } public static void main(String[] args) t...

C# Synchronize Wait / Poll methods.

I have a class that exposes two methods:  - GetObject Gets a single object, or returns null if there are none.  - WaitForObject Gets a single object, or waits until their is one. An example implementation:      class MyClass     {         MyStack stack;         public object GetObject()         {             return stack.Pop()...

Wpf Backgammon board

What are your ideas for designing backgammon board using WPF? may i use picture for board background? how about nuts? thanks all. ...

How to fill web form using C#

Does anybody know best aproach for work with web forms(open/fill/submit) ? For example there is an page: http://vkontakte.ru/login.php?app=111&layout=popup&type=browser How to open it from C#, fill email and password and send to server. ...

Wrapping logging within an exception object

I currently have this class that another programmer in my team coded: public static class SoapExecuter { private static readonly ILog logger; public static Exception ExecuterException { get; private set; } public static bool IsSoapException { get { if (ExecuterException == null) ...

how to intercept firefox events in .net?

i'm using watin,to control a firefox browser,but there's no support for events like page load,& progress.. i need a way to expose this events through .net,i tried a bit with xpcom from geckofx but with no vain due to lack of documentation,, thanx in advance ...

.NET UserControl inherit parent form background

I have a WinForms control inherited from TreeView and I want it to automatically adjust background color according to the form (also customized) background. How to make it? ...

ResourceDictionary + StaticResource alternative for pure System.XAML, no PresentationFramework

Dear ladies and sirs. I would like to enjoy the ResourceDictionary + StaticResource functionality, but without the need to load PresentationFramework - pure System.Xaml. I managed, quite easily, to define the Resources property as a dictionary, but I need a way to reference the items there, i.e. I need something like StaticResource. I ...

Silverlight Game Logic on client side or on server side?

I am running into some problems right now. I am developing a card game (Top Trumps) which is played by two players. I wonder how to best setup the architecture. Right now almost all of the game logic is calculated on client side. The game state is saved in a database table. The database is updated every second. But since two players a...

Is there any librtmp c# .net wrapper?

Is there any librtmp c# .net wrapper? ...

Console ReadKey async or callback?

I am trying to do a press Q to quit thing in the console window. I dont like my current implementation. Is there a way i can async or use a callback to get keys from the console? ...