From 6c731f50a95b179af7cf0ec7431fc4bbac37ade8 Mon Sep 17 00:00:00 2001 From: qianlifeng Date: Sun, 8 Feb 2015 16:27:41 +0800 Subject: [PATCH] Improve Everything plugin user experience --- Plugins/Wox.Plugin.Everything/Main.cs | 73 ++- .../PortableEverything/Everything.ini | 485 ++++++++++++++++++ .../Wox.Plugin.Everything.csproj | 1 + Plugins/Wox.Plugin.Everything/plugin.json | 2 +- .../PluginIndicator.cs | 2 +- Wox.CrashReporter/Properties/AssemblyInfo.cs | 55 +- Wox.CrashReporter/ReportWindow.xaml | 2 +- Wox.CrashReporter/ReportWindow.xaml.cs | 18 +- Wox.CrashReporter/Wox.CrashReporter.csproj | 225 ++++---- Wox.CrashReporter/packages.config | 4 + Wox.Infrastructure/Properties/AssemblyInfo.cs | 21 +- Wox/App.config | 12 +- Wox/Helper/ErrorReporting.cs | 1 - Wox/Properties/AssemblyInfo.cs | 3 +- Wox/Wox.csproj | 8 + Wox/packages.config | 1 + 16 files changed, 717 insertions(+), 196 deletions(-) create mode 100644 Plugins/Wox.Plugin.Everything/PortableEverything/Everything.ini create mode 100644 Wox.CrashReporter/packages.config diff --git a/Plugins/Wox.Plugin.Everything/Main.cs b/Plugins/Wox.Plugin.Everything/Main.cs index 17a6b84a15..58a41644f2 100644 --- a/Plugins/Wox.Plugin.Everything/Main.cs +++ b/Plugins/Wox.Plugin.Everything/Main.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; +using System.ServiceProcess; using Wox.Infrastructure; using System.Reflection; using Wox.Plugin.Everything.Everything; @@ -10,7 +11,7 @@ using Wox.Plugin.Features; namespace Wox.Plugin.Everything { - public class Main : IPlugin, IPluginI18n,IContextMenu + public class Main : IPlugin, IPluginI18n, IContextMenu { PluginInitContext context; EverythingAPI api = new EverythingAPI(); @@ -141,23 +142,67 @@ namespace Wox.Plugin.Everything private void StartEverything() { - if (!CheckEverythingIsRunning()) + if (!CheckEverythingSericeRunning()) { - try + if (InstallAndRunEverythingService()) { - Process p = new Process(); - p.StartInfo.Verb = "runas"; - p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; - p.StartInfo.FileName = GetEverythingPath(); - p.StartInfo.UseShellExecute = true; - p.Start(); - } - catch (Exception e) - { - context.API.ShowMsg("Start Everything failed"); + StartEverythingClient(); } + } + else + { + StartEverythingClient(); + } + } + + private bool InstallAndRunEverythingService() + { + try + { + Process p = new Process(); + p.StartInfo.Verb = "runas"; + p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; + p.StartInfo.FileName = GetEverythingPath(); + p.StartInfo.UseShellExecute = true; + p.StartInfo.Arguments = "-install-service"; + p.Start(); + return true; + } + catch (Exception e) + { + return false; + } + } + + private void StartEverythingClient() + { + try + { + Process p = new Process(); + p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; + p.StartInfo.FileName = GetEverythingPath(); + p.StartInfo.UseShellExecute = true; + p.StartInfo.Arguments = "-startup"; + p.Start(); + } + catch (Exception e) + { + context.API.ShowMsg("Start Everything failed"); + } + } + + private bool CheckEverythingSericeRunning() + { + try + { + ServiceController sc = new ServiceController("Everything"); + return sc.Status == ServiceControllerStatus.Running; + } + catch + { } + return false; } private bool CheckEverythingIsRunning() @@ -190,7 +235,7 @@ namespace Wox.Plugin.Everything { SearchResult record = selectedResult.ContextData as SearchResult; List contextMenus = new List(); - if(record == null) return contextMenus; + if (record == null) return contextMenus; List availableContextMenus = new List(); availableContextMenus.AddRange(GetDefaultContextMenu()); diff --git a/Plugins/Wox.Plugin.Everything/PortableEverything/Everything.ini b/Plugins/Wox.Plugin.Everything/PortableEverything/Everything.ini new file mode 100644 index 0000000000..c3769fe5c9 --- /dev/null +++ b/Plugins/Wox.Plugin.Everything/PortableEverything/Everything.ini @@ -0,0 +1,485 @@ +[Everything] +app_data=0 +run_as_admin=0 +window_x=75 +window_y=37 +window_wide=1097 +window_high=664 +maximized=0 +minimized=0 +fullscreen=0 +ontop=0 +match_whole_word=0 +match_path=0 +match_case=0 +match_diacritics=0 +match_regex=0 +selection_mask_right_bottom_inclusive=1 +allow_multiple_windows=0 +allow_multiple_instances=0 +run_in_background=1 +show_tray_icon=0 +alternate_row_color=0 +show_mouseover=0 +check_for_updates_on_startup=0 +beta_updates=0 +show_highlighted_search_terms=1 +text_size=0 +hide_empty_search_results=0 +clear_selection_on_search=1 +new_window_key=0 +show_window_key=0 +toggle_window_key=0 +language=0 +show_selected_item_in_statusbar=0 +open_folder_command2= +open_file_command2= +open_path_command2= +explore_command2= +explore_path_command2= +window_title_format= +taskbar_notification_title_format= +instance_name= +translucent_selection_rectangle_alpha=70 +min_zoom=-6 +max_zoom=27 +context_menu_type=0 +auto_include_fixed_volumes=1 +auto_include_removable_volumes=0 +last_export_type=0 +max_threads=0 +reuse_threads=1 +single_parent_context_menu=0 +auto_size_1=512 +auto_size_2=640 +auto_size_3=768 +auto_size_aspect_ratio_x=9 +auto_size_aspect_ratio_y=7 +auto_size_path_x=1 +auto_size_path_y=2 +sticky_vscroll_bottom=1 +last_options_page=0 +draw_focus_rect=1 +date_format= +time_format= +invert_layout=0 +listview_item_high=0 +debug=0 +home_match_case=0 +home_match_whole_word=0 +home_match_path=0 +home_match_diacritics=0 +home_regex=0 +home_search=1 +home_filter=0 +home_sort=0 +home_index=1 +allow_multiple_windows_from_tray=0 +single_click_tray=0 +close_on_execute=0 +double_click_path=0 +update_display_after_scroll=0 +update_display_after_mask=1 +auto_scroll_view=0 +double_quote_copy_as_path=0 +snap=0 +snaplen=10 +rename_select_filepart_only=0 +rename_move_caret_to_selection_end=0 +search_edit_move_caret_to_selection_end=0 +select_search_on_mouse_click=1 +focus_search_on_activate=0 +reset_vscroll_on_search=1 +wrap_focus=0 +load_icon_priority=0 +load_fileinfo_priority=0 +header_high=0 +hide_on_close=0 +winmm=0 +menu_escape_amp=1 +fast_ascii_search=1 +match_path_when_search_contains_path_separator=1 +allow_literal_operators=0 +allow_round_bracket_parenthesis=0 +expand_environment_variables=0 +search_as_you_type=1 +convert_forward_slash_to_backslash=0 +match_whole_filename_when_using_wildcards=1 +double_buffer=1 +search= +show_number_of_results_with_selection=0 +date_descending_first=0 +size_descending_first=1 +size_format=2 +alpha_select=0 +tooltips=1 +rtl_listview_edit=0 +bookmark_remember_case=1 +bookmark_remember_wholeword=1 +bookmark_remember_path=1 +bookmark_remember_diacritic=1 +bookmark_remember_regex=1 +bookmark_remember_sort=1 +bookmark_remember_filter=1 +bookmark_remember_index=1 +exclude_list_enabled=1 +exclude_hidden_files_and_folders=0 +exclude_system_files_and_folders=0 +include_only_files= +exclude_files= +db_location= +db_multi_user_filename=0 +db_compress=0 +extended_information_cache_monitor=1 +keep_missing_indexes=0 +editor_x=0 +editor_y=0 +editor_wide=0 +editor_high=0 +editor_maximized=0 +file_list_relative_paths=1 +max_recv_size=8388608 +display_full_path_name=0 +size_tiny=10240 +size_small=102400 +size_medium=1048576 +size_large=16777216 +size_huge=134217728 +themed_toolbar=1 +show_copy_path=2 +show_copy_full_name=2 +show_open_path=2 +show_explore=2 +show_explore_path=2 +copy_path_folder_append_backslash=0 +custom_verb01= +custom_verb02= +custom_verb03= +custom_verb04= +custom_verb05= +custom_verb06= +custom_verb07= +custom_verb08= +custom_verb09= +custom_verb10= +custom_verb11= +custom_verb12= +filters_visible=0 +filters_wide=128 +filters_right_align=1 +filters_tab_stop=0 +filter= +filter_everything_name= +sort=Name +sort_ascending=1 +always_keep_sort=0 +index=0 +index_file_list= +index_etp_server= +index_link_type=1 +status_bar_visible=1 +select_search_on_focus_mode=1 +select_search_on_set_mode=2 +search_history_enabled=0 +run_history_enabled=0 +search_history_days_to_keep=90 +run_history_days_to_keep=90 +search_history_always_suggest=0 +search_history_max_results=24 +search_history_show_above=0 +service_port=15485 +etp_server_enabled=0 +etp_server_bindings= +etp_server_port=21 +etp_server_username= +etp_server_password= +etp_server_welcome_message= +etp_server_log_file_name= +etp_server_logging_enabled=1 +etp_server_log_max_size=4194304 +etp_server_log_delta_size=524288 +etp_server_allow_file_download=1 +http_server_enabled=0 +http_server_bindings= +http_title_format= +http_server_port=80 +http_server_username= +http_server_password= +http_server_home= +http_server_default_page= +http_server_log_file_name= +http_server_logging_enabled=1 +http_server_log_max_size=4194304 +http_server_log_delta_size=524288 +http_server_allow_file_download=1 +name_column_pos=0 +name_column_width=256 +path_column_visible=1 +path_column_pos=1 +path_column_width=559 +size_column_visible=1 +size_column_pos=2 +size_column_width=96 +extension_column_visible=0 +extension_column_pos=3 +extension_column_width=96 +type_column_visible=0 +type_column_pos=4 +type_column_width=96 +last_write_time_column_visible=1 +last_write_time_column_pos=3 +last_write_time_column_width=153 +creation_time_column_visible=0 +creation_time_column_pos=6 +creation_time_column_width=140 +date_accessed_column_visible=0 +date_accessed_column_pos=7 +date_accessed_column_width=140 +attribute_column_visible=0 +attribute_column_pos=8 +attribute_column_width=70 +date_recently_changed_column_visible=0 +date_recently_changed_column_pos=9 +date_recently_changed_column_width=96 +run_count_column_visible=0 +run_count_column_pos=10 +run_count_column_width=96 +date_run_column_visible=0 +date_run_column_pos=11 +date_run_column_width=140 +file_list_filename_column_visible=0 +file_list_filename_column_pos=12 +file_list_filename_column_width=96 +translucent_selection_rectangle_background_color= +translucent_selection_rectangle_border_color= +ntfs_volume_paths="C:" +ntfs_volume_includes=1 +ntfs_volume_load_recent_changes=0 +ntfs_volume_include_onlys="" +ntfs_volume_monitors=1 +filelists= +folders= +folder_monitor_changes= +folder_update_types= +folder_update_days= +folder_update_ats= +folder_update_intervals= +folder_update_interval_types= +exclude_folders= +connect_history_hosts= +connect_history_ports= +connect_history_usernames= +connect_history_link_types= +file_new_search_window_keys=334 +file_open_file_list_keys=335 +file_close_file_list_keys= +file_close_keys=343,27 +file_export_keys=339 +file_copy_full_name_to_clipboard_keys=9539 +file_copy_path_to_clipboard_keys= +file_set_run_count_keys= +file_create_shortcut_keys= +file_delete_keys=8238 +file_delete_permanently_keys=9262 +file_edit_keys= +file_open_keys=8205 +file_open_selection_and_close_everything_keys= +file_explore_path_keys= +file_open_new_keys= +file_open_path_keys=8461 +file_open_with_keys= +file_open_with_default_verb_keys= +file_play_keys= +file_preview_keys= +file_print_keys= +file_print_to_keys= +file_properties_keys=8717 +file_read_extended_information_keys=8517 +file_rename_keys=8305 +file_run_as_keys= +file_exit_keys=337 +file_custom_verb_1_keys= +file_custom_verb_2_keys= +file_custom_verb_3_keys= +file_custom_verb_4_keys= +file_custom_verb_5_keys= +file_custom_verb_6_keys= +file_custom_verb_7_keys= +file_custom_verb_8_keys= +file_custom_verb_9_keys= +file_custom_verb_10_keys= +file_custom_verb_11_keys= +file_custom_verb_12_keys= +edit_cut_keys=8536 +edit_copy_keys=8515,8493 +edit_paste_keys=8534,9261 +edit_select_all_keys=8513 +edit_invert_selection_keys= +view_filters_keys= +view_status_bar_keys= +view_window_size_small_keys=561 +view_window_size_medium_keys=562 +view_window_size_large_keys=563 +view_window_size_auto_fit_keys=564 +view_zoom_zoom_in_keys=443,363 +view_zoom_zoom_out_keys=445,365 +view_zoom_reset_keys=304,352 +view_go_to_back_keys=549,166 +view_go_to_forward_keys=551,167 +view_go_to_home_keys=548 +view_sort_by_name_keys=305 +view_sort_by_path_keys=306 +view_sort_by_size_keys=307 +view_sort_by_extension_keys=308 +view_sort_by_type_keys=309 +view_sort_by_date_modified_keys=310 +view_sort_by_date_created_keys=311 +view_sort_by_attributes_keys=312 +view_sort_by_file_list_filename_keys= +view_sort_by_run_count_keys= +view_sort_by_date_run_keys= +view_sort_by_date_recently_changed_keys=313 +view_sort_by_date_accessed_keys= +view_sort_by_ascending_keys= +view_sort_by_descending_keys= +view_refresh_keys=116 +view_fullscreen_keys=122 +view_toggle_ltrrtl_keys= +view_on_top_never_keys= +view_on_top_always_keys=340 +view_on_top_while_searching_keys= +search_match_case_keys=329 +search_match_whole_word_keys=322 +search_match_path_keys=341 +search_match_diacritics_keys=333 +search_enable_regex_keys=338 +search_add_to_filters_keys= +search_organize_filters_keys=1350 +bookmarks_add_to_bookmarks_keys=324 +bookmarks_organize_bookmarks_keys=1346 +tools_options_keys=336 +tools_console_keys=448 +tools_file_list_editor_keys= +tools_connect_to_etp_server_keys= +tools_disconnect_from_etp_server_keys= +help_everything_help_keys=112 +help_search_syntax_keys= +help_regex_syntax_keys= +help_command_line_options_keys= +help_everything_website_keys= +help_check_for_updates_keys= +help_about_everything_keys=368 +search_edit_focus_search_edit_keys=326,114 +search_edit_delete_previous_word_keys=4360 +search_edit_auto_complete_search_keys=4384 +search_edit_show_search_history_keys= +search_edit_show_all_search_history_keys=4646,4648 +result_list_item_up_keys=8230,4134 +result_list_item_down_keys=8232,4136 +result_list_page_up_keys=8225,4129 +result_list_page_down_keys=8226,4130 +result_list_start_of_list_keys=8228 +result_list_end_of_list_keys=8227 +result_list_item_up_extend_keys=9254,5158 +result_list_item_down_extend_keys=9256,5160 +result_list_page_up_extend_keys=9249,5153 +result_list_page_down_extend_keys=9250,5154 +result_list_start_of_list_extend_keys=9252 +result_list_end_of_list_extend_keys=9251 +result_list_focus_up_keys=8486,4390 +result_list_focus_down_keys=8488,4392 +result_list_focus_page_up_keys=8481,4385 +result_list_focus_page_down_keys=8482,4386 +result_list_focus_start_of_list_keys=8484 +result_list_focus_end_of_list_keys=8483 +result_list_focus_up_extend_keys=9510,5414 +result_list_focus_down_extend_keys=9512,5416 +result_list_focus_page_up_extend_keys=9505,5409 +result_list_focus_page_down_extend_keys=9506,5410 +result_list_focus_start_of_list_extend_keys=9508 +result_list_focus_end_of_list_extend_keys=9507 +result_list_focus_result_list_keys= +result_list_toggle_path_column_keys=1330 +result_list_toggle_size_column_keys=1331 +result_list_toggle_extension_column_keys=1332 +result_list_toggle_type_column_keys=1333 +result_list_toggle_date_modified_column_keys=1334 +result_list_toggle_date_created_column_keys=1335 +result_list_toggle_attributes_column_keys=1336 +result_list_toggle_file_list_filename_column_keys= +result_list_toggle_run_count_column_keys= +result_list_toggle_date_recently_changed_column_keys=1337 +result_list_toggle_date_accessed_column_keys= +result_list_toggle_date_run_column_keys= +result_list_size_all_columns_to_fit_keys=8555 +result_list_size_result_list_to_fit_keys= +result_list_context_menu_keys=9337 +result_list_scroll_left_keys=8229 +result_list_scroll_right_keys=8231 +result_list_scroll_page_left_keys=8485 +result_list_scroll_page_right_keys=8487 +result_list_select_focus_keys=8224 +result_list_toggle_focus_selection_keys=8480 +result_list_copy_selection_to_clipboard_as_csv_keys= +result_list_font= +result_list_font_size= +search_edit_font= +search_edit_font_size= +status_bar_font= +status_bar_font_size= +header_font= +header_font_size= +normal_background_color= +normal_foreground_color= +normal_bold= +highlighted_background_color= +highlighted_foreground_color= +highlighted_bold= +selected_background_color= +selected_foreground_color= +selected_bold= +highlighted_selected_background_color= +highlighted_selected_foreground_color= +highlighted_selected_bold= +selected_inactive_background_color= +selected_inactive_foreground_color= +selected_inactive_bold= +highlighted_selected_inactive_background_color= +highlighted_selected_inactive_foreground_color= +highlighted_selected_inactive_bold= +drop_target_background_color= +drop_target_foreground_color= +drop_target_bold= +highlighted_drop_target_background_color= +highlighted_drop_target_foreground_color= +highlighted_drop_target_bold= +current_sort_background_color= +current_sort_foreground_color= +current_sort_bold= +highlighted_current_sort_background_color= +highlighted_current_sort_foreground_color= +highlighted_current_sort_bold= +mouseover_background_color= +mouseover_foreground_color= +mouseover_bold= +mouseover_highlighted_background_color= +mouseover_highlighted_foreground_color= +mouseover_highlighted_bold= +current_sort_mouseover_background_color= +current_sort_mouseover_foreground_color= +current_sort_mouseover_bold= +mouseover_current_sort_highlighted_background_color= +mouseover_current_sort_highlighted_foreground_color= +mouseover_current_sort_highlighted_bold= +alternate_row_background_color= +alternate_row_foreground_color= +alternate_row_bold= +alternate_row_highlighted_background_color= +alternate_row_highlighted_foreground_color= +alternate_row_highlighted_bold= +current_sort_alternate_row_background_color= +current_sort_alternate_row_foreground_color= +current_sort_alternate_row_bold= +current_sort_alternate_row_highlighted_background_color= +current_sort_alternate_row_highlighted_foreground_color= +current_sort_alternate_row_highlighted_bold= diff --git a/Plugins/Wox.Plugin.Everything/Wox.Plugin.Everything.csproj b/Plugins/Wox.Plugin.Everything/Wox.Plugin.Everything.csproj index 0c677c0d26..96380b9b22 100644 --- a/Plugins/Wox.Plugin.Everything/Wox.Plugin.Everything.csproj +++ b/Plugins/Wox.Plugin.Everything/Wox.Plugin.Everything.csproj @@ -44,6 +44,7 @@ + diff --git a/Plugins/Wox.Plugin.Everything/plugin.json b/Plugins/Wox.Plugin.Everything/plugin.json index 0f7418f956..8eb78934eb 100644 --- a/Plugins/Wox.Plugin.Everything/plugin.json +++ b/Plugins/Wox.Plugin.Everything/plugin.json @@ -1,6 +1,6 @@ { "ID":"D2D2C23B084D411DB66FE0C79D6C2A6E", - "ActionKeyword":"f", + "ActionKeyword":"*", "Name":"Everything", "Description":"Search Everything", "Author":"qianlifeng,orzfly", diff --git a/Plugins/Wox.Plugin.PluginIndicator/PluginIndicator.cs b/Plugins/Wox.Plugin.PluginIndicator/PluginIndicator.cs index d095013704..fe0a2a8f40 100644 --- a/Plugins/Wox.Plugin.PluginIndicator/PluginIndicator.cs +++ b/Plugins/Wox.Plugin.PluginIndicator/PluginIndicator.cs @@ -67,7 +67,7 @@ namespace Wox.Plugin.PluginIndicator public string GetTranslatedPluginDescription() { - return context.API.GetTranslation("wox_plugin_luginindicator_plugin_description"); + return context.API.GetTranslation("wox_plugin_pluginindicator_plugin_description"); } } } diff --git a/Wox.CrashReporter/Properties/AssemblyInfo.cs b/Wox.CrashReporter/Properties/AssemblyInfo.cs index 688a8e327b..13ef80c587 100644 --- a/Wox.CrashReporter/Properties/AssemblyInfo.cs +++ b/Wox.CrashReporter/Properties/AssemblyInfo.cs @@ -1,36 +1,19 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 有关程序集的常规信息通过以下 -// 特性集控制。更改这些特性值可修改 -// 与程序集关联的信息。 -[assembly: AssemblyTitle("Wox.CrashReporter")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Wox.CrashReporter")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// 将 ComVisible 设置为 false 使此程序集中的类型 -// 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, -// 则将该类型上的 ComVisible 特性设置为 true。 -[assembly: ComVisible(false)] - -// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID -[assembly: Guid("0ea3743c-2c0d-4b13-b9ce-e5e1f85aea23")] - -// 程序集的版本信息由下面四个值组成: -// -// 主版本 -// 次版本 -// 生成号 -// 修订号 -// -// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, -// 方法是按如下所示使用“*”: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息通过以下 +// 特性集控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("Wox.CrashReporter")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Wox.CrashReporter")] +[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: ComVisible(false)] +[assembly: Guid("0ea3743c-2c0d-4b13-b9ce-e5e1f85aea23")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/Wox.CrashReporter/ReportWindow.xaml b/Wox.CrashReporter/ReportWindow.xaml index abd22798ea..c9f7a92ff1 100644 --- a/Wox.CrashReporter/ReportWindow.xaml +++ b/Wox.CrashReporter/ReportWindow.xaml @@ -35,7 +35,7 @@ - + diff --git a/Wox.CrashReporter/ReportWindow.xaml.cs b/Wox.CrashReporter/ReportWindow.xaml.cs index 05612cd9ca..c5a7d1a577 100644 --- a/Wox.CrashReporter/ReportWindow.xaml.cs +++ b/Wox.CrashReporter/ReportWindow.xaml.cs @@ -12,6 +12,7 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; +using Exceptionless; using Wox.Core; using Wox.Core.Exception; using Wox.Core.i18n; @@ -49,19 +50,18 @@ namespace Wox.CrashReporter string sendingMsg = InternationalizationManager.Instance.GetTranslation("reportWindow_sending"); tbSendReport.Content = sendingMsg; btnSend.IsEnabled = false; - ThreadPool.QueueUserWorkItem(o => SendReport()); + SendReport(); } private void SendReport() { - Hide(); - string error = string.Format("{{\"data\":{0}}}", ExceptionFormatter.FormatExcpetion(exception)); - string response = HttpRequest.Post(APIServer.ErrorReportURL, error, HttpProxy.Instance); - if (response.ToLower() != "ok") - { - Log.Warn("sending crash report failed: " + response); - } - Dispatcher.Invoke(new Action(Close)); + string reproduceSteps = + new TextRange(tbReproduceSteps.Document.ContentStart, tbReproduceSteps.Document.ContentEnd).Text; + exception.ToExceptionless() + .SetUserDescription(reproduceSteps) + .Submit(); + ExceptionlessClient.Current.ProcessQueue(); + Close(); } private void btnCancel_Click(object sender, RoutedEventArgs e) diff --git a/Wox.CrashReporter/Wox.CrashReporter.csproj b/Wox.CrashReporter/Wox.CrashReporter.csproj index 565c82d816..822e397681 100644 --- a/Wox.CrashReporter/Wox.CrashReporter.csproj +++ b/Wox.CrashReporter/Wox.CrashReporter.csproj @@ -1,109 +1,118 @@ - - - - - Debug - AnyCPU - {2FEB2298-7653-4009-B1EA-FFFB1A768BCC} - Library - Properties - Wox.CrashReporter - Wox.CrashReporter - v3.5 - 512 - ..\ - true - - - - true - full - false - ..\Output\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - ..\Output\Release\ - TRACE - prompt - 4 - false - - - - - - - - - - - - - - - - - - ReportWindow.xaml - - - - - Designer - MSBuild:Compile - - - - - {B749F0DB-8E75-47DB-9E5E-265D16D0C0D2} - Wox.Core - - - {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3} - Wox.Infrastructure - - - {8451ECDD-2EA4-4966-BB0A-7BBC40138E80} - Wox.Plugin - - - - - PreserveNewest - - - PreserveNewest - - - - - PreserveNewest - - - - - PreserveNewest - - - - - - - 这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 - - - - + + + + + Debug + AnyCPU + {2FEB2298-7653-4009-B1EA-FFFB1A768BCC} + Library + Properties + Wox.CrashReporter + Wox.CrashReporter + v3.5 + 512 + ..\ + true + + + + true + full + false + ..\Output\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + ..\Output\Release\ + TRACE + prompt + 4 + false + + + + ..\packages\Exceptionless.1.5.2121\lib\net35\Exceptionless.dll + + + ..\packages\Exceptionless.1.5.2121\lib\net35\Exceptionless.Models.dll + + + + + + + + + + + + + + + + + ReportWindow.xaml + + + + + Designer + MSBuild:Compile + + + + + {B749F0DB-8E75-47DB-9E5E-265D16D0C0D2} + Wox.Core + + + {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3} + Wox.Infrastructure + + + {8451ECDD-2EA4-4966-BB0A-7BBC40138E80} + Wox.Plugin + + + + + PreserveNewest + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + + + + + + 这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 + + + + \ No newline at end of file diff --git a/Wox.CrashReporter/packages.config b/Wox.CrashReporter/packages.config new file mode 100644 index 0000000000..aaa9e6ed9c --- /dev/null +++ b/Wox.CrashReporter/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Wox.Infrastructure/Properties/AssemblyInfo.cs b/Wox.Infrastructure/Properties/AssemblyInfo.cs index b40c421669..092a409147 100644 --- a/Wox.Infrastructure/Properties/AssemblyInfo.cs +++ b/Wox.Infrastructure/Properties/AssemblyInfo.cs @@ -2,9 +2,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// 有关程序集的常规信息通过以下 -// 特性集控制。更改这些特性值可修改 -// 与程序集关联的信息。 + [assembly: AssemblyTitle("Wox.Infrastructure")] [assembly: AssemblyDescription("https://github.com/qianlifeng/Wox")] [assembly: AssemblyConfiguration("")] @@ -13,24 +11,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyCopyright("The MIT License (MIT)")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] - -// 将 ComVisible 设置为 false 使此程序集中的类型 -// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, -// 则将该类型上的 ComVisible 特性设置为 true。 [assembly: ComVisible(false)] - -// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID [assembly: Guid("aee57a31-29e5-4f03-a41f-7917910fe90f")] - -// 程序集的版本信息由下面四个值组成: -// -// 主版本 -// 次版本 -// 生成号 -// 修订号 -// -// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, -// 方法是按如下所示使用“*”: -// [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/Wox/App.config b/Wox/App.config index af328919aa..ab8b3cde5f 100644 --- a/Wox/App.config +++ b/Wox/App.config @@ -1,12 +1,16 @@ + +
+ - + - - + + - + + \ No newline at end of file diff --git a/Wox/Helper/ErrorReporting.cs b/Wox/Helper/ErrorReporting.cs index cff796318f..d1de5c9822 100644 --- a/Wox/Helper/ErrorReporting.cs +++ b/Wox/Helper/ErrorReporting.cs @@ -13,7 +13,6 @@ namespace Wox.Helper { public static void Report(Exception e) { - if (Debugger.IsAttached) return; Log.Error(ExceptionFormatter.FormatExcpetion(e)); new CrashReporter.CrashReporter(e).Show(); } diff --git a/Wox/Properties/AssemblyInfo.cs b/Wox/Properties/AssemblyInfo.cs index 525979aae8..cfddac76a7 100644 --- a/Wox/Properties/AssemblyInfo.cs +++ b/Wox/Properties/AssemblyInfo.cs @@ -19,4 +19,5 @@ using System.Windows; ResourceDictionaryLocation.SourceAssembly )] [assembly: AssemblyVersion("1.1.0")] -[assembly: AssemblyFileVersion("1.1.0")] \ No newline at end of file +[assembly: AssemblyFileVersion("1.1.0")] +[assembly: Exceptionless.Configuration.Exceptionless("13462a93b5e843c7bae7da13a86bc00b", EnableLogging = true, LogPath = "E:\\exceptionless.log")] \ No newline at end of file diff --git a/Wox/Wox.csproj b/Wox/Wox.csproj index 4badbf06b5..2122a7bb60 100644 --- a/Wox/Wox.csproj +++ b/Wox/Wox.csproj @@ -62,6 +62,14 @@ + + False + ..\packages\Exceptionless.1.5.2121\lib\net35\Exceptionless.dll + + + False + ..\packages\Exceptionless.1.5.2121\lib\net35\Exceptionless.Models.dll + False ..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll diff --git a/Wox/packages.config b/Wox/packages.config index 9f1a6d32bb..054bbd20c3 100644 --- a/Wox/packages.config +++ b/Wox/packages.config @@ -1,5 +1,6 @@  +