Click here to Skip to main content
15,887,875 members
Home / Discussions / C#
   

C#

 
GeneralRe: WPF / C# Listview Selected Item Pin
Jacob Dixon25-Jul-09 17:06
Jacob Dixon25-Jul-09 17:06 
Question[Message Deleted] Pin
Omar Akhtar Sheikh25-Jul-09 9:31
Omar Akhtar Sheikh25-Jul-09 9:31 
AnswerCP Member : Please Ignore - Crosspost Pin
Abhijit Jana25-Jul-09 9:45
professionalAbhijit Jana25-Jul-09 9:45 
Questionhow to disable keyboard.......... [modified] Pin
Member 423560125-Jul-09 8:24
Member 423560125-Jul-09 8:24 
AnswerRe: how to disable keyboard.......... Pin
Abhijit Jana25-Jul-09 8:48
professionalAbhijit Jana25-Jul-09 8:48 
AnswerRe: how to disable keyboard.......... Pin
PIEBALDconsult25-Jul-09 8:50
mvePIEBALDconsult25-Jul-09 8:50 
Questionmark as unsaved if the user changes ANYTHING? Pin
Megidolaon25-Jul-09 7:58
Megidolaon25-Jul-09 7:58 
AnswerRe: mark as unsaved if the user changes ANYTHING? Pin
Mike Ellison25-Jul-09 8:48
Mike Ellison25-Jul-09 8:48 
Yea, the most obvious solution is the tedious one: trap each input control's change event and set an isDirty type flag for the form to true.

But... you could think of this as a more general-purpose problem too. It wouldn't be difficult to write a separate controller class - one that could take a form as input, loop through all of its controls, and assign event handlers for the input control change events. This controller would have an Initialize(Form frm) method and an IsDirty read/write property. You would then instantiate this controller in the Load event for each winForm you wish to track this way. When you save a document from the winForm, you set the controller's IsDirty flag to false. Then whenever the input changes on the form, the controller has already established event handlers that sets its IsDirty flag to true.

Once the controller class is built, it becomes very simple to use in your winForm and reusable across multiple forms.


AnswerRe: mark as unsaved if the user changes ANYTHING? Pin
PIEBALDconsult25-Jul-09 10:49
mvePIEBALDconsult25-Jul-09 10:49 
AnswerRe: mark as unsaved if the user changes ANYTHING? Pin
DaveyM6925-Jul-09 11:29
professionalDaveyM6925-Jul-09 11:29 
AnswerRe: mark as unsaved if the user changes ANYTHING? Pin
Mike Ellison25-Jul-09 17:39
Mike Ellison25-Jul-09 17:39 
AnswerRe: mark as unsaved if the user changes ANYTHING? Pin
Guffa25-Jul-09 22:15
Guffa25-Jul-09 22:15 
AnswerRe: mark as unsaved if the user changes ANYTHING? Pin
Megidolaon26-Jul-09 6:18
Megidolaon26-Jul-09 6:18 
AnswerRe: mark as unsaved if the user changes ANYTHING? Pin
Mike Ellison1-Aug-09 11:00
Mike Ellison1-Aug-09 11:00 
QuestionScrollBar in Listview Pin
SajjadZare25-Jul-09 6:31
SajjadZare25-Jul-09 6:31 
AnswerRe: ScrollBar in Listview Pin
Abhijit Jana25-Jul-09 9:18
professionalAbhijit Jana25-Jul-09 9:18 
QuestionHelp with WIA scanning control. Pin
CodeBase2525-Jul-09 6:31
CodeBase2525-Jul-09 6:31 
Questiondatabound comboboxes in datagridview. Pin
tonks8425-Jul-09 6:27
tonks8425-Jul-09 6:27 
AnswerRe: databound comboboxes in datagridview. Pin
Omar Akhtar Sheikh25-Jul-09 8:29
Omar Akhtar Sheikh25-Jul-09 8:29 
GeneralRe: databound comboboxes in datagridview. Pin
tonks8425-Jul-09 8:54
tonks8425-Jul-09 8:54 
Question[Message Deleted] Pin
neha_rai25-Jul-09 5:36
neha_rai25-Jul-09 5:36 
Answerwaiting for reply Pin
neha_rai25-Jul-09 9:13
neha_rai25-Jul-09 9:13 
AnswerRe: moving points Pin
Henry Minute25-Jul-09 13:20
Henry Minute25-Jul-09 13:20 
QuestionToolStrip Overflow button event Pin
satsumatable25-Jul-09 3:40
satsumatable25-Jul-09 3:40 
AnswerRe: ToolStrip Overflow button event Pin
satsumatable25-Jul-09 4:01
satsumatable25-Jul-09 4:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.