Search results for query: *

  • Users: mauede
  • Content: Threads
  • Order by date
  1. M

    Question How to convert an Action into a Func that returns a value

    I am using the following statements, provided by Varian, to connect to the Velocity Engine and consequently be able to use the Velocity API library Action<bool> orThrow = result => OrThrow(result, engine); orThrow(engine.loginToGrid(UserName, Password, GRID_IP...
  2. M

    Question How to get full property updated with the contains of a TextBox

    I tried to integrate an example I found on the internet with my application but it doesn't work. Basically. my GUI contains a TextBox where the user can enter a value between 0 and 1. My goal is to check that the entered value is in the range [0,1] and also to have the property DiceThreshold...
  3. M

    Question Are INotifyPropertyChanged and ValidationRule compatible?

    In my GUI I have a TextBox whose content can be edited at any time by the user and must be known in the code that has to use its latest value. The TextBox is already bound to the procedure that checks its content is in the proper range: <Window.Resources> <local:DoubleRangeRule...
  4. M

    Question Changing the Background color of some ListBox Items

    The ListBox is defined as follows: <ListBox x:Name="EditableStructs" Grid.Row="5" Grid.Column="1" Margin="930,62,0,40" SelectionMode="Single" Grid.ColumnSpan="2" Background="PowderBlue" Height="500" ScrollViewer.VerticalScrollBarVisibility="Visible"...
  5. M

    How to draw the user's attention only to some items of a ListBox

    I wonder whether it is possible to highlight or change the color of the text or place a symbol (for example "!") or something else to attract the user's attention only on some items of the rightmost ListBox in the attached GUI. The reason is to reduce the user's time devote to double-checking...
  6. M

    Resolved How to find an alphanumeric substring

    This is a trivial problem but I cannot get a solution. I am trying to make my code recognize strings like the following: "PTV1_3000", "ITV3_4000" The sub-string should contain a root-like "PTV", "ITV", "CTV" followed by one or more integer numbers followed by "_". I tried different flavors of...
  7. M

    Erratic behavior of TextBox "TextChanged" event

    I have inserted in the GUI a TextBox. It must hold a number between 0 and 1 that represents a lower threshold for accepting a structure name guessed by the Dice coefficient. I have set a default but the user can edit the threshold. Therefore I have to check the number entered is between 0 and...
  8. M

    How to use a ComboBox as a dropdown menu

    I have to show a list of strings (Trial names) that are fetched from a PostgreSQL database. The number of strings is only known at runtime. I have implemented that through a ComboBox as follows: <ComboBox x:Name="TrialDB" Grid.Row="1" Grid.Column="1" MinWidth="100"...
  9. M

    How to improve the GUI

    Thank you for all the help you have given me. I added a couple of new features upon requests from my colleagues. It does what it is supposed to do. However, it looks ugly. I tried to make it more compact but WPF but I couldn't. For some reason, that I don't get, if I move horizontally one of the...
  10. M

    Resolved Wierd behavior of Visual Studio debugger

    Today I witnessed a weird behavior of Visual Studio debugger. For some reason, to me unknown, it refuses to set a break-point for some regular assignment statements. They are inside an event handler. I do not know whether that matters at all. In the following I am posting the code where that...
  11. M

    Is there a C# code to read and display Excel sheets?

    I have been asked to do something to read and display excel sheets. If I was using MatLab it would be a piece of cake. Unluckily there is no MatLab license in the hospital where I work. I found a posted C# code. I downloaded and unlocked it. Unluckily when I compiler I got a lot of errors...
  12. M

    Question Deployment of a WPF executable as a self-contained application

    Some time ago I asked the same question for a console UI application. Despite my efforts and all the help you gave me, I was unable to deploy a self-contained application. It looks like Visual Studio does not allow this choice when publishing an executable that targets >NET Framework. I am to...
  13. M

    ListBox_Selection_Changed triggered by clearing its content

    When the user changes his/her mind and selects another item (a CT scan) of a ListBox, I need to erase the content of another three ListBoxes. I do that through the following statements: StructSets.ItemsSource = null; StructSets.Items.Clear(); StructSets.Items.Refresh()...
  14. M

    How does "LostFocus" work

    In the WPF application, I am trying to develop, I have a TextBox where the user enters the identifier of the patient whose data are to be extracted and displayed. I am using the event "Property_Changed", available by default, to react to the user erasing the current patient_Id and entering...
  15. M

    How to instantiate the classes of a mono-threaded .dll library

    Some months ago I learned that the Varian library ESAPI is mono-threaded. Consequently, If we try to instantiate a class, that is on another thread, from the GUI, we get an exception because classes, on a stack, cannot transfer thread ownership. We can pass values over a multi-threaded...
  16. M

    Resolved Do I really need INotifyPropertyChanged?

    I suspect that INotifyPropertyChanged is overkill for what I would like to achieve. I need: to display a list of strings in a ListBox (the 5th column in the attached picture that is not working yet) to allow the user to edit each ListBox Item and set the status of the contained string...
  17. M

    Resolved ListBox whose items can be edited / discarded /accepted

    I would appreciate some help in implementing the following with WPF. I need to have a ListBox displaying a list of strings but some may be empty strings. Each ListBox item can be edited, discarded, or accepted. Therefore, besides the editable ListBox I need some other type of WPF control that...
  18. M

    Resolved how to best use "public"read-write properties of event-driven applications

    I am trying to convert a working Console UI application into a WPF one. I use an s/w library from Varian Medical Systems, called Velocity API, whose documentation is scarce and somewhat misleading. Velocity API hardcoded logic is built on context. My Console UI application calls several...
  19. M

    ListBox cascade

    I am working with patient data in a hospital. A patient can have multiple CT scans. Every CT scan may have several linked structure-sets Every structure-set contains several structures. I managed to display a list of structure names directly from a PostgreSQL table. The next step is to...
  20. M

    How to close a Console application

    I have developed a console application that sort of automates the renaming of RT structures in Radiotherapy clinical trials. I would like the console window to be closed from the program when it reaches the end. I tried many ways (please, see attached excerpts) but the window does not disappear...
Back
Top Bottom