ModuleDialogPage.ApplyChanges メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
派生クラスでオーバーライドされると、適用された変更の成功を示す値を返します。
protected:
abstract bool ApplyChanges();
protected abstract bool ApplyChanges ();
abstract member ApplyChanges : unit -> bool
Protected MustOverride Function ApplyChanges () As Boolean
戻り値
true
変更が正常に適用された場合。それ以外の場合は false
。
例
ApplyChanges メソッドを実装する例を次に示します。
protected override bool ApplyChanges() {
bool appliedChanges = false;
if (!ReadOnly || !UIInfoValid())
return false;
try {
Cursor.Current = Cursors.WaitCursor;
bool directoryExists = _serviceProxy.UpdateSettings(_updatedBag);
if (!directoryExists) {
ShowError(null, "Cannot access directory", true);
}
_bag = _updatedBag.Clone();
appliedChanges = true;
_hasChanges = false;
} catch (Exception ex) {
DisplayErrorMessage(ex, _resourceMgr);
} finally {
Cursor.Current = Cursors.Default;
Update();
}
return appliedChanges;
}