|
Ctrl+Shift+B
If you run without debugging it uses the release build, if you run with debugging it uses the debug build. This caught me out several times, but now I'm back on the Pro edition so I don't care.
|
|
|
|
|
Ed.Poore wrote: This caught me out several times, but now I'm back on the Pro edition so I don't care.
You're what we call "One of the technology haves."
|
|
|
|
|
Pete O'Hanlon wrote: One of the technology haves
Is there some subtle meaning behind this that I'm missing?
|
|
|
|
|
When you had express edition you were in the have nots. Now you're not you're in the haves. Clear? As mud?
|
|
|
|
|
|
It isn't funny now though. If you've got to explain it, it's not funny.
|
|
|
|
|
That's it, thanks!
Strange that the toolbar has the combo's for Debug/Release but has it disabled!
Nice to discover my application runs 10x faster in release than debug [perhaps I have too many Trace.TraceWarnings in my code! ]
Regards,
Ray
|
|
|
|
|
Ray Hayes wrote: perhaps I have too many Trace.TraceWarnings in my code!
Hope its not like:
Trace.TraceWarning("Incrementing variable i");
i++;
Trace.TraceWarning("Incremented variable i");
|
|
|
|
|
Not quite, I'm processing some CVS logs and haven't yet handled branch tags - that was fine until the other day when someone added a branch at the route, so I had 23014 "warnings" being traced that a branch tag was being ignored....
That's the difference between <2seconds to process a 45Mb log file and 20seconds.... I was fairly happy with 20!
Regards,
Ray
|
|
|
|
|
How do you give a plugin access to all data and methods of the hosting application?
Is it possible to set a plugins/interfaces method to respond to a windows event?
|
|
|
|
|
You don't give a plugin access to the data and methods of the hosting application. Your host communicates with the plugin (which is the opposite way around). Typically, your application will provide some interfaces which your plugin may or may not implement. For instance:
public interface IDataWrapper
{
object State{ get ; set ; }
bool HasProcessed{ get; }
}
public interface IPlugin
{
void Start();
}
public class MyPlugin : IPlugin, IDataWrapper
{
private object _state;
private bool _isSuccessful = false;
public object State
{
get { return _state; }
set { _state = value; }
}
public bool HasProcessed
{
get { return _isSuccessful; }
}
public void Start()
{
}
}
Then, in your application you would load the plugin and do something like:
IPlugin plugin = LoadPlugin(...);
IDataWrapper wrapped = plugin as IDataWrapper;
if (wrapped != null)
{
wrapped.State = ...;
}
plugin.Start();
if (wrapped != null)
{
if (wrapped.HasProcessed)
{
...
}
}
|
|
|
|
|
Take a look at this[^] article, it provides a nice introduction.
|
|
|
|
|
The above article would be great if in c#. Could anyone rewrite?
ty
|
|
|
|
|
There used to be a combo box which allowed you to select the language.
To be honest it's not that difficult to translate from VB.NET to C# since the classes used are all the same.
|
|
|
|
|
Download the code, compile it and run it through the excellent .NET Reflector (from Lutz Roeder). Reflector allows you to change the language target, so you can see what it would be in C#.
|
|
|
|
|
hi all,
how to unload the form from memory through code?
regards,
thanks
|
|
|
|
|
|
I tried this but even after calling form.dispose() the code in form is being executed. I have used a thread and that is a background thread.
thanks
|
|
|
|
|
You may need to abort the thread. Probably the best thing is to have the thread listen for an event that you can raise from your parent thread and use that so it can suspend and or terminate itself cleanly without executing any running code.
Dave
|
|
|
|
|
|
|
Hi
I have some zip files in a directory and want to copy them to another directory with the same of source files. Could any one please tell me.
DirectoryInfo di = new DirectoryInfo(zipsPath);
di.Attributes = FileAttributes.Normal;
FileInfo[] zFiles = di.GetFiles("*.zip");
string tempZip = "/Programme/tempZips";
if (!Directory.Exists(tempZip))
Directory.CreateDirectory(tempZip);
//FileInfo[] tmpFiles = di.GetFiles("*.zip");
foreach (FileInfo file in zFiles)
{
file.CopyTo(tempZip, true);
}
will the above code works.
thanks
|
|
|
|
|
DirectoryInfo di = new DirectoryInfo(zipsPath);
di.Attributes = FileAttributes.Normal;
FileInfo[] zFiles = di.GetFiles("*.zip");
string tempZip = "/Programme/tempZips";
if (!Directory.Exists(tempZip))
Directory.CreateDirectory(tempZip);
for(int a=0;a< FileInfo.Lenght;a++)
{
File.Copy(FileInfo[a].FullName, tempZip, true);
}
run this code, i hope it will work
Becoming Programmer...
|
|
|
|
|
Hi
thank you very much for your reply. I want to remove the files in the source direcory, after copying to new directory. To do this, can I use File.Move() instead of File.Copy() and File.Delete().
thanks
|
|
|
|
|
as you wish, AFAIK Move() may little bit slower than Copy() then Delete()
Becoming Programmer...
|
|
|
|