Trust me, maintaining your own versions can be a real blessing! I'm both the software architect and the build master so it's one thing I have to worry about. It didn't take me long to make policy that we do it ourselves. Besides, look at all your commercial .NET libraries and find a good one that uses automated versioning!
With our app, it was even more crucial. For testing, we all drop assemblies in a repository for varoius reasons (like only some people have licenses to third-party libraries, though we use very few). We do use assembly binding redirection in our .config file because our app is deployed as a touchless-deployment smart client that we can easily update, but it got to be a complete hastle to keep synced when many different people are dropped locally-tested assemblies in a testing repository!
If it would give you any ideas, here's how we do ours: the major and minor versions are still incremented as most applications are. The build number is the same as what it is in .NET when you use an asterisk in that position: the number of days since Jan. 1, 2000 (ex, 1475 for today). .NET uses the number of seconds since midnight of the current day modulo 2 for the revision number, but we simply increment that for bugfixes to an existing, already-deployed assembly. Feature enhancements is what usually constitutes a minor or major version number increment. The build number we typically use to just track the date since the aforementioned epoch when the assembly was build. That's what .NET's automatic versioning seems to do anway.
Now, what I'm still wondering about is how Microsoft manages there. Take a look at .NET 1.0 assemblies: 1.0.3300.0 (1.0.3300.228 for a file version - not assembly version - for SP2). For .NET 1.1 assemblies, they use 1.0.5000.0. Why that's not 1.1.5000.0 and what that build number represents I don't know. Also note that they don't change their assembly versions for service packs. You could also consider that, using the AssemblyFileVersionAttribute instead for bug fixes instead of the AssemblyVersionAttribute.
how can u scale a bitmap that has a pixel format of 1bppindexed!!
i tried to use poiners to extract each pixel(that is 1bit) and then scale them, it didn't work with me!!
can anyone provide me with a sample code?
I get some strange behavior from a comboBox.
It selects it's value, when the tab page where it's on is Entered.
I do not want that to happen!
When creating or layouting the selection is NULL.
(I'm using the tabpages from the magiclibrary by the way, the designer f***s the visualAppearance enum up but it work ok)
The comboBox uses a dataView for it's selectedValue
and an other one for it's dataSource.
Tried setting the SelectedText in the SelectedValueChanged event but it's already NULL.
Solved it by setting the selectedtext in the tappage enter function.
Unfortunatly this means that i have to litter my code all over the place with functions that fix this.
Is there a more generic sollution to this?
Could I inherit and catch some hidden event that get's fired just before it get's shown? (but after it's layouted)
Or does sombody know what setting might be wrong?
(PS 4 people have been trying to find it for a few days now and no luck, so probably only the true wizards can solve this riddle.)
The documentation defines the SelectedText property: A string that represents the currently selected text in the combo box. If DropDownStyle is set to ComboBoxStyle.DropDownList, the return is an empty string ("").
The default value for DropDownStyle is DropDown, not DropDownList.
For my application the ComboBox has a DataView as its DataSource. After selecting an item from the drop-down list, the SelectedIndex and SelectedValue properties contain the expected values. The SelectedText property contains an empty string even though the correct value is clearly displayed in the edit window.
I haven't tried this yet, but I think setting the SelectedIndex to "-1" will cause the edit window to remain empty until a value is selected.
I'm working on a windows app that uses a PropertyGrid control. The grid displays certain properties of some objects that I use in my app. I want to make the PropertyGrid display a dialog for a string property. This functionality is typically available for properties of array type. I want the user to be able to click next to the string property and make a dialog popup so that he/she can construct the value of the string property from some possible options. Is this possible?
See the UITypeEditor class. You need to derive the class and create your own UITypeEditor that uses GetService to request the IWindowsFormsEditorService so that you can call ShowDialog and pass an instance of your form. Finally, use the EditorAttribute on your property that specifies the Type (or the type string if in another assembly for design-time only that you don't want to ship, which should be installed into the Global Assembly Cache (GAC)). There should be examples of this in the documentation for these classes in the .NET Framework SDK.
i had such question: i wrote my code in vs.net then i press f5 to view the result of my program,but theres only a flash of the commandline window which disapeared within 0.5 second... Is there any method to view the result while coding with vs.net? I have known the method that write such code as Console.ReadLine() at the end of the code . Is there any other method ?
You can either Debug the code, manually run it from the command line, or put in a Thread.Sleep(x) where X is the number of Milisecoinds you want the program (current thread) to pause for. If you use the Thread.Sleep option, you will need to reference the System.Threading library.
I create a console application project for Multicast of IP. I get a problem when I run this application.
The console outputs an error message: Invalid Parametres. I implement multicast with an UDPClient object like this:
UdpClient s = new UdpClient();
s.JoinMulticastGroup(ip); //The exception happens here
//Environment: Windows Server 2003 Standard Edition, VC#.NET
Make sure you set the AddressFamily of the UdpClient in the constructor before calling JoinMulticastGroup, otherwise an ArgumentException will be thrown. This constructor overload is only supported in .NET 1.1 and higher. More information about the exception that is thrown and the version of the .NET Framework in which you're developing might help if this doesn't solve your problem / is not possible to implement (i.e., using .NET 1.0).
You could create your own DataGridColumnStyle derivatives and ignore the Alignment property. Just derive from the existing ones like DataGridTextBoxColumn and DataGridBoolColumn to avoid having to implement the rest of the behavior.
In the override for DataGridColumnStyle.Alignment, try returning HorizontalAlignment.Left. The default painting procedure should use that to paint the text; otherwise, yes, you will have to do the text painting yourself (but that is pretty easy to do). See Graphics.MeasureString and Graphics.DrawString for more information.
i try to connect three tables by two datarelations. the first two are no problems but the third one doesnt work. i tried to connect table a with table b and table b with table c. connection b to c is the connection that does not work
What exactly doesn't work? Is the third grid just not showing any rows?
One other thing you could try, although your code looks correct, is to design a strongly-typed DataSet (add a new item to your project and select DataSet in the popup window) and create the tables and relationships in there. You can also drag-n-drop from the Server Explorer for a database connection as well. When you fill the DataSet using a DbDataAdapter derivative, you don't have to worry about all the code for the relationships and what not.