I'm distributing an application via ClickOnce (runs 'online' from network'), included in the app are a couple of text files which are copied to the deployment location correctly when published.
I'm attempting to refer to the path of these files programatically:
Dim t As New HTMLTemplate("ReportTemplates\IncidentDetailMain.txt")
Somet...
Is it possible to transmit a callback via remoting? I'd like to do something along the lines of myRemoteObject.PerformStuff( x => Console.WriteLine(x) );
If not, how would I implement a equivalent functionality?
Edit: I'm aware Remoting got superseded by WCF, but I'm still interested in this specific case. (Out of curiosity though, how...
Hi all!
I have a code contract on some interface IImageRepository:
[ContractClassFor(typeof(IImageRepository))]
sealed class IImageRepositoryContract : IImageRepository
{
IImage IImageRepository.GetById(int imageId)
{
Contract.Requires(imageId > 0);
return default(IImage);
}
}
I want to test code contract...
Normally a databound winform only fires the getters for the properties which match textboxes, grids etc
But as I page through a collection (via BindingNavigator NextItem/PreviousItem), I'm finding that if I set a datagrid's DataSource to a property, then remove it, that property getter thereafter continues to fire even though the grid o...
What I want to be more specific is an element I can use for grouping a set of other elements, without effecting their layout. The only thing it should do besides giving a nicer XAML by grouping related elements in their own parent tag is to propagate ambient properties such as DataContext. It should be a purely logical element without an...
Hi
I am using Aspose cells to manipulate Excel spreadsheets.
One of the types in the API is a collection of Pictures in the spreadsheet, which derives from CollectionBase:
see this link:
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/aspose.cells.pictures.html
I want to convert this type to something that al...
I have a C# app in which I am testing 3 ways to do something with XML.
I read a string of XML get a value out and then add it to a custom collection.
I am testing XMLDocument, XDocument and String manipulation to find the node value, in that order recording a start and end time for each.
However if I say mix the order up I get differe...
When I press CTRL and Up Arrow on DataGridView I go to the first row. When I do the same with Down Arrow I go to last row in DGV. How to disable this behavior in this direction that when I will do CTRL+Up I will go one row up and when I do CTRL+Down I go one row down?
...
Im just starting to work with NHibernate. I've setup a simple many-to-many scenario using Products and Suppliers as follows:
<class name="Product" table="Products">
<id name="Id">
<generator class="guid" />
</id>
<property name="Name" />
<bag name="SuppliedBy" table="ProductSuppliers" lazy="true">
<key colu...
I have some List:
List<int> list = new List<int> { 1, 2, 3, 4, 5 };
I want to apply some transformation to elements of my list. I can do this in two ways:
List<int> list1 = list.Select(x => 2 * x).ToList();
List<int> list2 = list.ConvertAll(x => 2 * x).ToList();
What is the difference between these two ways?
...
I've created a class library and built a dll (release build). I've then referenced the DLL in another project (I've tried several). I can see the namespace and classes in Object Browser and I can declare instances of the classes but I cannot use or see any of the methods or properties! there is no IntelliSense whatsoever and calling the ...
Hi,
I set the data source programmatically to datagridview of the windows application.
I set the "Enable editing" to true & readonly property is also set to false.
so is there any thing I'm missing?
Thanks..
...
Is there a .NET/Python library that supports Bluetooth passkey authentication?
I'd like to create a Windows desktop application that would scan for Bluetooth devices and interact with them. So in case of .NET it is .NET Desktop.
What .NET/Python lib should I use (preferably the one that supports passkey authentication along with a no-a...
Hello everyone,
I am using VSTS 2008 + C# + .Net 3.5 to conversion the below input XML file into destination format. There may be arbitrary number of Image elements. And the new Price information is provided in List.
Any quick way to implement the conversion function?
source format,
<?xml version="1.0"?>
<Metadata version="1">
<Own...
How do I make instances of and calls to COM components that have been extended?
I have used a third party COM component (XRawFile2.dll from Finnigan/ Thermo Scientific) for many years in a mass spectrometry related application written in .NET (mixed VB.NET and C#) for accessing raw spectrum data. This has worked well. However this COM c...
I'm trying to insert a new object into my database using LINQ to SQL but get a NullReferenceException when I call InsertOnSubmit() in the code snippet below. I'm passing in a derived class called FileUploadAudit, and all properties on the object are set.
public void Save(Audit audit)
{
try
{
using (ULNDat...
I have a DataGridView and handle event CellFormatting. It has a parameter called:
DataGridViewCellFormattingEventArgs e
With
e.RowIndex in it.
When i do:
DataGridView.Rows[e.RowIndex]
I get proper row from collection.
But when I click at a header of a column to sort it by other column than default one and user DataGridView.Rows...
Are there localisation mechanisms available under .NET (out of the box) that support something like Java's locale's variant?
Beside the language and country I would like to be able to have a variant, say, per users' domain.
My users represent various domains and their vocabulary varies. I was trying something like "en-US-domain1", but to...
I'm using the XlsIo .net library and it seems to consistently return a date that is four years and one day in the past compared to the value I see in Excel.
Does anyone know what the cause of this is?
...
Hi
I have a solution called Tools that has three projects in it; Tools, PerecentageBar, MessageBox. Each of these projects is part of the Tools assembly.[In the properties page of each I have set the AssemblyName to MyCompany.Tools.Controls].
I have in Tools Project:
namespace MyCompany.Tools.Controls
{
public class MyPictureBox...