本文整理汇总了C#中Db.Repair方法的典型用法代码示例。如果您正苦于以下问题:C# Db.Repair方法的具体用法?C# Db.Repair怎么用?C# Db.Repair使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Db
的用法示例。
在下文中一共展示了Db.Repair方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MainWindow
//.........这里部分代码省略.........
sidebar.CloseRequested += HideSidebar;
sidebar.Show ();
info_box = new InfoBox ();
ViewModeChanged += info_box.HandleMainWindowViewModeChanged;
info_box.VersionIdChanged += delegate (InfoBox box, uint version_id) { UpdateForVersionIdChange (version_id);};
sidebar_vbox.PackEnd (info_box, false, false, 0);
info_box.Context = ViewContext.Library;
tag_selection_widget.Selection.Changed += HandleTagSelectionChanged;
tag_selection_widget.DragDataGet += HandleTagSelectionDragDataGet;
tag_selection_widget.DragDrop += HandleTagSelectionDragDrop;
tag_selection_widget.DragBegin += HandleTagSelectionDragBegin;
tag_selection_widget.KeyPressEvent += HandleTagSelectionKeyPress;
Gtk.Drag.SourceSet (tag_selection_widget, Gdk.ModifierType.Button1Mask | Gdk.ModifierType.Button3Mask,
tag_target_table, DragAction.Copy | DragAction.Move);
tag_selection_widget.DragDataReceived += HandleTagSelectionDragDataReceived;
tag_selection_widget.DragMotion += HandleTagSelectionDragMotion;
Gtk.Drag.DestSet (tag_selection_widget, DestDefaults.All, tag_dest_target_table,
DragAction.Copy | DragAction.Move );
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 (db.Photos);
} catch (System.Exception e) {
//FIXME assume any exception here is due to a corrupt db and handle that.
new RepairDbDialog (e, db.Repair (), main_window);
query = new FSpot.PhotoQuery (db.Photos);
}
UpdateStatusLabel ();
query.Changed += HandleQueryChanged;
db.Photos.ItemsChanged += HandleDbItemsChanged;
db.Tags.ItemsChanged += HandleTagsChanged;
db.Tags.ItemsAdded += HandleTagsChanged;
db.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;