|
can you explain it more with code?
When You are adding items? in runtime or during the design?
My small attempt...
|
|
|
|
|
during design time through the public properties (in properties tab)
C++ where friends have access to your private members !
|
|
|
|
|
add
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
to the property being exported
C++ where friends have access to your private members !
|
|
|
|
|
hi all,
i want to update my existing windows application using click once,
here i fallowed the necessory steps, but i couldn't control some statements,
i could check wether the application is of clickonce by ApplicationDeployment.IsNetworkDeployed property, but i couldn't able to manage code
i mean i am checking updates manually if its already the higher version i need to desplay in messagebox which i couldn't using the below code...
<b>if (ApplicationDeployment.IsNetworkDeployed)</b> {
ApplicationDeployment CurrentDeploy = ApplicationDeployment.CurrentDeployment;
CurrentDeploy.CheckForUpdateCompleted += OnCheckForUpdateCompleted;
CurrentDeploy.UpdateCompleted += OnUpdateCompleted;
//OnCheckForUpdateCompleted(sender,e);
//OnUpdateCompleted(sender,e);
if (CurrentDeploy.CheckForUpdate())
{
CurrentDeploy.Update();
DialogResult dr = MessageBox.Show("Update Downloaded,Restart the Application", "Application Update", MessageBoxButtons.YesNo);
if (dr == DialogResult.Yes)
{
Application.Restart();
}
}
}
else <b>if(!ApplicationDeployment.IsNetworkDeployed)</b>
{
<b>MessageBox.Show("No Updates are available", "UpDate Info");</b>
}
}
prashanth,
s/w Engineer,
Syfnosys.
|
|
|
|
|
Has anyone used this family of controls in anger, esp. the Tree/List widget? I'm especially keen to have multi-column, multi-selection, drag/drop with print/print-preview abilities - and this seems to fit nicely. Anyone got any war stories to share or other products to suggest?
Thx++
Whoops. Here's the URL:
http://www.devexpress.com/Products/NET/WinForms/XtraTreeList/Index.xml
|
|
|
|
|
Does anybody know if it is possible to use generics
in an attribute ?
Example: (what I would like to do)
class MyClass <T>{
[MyAttribute(T == typeof(ClassCase1) ? "Case1" : "Case2")]
private object MyProp{
get{...}
set{...}
}
}
Thanks
May u have a bug free day...
|
|
|
|
|
Unfortunately you can't reference a generic type parameter in an attribute, so you can't use T == in your attribute.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
i have a custom control which has a magnification property. when we change to 'double width' value, it should stretch the font on the control to double width but the height has to remain the same. similarly i have to stretch the font along y axis when 'double height' is selected for magnification. we cannot separately set the height and width of the FONT. Please help me achieve this.
Thanks
Priya
|
|
|
|
|
Hi anyone !
I have some problem with my listview.
I read from database and find 10 items. I add them to listview and listview show 10 items.
So... then I add one item to database and then i read database again, and find 11 items (i checked in debug mode). I add every each to the listview BUT, the listview just shows 10 items. (the one already there).
Whats wrong ???
If i execute in debug mode the problems does not occur. Because it goes slower ?? or what ??
Anyone that have any ideas ?
With Kind Regars
Heino
|
|
|
|
|
henur wrote: then I add one item to database
How are you doing this? Using some other program or manually, using Query Analyzer and the like? Also, are you sure your query is being committed?
Posting the relevant code snippet might be useful.
Cheers,
Vikram.
"But nowadays, it means nothing. Features are never frozen, development keeps happening, bugs never get fixed, and documentation is something you might find on wikipedia."
- Marc Clifton on betas. Join the CP group at NationStates. Password: byalmightybob
|
|
|
|
|
It's done manually. Reading a datareader and adding items by items.
If i execute in debug-mode i see information about every post, even the one that is not added to the listview.
Heino
|
|
|
|
|
Hi.
I'm handling the event on Windows clock change:
public static EventHandler timeChanged = new EventHandler(OnTimeChanged);
Microsoft.Win32.SystemEvents.TimeChanged += timeChanged;
public static void OnTimeChanged(object sender, EventArgs e)
{
// Do something....
}
Problem: I don't know how to get the part of date that has been changed: days, minutes etc.
Does somebody know how to do it?
Thanks.
Vadim G.
|
|
|
|
|
hi there.
i've got a problem. currently i'm developing a .net webservice and i need to access windows network shares from within that webservice. some of the shares are located inside the domain the server is a member of where the webservice runs, some are located on servers which are members of foreign domains where the domain the webservice server belongs to has no security trust, thus it is a foreign domain.
i'm unable to figure out how to parse the credentials to the directory- and/or fileInfo objects when creating them using the uncPath to the share(s). i tried impersonation which works well for accessing shares within the same domain the webservice server belongs to, but not for the domain it does not belong to.
i think the problem is, that the underlaying implementation of the impersonation class i use - advapi32.dll - does not know the domain controler(s) it should use to authenticate the credentials i use for the impersonation.
maybee im wrong with this thinkings...
PLZ, can anyone help me with this problem? its realy urgent, i need to get this working!
thank you very much,
dialsc
|
|
|
|
|
Hello..
i'm beginner in c# and have problems with implementing some things in my project...
i need to draw circle (ellipse) as car and different roads (from couple segments) on some map
and to be able to peek a road and navigate such car on this road and also noise if the car gets out from the road... something like this..
I tried to read some good articles here.. but i missed the main idea of such design and also do i need directx?
Thanks for any help...
Shimon
|
|
|
|
|
Hi,
I'm creating a COM object single dll server in C++, which will be used in managed code, in C#. I'm having a little trouble with types . I need to declare method wich will have one input argument and one output argument, both of string type (in C#). Now I work with arguments :
C++
HRESULT Method([in] unsigned char const* source, [out, retval] unsigned char* output);
which are (in C#) converted to :
byte Method(ref byte source);
1. what kind of declaration I need in C++, so it would be transformed to string Method(string source) (in C#);
2. How to convert that kind to char* (in C++).
thanks
|
|
|
|
|
|
Idea - what I want to do:
<br />
struct AtomicInt<br />
{<br />
Int32 m_value;<br />
public static int operator++(ref AtomicInt ai) { Interlocked.Increment(ai.m_value); });<br />
}<br />
operator ++ has to modify the struct itself, but ref doesn't seem to be allowed for operators. So I either have toi make AtomicInt a class (sucks), or I can't provide a meaningful overload for operator ++ - or am I missing something?
|
|
|
|
|
This works for me:
public struct AtomicInt
{
Int32 m_value;
public static AtomicInt operator++ (AtomicInt ai)
{
Interlocked.Increment(ref ai.m_value);
return ai;
}
public override string ToString()
{
return m_value.ToString();
}
}
...
AtomicInt ai = new AtomicInt();
Console.WriteLine(ai);
Console.WriteLine(++ai);
Console.WriteLine(ai++);
Console.WriteLine(ai);
Hope this helps.
|
|
|
|
|
ah yes, that's probably how it's intended to work, but that defeats the purpose
|
|
|
|
|
Ok, then perhaps this is saver:
public struct AtomicInt
{
Int32 m_value;
public AtomicInt(Int32 value)
{
m_value = value;
}
public static AtomicInt operator++ (AtomicInt ai)
{
int i = Interlocked.Increment(ref ai.m_value);
return new AtomicInt(i);
}
public override string ToString()
{
return m_value.ToString();
}
}
|
|
|
|
|
I'm still not sure if this is handled correctly internally.
As I guess, what the IL really does is
AtomicInt x; <br />
++x;<br />
==>
<br />
AtomicInt x;<br />
x = AtmicInt.op_Increment(x);<br />
which wouldn#t work as intended. I guess I should check with reflector.
|
|
|
|
|
I assume, that's correct, but then you have to protect the Increment operation (e.g. per lock on any object) outside of the structs code, and this is not what you want ...
|
|
|
|
|
A struct should generally be immutable, so perhaps you should make it a class after all.
---
single minded; short sighted; long gone;
|
|
|
|
|
Guffa wrote: A struct should generally be immutable
But the inbuild structs are also not, eg: Rectangle.Offset()
|
|
|
|
|
Yes, some structures are not immutable, but most are. It has been questioned many times if making those mutable was a good move or not.
If you make a mutable struct, you should be aware that it doesn't work as a property in a class, you can only use it locally.
---
single minded; short sighted; long gone;
|
|
|
|