Remove all the feedback options, as well as removal of TFS support notification. (#26)

This commit is contained in:
Ivan (Vanya) Kashperuk 2021-06-27 23:30:05 +02:00 коммит произвёл GitHub
Родитель 8c5f579143
Коммит 6597a3e890
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
17 изменённых файлов: 6 добавлений и 521 удалений

Просмотреть файл

@ -114,7 +114,6 @@ namespace Microsoft.Tools.TeamMate.Sandbox.Wpf
// window = new PeopleSummaryWindow();
// window = new AppPreviewWindow();
// window = new SendFeedbackWindow();
// window = new TestWindow();
// window = new MyTransitionWindow();
// window = new TransitionWindow();
@ -126,18 +125,6 @@ namespace Microsoft.Tools.TeamMate.Sandbox.Wpf
window.Show();
/*
if (window.ShowDialog() == true)
{
var fi = ((SendFeedbackWindow)window).FeedbackItem;
string filename = Environment.ExpandEnvironmentVariables(@"%TEMP%\Feedback.fdbx.zip");
fi.Save(filename);
var fi2 = FeedbackItem.FromFile(filename);
}
*/
/*
ToastViewManager toastViewManager = new ToastViewManager();

Просмотреть файл

@ -23,16 +23,9 @@ namespace Microsoft.Tools.TeamMate.Sandbox.Wpf
/*
var dd2 = DragDropHelper2.Create(tb);
dd2.DragRequested += dd2_DragRequested;
this.GiveFeedback += TestWindow_GiveFeedback;
*/
}
void TestWindow_GiveFeedback(object sender, GiveFeedbackEventArgs e)
{
e.UseDefaultCursors = false;
e.Handled = true;
}
void dd2_DragRequested(object sender, EventArgs e)
{
/*

Просмотреть файл

@ -7,9 +7,6 @@ namespace Microsoft.Tools.TeamMate.Model
{
public class ApplicationHistory : ObservableObjectBase
{
public static readonly TimeSpan IntervalBetweenFeedbackChecks = TimeSpan.FromDays(30);
public static readonly TimeSpan IntervalBetweenFeedbackPrompts = TimeSpan.FromDays(180);
private DateTime? lastRun;
private int launches;
private TimeSpan uptime;
@ -53,59 +50,6 @@ namespace Microsoft.Tools.TeamMate.Model
set { SetProperty(ref this.workItemViews, value); }
}
private int feedbacksReported;
public int FeedbacksReported
{
get { return this.feedbacksReported; }
set { SetProperty(ref this.feedbacksReported, value); }
}
private int errorsReported;
public int ErrorsReported
{
get { return this.errorsReported; }
set { SetProperty(ref this.errorsReported, value); }
}
private DateTime? lastFeedbackProvided;
public DateTime? LastFeedbackProvidedOrPrompted
{
get { return this.lastFeedbackProvided; }
set { SetProperty(ref this.lastFeedbackProvided, value); }
}
private DateTime nextTimeToRequestFeedback = DateTime.Now.AddDays(7);
public DateTime NextTimeToRequestFeedback
{
get { return this.nextTimeToRequestFeedback; }
set { SetProperty(ref this.nextTimeToRequestFeedback, value); }
}
private DateTime? lastRated;
public DateTime? LastRated
{
get { return this.lastRated; }
set { SetProperty(ref this.lastRated, value); }
}
public bool RatingEverProvided
{
get { return LastRated != null; }
}
private bool notInterestedInRating;
public bool NotInterestedInRating
{
get { return this.notInterestedInRating; }
set { SetProperty(ref this.notInterestedInRating, value); }
}
public bool HasBeenUsedEnough
{
get
@ -114,14 +58,6 @@ namespace Microsoft.Tools.TeamMate.Model
}
}
private bool notInterestedInFeedback;
public bool NotInterestedInFeedback
{
get { return this.notInterestedInFeedback; }
set { SetProperty(ref this.notInterestedInFeedback, value); }
}
public XDocument Write()
{
XElement element = new XElement(Schema.History);
@ -133,13 +69,6 @@ namespace Microsoft.Tools.TeamMate.Model
element.SetElementValue<DateTime?>(Schema.FirstRun, FirstRun);
element.SetElementValue<int>(Schema.WorkItemsCreated, WorkItemsCreated);
element.SetElementValue<int>(Schema.WorkItemViews, WorkItemViews);
element.SetElementValue<int>(Schema.ErrorsReported, ErrorsReported);
element.SetElementValue<int>(Schema.FeedbacksReported, FeedbacksReported);
element.SetElementValue<DateTime?>(Schema.LastFeedbackProvidedOrPrompted, LastFeedbackProvidedOrPrompted);
element.SetElementValue<DateTime?>(Schema.NextTimeToRequestFeedback, NextTimeToRequestFeedback);
element.SetElementValue<DateTime?>(Schema.LastRated, LastRated);
element.SetElementValue<bool>(Schema.NotInterestedInRating, NotInterestedInRating);
element.SetElementValue<bool>(Schema.NotInterestedInFeedback, NotInterestedInFeedback);
return new XDocument(element);
}
@ -157,18 +86,6 @@ namespace Microsoft.Tools.TeamMate.Model
history.FirstRun = root.GetElementValue<DateTime?>(Schema.FirstRun);
history.WorkItemsCreated = root.GetElementValue<int>(Schema.WorkItemsCreated);
history.WorkItemViews = root.GetElementValue<int>(Schema.WorkItemViews);
history.ErrorsReported = root.GetElementValue<int>(Schema.ErrorsReported);
history.FeedbacksReported = root.GetElementValue<int>(Schema.FeedbacksReported);
history.LastFeedbackProvidedOrPrompted = root.GetElementValue<DateTime?>(Schema.LastFeedbackProvidedOrPrompted);
history.LastRated = root.GetElementValue<DateTime?>(Schema.LastRated);
history.NotInterestedInRating = root.GetElementValue<bool>(Schema.NotInterestedInRating);
history.NotInterestedInFeedback = root.GetElementValue<bool>(Schema.NotInterestedInFeedback);
var nextTimeToRequestFeedback = root.GetElementValue<DateTime?>(Schema.NextTimeToRequestFeedback);
if (nextTimeToRequestFeedback != null)
{
history.NextTimeToRequestFeedback = nextTimeToRequestFeedback.Value;
}
return history;
}
@ -186,13 +103,6 @@ namespace Microsoft.Tools.TeamMate.Model
public static readonly XName FirstRun = "FirstRun";
public static readonly XName WorkItemsCreated = "WorkItemsCreated";
public static readonly XName WorkItemViews = "WorkItemViews";
public static readonly XName ErrorsReported = "ErrorsReported";
public static readonly XName FeedbacksReported = "FeedbacksReported";
public static readonly XName LastFeedbackProvidedOrPrompted = "LastFeedbackProvidedOrPrompted";
public static readonly XName NextTimeToRequestFeedback = "NextTimeToRequestFeedback";
public static readonly XName LastRated = "LastRated";
public static readonly XName NotInterestedInRating = "NotInterestedInRating";
public static readonly XName NotInterestedInFeedback = "NotInterestedInFeedback";
}
}
}

Просмотреть файл

@ -8,8 +8,6 @@ using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
@ -28,10 +26,8 @@ namespace Microsoft.Tools.TeamMate.Model
static TeamMateApplicationInfo()
{
ApplicationName = "TeamMate";
ApplicationDescription = "An internal tool for managing work items at Microsoft";
ApplicationDescription = "A tool for managing work items";
VersionQualifier = null; // e.g. was "Preview"
Author = "Ben Amodio";
FeedbackEmail = "teammate@microsoft.com";
// KLUDGE: An AppUserModelId is needed to display Toast Notifications from a Windows Desktop app
// See https://msdn.microsoft.com/en-us/library/windows/desktop/dd378459(v=vs.85).aspx
@ -42,31 +38,6 @@ namespace Microsoft.Tools.TeamMate.Model
// we use is shown as the application name in the Action Center. Hence, choosing the application name
// as the default AppUserModelId no matter what. It works for both scenarios.
AppUserModelId = ApplicationName;
// URLs
ToolboxHomeUrl = "http://toolbox/TeamMate";
RatingUrl = ToolboxHomeUrl;
IssueListUrl = "http://aka.ms/teammatevote";
ReportBugUrl = "http://aka.ms/teammatebug";
SuggestFeatureUrl = "http://aka.ms/teammatefeature";
YammerUrl = "https://aka.ms/teammateyammer";
BlogUrl = "http://aka.ms/teammateblog";
// TODO: Update Help Url
HelpUrl = ToolboxHomeUrl;
LegacyTfsSupportDroppedUrl = "http://aka.ms/teammateoptimizedforvsts";
}
private static void TryEnsureDirectoryExists(string baseFileShare)
{
try
{
PathUtilities.EnsureDirectoryExists(baseFileShare);
}
catch (Exception e)
{
Log.WarnAndBreak(e);
}
}
public static bool IsDataDirectoryAccessAllowed { get; set; }
@ -120,8 +91,8 @@ namespace Microsoft.Tools.TeamMate.Model
}
else
{
IsUpgrade = (LastVersion != null && LastVersion < Version);
IsDowngrade = (LastVersion != null && LastVersion > Version);
IsUpgrade = LastVersion != null && LastVersion < Version;
IsDowngrade = LastVersion != null && LastVersion > Version;
if (IsDowngrade)
{
@ -209,7 +180,7 @@ namespace Microsoft.Tools.TeamMate.Model
set
{
if (!Object.Equals(LastVersion, value))
if (!Equals(LastVersion, value))
{
lastVersion = value;
if (lastVersion != null)
@ -283,10 +254,6 @@ namespace Microsoft.Tools.TeamMate.Model
}
}
public static string FeedbackEmail { get; private set; }
public static string FeedbackFileShare { get; private set; }
public static string DataDirectory
{
get
@ -304,24 +271,6 @@ namespace Microsoft.Tools.TeamMate.Model
}
}
public static string HelpUrl { get; private set; }
public static string ToolboxHomeUrl { get; private set; }
public static string RatingUrl { get; private set; }
public static string IssueListUrl { get; private set; }
public static string ReportBugUrl { get; private set; }
public static string SuggestFeatureUrl { get; private set; }
public static string YammerUrl { get; private set; }
public static string BlogUrl { get; private set; }
public static string Author { get; private set; }
public static string InstallPath
{
get
@ -345,7 +294,7 @@ namespace Microsoft.Tools.TeamMate.Model
{
string entryExe = Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName);
string teamMateExe = Path.GetFileName(ExePath);
return String.Equals(entryExe, teamMateExe, StringComparison.OrdinalIgnoreCase);
return string.Equals(entryExe, teamMateExe, StringComparison.OrdinalIgnoreCase);
}
}
@ -390,6 +339,5 @@ namespace Microsoft.Tools.TeamMate.Model
}
}
public static string LegacyTfsSupportDroppedUrl { get; private set; }
}
}

Просмотреть файл

@ -26,8 +26,6 @@
<StackPanel Margin="24">
<TextBlock Style="{StaticResource SubheaderTextBlockStyle}" Text="Actions" />
<Button Margin="0,12,0,0" Command="{Binding ShowWelcomeDialogCommand}">Show Welcome Dialog</Button>
<Button Margin="0,12,0,0" Command="{Binding RequestRatingCommand}">Request Rating</Button>
<Button Margin="0,12,0,0" Command="{Binding RequestFeedbackCommand}">Request Feedback</Button>
<Button Margin="0,12,0,0" Command="{Binding RunInstallUpgradeConfigurationStepCommand}">Run Install/Upgrade Configuration Step</Button>
<Button Margin="0,12,0,0" Command="{Binding TriggerApplicationUpdateCommand}">Trigger Application Update</Button>
<Button Margin="0,12,0,0" Command="{Binding ThrowUnhandledExceptionCommand}">Throw Unhandled Exception</Button>

Просмотреть файл

@ -23,35 +23,6 @@ namespace Microsoft.Tools.TeamMate.Resources
private static ToastViewModel toastViewModel;
private static List<WorkItemRowViewModel> listOfWorkItems;
public static CustomDialogViewModel CustomDialogViewModel
{
get
{
CustomDialogViewModel dialogViewModel = new CustomDialogViewModel();
dialogViewModel.Title = "We would love to hear from you";
dialogViewModel.Message =
"Looks like you've been using TeamMate quite a bit. We could use your feedback. " +
"You can provide it in our Toolbox page by clicking on the Rating section (right-hand side).\n\n" +
" Is this a good time to rate the app?";
var button = new ButtonInfo("Sure");
button.IsDefault = true;
dialogViewModel.Buttons.Add(button);
button = new ButtonInfo("No Thanks");
dialogViewModel.Buttons.Add(button);
button = new ButtonInfo("Maybe Later");
button.IsCancel = true;
dialogViewModel.Buttons.Add(button);
dialogViewModel.CheckBoxText = "Do not ask me again";
dialogViewModel.IsCheckBoxChecked = true;
return dialogViewModel;
}
}
private static CodeFlowReviewViewModel codeFlowReview;
public static CodeFlowReviewViewModel CodeFlowReview

Просмотреть файл

@ -3,16 +3,6 @@
xmlns:tmr="clr-namespace:Microsoft.Tools.TeamMate.Resources">
<!-- Unfortunately we need a regular flavor and a RadContextMenu flavor of the same menu, keep these in sync -->
<ContextMenu x:Key="FeedbackMenu">
<MenuItem Command="{x:Static tmr:TeamMateCommands.VoteOnFeatures}" Style="{DynamicResource CommandMenuItemStyle}" />
<MenuItem Command="{x:Static tmr:TeamMateCommands.SuggestFeature}" Style="{DynamicResource CommandMenuItemStyle}" />
<MenuItem Command="{x:Static tmr:TeamMateCommands.ReportBug}" Style="{DynamicResource CommandMenuItemStyle}" />
<MenuItem Command="{x:Static tmr:TeamMateCommands.BecomeAContributor}" Style="{DynamicResource CommandMenuItemStyle}" />
<Separator />
<MenuItem Command="{x:Static tmr:TeamMateCommands.YammerUs}" Style="{DynamicResource CommandMenuItemStyle}" />
<MenuItem Command="{x:Static tmr:TeamMateCommands.ContactUs}" Style="{DynamicResource CommandMenuItemStyle}" />
</ContextMenu>
<ContextMenu x:Key="WorkItemContextMenu" DataContext="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Self}}">
<MenuItem Command="{x:Static tmr:TeamMateCommands.CopyHyperlink}"
Header="Copy Hyperlink"

Просмотреть файл

@ -18,12 +18,9 @@ namespace Microsoft.Tools.TeamMate.Resources
public static ICommand About { get { return commands.FindResource(); } }
public static ICommand Help { get { return commands.FindResource(); } }
public static ICommand BecomeAContributor{ get { return commands.FindResource(); } }
// Auto Update command
public static ICommand Restart { get { return commands.FindResource(); } }
// Ribbon Comands
public static ICommand Save { get { return commands.FindResource(); } }
public static ICommand SaveAndClose { get { return commands.FindResource(); } }
@ -64,11 +61,6 @@ namespace Microsoft.Tools.TeamMate.Resources
public static ICommand ReplyAllInQueryWithEmail { get { return commands.FindResource(); } }
public static ICommand ConnectToProject { get { return commands.FindResource(); } }
public static ICommand VoteOnFeatures { get { return commands.FindResource(); } }
public static ICommand SuggestFeature { get { return commands.FindResource(); } }
public static ICommand ReportBug { get { return commands.FindResource(); } }
public static ICommand ContactUs { get { return commands.FindResource(); } }
public static ICommand YammerUs { get { return commands.FindResource(); } }
public static ICommand OpenAttachment { get { return commands.FindResource(); } }
public static ICommand SaveAttachmentAs { get { return commands.FindResource(); } }
@ -91,7 +83,6 @@ namespace Microsoft.Tools.TeamMate.Resources
public static ICommand NavigateToProjectsPage { get { return commands.FindResource(); } }
public static ICommand NavigateToSettingsPage { get { return commands.FindResource(); } }
public static ICommand NavigateToDeveloperOptionsPage { get { return commands.FindResource(); } }
public static ICommand SendFeedbackToolBar { get { return commands.FindResource(); } }
public static ICommand MarkAsRead { get { return commands.FindResource(); } }
public static ICommand MarkAsUnread { get { return commands.FindResource(); } }

Просмотреть файл

@ -30,14 +30,6 @@
</fwi:UICommand.InputGestures>
</fwi:UICommand>
<fwi:UICommand x:Key="SendFeedbackToolBarCommand"
SymbolIcon="Emoji2"
Text="Send Feedback">
<fwi:UICommand.InputGestures>
<KeyGesture>Alt+5</KeyGesture>
</fwi:UICommand.InputGestures>
</fwi:UICommand>
<fwi:UICommand x:Key="NavigateToDeveloperOptionsPageCommand"
SymbolIcon="Developer"
Text="Developer Options" />
@ -409,24 +401,6 @@
<!-- Global Commands -->
<fwi:UICommand x:Key="VoteOnFeaturesCommand" Text="Vote on Features" />
<fwi:UICommand x:Key="SuggestFeatureCommand" Text="Suggest a Feature" />
<fwi:UICommand x:Key="ReportBugCommand" Text="Report a Bug" />
<fwi:UICommand x:Key="ContactUsCommand"
Icon="/Resources/Icons/Office15/Send2.16x16x32.png"
Text="Contact Us" />
<fwi:UICommand x:Key="YammerUsCommand"
Icon="/Resources/Icons/Other/Yammer.16x16x32.png"
Text="Find us in Yammer" />
<fwi:UICommand x:Key="BecomeAContributorCommand" Text="Become a Contributor" />
<c:RoutedUICommand x:Key="HelpCommand" Text="Help" />
<c:RoutedUICommand x:Key="ConnectToProjectCommand" Text="Connect to Project" />
<!-- Attachment Commands -->

Просмотреть файл

@ -5,49 +5,5 @@ namespace Microsoft.Tools.TeamMate.Services
{
public class ExternalWebBrowserService
{
public void FileFeatureRequestOrBug()
{
ExternalWebBrowser.Launch(TeamMateApplicationInfo.IssueListUrl);
}
public void VoteOnFeatures()
{
ExternalWebBrowser.Launch(TeamMateApplicationInfo.IssueListUrl);
}
public void SuggestFeature()
{
ExternalWebBrowser.Launch(TeamMateApplicationInfo.SuggestFeatureUrl);
}
public void ReportBug()
{
ExternalWebBrowser.Launch(TeamMateApplicationInfo.ReportBugUrl);
}
public void ShowHelp()
{
ExternalWebBrowser.Launch(TeamMateApplicationInfo.HelpUrl);
}
public void GoToToolbox()
{
ExternalWebBrowser.Launch(TeamMateApplicationInfo.ToolboxHomeUrl);
}
public void GoToYammer()
{
ExternalWebBrowser.Launch(TeamMateApplicationInfo.YammerUrl);
}
public void RateApplication()
{
ExternalWebBrowser.Launch(TeamMateApplicationInfo.RatingUrl);
}
public void LaunchLegacyTfsSupportDropped()
{
ExternalWebBrowser.Launch(TeamMateApplicationInfo.LegacyTfsSupportDroppedUrl);
}
}
}

Просмотреть файл

@ -35,16 +35,8 @@ namespace Microsoft.Tools.TeamMate.Services
public void RegisterBindings(CommandBindingCollection bindings)
{
bindings.Add(TeamMateCommands.VoteOnFeatures, () => this.ExternalWebBrowserService.VoteOnFeatures());
bindings.Add(TeamMateCommands.SuggestFeature, () => this.ExternalWebBrowserService.SuggestFeature());
bindings.Add(TeamMateCommands.ReportBug, () => this.ExternalWebBrowserService.ReportBug());
bindings.Add(TeamMateCommands.ContactUs, ContactUs);
bindings.Add(TeamMateCommands.YammerUs, () => this.ExternalWebBrowserService.GoToYammer());
bindings.Add(TeamMateCommands.BecomeAContributor, BecomeAContributor);
}
public void QuickCreateDefault()
{
QuickCreateDefault(null);
@ -119,26 +111,6 @@ namespace Microsoft.Tools.TeamMate.Services
this.WindowService.ShowSettingsPage();
}
public void ContactUs()
{
string subject = String.Format("What I have to say about {0}", TeamMateApplicationInfo.ApplicationName);
string body = String.Format("(I'm using version {0})", TeamMateApplicationInfo.Version);
MailMessage message = new MailMessage();
message.To.Add(TeamMateApplicationInfo.FeedbackEmail);
message.Subject = subject;
message.HtmlBody = MailMessage.WrapHtmlInDefaultFont(body);
this.CollaborationService.SendMail(message);
}
public void BecomeAContributor()
{
MailMessage message = new MailMessage();
message.To.Add(TeamMateApplicationInfo.FeedbackEmail);
message.Subject = "I'd like to contribute";
this.CollaborationService.SendMail(message);
}
public bool EnsureProjectsHaveBeenConfigured()
{
var settings = this.SettingsService.Settings;

Просмотреть файл

@ -97,11 +97,6 @@ namespace Microsoft.Tools.TeamMate.Services
this.ConnectionInfo.ConnectionState = ConnectionState.Connected;
this.Session.ProjectContext = projectContext;
this.VolatileSettings.LastUsedProject = projectContext.ProjectInfo;
// Whenever we connect to a project, we take the opportunity to periodically request feedback too.
// Seems like an OK, non intrusive time to do this. Note that the call will rarely result in
// an actual prompt to the user
this.WindowService.PeriodicallyRequestFeedback();
}
}

Просмотреть файл

@ -378,76 +378,6 @@ namespace Microsoft.Tools.TeamMate.Services
dialog.ShowDialog();
}
public void ShowRequestRatingDialog()
{
CustomDialogViewModel dialogViewModel = new CustomDialogViewModel();
dialogViewModel.Title = "We love feedback";
dialogViewModel.Message =
"It looks like you've been using TeamMate quite a bit. We could really use your feedback. " +
"You can provide it in our Toolbox page, in the Rating section on the right-hand side.\n\n" +
"This should only take a couple of clicks. Is this a good time?";
var yesButton = dialogViewModel.AddDefaultButton("Sure");
var noButton = dialogViewModel.AddButton("No Thanks");
var laterButton = dialogViewModel.AddCancelButton("Not Now");
CustomDialog dialog = new CustomDialog();
dialog.DataContext = dialogViewModel;
if (MainWindow.IsVisible)
{
dialog.Owner = MainWindow;
}
if (dialog.ShowDialog() == true)
{
if (dialogViewModel.PressedButton == yesButton)
{
this.HistoryService.History.LastRated = DateTime.Now;
this.ExternalWebBrowserService.RateApplication();
}
else if (dialogViewModel.PressedButton == noButton)
{
this.HistoryService.History.NotInterestedInRating = true;
}
}
}
public void ShowRequestFeedbackDialog()
{
this.HistoryService.History.LastFeedbackProvidedOrPrompted = DateTime.Now;
CustomDialogViewModel dialogViewModel = new CustomDialogViewModel();
dialogViewModel.Title = "We love feedback";
dialogViewModel.Message =
"Seriously, we use it to prioritize features and make our users happy. " +
"Looks like you've been using TeamMate quite a bit, so we would really value your opinion.\n\n" +
"Is this a good time?";
var voteButton = dialogViewModel.AddDefaultButton("Vote on Features");
var suggestButton = dialogViewModel.AddButton("Suggest a Feature");
var laterButton = dialogViewModel.AddCancelButton("Not Now");
CustomDialog dialog = new CustomDialog();
dialog.DataContext = dialogViewModel;
if (MainWindow.IsVisible)
{
dialog.Owner = MainWindow;
}
if (dialog.ShowDialog() == true)
{
if (dialogViewModel.PressedButton == voteButton)
{
this.ExternalWebBrowserService.VoteOnFeatures();
}
else if (dialogViewModel.PressedButton == suggestButton)
{
this.ExternalWebBrowserService.SuggestFeature();
}
}
}
public void MonitorWithProgressDialog(TaskContext taskContext)
{
@ -480,43 +410,6 @@ namespace Microsoft.Tools.TeamMate.Services
}
public void PeriodicallyRequestFeedback()
{
var history = this.HistoryService.History;
if (DateTime.Now > history.NextTimeToRequestFeedback)
{
history.NextTimeToRequestFeedback += ApplicationHistory.IntervalBetweenFeedbackChecks;
if (history.HasBeenUsedEnough)
{
// Used it enough to rate it...
if (ShouldPromptForRating(history))
{
this.ShowRequestRatingDialog();
}
else if (ShouldPromptForFeedback(history))
{
this.ShowRequestFeedbackDialog();
}
}
}
}
private static bool ShouldPromptForFeedback(ApplicationHistory history)
{
// If feedback was never provided, or it was provided a long time ago, ask for it again
// TODO: Maybe consider version changes from last time feedback was provided?
return !history.NotInterestedInFeedback &&
(history.LastFeedbackProvidedOrPrompted == null
|| DateTime.Now > (history.LastFeedbackProvidedOrPrompted.Value + ApplicationHistory.IntervalBetweenFeedbackPrompts));
}
private static bool ShouldPromptForRating(ApplicationHistory history)
{
return !history.RatingEverProvided && !history.NotInterestedInRating;
}
public bool RequestShutdown()
{
bool shouldCancel = this.PromptSaveOnDirtyWindows();

Просмотреть файл

@ -15,8 +15,6 @@ namespace Microsoft.Tools.TeamMate.ViewModels
this.Title = "Developer Options";
this.ChaosMonkey = new ChaosMonkeyViewModel();
this.RequestFeedbackCommand = new RelayCommand(RequestFeedback);
this.RequestRatingCommand = new RelayCommand(RequestRating);
this.RunInstallUpgradeConfigurationStepCommand = new RelayCommand(RunInstallUpgradeConfigurationStep);
this.ShowWelcomeDialogCommand = new RelayCommand(ShowWelcomeDialog);
this.CrashApplicationCommand = new RelayCommand(CrashApplication);
@ -41,23 +39,10 @@ namespace Microsoft.Tools.TeamMate.ViewModels
throw new ForceCrashException("Force crashed application!");
}
public ICommand RequestRatingCommand { get; private set; }
public void RequestRating()
{
this.WindowService.ShowRequestRatingDialog();
}
public ICommand RequestFeedbackCommand { get; private set; }
[Import]
public WindowService WindowService { get; set; }
public void RequestFeedback()
{
this.WindowService.ShowRequestFeedbackDialog();
}
public ICommand RunInstallUpgradeConfigurationStepCommand { get; private set; }
[Import]

Просмотреть файл

@ -298,31 +298,5 @@ namespace Microsoft.Tools.TeamMate.ViewModels
this.GlobalCommandService.QuickCreateDefault();
}
private ICommand displayLegacyTfsSupportDroppedBannerCommand;
public ICommand DisplayLegacyTfsSupportDroppedBannerCommand
{
get
{
return displayLegacyTfsSupportDroppedBannerCommand ?? (displayLegacyTfsSupportDroppedBannerCommand = new RelayCommand(() =>
{
this.ExternalWebBrowserService.LaunchLegacyTfsSupportDropped();
}));
}
}
private ICommand closeLegacyTfsSupportDroppedBannerCommand;
public ICommand CloseLegacyTfsSupportDroppedBannerCommand
{
get
{
return closeLegacyTfsSupportDroppedBannerCommand ?? (closeLegacyTfsSupportDroppedBannerCommand = new RelayCommand(() =>
{
this.VolatileSettings.DisplayLegacyTfsSupportDroppedBanner = false;
}));
}
}
}
}

Просмотреть файл

@ -111,9 +111,6 @@
<tmc:BowtieIcon Symbol="ProjectCollection"/>
</fwc:SplitViewButton.Icon>
</fwc:SplitViewButton>
<fwc:SplitViewButton x:Name="feedbackButton"
Command="{x:Static tmr:TeamMateCommands.SendFeedbackToolBar}"
Style="{StaticResource SplitViewNavigationButtonStyle}" />
</StackPanel>
<Border Grid.Row="2"
BorderBrush="#535353"
@ -169,49 +166,9 @@
Grid.Column="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Vertical">
<Border Name="updateBanner"
Background="#DEEBF9" Height="48" Padding="6"
Visibility="{Binding IsUpdateAvailable, Converter={x:Static fw:Converters.Visibility}}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<tmc:BowtieIcon Margin="6" Symbol="StatusInfoOutline" FontSize="16" VerticalAlignment="Center"/>
<TextBlock Grid.Column="1" VerticalAlignment="Center" Style="{StaticResource BaseTextBlockStyle}" TextTrimming="CharacterEllipsis">
<Run FontWeight="Bold">Update Installed: </Run>
<Run>Restart TeamMate to enjoy the latest features and bug fixes.</Run>
</TextBlock>
<Button Margin="6, 0, 0, 0" Grid.Column="3" Style="{StaticResource WindowsColoredButtonStyle}" Foreground="White" Command="{x:Static tmr:TeamMateCommands.Restart}">Restart Now</Button>
</Grid>
</Border>
<Border Name="deprecationBanner"
Background="#DEEBF9" Height="48" Padding="6"
Visibility="{Binding VolatileSettings.DisplayLegacyTfsSupportDroppedBanner, Converter={x:Static fw:Converters.Visibility}}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<tmc:BowtieIcon Margin="6" Symbol="StatusInfoOutline" FontSize="16" VerticalAlignment="Center"/>
<TextBlock Grid.Column="1" VerticalAlignment="Center" Style="{StaticResource BaseTextBlockStyle}" TextTrimming="CharacterEllipsis">
<Run FontWeight="Bold">Important: </Run>
<Run>TeamMate is now optimized for VSTS and no longer supports older versions of TFS.</Run>
<Hyperlink Command="{Binding DisplayLegacyTfsSupportDroppedBannerCommand}" Style="{StaticResource WindowsHyperlinkStyle}">Learn more</Hyperlink>
</TextBlock>
<StackPanel Grid.Column="3" Orientation="Horizontal">
<Button Margin="6, 0, 0, 0" Style="{StaticResource WindowsColoredButtonStyle}" Foreground="White" Command="{Binding CloseLegacyTfsSupportDroppedBannerCommand}">Close</Button>
</StackPanel>
</Grid>
</Border>
</StackPanel>
<tmc:NavigationFrame Grid.Row="1" x:Name="navigationFrame" DataContext="{Binding Navigation}" />
<tmc:NavigationFrame Grid.Row="0" x:Name="navigationFrame" DataContext="{Binding Navigation}" />
</Grid>
</Grid>
</Grid>

Просмотреть файл

@ -58,14 +58,6 @@ namespace Microsoft.Tools.TeamMate.Windows
}
}
private void ShowSendFeedbackContextMenu()
{
ContextMenu contextMenu = this.FindResource<ContextMenu>("FeedbackMenu");
contextMenu.PlacementTarget = this.feedbackButton;
contextMenu.Placement = PlacementMode.Right;
contextMenu.IsOpen = true;
}
private void HandleDataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
{
var oldModel = e.OldValue as MainWindowViewModel;
@ -182,7 +174,6 @@ namespace Microsoft.Tools.TeamMate.Windows
private void RegisterBindings()
{
this.CommandBindings.Add(TeamMateCommands.Hamburger, this.ToggleToolBarWidth);
this.CommandBindings.Add(TeamMateCommands.SendFeedbackToolBar, ShowSendFeedbackContextMenu);
RoutedUICommand newItemCommand = new RoutedUICommand();
newItemCommand.InputGestures.Add(TeamMateGestures.New);