|
I tried with:
public class SubjectIndexComparer : IComparer
{
...
public int Compare(int x, int y)
{
...
}
}
but I got:
'UQTimetable.SubjectIndexComparer' does not implement interface member 'System.Collections.IComparer.Compare(object, object)'
I tried with:
public class SubjectIndexComparer : IComparer
{
...
public int Compare(object x, object y)
{
...
}
}
but I got:
The best overloaded method match for 'System.Collections.Generic.List<int>.Sort(System.Collections.Generic.IComparer<int>)' has some invalid arguments
Argument '1': cannot convert from 'UQTimetable.SubjectIndexComparer' to 'System.Collections.Generic.IComparer<int>'
Any more ideas?
Jack
|
|
|
|
|
Use this:
public class SubjectIndexComparer : IComparer<int>
{
public int Compare(int x, int y)
{
...
}
}
|
|
|
|
|
that's what I meant... tnx for correcting me Daniel.
|
|
|
|
|
Worked a treat! Thanks
Jack
|
|
|
|
|
We have about 13 services that my service manager is starting up. All are ServiceHost objects. Some of the services will optionally inherit an IServiceRequestor interface that exposes an initialize and terminate routine that I need to call at startup and shutdown of the service.
Problem: The object is encapsulated with the ServiceHost object and I cannot find where I can access the class to run the routines.
Has anyone done this? How do I get at the encapsulated object to cast it to my IServiceRequestor object so that the intialize and terminate methods are executed within the ServiceHost's AppDomain?
|
|
|
|
|
Hi All,
I'm creating an application with a form that spans the length of the screen i.e. 1024x100 on a 1024x768 screen. Is there a way that i can reposition the 'usable' window to begin at the bottom left corner of the form? For example, if I open IE or Notepad, when maximized, the top most corner would be (0,668). Currently when I maximize IE, most of the menu appears under the form.
Any help would be appreciated
Thanks!
DLee
|
|
|
|
|
Hi,
I'm working on a C# project in which there's a conflict between two dll-files (office automation dll's, version 2.1 & version 2.4), forcing me to manually copy the second dll to the "bin/Debug" folder instead of referencing to it in the solution. The problem is that the project needs to be distributed using the ClickOnce publish feature in Visual Studio 2005, and the second dll is not added to the distributed version of the project.
Now I need this file to be included into the publish procedure, so it is added in the result and can be used. I have been exploring VS 2005, but I didn't find any solution up till now.
Is there a way to auto-include non-referenced dll files to a publish, or will I need to solve the dll conflict in another way?
Both dll files have a different name and the project runs as it should, but the "old" dll file does not completely support the features we are using. And upgrading the old functionality to the new Office dll is also not an option .
Any help is appreciated!
Greetz
|
|
|
|
|
If I understand you correctly this should solve your problem:
1. Copy non-referenced dll to your project's directory and add it to project using Add -> Existing Item -> browse to dll.
2. When it is added to project, right click in it on Solution Explorer -> Properties and Set Build Action -> Content (ClickOnce problem) && Copty to Output Directory -> Copy Always (autocopy) in Properties Window
3. If you now right click on your project icon in Solution Explorer -> go to project Properties -> Publish -> Application Files, you should see your dll in list with status Include(Auto).
Hope this solves your problem, if not -> give more details and I'll answer .
Cheers!
|
|
|
|
|
I tried your solution, but when debugging, the second dll file (office 2007 dll) is not copied to the Debug folder, only the first one (office 2000 dll) is copied. If I remove the reference to the first dll than the second one is copied. So it seems that only one of the dlls can be in the compiled result. I assume Visual Studio detects an Assembly name or something and this name is the same in both dll files.
I managed to get both dll files in there by adding them both manually and setting build action to "None" and Copy to Output Directory to "Copy Always". The problem is that when debugging, the program crashes with an error that the second dll file could not be found.
I'm out of options at the moment.
Hope you can help me.
|
|
|
|
|
Hello everyone,
I have a Windows Application with all sort of controllers such as ListView, TextBox, Buttons, ComboBox and so on. I undrestand that I should dock the controllers so once the user changes the Window Size the Windows Application doesn't get ugly anf messed up and still useable.
I was wondering if anyone can take a moment and explain if there are any particular order that I should follow since whatever I am doing there is always one or two controller running over another ones.
Thank you very much and have a great weekend.
Khoramdin
|
|
|
|
|
I'm really not sure of your question, this article might help though: Working With Anchoring And Docking
If not, let me know.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Hey
I need to be able from my ASP.Net to add a static a-record for some websites
So how do I do that ?
Examles
Adding
"testside" 10.2.6.244
"sales" 10.2.6.244
"tech" 10.2.6.244
It is for a Windows 2003 DNS, I have have all the security right, and are able to do impersonation if thay should be a problem..
|
|
|
|
|
Research this: DNS WMI Provider.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
I have project and store the name of this project forms in a database table,
the start up form will show the other project form in a tree view and store the description of that forms and its names
on mouse double click i want to create instance of a form in the selected node with out knowing the name of that form not hard code
also i dont know how to use the system.reflication
please can any one help me
Hosam Taji
|
|
|
|
|
Can I ask why the duplication ? What if a form name changes within the project, the database will be wrong. Why do you need to use reflection at all, if you know the names of all the forms, to store them in a database table ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
what if i have more that 1000 forms in my project do i have to write code for each form in its name to call it, also my project is multilengual and the user can change the form descritpion and loacation in the tree throw a spechle forms so that why i use the database !!!!
i do all these in other languge like oracle developer and know i am trying to do so in C# windows application to let my team enter the information about the forms in the database and then the startup form will call these forms automatic
Hosam Taji
|
|
|
|
|
hi
is there any free component or class to co convert Html to PDF and support Unicode charrecters
with regards
MHF
|
|
|
|
|
Hi every one
i have a form name sotred in string parameter
i want to create object from that form and show this form
thx
hosam taji
|
|
|
|
|
public Form CreateFormThroughName(string formClassName)
{
switch(formClassName)
{
case "FormA":
return new FormA();
case "FormB":
return new FormB();
}
}
try it!!!!!
|
|
|
|
|
First Thx You For Your Help But This is not exactly what i want
Realy i want something like this not return new formClassName
thx A gain
|
|
|
|
|
Perhaps you need to explain it better?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
do you know the names of all form in advance?
|
|
|
|
|
Yes Thats Exactly What I Want How To Use The Refliction in this case
Hosam Taji
|
|
|
|
|
simply ask thanks if it works
|
|
|
|
|
You could use reflection, or if the collection of names is known, use the approach that was given by someone else. Personally, if I had a known collection, I'd be storing an enum, not strings.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|