本文整理汇总了C#中System.Db.Repair方法的典型用法代码示例。如果您正苦于以下问题:C# Db.Repair方法的具体用法?C# Db.Repair怎么用?C# Db.Repair使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Db
的用法示例。
在下文中一共展示了Db.Repair方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MainWindow
//.........这里部分代码省略.........
tag_selection_scrolled.ShadowType = ShadowType.In;
tag_selection_widget = new TagSelectionWidget (Database.Tags);
tag_selection_scrolled.Add (tag_selection_widget);
Sidebar.AppendPage (tag_selection_scrolled, Catalog.GetString ("Tags"), "tag");
AddinManager.AddExtensionNodeHandler ("/FSpot/Sidebar", OnSidebarExtensionChanged);
Sidebar.Context = ViewContext.Library;
Sidebar.CloseRequested += HideSidebar;
Sidebar.Show ();
InfoBox = new InfoBox ();
ViewModeChanged += InfoBox.HandleMainWindowViewModeChanged;
InfoBox.VersionIdChanged += delegate (InfoBox box, uint version_id) { UpdateForVersionIdChange (version_id);};
sidebar_vbox.PackEnd (InfoBox, false, false, 0);
InfoBox.Context = ViewContext.Library;
tag_selection_widget.Selection.Changed += HandleTagSelectionChanged;
tag_selection_widget.KeyPressEvent += HandleTagSelectionKeyPress;
tag_selection_widget.ButtonPressEvent += HandleTagSelectionButtonPressEvent;
tag_selection_widget.PopupMenu += HandleTagSelectionPopupMenu;
tag_selection_widget.RowActivated += HandleTagSelectionRowActivated;
LoadPreference (Preferences.TAG_ICON_SIZE);
try {
query = new FSpot.PhotoQuery (Database.Photos);
} catch (System.Exception e) {
//FIXME assume any exception here is due to a corrupt db and handle that.
new RepairDbDialog (e, Database.Repair (), main_window);
query = new FSpot.PhotoQuery (Database.Photos);
}
UpdateStatusLabel ();
query.Changed += HandleQueryChanged;
Database.Photos.ItemsChanged += HandleDbItemsChanged;
Database.Tags.ItemsChanged += HandleTagsChanged;
Database.Tags.ItemsAdded += HandleTagsChanged;
Database.Tags.ItemsRemoved += HandleTagsChanged;
#if SHOW_CALENDAR
FSpot.SimpleCalendar cal = new FSpot.SimpleCalendar (query);
cal.DaySelected += HandleCalendarDaySelected;
left_vbox.PackStart (cal, false, true, 0);
#endif
group_selector = new FSpot.GroupSelector ();
group_selector.Adaptor = new FSpot.TimeAdaptor (query, Preferences.Get<bool> (Preferences.GROUP_ADAPTOR_ORDER_ASC));
group_selector.ShowAll ();
if (zoom_scale != null) {
zoom_scale.ValueChanged += HandleZoomScaleValueChanged;
}
view_vbox.PackStart (group_selector, false, false, 0);
view_vbox.ReorderChild (group_selector, 0);
find_bar = new FindBar (query, tag_selection_widget.Model);
view_vbox.PackStart (find_bar, false, false, 0);
view_vbox.ReorderChild (find_bar, 1);
main_window.KeyPressEvent += HandleKeyPressEvent;