|
yes, winforms application is apart, it can just connect to the service
|
|
|
|
|
Then your initial premise is wrong. You can't pass a value in from one side and expect the same value to be available at the other side without doing some work. What you could do is write the value to a database at the server, and read it from there using a separate WCF call.
|
|
|
|
|
Thank you for your help Pete O'Hanlon
|
|
|
|
|
Not a problem. There are many ways you could architect this - from using MSMQ over WCF to hosting the WCF server inside your Windows Forms application and having your PDF connect to that.
|
|
|
|
|
I used below regular experssion to Not allow double quotes in textbox but it didn't work .
(I need to allow single quotes)
<asp:RegularExpressionValidator ID="rwvFilter" runat="server" ControlToValidate="txtFilter"
ErrorMessage="Filter is not valid" CssClass="error-message" ValidationExpression="@\\""></asp:RegularExpressionValidator>
|
|
|
|
|
Our IT, a very elaborate production environment, is rather involved and I'm try to write a GUI front end that will help visualize the layout and help in troubleshooting.
For remote consoles were using VNC, and it can be spawned from inside an application. But this does not appear to be the same case with Microsoft Management Console(MMC). How can I spawn a remote console to any server and get the GUI that I would get in MMC. Any direction would great. Technologies I may be missing etc. Thanks guys.
Gregg
|
|
|
|
|
This question doesn't make sense.
VNC will show you the remote desktop, NOT a single application. Sooooo you would just need to launch the MMC on the remote desktop and you'll see it. All it takes is a couple of mouse clicks on the remote machine.
...or am I missing something?
For what you're talking about, we just use Terminals[^] and launch the MMC we want in the Start/Run box.
|
|
|
|
|
Hello Gregg,
MMC is just a kind of Plattform. The Connection you want to do is not in the MMC, it is part of the Plugin what you load to your MMC.
You can add for example the Plugin in for DHCP Management and while you add them, you can deceide, what server you want to connect with. Afterwards you can save this settings as "DHCPonMyServer.msc" file.
If you want to run this Plugin on this server again, just run the MMC with this file as parameter.
You can also add more than one Plugin to an MMC so you can create an individual MMC File for each of your server.
Martin
|
|
|
|
|
Thanks guys... My understanding of what is happening here has grown and understand how ridiculous it sounds. And I am grateful that there are those who responded to tell me so. Thanks again
|
|
|
|
|
how to get a report between two number field in selection formula??
Eg: stselection = "{tblSales_D.InvNo}>='" & txtInvoice.Text.Trim() & "' AND {tblSales_D.InvNo} <='" & TextBox1.Text.Trim() & "'"
I want to fetch data from between two text bob fields
|
|
|
|
|
gridview conrol coding in asp.net c#
|
|
|
|
|
K.Bharathidhasan wrote: gridview conrol coding in asp.net c#
Yes I am sure that you can do that if you just give it a try. In the future, please try and create a meaningful title for your posting as "c#" is not very descriptive of your question, if indeed you meant to ask some sort of a question.
|
|
|
|
|
MSDN[^]
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
Hi,
i want to store the webservice method's XML output[the one which we get after invoking the webservice method]. Below is the code which am using and the output that am getting after executing it. Please help to get sort of this....
code:
After adding web reference that consists of webservice URL am using the below code.
WindowsService.webservice ody = new WindowsService.webservice ();
try
{
ody.PreAuthenticate = true;
ody.Credentials = new System.Net.NetworkCredential("login", "Password", "Domain");
Logfile(ody.Reconfigure(1).ToString());
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
output as in log file:
OdyTibWinService.OdyTibWebService.OUT_Reconfigure
But the actual XML output is:
<message>Reconfiguration completed successfully.
|
|
|
|
|
Logfile(ody.Reconfigure(1).ToString());
That would call the "ToString" method on a "Reconfigure" item, of the class called "OUT_Reconfigure".
Member 9826281 wrote: But the actual XML output is:
<message>Reconfiguration completed successfully.
Implement a function in that class to return the "actual content". Might be that it's already implemented. Change the code to look like below;
Logfile(ody.Reconfigure(1).); Now remove the dot (the one on the far-right), and type it in again. Check the list; there should be a description popping up as you hover the items.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Member 9826281 wrote: But the actual XML output is:
<message>Reconfiguration completed successfully.
Well since that is not XML that certainly isn't the output.
|
|
|
|
|
Hi everybody,
my application is written in VB.NET using Visual Studio 2008 and it runs an a Windows CE device, so it uses Compact Framework.
I need to avoid multiple instances of the application and I don't know how to do it.
I have found some solutions but only for the full framework, not for the compact.
Other solutions to this problem talk about mutex: when the application start I should create a mutex if this is the first instance of the application or stop the application if the mutex already exists (or something like this)... but I don't know how to do this.
Can someone help me?
Thanks in advance
|
|
|
|
|
steve_9496613 wrote: but I don't know how to do this.
Would require some P/Invokes as described on SO[^]. Also check out the alternative file-lock.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi Eddy!
Searching again I found some code about mutex and with little changes it seems to work.
I wrote (copy/past + some changes...) a class SingleInstanceApplication:
Imports System.Reflection
Imports System.Runtime.InteropServices
Public Class SingleInstanceApplication
<DllImport("Coredll.dll", SetLastError:=True)> _
Public Shared Function CreateMutex(ByVal Attr As IntPtr, ByVal Own As Boolean, ByVal Name As String) As IntPtr
End Function
<DllImport("Coredll.dll", SetLastError:=True)> _
Public Shared Function ReleaseMutex(ByVal hMutex As IntPtr) As Boolean
End Function
Const ERROR_ALREADY_EXISTS As Long = 183
Public Shared Sub Run(ByVal frm As Form)
Dim name As String = Assembly.GetExecutingAssembly().GetName().Name
Dim mutexHandle As IntPtr = CreateMutex(IntPtr.Zero, True, name)
Dim Rerror As Long = Marshal.GetLastWin32Error()
If (Not Rerror = ERROR_ALREADY_EXISTS) Then
Application.Run(frm)
End If
ReleaseMutex(mutexHandle)
End Sub
End Class
then I wrote a class to start the application:
Public Class StartApp
Public Shared Sub main()
Try
SingleInstanceApplication.Run(FormMain)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
End Class
finally I modified the start object of the application from "FormMain" (the main form of the application) to "StartApp".
It works!
Thanks.
|
|
|
|
|
Nice, you're welcome
|
|
|
|
|
Sorry for the cross post but this doesn't fit neatly into Silverlight/WPF!
I am asking this in the WPF forum because this is a WPF app but this question does not necessarily pertain to WPF, i.e. the UI thread.
Here is the scenario:
I have three (3) threads. Thread One (1) call it the Master Thread; Thread Two (2) is a Ethernet Comm thread; and Thread Three (3) is a GPIB comm thread. Both communication threads handle asynchronous communications from remote entities. At this time there is only one entity hanging off each comm type.
I have implemented a mix of EventWaitHandles and delegates. This all works pretty well. Just think this architecture is a bit ...... ugly. So which one is better/safer?
My concern is as follows. With delegates, for example, the Master thread registers an event handler with Thread 2 and an event handler with Thread 3 for messages that come in. Obviously data could come in near simultaneously. So Thread 2 encases a message in an EventArg and invokes the event on the Master thread. The Master Thread begins processing and then Thread 3 encases its message in an EventArg and invokes the event on the Master Thread. What happens? Does the Master Thread stop in the middle of handling the first event to service the second one? Does the second event wait until the first event is processed? What if Thread 2 gets another message and invokes the event again while the Master is processing the first event?
I wonder if using a queue and an manual Reset EventWaitHandle is not a better idea as the Thread 2 can check the status and wait until it is reset before putting the message in the queue and setting the EventWaitHandle again.
Opinions, please?
Thanks,
Doug
I am a Traveler
of both Time and Space
|
|
|
|
|
I have a similar case: multiple threads accessing temperature controllers over a serial port; a temperature charting thread; another handling user interaction.
When I need to access a shared resource (like the serial port), I’ve been using a C# “lock” at the appropriate point to block a competing thread.
It’s been working well and does not require the threads to do anything “special” (other than insure all requests are short in duration so as not to tie up any one thread for an extended amount of time).
|
|
|
|
|
Good solution! I am using that in a couple of places and that helps. More I am trying to avoid a mix of EventWaitHandles and delegate/event handlers. I think this is a bit "messy" looking. But with schedule tight sometimes you just have to do what you have to do
Doug
I am a Traveler
of both Time and Space
|
|
|
|
|
OK, I cannot get my head around the whether there is a difference between the 'classic' (perhaps long winded) way of doing it, multiple classes and the 'new' Yield route to (apparently) the same end.
I can understand the classic route (I think), see the code below.
Yield confuses the heck out of me, if I understand it correctly then it's absolutely genius, I get the idea of a state machine (I think) and logically it sort of makes sense but I am not at all confident.
Can it possibly be this simple? You just make that one method as simple or complex as necessary for your situation?
(Warning, silly example since arrays can already be enumerated, but it's easy to demo)
Public Class YieldExample
Implements IEnumerable
Private _Thing As Double()
Public Iterator Function GetEnumerator() As IEnumerator Implements IEnumerable.GetEnumerator
If IsNothing(Me._Thing) Then
Throw New InvalidOperationException()
End If
For Index As Integer = 0 To Me._Thing.GetUpperBound(0)
Yield Me._Thing(Index)
Next
End Function
End Class
What I understand to be the 'old way'.
Public Class ExampleEnumerable
Implements IEnumerable(Of Double)
Private _Thing As Double()
Public Function GetEnumerator() As IEnumerator(Of Double) Implements IEnumerable(Of Double).GetEnumerator
Return New ExampleEnumerator(Me._Thing)
End Function
Public Function GetEnumerator1() As IEnumerator Implements IEnumerable.GetEnumerator
Return Me.GetEnumerator
End Function
End Class
Public Class ExampleEnumerator
Implements IEnumerator(Of Double)
Private _Thing As Double()
Private _Index As Integer
Private _curItem As Double
Public Sub New(ByVal Thing As Double())
Me._Thing = Thing
Me._Index = -1
Me._curItem = Nothing
End Sub
Public ReadOnly Property Current As Double Implements IEnumerator(Of Double).Current
Get
If IsNothing(Me._curItem) Then
Throw New InvalidOperationException()
End If
Return Me._curItem
End Get
End Property
Public ReadOnly Property Current1 As Object Implements IEnumerator.Current
Get
Return Me.Current
End Get
End Property
Public Function MoveNext() As Boolean Implements IEnumerator.MoveNext
If Me._Index = Me._Thing.GetUpperBound(0) Then
Return False
End If
Me._Index += 1
Me._curItem = Me._Thing(Me._Index)
Return True
End Function
Public Sub Reset() Implements IEnumerator.Reset
Me._Index = -1
Me._curItem = Nothing
End Sub
#Region "IDisposable Support"
End Class
Thanks,
Mike
|
|
|
|