/// <summary> /// Displays the current status of the service /// </summary> /// <param name="clientLogic">ClientLogic</param> public ServiceStatusWindow(ClientLogic clientLogic) { if (clientLogic == null) { throw new ArgumentNullException("clientLogic"); } _clientLogic = clientLogic; InitializeComponent(); if (UserSettings.Settings.HaveWindow(WindowKey)) { UserSettings.Settings.RestoreWindow(WindowKey, this); } UserSettings.Settings.RestoreGridView(ListViewContextsKey, listViewContexts.View as GridView); UserSettings.Settings.RestoreGridView(ListViewTasksKey, listViewTasks.View as GridView); _worker = new BackgroundWorker(); _worker.WorkerReportsProgress = false; _worker.WorkerSupportsCancellation = false; _worker.DoWork += new DoWorkEventHandler(_worker_DoWork); _worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(_worker_RunWorkerCompleted); _reselectContextId = UserSettings.InvalidContextId; _contextListSorter = new ListViewSorter(listViewContexts); _taskListSorter = new ListViewSorter(listViewTasks); }
/// <summary> /// Properties window for an event package /// </summary> /// <param name="eventPackage">The event package</param> /// <param name="clientLogic">Client Logic</param> public EventProperties(DisplayEventPackage eventPackage, ClientLogic clientLogic) { if (eventPackage == null) { throw new ArgumentNullException("eventPackage"); } if (clientLogic == null) { throw new ArgumentNullException("clientLogic"); } _eventPackage = eventPackage; _clientLogic = clientLogic; InitializeComponent(); if (!DesignerProperties.GetIsInDesignMode(this)) { if (UserSettings.Settings.HaveWindow(WindowKey)) { UserSettings.Settings.RestoreWindow(WindowKey, this); } UserSettings.Settings.RestoreGridView(ListViewRawEventSignatureKey, listViewRawEventSignature.View as GridView); _listViewSorter = new ListViewSorter(listViewRawEventSignature); _listViewSorter.AddDefaultSort("Name", ListSortDirection.Ascending); _listViewSorter.AddDefaultSort("Value", ListSortDirection.Ascending); } }
/// <summary> /// Displays the product list and associated reports /// </summary> public MainProductList() { InitializeComponent(); if (!DesignerProperties.GetIsInDesignMode(this)) { UserSettings.Settings.RestoreGridView(ListViewProductsKey, listViewProducts.View as GridView); if (UserSettings.Settings.HaveGridLength(Column1Key)) { Column1.Width = UserSettings.Settings.RestoreGridLength(Column1Key); } if (UserSettings.Settings.HaveGridLength(Column3Key)) { Column3.Width = UserSettings.Settings.RestoreGridLength(Column3Key); } _listViewSorter = new ListViewSorter(listViewProducts); _listViewSorter.AddDefaultSort("Name", ListSortDirection.Ascending); _listViewSorter.AddDefaultSort("Version", ListSortDirection.Descending); _listViewSorter.AddDefaultSort("Id", ListSortDirection.Descending); _listViewSorter.AddDefaultSort("SynchronizeEnabled", ListSortDirection.Ascending); _listViewSorter.AddDefaultSort("TotalEvents", ListSortDirection.Descending); _listViewSorter.AddDefaultSort("TotalResponses", ListSortDirection.Descending); _listViewSorter.AddDefaultSort("DateCreatedLocal", ListSortDirection.Descending); _listViewSorter.AddDefaultSort("DateModifiedLocal", ListSortDirection.Descending); _listViewSorter.AddDefaultSort("CabCollectionPolicy", ListSortDirection.Descending); } }
/// <summary> /// Shows details for a StackHashEventPackage /// </summary> public EventDetails() { InitializeComponent(); if (!DesignerProperties.GetIsInDesignMode(this)) { UserSettings.Settings.RestoreGridView(ListViewEventInfosKey, listViewEventInfos.View as GridView); UserSettings.Settings.RestoreGridView(ListViewCabsKey, listViewCabs.View as GridView); if (UserSettings.Settings.HaveGridLength(Column1Key)) { Column1.Width = UserSettings.Settings.RestoreGridLength(Column1Key); } if (UserSettings.Settings.HaveGridLength(Column3Key)) { Column3.Width = UserSettings.Settings.RestoreGridLength(Column3Key); } if (UserSettings.Settings.HaveGridLength(Row3Key)) { Row3.Height = UserSettings.Settings.RestoreGridLength(Row3Key); } if (UserSettings.Settings.HaveGridLength(Row5Key)) { Row5.Height = UserSettings.Settings.RestoreGridLength(Row5Key); } _listViewEventInfosSorter = new ListViewSorter(listViewEventInfos); _listViewCabsSorter = new ListViewSorter(listViewCabs); _listViewEventInfosSorter.AddDefaultSort("HitDateLocal", ListSortDirection.Descending); _listViewEventInfosSorter.AddDefaultSort("Language", ListSortDirection.Ascending); _listViewEventInfosSorter.AddDefaultSort("Locale", ListSortDirection.Ascending); _listViewEventInfosSorter.AddDefaultSort("Lcid", ListSortDirection.Ascending); _listViewEventInfosSorter.AddDefaultSort("OperatingSystemName", ListSortDirection.Ascending); _listViewEventInfosSorter.AddDefaultSort("OperatingSystemVersion", ListSortDirection.Ascending); _listViewEventInfosSorter.AddDefaultSort("TotalHits", ListSortDirection.Descending); _listViewEventInfosSorter.AddDefaultSort("DateCreatedLocal", ListSortDirection.Descending); _listViewEventInfosSorter.AddDefaultSort("DateModifiedLocal", ListSortDirection.Descending); _listViewCabsSorter.AddDefaultSort("DateCreatedLocal", ListSortDirection.Descending); _listViewCabsSorter.AddDefaultSort("CabDownloaded", ListSortDirection.Ascending); _listViewCabsSorter.AddDefaultSort("OSVersion", ListSortDirection.Ascending); _listViewCabsSorter.AddDefaultSort("MachineArchitecture", ListSortDirection.Ascending); _listViewCabsSorter.AddDefaultSort("DotNetVersion", ListSortDirection.Ascending); _listViewCabsSorter.AddDefaultSort("ProcessUpTime", ListSortDirection.Ascending); _listViewCabsSorter.AddDefaultSort("SystemUpTime", ListSortDirection.Ascending); _listViewCabsSorter.AddDefaultSort("EventTypeName", ListSortDirection.Ascending); _listViewCabsSorter.AddDefaultSort("SizeInBytes", ListSortDirection.Ascending); _listViewCabsSorter.AddDefaultSort("Id", ListSortDirection.Descending); _listViewCabsSorter.AddDefaultSort("DateModifiedLocal", ListSortDirection.Descending); _listViewCabsSorter.AddDefaultSort("Purged", ListSortDirection.Ascending); } }
/// <summary> /// Shows details for a StackHashCab /// </summary> public CabDetails() { InitializeComponent(); if (!DesignerProperties.GetIsInDesignMode(this)) { UserSettings.Settings.RestoreGridView(ListViewResultFilesKey, listViewResultFiles.View as GridView); UserSettings.Settings.RestoreGridView(ListViewCabContentsKey, listViewCabContents.View as GridView); if (UserSettings.Settings.HaveGridLength(Column1Key)) { Column1.Width = UserSettings.Settings.RestoreGridLength(Column1Key); } if (UserSettings.Settings.HaveGridLength(Column3Key)) { Column3.Width = UserSettings.Settings.RestoreGridLength(Column3Key); } if (UserSettings.Settings.HaveGridLength(InnerColumn1Key)) { InnerColumn1.Width = UserSettings.Settings.RestoreGridLength(InnerColumn1Key); } if (UserSettings.Settings.HaveGridLength(InnerColumn3Key)) { InnerColumn3.Width = UserSettings.Settings.RestoreGridLength(InnerColumn3Key); } if (UserSettings.Settings.HaveGridLength(Row3Key)) { Row3.Height = UserSettings.Settings.RestoreGridLength(Row3Key); } if (UserSettings.Settings.HaveGridLength(Row5Key)) { Row5.Height = UserSettings.Settings.RestoreGridLength(Row5Key); } _listViewSorter = new ListViewSorter(listViewResultFiles); _listViewSorter.AddDefaultSort("ScriptName", ListSortDirection.Ascending); _listViewSorter.AddDefaultSort("RunDate", ListSortDirection.Descending); _listViewSorter.AddDefaultSort("UserName", ListSortDirection.Ascending); _listViewCabContentsSorter = new ListViewSorter(listViewCabContents); _listViewCabContentsSorter.AddDefaultSort("FileName", ListSortDirection.Ascending); _listViewCabContentsSorter.AddDefaultSort("Length", ListSortDirection.Ascending); } }
/// <summary> /// Products page for the setup wizard /// </summary> public SetupProductsPage() { InitializeComponent(); this.NextEnabled = true; this.BackEnabled = true; this.NextText = Properties.Resources.ButtonText_Next; _listViewSorter = new ListViewSorter(listViewProducts); _listViewSorter.AddDefaultSort("Name", ListSortDirection.Ascending); _listViewSorter.AddDefaultSort("Version", ListSortDirection.Descending); _listViewSorter.AddDefaultSort("Id", ListSortDirection.Descending); _listViewSorter.AddDefaultSort("SynchronizeEnabled", ListSortDirection.Ascending); }
/// <summary> /// Displays diagnostic information for plugins /// </summary> /// <param name="clientLogic">ClientLogic</param> /// <param name="contextId">Context Id (may be invalid)</param> /// <param name="contextIsActive">True if the context is currently active</param> public PluginDiagnostics(ClientLogic clientLogic, int contextId, bool contextIsActive) { if (clientLogic == null) { throw new ArgumentNullException("clientLogic"); } _clientLogic = clientLogic; _contextId = contextId; _contextIsActive = contextIsActive; InitializeComponent(); if (UserSettings.Settings.HaveWindow(WindowKey)) { UserSettings.Settings.RestoreWindow(WindowKey, this); } UserSettings.Settings.RestoreGridView(ListViewAllPluginsKey, listViewAllPlugins.View as GridView); UserSettings.Settings.RestoreGridView(ListViewGlobalDiagnosticsKey, listViewGlobalDiagnostics.View as GridView); UserSettings.Settings.RestoreGridView(ListViewProfileDiagnosticsKey, listViewProfileDiagnostics.View as GridView); this.DataContext = _clientLogic; _allPluginsSorter = new ListViewSorter(listViewAllPlugins); _allPluginsSorter.AddDefaultSort("Name", System.ComponentModel.ListSortDirection.Ascending); _allPluginsSorter.AddDefaultSort("FileName", System.ComponentModel.ListSortDirection.Ascending); _allPluginsSorter.AddDefaultSort("Loaded", System.ComponentModel.ListSortDirection.Ascending); _allPluginsSorter.AddDefaultSort("LastException", System.ComponentModel.ListSortDirection.Ascending); _globalDiagnosticsSorter = new ListViewSorter(listViewGlobalDiagnostics); _globalDiagnosticsSorter.AddDefaultSort("Name", System.ComponentModel.ListSortDirection.Ascending); _globalDiagnosticsSorter.AddDefaultSort("Value", System.ComponentModel.ListSortDirection.Ascending); _profileDiagnosticsSorter = new ListViewSorter(listViewProfileDiagnostics); _profileDiagnosticsSorter.AddDefaultSort("Name", System.ComponentModel.ListSortDirection.Ascending); _profileDiagnosticsSorter.AddDefaultSort("Value", System.ComponentModel.ListSortDirection.Ascending); // no profile diagnostics if no profile specified if ((contextId == UserSettings.InvalidContextId) || (!contextIsActive)) { textBlockProfileDiagnostics.IsEnabled = false; listViewProfileDiagnostics.IsEnabled = false; } }
/// <summary> /// Allows the user to add, edit and delete profiles as well as setting the active profile /// </summary> public ProfileManager(ClientLogic clientLogic) { Debug.Assert(clientLogic != null); _clientLogic = clientLogic; InitializeComponent(); if (UserSettings.Settings.HaveWindow(WindowKey)) { UserSettings.Settings.RestoreWindow(WindowKey, this); } UserSettings.Settings.RestoreGridView(ListViewProfilesKey, listViewProfiles.View as GridView); _listViewSorter = new ListViewSorter(listViewProfiles); _listViewSorter.AddDefaultSort("ProfileName", ListSortDirection.Ascending); _listViewSorter.AddDefaultSort("IsActive", ListSortDirection.Ascending); _listViewSorter.AddDefaultSort("CurrentErrorText", ListSortDirection.Ascending); this.DataContext = _clientLogic; }
/// <summary> /// Select one or more plugins to synchronize with profile data /// </summary> /// <param name="activePlugins">List of active plugins</param> public SelectPlugins(ObservableCollection <StackHashBugTrackerPlugIn> activePlugins) { if (activePlugins == null) { throw new ArgumentNullException("activePlugins"); } _selections = PluginSelection.FromActivePlugins(activePlugins); InitializeComponent(); if (UserSettings.Settings.HaveWindow(WindowKey)) { UserSettings.Settings.RestoreWindow(WindowKey, this); } UserSettings.Settings.RestoreGridView(ListViewPluginsKey, listViewPlugins.View as GridView); _listViewSorter = new ListViewSorter(listViewPlugins); _listViewSorter.AddDefaultSort("Name", System.ComponentModel.ListSortDirection.Ascending); _listViewSorter.AddDefaultSort("Selected", System.ComponentModel.ListSortDirection.Ascending); listViewPlugins.ItemsSource = _selections; UpdateState(); }
/// <summary> /// Window for adding, editing and removing scripts /// </summary> /// <param name="clientLogic">ClientLogic</param> public ScriptManager(ClientLogic clientLogic) { Debug.Assert(clientLogic != null); _clientLogic = clientLogic; InitializeComponent(); if (UserSettings.Settings.HaveWindow(WindowKey)) { UserSettings.Settings.RestoreWindow(WindowKey, this); } UserSettings.Settings.RestoreGridView(ListViewScriptsKey, listViewScripts.View as GridView); _listViewSorter = new ListViewSorter(listViewScripts); _listViewSorter.AddDefaultSort("Name", ListSortDirection.Ascending); _listViewSorter.AddDefaultSort("IsReadOnly", ListSortDirection.Ascending); _listViewSorter.AddDefaultSort("RunAutomatically", ListSortDirection.Ascending); _listViewSorter.AddDefaultSort("DumpType", ListSortDirection.Ascending); _listViewSorter.AddDefaultSort("LastModifiedDate", ListSortDirection.Ascending); _listViewSorter.AddDefaultSort("CreationDate", ListSortDirection.Ascending); this.DataContext = _clientLogic; UpdateState(); }