mirror of
https://github.com/openziti/desktop-edge-win.git
synced 2026-10-13 16:21:25 +00:00
Merge pull request #188 from openziti/release-1.3.4-dragger
Release 1.3.4 dragger
This commit is contained in:
@@ -29,8 +29,8 @@
|
||||
<ColumnDefinition Width="40"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<local:Toggler x:Name="IdDetailToggle" Grid.Column="0" HorizontalAlignment="Left" OnToggled="IdToggle"></local:Toggler>
|
||||
<TextBlock x:Name="IdDetailName" MaxWidth="220" Grid.Column="1" TextTrimming="CharacterEllipsis" HorizontalAlignment="Center" FontSize="14" FontWeight="Bold" FontFamily="pack://application:,,,/Assets/Fonts/#Open Sans" Foreground="#0F0F23" VerticalAlignment="Center" TextWrapping="NoWrap" />
|
||||
<Image Grid.Column="2" Cursor="Hand" Source="/Assets/Images/x.png" Width="20" Height="20" Margin="0,0,0,0" HorizontalAlignment="Right" MouseUp="HideMenu"></Image>
|
||||
<TextBlock x:Name="IdDetailName" MouseDown="Window_MouseDown" MaxWidth="220" Grid.Column="1" TextTrimming="CharacterEllipsis" HorizontalAlignment="Center" FontSize="14" FontWeight="Bold" FontFamily="pack://application:,,,/Assets/Fonts/#Open Sans" Foreground="#0F0F23" VerticalAlignment="Center" TextWrapping="NoWrap" />
|
||||
<Image Grid.Column="2" Cursor="Hand" Source="/Assets/Images/x.png" Width="20" Height="20" Margin="0,0,0,0" HorizontalAlignment="Right" MouseUp="HideMenu"></Image>
|
||||
</Grid>
|
||||
<Rectangle HorizontalAlignment="Stretch" Height="1" Fill="#7d8faf" Opacity="0.2"></Rectangle>
|
||||
<Grid>
|
||||
|
||||
@@ -26,6 +26,8 @@ namespace ZitiDesktopEdge {
|
||||
public event Forgot OnForgot;
|
||||
public delegate void ErrorOccurred(string message);
|
||||
public event ErrorOccurred OnError;
|
||||
public delegate void Detched(MouseButtonEventArgs e);
|
||||
public event Detched OnDetach;
|
||||
public double MainHeight = 500;
|
||||
|
||||
private List<ZitiIdentity> identities {
|
||||
@@ -52,6 +54,13 @@ namespace ZitiDesktopEdge {
|
||||
|
||||
public IdentityItem SelectedIdentity { get; set; }
|
||||
|
||||
private void Window_MouseDown(object sender, MouseButtonEventArgs e) {
|
||||
if (e.ChangedButton == MouseButton.Left) {
|
||||
_isAttached = false;
|
||||
OnDetach(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool IsAttached {
|
||||
get {
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<Image Source="/Assets/Images/lastArrow.png" Width="20" Height="20"></Image>
|
||||
<Label FontSize="12" FontWeight="SemiBold" Content="Back" FontFamily="pack://application:,,,/Assets/Fonts/#Open Sans"></Label>
|
||||
</StackPanel>
|
||||
<Label Name="MenuTitle" Grid.Column="1" Content="Main Menu" HorizontalAlignment="Center" FontSize="14" FontWeight="SemiBold" FontFamily="pack://application:,,,/Assets/Fonts/#Open Sans" Foreground="#0F0F23"></Label>
|
||||
<Label Name="MenuTitle" MouseDown="Window_MouseDown" Grid.Column="1" Content="Main Menu" HorizontalAlignment="Center" FontSize="14" FontWeight="SemiBold" FontFamily="pack://application:,,,/Assets/Fonts/#Open Sans" Foreground="#0F0F23"></Label>
|
||||
<Image Grid.Column="2" Cursor="Hand" Source="/Assets/Images/x.png" Height="20" Margin="50,4,0,5" MouseUp="HideMenu"></Image>
|
||||
</Grid>
|
||||
<Rectangle HorizontalAlignment="Stretch" Height="1" Fill="#7d8faf" Opacity="0.2"></Rectangle>
|
||||
|
||||
@@ -26,6 +26,8 @@ namespace ZitiDesktopEdge
|
||||
public event AttachementChanged OnAttachmentChange;
|
||||
public delegate void LogLevelChanged(string level);
|
||||
public event LogLevelChanged OnLogLevelChanged;
|
||||
public delegate void Detched(MouseButtonEventArgs e);
|
||||
public event Detched OnDetach;
|
||||
public string menuState = "Main";
|
||||
public string licenseData = "it's open source.";
|
||||
public string LogLevel = "";
|
||||
@@ -43,6 +45,11 @@ namespace ZitiDesktopEdge
|
||||
UpdateState();
|
||||
MainMenuArea.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
private void Window_MouseDown(object sender, MouseButtonEventArgs e) {
|
||||
if (e.ChangedButton == MouseButton.Left) {
|
||||
OnDetach(e);
|
||||
}
|
||||
}
|
||||
|
||||
private void CloseApp(object sender, MouseButtonEventArgs e) {
|
||||
Application.Current.Shutdown();
|
||||
|
||||
@@ -66,12 +66,28 @@ namespace ZitiDesktopEdge {
|
||||
notifyIcon.Visible = true;
|
||||
notifyIcon.Click += TargetNotifyIcon_Click;
|
||||
notifyIcon.Visible = true;
|
||||
IdentityMenu.OnDetach += OnDetach;
|
||||
MainMenu.OnDetach += OnDetach;
|
||||
|
||||
LaunchOrInstall();
|
||||
|
||||
SetNotifyIcon("white");
|
||||
}
|
||||
|
||||
private void Window_MouseDown(object sender, MouseButtonEventArgs e) {
|
||||
OnDetach(e);
|
||||
}
|
||||
|
||||
private void OnDetach(MouseButtonEventArgs e) {
|
||||
if (e.ChangedButton == MouseButton.Left) {
|
||||
_isAttached = false;
|
||||
IdentityMenu.Arrow.Visibility = Visibility.Collapsed;
|
||||
Arrow.Visibility = Visibility.Collapsed;
|
||||
MainMenu.Detach();
|
||||
this.DragMove();
|
||||
}
|
||||
}
|
||||
|
||||
private void MainWindow_Activated(object sender, EventArgs e) {
|
||||
this.Visibility = Visibility.Visible;
|
||||
Placement();
|
||||
@@ -105,16 +121,6 @@ namespace ZitiDesktopEdge {
|
||||
SetCantDisplay("Service Not Started", "Start the Ziti Tunnel Service to get started");
|
||||
}
|
||||
|
||||
private void Window_MouseDown(object sender, MouseButtonEventArgs e) {
|
||||
if (e.ChangedButton == MouseButton.Left) {
|
||||
_isAttached = false;
|
||||
IdentityMenu.Arrow.Visibility = Visibility.Collapsed;
|
||||
Arrow.Visibility = Visibility.Collapsed;
|
||||
MainMenu.Detach();
|
||||
this.DragMove();
|
||||
}
|
||||
}
|
||||
|
||||
private void TargetNotifyIcon_Click(object sender, EventArgs e) {
|
||||
this.Show();
|
||||
this.Activate();
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
package main
|
||||
|
||||
const (
|
||||
Version = "1.3.4"
|
||||
Revision = "af9d0a33f647"
|
||||
Branch = "release-1.3.4"
|
||||
Version = "1.2.15"
|
||||
Revision = "12439f31b02c"
|
||||
Branch = "release-1.3.4-dragger"
|
||||
BuildUser = ""
|
||||
BuildDate = "2020-11-02 13:16:40"
|
||||
BuildDate = "2020-11-02 13:45:50"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user