forked from felixse/FluentTerminal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Un-swap Ubuntu yellow and cyan (felixse#291) The build-in Ubuntu profile has the yellows and cyans swapped. This fixes that. * Add dark and light mode SVG icons for felixse#203 (felixse#290) * Ap/ssh Implemented SSH by using the exsting infrastructure (felixse#293) * Appveyor builds (felixse#6) * SSH implemented. * Implementing SSH by using the existing app infrastructure. * Refactored to new command instead of a profile * Update .gitignore * fix: new line bug in verbatim string (felixse#294) * Read whole terminal frame at once to avoid console data append glitches (felixse#299) * Read whole terminal frame at once to avoid console data append glitches * Simplify calculation logic with Math.Max * Move back referencing <None Include="FluentTerminal.App_TemporaryKey.pfx" /> since it's used during AppVeyor GitHub Releases deployment * Dev/overlay control (felixse#278) * Creating a control for the overlay * using Interactivity * trying to bind by reference * fix bindings * remove unused packages * Move getter/setter to show method * Convert to AutoProperty * Make text copied notification configurable * cache settings, removed unused file * Less conflicting default keybindings (felixse#309) Many of FluentTerminal's default keybindings collide with commonly used default keys in various terminal apps. Use defaults that are less likely to cause problems to provide a better out-of-the-box experience. Many of the bindings are inspired by gnome-terminal's defaults. Also, the `false` modifiers in the default keybinding specifications have been removed. This makes it easier to see which modifiers are actually in use.
- Loading branch information
Showing
11 changed files
with
151 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using FluentTerminal.App.Services; | ||
using GalaSoft.MvvmLight; | ||
using System; | ||
|
||
namespace FluentTerminal.App.ViewModels | ||
{ | ||
public class OverlayViewModel : ViewModelBase | ||
{ | ||
private readonly IDispatcherTimer _overlayTimer; | ||
private bool _showOverlay; | ||
private string _overlayContent; | ||
|
||
public OverlayViewModel(IDispatcherTimer dispatcherTimer) | ||
{ | ||
_overlayTimer = dispatcherTimer; | ||
_overlayTimer.Interval = new TimeSpan(0, 0, 2); | ||
_overlayTimer.Tick += OnResizeOverlayTimerFinished; | ||
} | ||
|
||
public bool ShowOverlay | ||
{ | ||
get => _showOverlay; | ||
set => Set(ref _showOverlay, value); | ||
} | ||
|
||
public string OverlayContent | ||
{ | ||
get => _overlayContent; | ||
set => Set(ref _overlayContent, value); | ||
} | ||
|
||
public void Show(string message) | ||
{ | ||
OverlayContent = message; | ||
ShowOverlay = true; | ||
|
||
if (_overlayTimer.IsEnabled) | ||
{ | ||
_overlayTimer.Stop(); | ||
} | ||
_overlayTimer.Start(); | ||
} | ||
|
||
private void OnResizeOverlayTimerFinished(object sender, object e) | ||
{ | ||
_overlayTimer.Stop(); | ||
ShowOverlay = false; | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.