Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
J

J Holzer

@J Holzer
About
Posts
26
Topics
19
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • ReactiveCommand CanExecute is not updating button
    J J Holzer

    I´ve set up business logic handling a connection of a clientsoftware to a serversoftware. That BL is encapsulated in this interface:

    public interface IServerConnectionLogic
    {
    IObservable Connected { get; }
    Task Connect();
    ...
    }
    Connect());

    In my viewmodel (based on ReactiveObject) I create my commands, that should trigger the server-connection:

    CmdConnectToService = new ReactiveCommand(ServerConnectionLogic.Connected.Select(connected => !connected));
    CmdConnectToService.Subscribe(_ => ServerConnectionLogic.Connect());

    The command is bound to a button in my UI-XAML. When pressing the button the subscribed lamda is hit and the "Connect" method is called. Inside the Observable "Connected" is set to "true. Also the lambda in the "CanExecute"-parameter of the constructor of the ReactiveCommand is hit. But the UI is not updated. I would have expected the button to get disabled, sinde the observable "Connected" turns to "true" and the "Select" statement inverts my boolean value... I´ve tried that with the "RibbonButton" from the WpfToolkit as well as with a "normal" Button. Both are not getting updated. The same IObservable is also bound to a member field:

    m_ServerConnected = new ObservableAsPropertyHelper(ServerConnectionLogic.Connected, _ => raisePropertyChanged("ServerConnected"));

    while "m_ServerConnected" is bound to a CheckBox (for testing) via a property. That one is working fine, so the observable must be working... Does anyone have an idea what could be my issue?

    C# database wpf linq design sysadmin

  • Strange behavoir on KeyDown in CompactFramework
    J J Holzer

    That was my emergency-solution. The big question is why an event is raised in the beginning, but not after a button was pressed... That´s kind of strange to me...

    .NET (Core and Framework) csharp question

  • Strange behavoir on KeyDown in CompactFramework
    J J Holzer

    Hi! I have a Motorola MC7090 that runs a .Net Compact Framework - application. On the mainform i catch the "KeyDown"-Event, which work fine for "regular" keys. As the MC7090 (as most Windows Mobile devices) has some custom keys, two for volume (+/-) on the left side, and another key on the right side. When i open the application i get a key-down-event from this key on the right side. After klicking a button on the touchscreen the event is not longer thrown. All other keys (keypad 1-9, etc...) work fine. Just this one key is not working. Unfortunately my customner wants exacly this key to work. Does anyone have any idea how i could make this key work? Thanx! J.

    .NET (Core and Framework) csharp question

  • Speeding up the display of .Net Compact 2.0-application
    J J Holzer

    Hi folks! I have a Motorola/Symbol MC70 running a Compact Framework 2.0-application. The app receives commands from the network and displays custom-controls inside a panel. My problem is, that the creation of the control takes a lot of time. Are there any ideas how i could speed up this process?

    Mobile csharp sysadmin performance help question

  • DNS.GetHostEntry very slow. How do i speed it up?
    J J Holzer

    Hi folks! I do have an "Windows Mobile 5" device that runs a software that is trying to connect to a server in our network. When starting the software and connecting via IP-address everything works within a second. But we need to use the hostname of the server as the IP-address may change. So i built in a "DNS.GetHostEntry"-call to get the IPEndPoint i need to connect. When running the software the first time after reboot the DNS-Lookup takes between 20 and 30 seconds, which is way to long. (btw. when entering a URL in the device´s Internet Explorer is way faster!) Is there a way to speed up this query? Thanx for help! Greetings J.Holzer

    Mobile sysadmin question database performance help

  • Problems of losing handle to stdcall-api from C#-DLL
    J J Holzer

    Hi! I have a stdcall-DLL, that works as an API and offers me connection to a hardware-device using "open"/"close"-methodes, as well a "read"/"write"-methodes for accessing the device. These API-calls are wrapped by a C#-DLL, that encapsules the calls an offers some methods i need to use in my application. The API´s "open"-method delivers a handle, that is used with the other functions to access the device. This handle is stored in a private class-member for further use with the read-methodes. My application/wrapper-DLL opens the connection, then reads something from the device everytime an external signal arrives at my software. When starting my app everything works fine for some hours or days, until nothing can be read from the DLL and an error occurs ssaying "invalid handle". When trying to re-connect the device (API-calls "close" and "connect") the API tells me that the connection is already open and i cannot connect to the device. After restarting my software everything works fine again. Because of this behaviour i changed the operation of my software: Now the device is re-connected everytime i finished a read-operation. This is because i thought that maybe the API might have a problem with a long-term connection. Unfortunately i get the same problem again: After some hours/days i get an "invalid handle" again. As the application should run 24/7 i need a way to stabilize this connection to the device. Does anyone have an idea, where my problem might be? Thanx a lot Greetings JH

    C# help csharp hardware json question

  • ProgressBar does show value Vista but not under XP
    J J Holzer

    Hi! I have a C#/.Net2.0 software, that calculates some values in thread A, which is not the thread serving the forms. Those values should be displayed by a progressBar using a "set"-method using "Invoke". When running the software under Vista the Bar shows the values as it should. When running under XP the values are calculated and passed to the progressBar´s value-property, but not displayed in the form. Is there a difference between XP and Vista that has to be taken in mind in order to make the software display the progressBar´s value? Thanx for help! J.

    Windows Forms csharp help question

  • Discarding Keyboard-Events for GUI
    J J Holzer

    That´s the same thing i experienced. Strange... Thanx anyway!

    Windows Forms javascript help question

  • Discarding Keyboard-Events for GUI
    J J Holzer

    This didn´t work the way i need it. For testing i just built a small App, containing a form with 9 buttons. I handled the KeyDown-Event and set SupressKeyPress to true, but i still could navigation through my buttons with the cursor-keys and click them using the space-bar. I checked that with handling the Click-event, which behaved exactly like it did without SupressKeyPress set to true. I guess that this keyboard events are handled BEFOR they even arrive at my KeyDown-handler. The question is, if this prior handling can be suppressed in any way...

    Windows Forms javascript help question

  • Discarding Keyboard-Events for GUI
    J J Holzer

    Hi! I have an application that has a keyboard-listener (system-hook). It is being notified on any keyboad-event, even if the app-windows is not active. As far as that it works as designed. My problem is, that it is possible, that someone pushed the space-bar or the cursor-buttons, what effects on the GUI, e.g. to buttons, list-views, etc... So if someone presses the curser-buttons a highlight wanders around my gui. And if the spacebar is hit and a button was highlighted this button will be pressed. This is what i´d like to avoid. What i´d like to have is to make the gui ignore these keyboard inputs (except textboxes, where you need the keyboard). Is there a way of making the GUI-elements not react on keyboard-actions? Thanx J.

    Windows Forms javascript help question

  • Discarding Keyboard-Events for GUI
    J J Holzer

    Hi! I have an application that has a keyboard-listener (system-hook). It is being notified on any keyboad-event, even if the app-windows is not active. As far as that it works as designed. My problem is, that it is possible, that someone pushed the space-bar or the cursor-buttons, what effects on the GUI, e.g. to buttons, list-views, etc... So if someone presses the curser-buttons a highlight wanders around my gui. And if the spacebar is hit and a button was highlighted this button will be pressed. This is what i´d like to avoid. What i´d like to have is to make the gui ignore these keyboard inputs (except textboxes, where you need the keyboard). Is there a way of making the GUI-elements not react on keyboard-actions? Thanx J.

    C# javascript help question

  • Socket Problems
    J J Holzer

    Unfortunately not. We do not have access to the electronic´s firmware, so we cannot change the protocol in any way...

    .NET (Core and Framework) sysadmin question

  • Socket Problems
    J J Holzer

    Hello! I have a TCP/IP-Server, that listens for connections from a electronic device. The device connects to the server and the server build another IP-Connection to the electronic. It may happen, that the electronic has to reboot and cannot close the connection properly. The server has a connection-watchdog, that checks when the last message came in from the electronic and tries to close the connection if the electronic didn´t send a message since a certain time. Since the electronic cannot answer this close-request the connection seems to remain open, at least that´s what "netstat" tells me ("Wait for FIN", or "Last message was ACK"). Also it may happen, that the electronic tries to connect again, but then the server send´s just an "ACK" instead of "SYN/ACK", what makes the electronic retry to open the connection with "SYN". (Traced with WireShark) Is there a way to force the closing the connection, clear the open/waiting ports and enable the server to accept a new connection from the same electronic on the same port from the same IP? Thanks J.

    .NET (Core and Framework) sysadmin question

  • Problem with events in Webservices
    J J Holzer

    Hello! I have the following situation: A server should call event, which are being handled by the client. So i took the example posted on codeproject http://www.codeproject.com/useritems/RemotingEvent.asp (Remoting Event) and merged it with my existing code. When calling soapsuds for the desired webservice-class i get all my other methodes, but for the event i only get "add_xyevent"- and "remove_xyevent"-methodes. In the code in the example metioned above the event is subscribed inside the client like a regular event: m_server.xyevent += new EventDelegate(handlerFuncion) So i tried to use the event-method "add_xyevent", which ran into an SerializationException telling me that SOAP cannot serialize a generic type. m_server.add_xyevent(handlerFuncion); => SerializationException My question is: How can i subscribe to this event? Do i have to provide a specific keyword when declaring the event on the server? Who can help me? Thanks a lot! J.

    C# question help wcf com sysadmin

  • Focus-problems
    J J Holzer

    Hello! I´m having a problem with an application. This app has two windows, one as main view, one for entering some value that pops up when the value is needed. Sometime it happens that another application fetches the window-focus and so theres no focus on my input window. In order to see that i made the inputbox change it´s color. I´m using the "deactivate"-event to do this. Unfortunately this doesn´t work always. Does anybody have any idea why this could be so?

    C# help question

  • Calling unmanaged DLL-methodes (winmm.dll)
    J J Holzer

    Hi! I'd like to attach to winmm.dll from C# (VS2005) and translated a few DLLImports from a very old VB6-Code i found on the internet. Some methods have callbacks and i don't know how to translate them. The methods look like this: public static extern int midiInOpen(ref int lphMidiIn, int uDeviceID, int dwCallback, int dwInstance, int dwFlags); and public void MidiIN_Proc(long hmIN, long wMsg, int dwInstance, int dwParam1, int dwParam2) The method should somehow work like this: midiInOpen(ref hMidiIN, mMPU401IN, 0, CALLBACK_FUNCTION); The problem is, that in the original version dwInstance and dwCallback are pointers to methods. Unfortunately i have no clue how to use these DLL-calls in C#. Can anybody tell me how to do these DLL-calls or provide some example-code= Thanx a lot! J.

    C# tutorial csharp help announcement

  • Problems adding dynamically a custon-control to a panel
    J J Holzer

    Hi! I have the following situation: A panel called "BayContainer" some custom-controls from type "Bay" should be filled by file-drag&drop. So i created a method called "insert", that gets the position, the filename and the "BayContainer.Controls"-Object, where the newly created custom-control should be placed, as parameters When dropping a file into the panel the position is being calculated, the control is created, size and position are set. The first file works fine, but the 2nd control is not being painted (allthough it seems to be there because it received events, that are being connected to the new control). Any ideas, why the 2nd, 3rd, etc... control do not appear inside the panel? Thanx for help! J.

    Windows Forms help question

  • Stange crashes of an application
    J J Holzer

    I do have a debug-writer. But i always get different code-lines with that. The thread-sync is done by events, that are sent between the threads (this is because of the architecture and the needs of the app). Each class takes handles events it receives. What i got a few minutes ago was a "ExecutionEngineException" while closing a Logging-FileStream. Maybe this could be a hint on where the error might be...

    C# csharp help question

  • Stange crashes of an application
    J J Holzer

    Hi! I do have strange crashes on an application. An App, consisting of an .Net1.1/C#-Exe and some .Net1.1-DLLs is doing some communication over RS232 and executing some Threads/UserWorkItems. It processes some Jobs, that are started by commands that arrive over RS232. At some point, when the app is running maybe about 45mins to 1.5 hours it disapperard without any sign. I put in a lot of logging (Status of the system, exceptions and so on), so there should be nearly no line of code outside a try/catch. Every try/catch-block has it´s own logging. I even put a try/catch around the "Application.Run(...)" inside my main-routine. Logging before and after this application start should show me, what happened. No result: the app doesn´t even write the logging at the very end of the main-routine where any exception should be caught. But when the app crashes i do not get any more logging-entry or event this nice "MS-Send Information on crash"-Window. It´s just gone, just if anyone killed the process with the task-manager. And what the stangest thing is: it works fine for hours and hours on an simulation-worksstation, but crashes on the machine it should finally run on. Who can help me? Any ideas are welcome! Thanx a lot! J.

    C# csharp help question

  • Strange Problems with Memory- and Object-Access
    J J Holzer

    Of course. Not only one *g*

    C / C++ / MFC announcement c++ debugging performance help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups