private void FormSettingsCollectingSetting(object sender, SettingCollectorCancelEventArgs e) { if (e.Element == optionLevel3) { e.Cancel = true; } }
} // CollectedSettingsForm // ---------------------------------------------------------------------- private void FormSettingsCollectingSetting( object sender, SettingCollectorCancelEventArgs e ) { if ( e.Element == optionLevel3 ) { e.Cancel = true; } } // FormSettingsCollectingSetting
// ---------------------------------------------------------------------- protected virtual bool OnCollectingSetting(object element) { if (CollectingSetting != null) { SettingCollectorCancelEventArgs e = new SettingCollectorCancelEventArgs(element); CollectingSetting(this, e); return(e.Cancel == false); } return(true); } // OnCollectingSetting
// ---------------------------------------------------------------------- protected virtual bool OnCollectingSetting(object element) { if (CollectingSetting != null) { SettingCollectorCancelEventArgs e = new SettingCollectorCancelEventArgs(element); CollectingSetting(this, e); return e.Cancel == false; } return true; } // OnCollectingSetting
} // DerivedSettingsWindow // ---------------------------------------------------------------------- protected override void OnCollectingSetting(SettingCollectorCancelEventArgs e) { FrameworkElement frameworkElement = e.Element as FrameworkElement; if (frameworkElement == null) { return; } // exclusion rules if (Option3.Name.Equals(frameworkElement.Name) || Edit3.Name.Equals(frameworkElement.Name)) { e.Cancel = true; } } // OnCollectingSetting
} // OnCollectingSetting // ---------------------------------------------------------------------- private void WindowCollectingSetting(object sender, SettingCollectorCancelEventArgs e) { OnCollectingSetting(e); } // WindowCollectingSetting
} // WindowSettings // ---------------------------------------------------------------------- protected virtual void OnCollectingSetting(SettingCollectorCancelEventArgs e) { } // OnCollectingSetting
} // UserSettingLoading // ---------------------------------------------------------------------- private void SettingCollectorsCollectingSetting( object sender, SettingCollectorCancelEventArgs e ) { OnCollectingSetting( e ); } // SettingCollectorsCollectingSetting
} // SaveSettings // ---------------------------------------------------------------------- protected virtual void OnCollectingSetting( SettingCollectorCancelEventArgs e ) { if ( CollectingSetting != null ) { CollectingSetting( this, e ); } } // OnCollectingSetting
} // Collect // ---------------------------------------------------------------------- private void SettingCollectingSetting( object sender, SettingCollectorCancelEventArgs e ) { if ( CollectingSetting != null ) { CollectingSetting( this, e ); } } // SettingCollectingSetting