I am trying to write a desktop app where users can browse their computers for images and when they are found drag them onto a design stage. Basically the interface for the app consists of a tools panel on the right side of the screen and the design stage (a large white box) on the left. One of the many tools within the tools panel is a browse button which is used to search for images. How can I add the ability to drag images from where ever they reside onto the design stage using C#? Please point me to a site that talks about importing images into an app if you know of any, thanks in advance for your help.
How can I add the ability to drag images from where ever they reside onto the design stage using C#?
Create a new Panel in the staging-area, and display the image within. Go here[^] for explanation on implementing Drag&Drop.
Images can't be stored in the application, one would use a special directory or, preferably, a local database (like SqlCe or Sqlite). There are various examples on storing and retrieving images from a database.
I'm working on writing something that will allow you to create distribution groups in Exchange 2010.
The problem I am having is I am passing string arrays to my service for the Members and ManagedBy parameters.
This is how I attempted to make this work:
var members = new MultiValuedProperty<object>();
foreach (string s ingroup.Members)
The problem I'm having is it is returning an error because it appears it wants Microsoft.Exchange.Configuration.Tasks.RecipientWithAdUserGroupIdParameter within the MultiValuedProperty.
I'm a little confused because it then looks like the RecipientWithAdUserGroupIdParameter contains an array of RecipientIdParameter:
Error: System.ServiceModel.FaultException: System.Management.Automation.RemoteException: Cannot process argument transformation on parameter 'Members'. Cannot convert value"8caf8910-86d0-4d00-a452-8c30c0f62373 cfa01a55-6b35-4e61-bf0e-9050308623c7" to type "Microsoft.Exchange.Data.MultiValuedProperty`1[Microsoft.Exchange.Configuration.Tasks.RecipientWithAdUserGroupIdParameter`1[Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter]]". Error: "Cannot convert the "8caf8910-86d0-4d00-a452-8c30c0f62373" value of type "Deserialized.Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter" to type "Microsoft.Exchange.Configuration.Tasks.RecipientWithAdUserGroupIdParameter`1[Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter]"." at System.Management.Automation.PowerShell.CoreInvoke[TOutput](IEnumerable input, PSDataCollection`1 output, PSInvocationSettings settings) at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings) at System.Management.Automation.PowerShell.Invoke() at CloudPanel.Exchange.ExchPs.RunPowershell(PSCommand pscmd, String script) at CloudPanel.Exchange.ExchPs.RunPowershell(PSCommand pscmd, String script) at CloudPanel.Exchange.ExchPs.New_DistributionGroup(DistributionGroup group, String companydn)
Anyone have an idea what I can do to accomplish this? There are some stuff out on the web about using ICollection when reading from Exchange but i'm trying to send commands to exchange.
I need to do a simple drag and drop procedure, but I dont know why this code isn´t working...
/// Interaction logic for MainWindow.xaml
public partial class MainWindow : Window
throw; // this rethrows the caugh exception.
// here you will get the same exception as you got in the// other catch.// Note that I used throw; to rethrow the exception. If on the// other catch I did a throw exception; I would end-up replacing// the stored callstack (that's usually a bad thing).
Note: You can also avoid catching the exception by putting a more specific type in the first catch (like IOException instead of Exception).
Hey folks!! Hope you can help me with my client code.
Först I debugg the Server wich is an consoleapplication and the server starts, secondly I debugg the Client, I put a nickname value to the nickNameTextBox and click on Connect (button2) the compiler stops at this code line
from the button 2 handler - unless you have pressed Button1 first, the connection has not been established and it will likely throw an exception - probably the one you are complaining about.
Personally, I would have a "Connect" method, which checked if you are connected and does so if not - and call it from both click events. (I would probably also make it return the stream instead of using a class level variable directly in the two event handlers).
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.