|
Thank Dan_P for your reply. Just try to confirm with you. The SQL server CE tools is pre-installed on the PDA or it needed to get the software install in it.
|
|
|
|
|
|
Also the first time you deploy an app that uses SqlServer CE, it installs it.
Top 10 Geek Resulutions:
5. To decipher what that big room is, which has the blue ceiling and poor climate control.
|
|
|
|
|
This might not be the best forum for this question but I hope someone will be able to answer it anyway.
I have a bunch of nunit tests that I want to run. The problem is that they fail if run them all. If I run them one by one they work fine. These tests tests some sockets network code. The network connection is done using a static object. This means all tests use the same network connection object. I thought that the tests run one after the other, but it seems they run in parallell sometimes. This has the effect that a test connects to the server and starts doing what the test does and then another test opens a new connection with the effect that the state needed in the first tests is lost, and thereby causing the first test to fail.
So the real question is how NUnit runs the tests? Does it run them one after the other or (atleast to some degree) in parallell?
|
|
|
|
|
I've not noticed them running in parallel and I don't believe that they do but I have had similar problems and upon closer inspection determined that I have introduced some state dependencies. Anyway, the solution for me was to use Setup and Teardown (Nunit things) code to make sure state was setup correctly for each test that I ran.
That just might work for you too.
|
|
|
|
|
I've set Contolbox = false on mdi children so it appears to the user that the children are part of the mdi parent. This workls fine, but when the child is first created it has a titlebar that disappears after a split second, but it is there long enough to make the whole form appear to "bounce" when the titlebar goes away, causing the entire form to shift upward. I'm using VS 2003 and C#.
Any suggestions would be greatly appreciated.
|
|
|
|
|
I do this kind of UI trick here at work all the time so try what I do, just turn off the border altogether, that works great!
|
|
|
|
|
Hi...I'm working on the windows mobile 2003 platform (e200 spv) and would like to get the phones' location info and write it to a txt file.
Any suggestions?
dboy.spv
|
|
|
|
|
Hi...I'm working on the windows mobile 2003 platform (e200 spv) and would like to get the phones' location info and write it to a txt file.
Any suggestions?
dboy.spv
|
|
|
|
|
Hello,
Is it possible to have a solution containing 2 versions of an application (a normal and an extensive version)? It's very tedious to make this into 2 solutions because the 2 versions share common forms.
Any suggestions?
Thanks,
~Rafferty
|
|
|
|
|
It depends. It's pretty easy to have two builds of the one code base, to create two seperate versions. Or did you want two versions in seperate projects that are part of the one solution ? There's probably no reason why you can't do that, and have them both include source from a common file, but you still need to code a way for your app to not show extra features that you've not compiled into the program. It really depends on how complex the differences are - will removing one menu option remove all access to the advanced features, or is it right through the UI ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
No, the two versions are part of one project. So to do this, I simply have to hide the other features for the regular version and show them in the extended version? maybe i just create a
isExtended = false; in the Main() function and have an if(isExtended) {...} in the other areas.
Is this correct?
Thanks for the help,
~Rafferty
|
|
|
|
|
No i don't think that's good
Compiler will comile evrything. Only a hacker will get extendet future.
You should use:
#define IsExtended
#ifdef IsExtended
ToDo:
#endif //IsExtended
In this way the compiler will comile the extendet future.
if you don't want to compile, then just delete "#define IsExtended"
What do you think
|
|
|
|
|
You're assuming he's using C++. There's a 1/3 chance of that, here.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I'm using c# so the suggestion of sakida also works in c# right? i believe the syntax is also #ifdef correct?
|
|
|
|
|
I don't think #define works in C#, no. It's a holdover from C, in C++.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
found #define, #if & #endif in the MSDN (Filtered by C#). So I believe there is. Thanks for the help!
|
|
|
|
|
As Sakida said, you don't want to compile the functionality you're not offering into your code base. So create two projects, so that only one has all the functionality, and the one with limited functionality needs to somehow figure out not to show the options that are missing from menus, etc. Something like what you suggest would work for that part.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I see... I'm thinking about separating them into two projects and have a
<br />
#define IsExtended<br />
<br />
#if IsExtended<br />
using extended;<br />
#endif<br />
What do you think? And how can I make the #define IsExtended line globally accessible by all forms?
By the way, is the syntax correct? ^^
Thanks,
~Rafferty
|
|
|
|
|
If the #define happens in code, then it's a waste of time. If you can't create a define as a build property ( as you can in C++ ), then the mechanism you use to change builds remains a manual one.
It seems that C# works the same a C here, I didn't know ( I hated macros in C ). You can set the defined values in your build settings, so you can set up builds for more than one version, and wrap entire classes in #ifdef statements. Personally, ( and I did this on a project in C++ years ago ), I think this gets too messy, too quickly. Your code gets hard to read, and flow is hard to establish with little #ifdef blocks everywhere. The approach I suggest would force you to move most of the differences into entire classes that are excluded, and a #define could be used just for the code that controls what menu options are provided, as appropriate. The less #ifdef blocks you can have, the better.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
ahh.. that sounds doable. Did you just look it up in the MSDN Library? What's the keyword so I can read it too. I also don't know about how to customize build settings yet.
~Rafferty
|
|
|
|
|
Rafferty Uy wrote:
Did you just look it up in the MSDN Library?
The overall approach ? No, it's just what I would do.
Rafferty Uy wrote:
I also don't know about how to customize build settings yet.
Fair enough. On the menu, go to Build/Configuration Manager. choose 'new' in the drop down. Call it 'Demo version' or something. Do that twice, copy one from release and one from debug, and name them accordingly. Now in both of these projects, right click on the project name in the solution explorer and choose properties. Click on 'configuration properties'. The first of the three options below it is selected, and the first item in the list of options is compiler settings. DEBUG is defined for the debug version, in both cases, add the name of the define you want to check in your code. Now these builds will have that define set. HOWEVER, I'd recommend creating a new project that imports most of the other one ( i.e. looks at the same files ) and excludes the files that contain the stuff you don't want to offer in your demo version. Then you only need to use the #ifdef stuff to check your define before adding those items to menus, etc. If you do it all in one project, then you'll need to #ifdef out entire files as well, which is just plain ugly IMO.
Either way, that's how you set up the defines in the build versions.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Wow that's great! I'll try to work on it
Thanks Mr. Christian. Maybe I'll just post again if I encounter any problem/difficulties
|
|
|
|
|
By all means, that's what we're here for
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi Christian,
How do you #ifdef out entire files? I may have to do this for some of the files. do I just do something like this?
#if ISEXTENDED<br />
#endif
Also, I tried what you suggested about moving the differences into a separate project. If the Main project has a reference to the Extended project, is it okay not to compile the extended project?
Thanks Much!
~Rafferty
|
|
|
|