|
Linq is loops.
Dictionary<accountId, SortedList<DataItem>> populateMeSortDescending;
|
|
|
|
|
I've got a MVVM WPF app that launches multiple threads via Tasks and I'd like the app to have a basic log UI feature, that is updated asynchronously as the tasks update.
I've been playing with Dispatchers, SyncContexts, various rewrites of ObsverableCollections and basically getting not very far.
I've currently got a ObservableCollection<string>, and each log entry is basically a new item, but I don't care if its just a textblock or anything else if it works .
Updating the collection works async, but it only displays on the ui once all the tasks have finished (and not all the entries are displayed even then, I have to call OnPropertyChanged again...).
Can anyone point me to an working example?
|
|
|
|
|
I answered a question a while back about using log4net to log to the UI. I blogged about how to do it here[^].
|
|
|
|
|
ah, that looks interesting. I'll give that a go, plus it looks like it might provide a base for more larger apps.
Thanks
|
|
|
|
|
|
I am writing a windows desktop application in C# 2008 and i wanna to have select for datatable :
IEnumerable<string> idsInA = dtd.AsEnumerable().Select(row => (string)row["ID"]);
it filters only on one row (ex.ID) but the thing i wanna is for three rows (ex:ID , Title , Path)
Ho i can do that ?
|
|
|
|
|
IEnumerable<string> idsInA =
(from row in dtd
where row["ID"] = idFilter && row["Title"] = titleFilter && row["Path"] = pathFilter
select row["ID"]).AsEnumerable();
But this only returns one column, if you want all the columns, you would use something like this:
var rowsInA =
(from row in dtd
where row["ID"] = idFilter && row["Title"] = titleFilter && row["Path"] = pathFilter
select row);
and then rowsInA is an IEnumerable that contains the row objects.
|
|
|
|
|
thanks in advnaced!
But i wanna to return all cells of my datatable !
(Not filter some !!! [No where])
|
|
|
|
|
Then just remove the where part of the second example I gave.
|
|
|
|
|
I am writing a windows desktop application in C# 2010 that will be calling a windows api. The user will enter some information, hit the submit button, and the windows api will be called.
My question is would you show me code on how to call the windows api, tell the windows api what you are looking for, and return any optional values obtained from the windows api?
|
|
|
|
|
|
classy_dog wrote: show me code on how to call the windows api An impossible task, since the code for each function is unique to that function. Go to MSDN, search for the function you are interested in, and read the documentation.
Use the best guess
|
|
|
|
|
What functions in the Windows API are you wanting to call?
|
|
|
|
|
I will get calling an windows api that another programmer at work is 'writing'? Should I ask her how to call the windows api?
|
|
|
|
|
Unless you are working for Microsoft, the other programmer is not writing a Windows API. And yes, you should ask her how her "API" should be called.
|
|
|
|
|
|
classy_dog wrote: Should I ask her how to call the windows api? Let's dub it the "Classy API"
using System.Windows.Forms;
using Microsoft.Win32;
using Classy;
using Classy.Dog;
using Classy.Core;
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I want to write a C# WPF application using visual studio 2010. I want to be able to allow the user to do the following:
1. enter some data,
2. select a file from a directory path,
3. error message will be displayed if the user enters wrong data,
4. the user will hit the submit button and call a windows api.
Thus can you tell me how to accomplish this goal?
|
|
|
|
|
Create a WPF project in Visual Studio. Write some code. Beyond that, it's up to you.
|
|
|
|
|
In addition to Pete's comments, if you head over to the articles section you will find plenty of good samples of Windows forms applications, and how to use the various controls. Alternatively look here[^] and here[^] on MSDN.
Use the best guess
|
|
|
|
|
|
I'm having the toughest time finding / figuring out how to get remote powershell working with 2012.
Currently this is my code:
private void OpenRunspace(string username, string password, ref Runspace remoteRunspace)
{
SecureString pass = new SecureString();
foreach (char c in password.ToCharArray())
{
pass.AppendChar(c);
}
PSCredential psc = new PSCredential(username, pass);
WSManConnectionInfo wmci = new WSManConnectionInfo(new Uri("http://" + ConfigurationManager.AppSettings["ExchangeServer"] + "/powershell"), "http://schemas.microsoft.com/powershell/Microsoft.Exchange", psc);
wmci.AuthenticationMechanism = AuthenticationMechanism.Kerberos;
wmci.ProxyAuthentication = AuthenticationMechanism.Negotiate;
wmci.SkipCACheck = true;
wmci.SkipCNCheck = true;
remoteRunspace = RunspaceFactory.CreateRunspace(wmci);
}
The error I keep getting is "Access is denied". I've verified the credentials I am passign to it is part of the REmote Management Users group on that local server, ran the Set-User "Administrator" powershell enabled command in Exchange 2013
What else am I missing here?
|
|
|
|
|
Hi,
I have working C# winform application ,
I need access the database name userid,password in
variaus sysetems SQL Server's current DB Name UID, PWD
thanks,
Senthil Kumar
|
|
|
|
|
What is the exact problem? It is not really clear.
What have you tried, where are you stuck?
Please improve the question if you want us to help you.
|
|
|
|
|
My Question is How to change the connection string externally... i use a txt file and change the uid,pwd in client place... is there any other ways to set the sql DB,UID,Pwd
thanks
|
|
|
|