次の方法で共有


ModuleDialogPage.ApplyChanges メソッド

定義

派生クラスでオーバーライドされると、適用された変更の成功を示す値を返します。

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;
} 

適用対象