C# (CSharp) SIL.FieldWorks.SharpViews.Hookups TssHookupAdapter - 2개의 예제가 발견되었습니다. 이것들은 오픈소스 프로젝트에서 추출된 C# (CSharp)의 SIL.FieldWorks.SharpViews.Hookups.TssHookupAdapter에 대한 실세계 최고 등급의 예제들입니다. 예제들을 평가하여 예제의 품질 향상에 도움을 줄 수 있습니다.
관련
Related in langs
The information a TssHookup needs in order to hook to a particular string property of a particular object. This is intended to support one style of view construction with SharpViews. The idea is that, given a class like StTxtPara and a property like Contents, we could generate a helper class StTxtParaProps, with static methods like this: class StTxtParaProps { public static TssHookupAdapter Contents(StTxtPara target) { return new TssHookupAdapter(target, () => target.Contents, hookup => target.Contents += hookup.TssPropChanged, hookup => target.Contents -= hookup.TssPropChanged); } } This then allows us to do something (as yet not fully designed or implemented) like aView.Add(StTxtParaProps.Contents(aPara)); Problems: (1) the above doesn't look particularly fluent; (2) we have a dependency problem between SharpViews (which defines TssHookupAdapter) and FDO (where we'd like to keep the model-specific code generation). SharpViews already references FDO, and it's unlikely we can change that. The approach used in ExpressionDemo may be more promising.