本文整理汇总了C#中System.Windows.Annotations.Storage.XmlStreamStore.Flush方法的典型用法代码示例。如果您正苦于以下问题:C# XmlStreamStore.Flush方法的具体用法?C# XmlStreamStore.Flush怎么用?C# XmlStreamStore.Flush使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。
在下文中一共展示了XmlStreamStore.Flush方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: StopAnnotations
// -------------------------- StopAnnotations -------------------------
/// <summary>
/// Disables annotations processing and hides annotations.</summary>
public void StopAnnotations()
{
// If the AnnotationStore is active, flush and close it.
if ( (_annotService != null) && _annotService.IsEnabled )
{
_annotService.Store.Flush();
_annotStream.Flush();
_annotStream.Close();
}
// If the AnnotationService is active, shut it down.
if (_annotService != null)
{
if (_annotService.IsEnabled)
_annotService.Disable();
_annotService = null;
}
}// end:StopAnnotations()
示例2: DeleteMark_Click
// ------------------------- DeleteMark_Click -------------------------
void DeleteMark_Click(object sender, RoutedEventArgs e)
{
Annotation ann = ((MenuItem)sender).Tag as Annotation;
_annStore.DeleteAnnotation(ann.Id);
_annStore.Flush();
MenuItem thisMenu = sender as MenuItem;
ContextMenu parentMenu = thisMenu.Parent as ContextMenu;
FrameworkElement dObj =
parentMenu.PlacementTarget as FrameworkElement;
while (!(dObj is StackPanel))
{
dObj = dObj.Parent as FrameworkElement;
}
ListBox collection = dObj.Parent as ListBox;
collection.Items.Remove(dObj);
Util.FlushDispatcher();
}