SEBWIN-516: Added icons for raise hand control and removed BETA version marker.
This commit is contained in:
parent
b5ec48498f
commit
55db0f8bf9
15 changed files with 133 additions and 22 deletions
|
@ -29,9 +29,14 @@
|
|||
</Border>
|
||||
</Popup>
|
||||
<Button x:Name="NotificationButton" Padding="2" Template="{StaticResource ActionCenterButton}">
|
||||
<Viewbox Stretch="Uniform">
|
||||
<TextBlock x:Name="TextBlock" FontWeight="Bold" Margin="2" TextAlignment="Center" VerticalAlignment="Center" Text="L" />
|
||||
</Viewbox>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*" />
|
||||
<RowDefinition Height="3*" />
|
||||
</Grid.RowDefinitions>
|
||||
<ContentControl x:Name="Icon" />
|
||||
<TextBlock Grid.Row="1" x:Name="Text" FontSize="11" Foreground="White" TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" VerticalAlignment="Bottom" />
|
||||
</Grid>
|
||||
</Button>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -6,16 +6,19 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using SafeExamBrowser.Core.Contracts.Resources.Icons;
|
||||
using SafeExamBrowser.I18n.Contracts;
|
||||
using SafeExamBrowser.Proctoring.Contracts;
|
||||
using SafeExamBrowser.Settings.Proctoring;
|
||||
using SafeExamBrowser.UserInterface.Contracts.Shell;
|
||||
using SafeExamBrowser.UserInterface.Shared.Utilities;
|
||||
|
||||
namespace SafeExamBrowser.UserInterface.Desktop.Controls.ActionCenter
|
||||
{
|
||||
|
@ -25,6 +28,9 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.ActionCenter
|
|||
private readonly ProctoringSettings settings;
|
||||
private readonly IText text;
|
||||
|
||||
private IconResource LoweredIcon;
|
||||
private IconResource RaisedIcon;
|
||||
|
||||
public RaiseHandControl(IProctoringController controller, ProctoringSettings settings, IText text)
|
||||
{
|
||||
this.controller = controller;
|
||||
|
@ -45,6 +51,10 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.ActionCenter
|
|||
HandButton.Click += RaiseHandButton_Click;
|
||||
HandButtonText.Text = text.Get(TextKey.Notification_ProctoringRaiseHand);
|
||||
|
||||
LoweredIcon = new XamlIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/Hand_Lowered.xaml") };
|
||||
RaisedIcon = new XamlIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/Hand_Raised.xaml") };
|
||||
Icon.Content = IconResourceLoader.Load(LoweredIcon);
|
||||
|
||||
NotificationButton.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => Popup.IsOpen = Popup.IsMouseOver));
|
||||
NotificationButton.PreviewMouseLeftButtonUp += NotificationButton_PreviewMouseLeftButtonUp;
|
||||
NotificationButton.PreviewMouseRightButtonUp += NotificationButton_PreviewMouseRightButtonUp;
|
||||
|
@ -54,6 +64,8 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.ActionCenter
|
|||
Popup.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => Popup.IsOpen = IsMouseOver));
|
||||
Popup.Opened += (o, args) => Grid.Background = Brushes.Gray;
|
||||
Popup.Closed += (o, args) => Grid.Background = originalBrush;
|
||||
|
||||
Text.Text = text.Get(TextKey.Notification_ProctoringHandLowered);
|
||||
}
|
||||
|
||||
private void NotificationButton_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||
|
@ -102,17 +114,19 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.ActionCenter
|
|||
private void ShowLowered()
|
||||
{
|
||||
HandButtonText.Text = text.Get(TextKey.Notification_ProctoringRaiseHand);
|
||||
Icon.Content = IconResourceLoader.Load(LoweredIcon);
|
||||
Message.IsEnabled = true;
|
||||
NotificationButton.ToolTip = text.Get(TextKey.Notification_ProctoringHandLowered);
|
||||
TextBlock.Text = "L";
|
||||
Text.Text = text.Get(TextKey.Notification_ProctoringHandLowered);
|
||||
}
|
||||
|
||||
private void ShowRaised()
|
||||
{
|
||||
HandButtonText.Text = text.Get(TextKey.Notification_ProctoringLowerHand);
|
||||
Icon.Content = IconResourceLoader.Load(RaisedIcon);
|
||||
Message.IsEnabled = false;
|
||||
NotificationButton.ToolTip = text.Get(TextKey.Notification_ProctoringHandRaised);
|
||||
TextBlock.Text = "R";
|
||||
Text.Text = text.Get(TextKey.Notification_ProctoringHandRaised);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,9 +30,7 @@
|
|||
</Border>
|
||||
</Popup>
|
||||
<Button x:Name="NotificationButton" Background="Transparent" Template="{StaticResource TaskbarButton}" Padding="5" Width="40">
|
||||
<Viewbox Stretch="Uniform">
|
||||
<TextBlock x:Name="TextBlock" FontWeight="Bold" Margin="2" TextAlignment="Center" VerticalAlignment="Center" Text="L" />
|
||||
</Viewbox>
|
||||
<ContentControl Name="Icon" />
|
||||
</Button>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -6,16 +6,19 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using SafeExamBrowser.Core.Contracts.Resources.Icons;
|
||||
using SafeExamBrowser.I18n.Contracts;
|
||||
using SafeExamBrowser.Proctoring.Contracts;
|
||||
using SafeExamBrowser.Settings.Proctoring;
|
||||
using SafeExamBrowser.UserInterface.Contracts.Shell;
|
||||
using SafeExamBrowser.UserInterface.Shared.Utilities;
|
||||
|
||||
namespace SafeExamBrowser.UserInterface.Desktop.Controls.Taskbar
|
||||
{
|
||||
|
@ -25,6 +28,9 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.Taskbar
|
|||
private readonly ProctoringSettings settings;
|
||||
private readonly IText text;
|
||||
|
||||
private IconResource LoweredIcon;
|
||||
private IconResource RaisedIcon;
|
||||
|
||||
public RaiseHandControl(IProctoringController controller, ProctoringSettings settings, IText text)
|
||||
{
|
||||
this.controller = controller;
|
||||
|
@ -45,6 +51,10 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.Taskbar
|
|||
HandButton.Click += RaiseHandButton_Click;
|
||||
HandButtonText.Text = text.Get(TextKey.Notification_ProctoringRaiseHand);
|
||||
|
||||
LoweredIcon = new XamlIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/Hand_Lowered.xaml") };
|
||||
RaisedIcon = new XamlIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/Hand_Raised.xaml") };
|
||||
Icon.Content = IconResourceLoader.Load(LoweredIcon);
|
||||
|
||||
NotificationButton.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => Popup.IsOpen = Popup.IsMouseOver));
|
||||
NotificationButton.PreviewMouseLeftButtonUp += NotificationButton_PreviewMouseLeftButtonUp;
|
||||
NotificationButton.PreviewMouseRightButtonUp += NotificationButton_PreviewMouseRightButtonUp;
|
||||
|
@ -57,7 +67,6 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.Taskbar
|
|||
Background = Brushes.LightGray;
|
||||
NotificationButton.Background = Brushes.LightGray;
|
||||
};
|
||||
|
||||
Popup.Closed += (o, args) =>
|
||||
{
|
||||
Background = originalBrush;
|
||||
|
@ -111,17 +120,17 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.Taskbar
|
|||
private void ShowLowered()
|
||||
{
|
||||
HandButtonText.Text = text.Get(TextKey.Notification_ProctoringRaiseHand);
|
||||
Icon.Content = IconResourceLoader.Load(LoweredIcon);
|
||||
Message.IsEnabled = true;
|
||||
NotificationButton.ToolTip = text.Get(TextKey.Notification_ProctoringHandLowered);
|
||||
TextBlock.Text = "L";
|
||||
}
|
||||
|
||||
private void ShowRaised()
|
||||
{
|
||||
HandButtonText.Text = text.Get(TextKey.Notification_ProctoringLowerHand);
|
||||
Icon.Content = IconResourceLoader.Load(RaisedIcon);
|
||||
Message.IsEnabled = false;
|
||||
NotificationButton.ToolTip = text.Get(TextKey.Notification_ProctoringHandRaised);
|
||||
TextBlock.Text = "R";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<Viewbox
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Grid>
|
||||
<Canvas Width="858.999" Height="862.000">
|
||||
<Path Fill="Black" Data="F1 M 425.701,794.995 C 379.929,794.995 340.560,785.583 307.594,766.759 C 274.629,747.934 249.228,720.533 231.394,684.556 C 213.560,648.578 204.643,605.004 204.643,553.835 L 204.643,232.478 C 204.643,225.177 206.828,219.235 211.200,214.654 C 215.571,210.074 221.301,207.783 228.391,207.783 C 235.437,207.783 241.250,210.074 245.831,214.654 C 250.412,219.235 252.702,225.177 252.702,232.478 L 252.702,429.758 C 252.702,437.762 255.532,444.401 261.193,449.677 C 266.854,454.952 273.347,457.590 280.672,457.590 C 288.464,457.590 295.231,454.952 300.971,449.677 C 306.712,444.401 309.582,437.762 309.582,429.758 L 309.582,134.006 C 309.582,126.704 311.704,120.710 315.947,116.024 C 320.191,111.337 325.860,108.994 332.954,108.994 C 340.047,108.994 345.884,111.337 350.465,116.024 C 355.046,120.710 357.336,126.704 357.336,134.006 L 357.336,409.800 C 357.336,417.804 360.153,424.443 365.788,429.719 C 371.423,434.994 378.033,437.632 385.618,437.632 C 393.198,437.632 399.848,434.994 405.566,429.719 C 411.285,424.443 414.145,417.804 414.145,409.800 L 414.145,85.449 C 414.145,78.195 416.435,72.173 421.015,67.383 C 425.596,62.593 431.434,60.198 438.527,60.198 C 445.410,60.198 451.088,62.593 455.563,67.383 C 460.038,72.173 462.276,78.195 462.276,85.449 L 462.276,405.459 C 462.276,413.203 465.042,419.777 470.575,425.180 C 476.108,430.583 482.770,433.285 490.563,433.285 C 498.308,433.285 504.998,430.583 510.635,425.180 C 516.271,419.777 519.089,413.203 519.089,405.459 L 519.089,134.006 C 519.089,126.704 521.304,120.710 525.733,116.024 C 530.163,111.337 535.924,108.994 543.017,108.994 C 550.111,108.994 555.908,111.337 560.407,116.024 C 564.906,120.710 567.155,126.704 567.155,134.006 L 567.155,515.518 C 567.155,526.396 570.239,534.828 576.407,540.814 C 582.574,546.800 590.147,549.793 599.125,549.793 C 606.758,549.749 613.863,547.732 620.440,543.742 C 627.016,539.752 632.568,532.671 637.095,522.500 L 692.280,399.003 C 695.582,391.355 700.202,386.286 706.142,383.797 C 712.082,381.308 718.005,381.203 723.909,383.483 C 730.492,386.062 734.788,390.327 736.798,396.279 C 738.808,402.231 738.336,409.407 735.382,417.806 L 664.082,614.392 C 640.346,679.569 608.514,725.963 568.587,753.576 C 528.659,781.189 481.030,794.995 425.701,794.995 Z M 427.827,859.330 C 498.493,859.330 558.389,840.488 607.515,802.806 C 656.640,765.124 694.482,709.031 721.040,634.529 L 789.323,442.896 C 794.241,429.083 796.700,415.750 796.700,402.896 C 796.700,381.287 789.469,363.388 775.007,349.199 C 760.550,335.009 742.647,327.914 721.298,327.914 C 707.645,327.914 694.945,331.775 683.196,339.498 C 671.448,347.220 662.334,358.505 655.855,373.351 L 635.083,424.458 C 634.364,426.107 633.285,426.932 631.844,426.932 C 630.147,426.932 629.298,425.874 629.298,423.758 L 629.298,128.275 C 629.298,104.087 622.123,84.794 607.772,70.395 C 593.421,55.996 574.457,48.796 550.880,48.796 C 543.511,48.796 536.562,49.966 530.033,52.305 C 523.504,54.645 517.625,58.024 512.395,62.443 C 508.739,43.046 500.446,27.789 487.518,16.674 C 474.590,5.558 458.374,0.000 438.868,0.000 C 419.667,0.000 403.510,5.610 390.396,16.830 C 377.282,28.049 368.767,43.020 364.851,61.742 C 355.210,53.112 343.534,48.796 329.821,48.796 C 307.913,48.796 290.190,55.788 276.651,69.772 C 263.112,83.756 256.343,102.040 256.343,124.622 L 256.343,160.747 C 251.556,156.209 245.815,152.730 239.118,150.310 C 232.422,147.891 225.401,146.682 218.056,146.682 C 196.148,146.682 178.245,153.968 164.347,168.541 C 150.448,183.114 143.499,202.087 143.499,225.460 L 143.499,560.451 C 143.499,622.072 155.334,675.223 179.002,719.906 C 202.671,764.588 235.828,798.996 278.474,823.130 C 321.121,847.263 370.905,859.330 427.827,859.330 Z"/>
|
||||
</Canvas>
|
||||
</Grid>
|
||||
</Viewbox>
|
|
@ -0,0 +1,12 @@
|
|||
<Viewbox
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Grid>
|
||||
<Canvas Width="929.832" Height="936.000">
|
||||
<Canvas>
|
||||
<Path Fill="#ff000000" Data="F1 M 188.249,869.559 C 168.871,869.559 153.644,854.794 153.644,835.416 C 153.644,816.960 169.332,801.734 188.249,801.734 C 207.628,801.734 222.854,816.960 222.854,835.416 C 222.854,854.794 207.628,869.559 188.249,869.559 Z M 188.249,777.280 C 173.023,777.280 162.411,767.129 161.949,752.826 L 158.720,655.933 C 158.259,638.861 170.255,626.865 188.249,626.865 C 206.243,626.865 218.240,638.861 217.778,655.933 L 214.549,752.826 C 214.087,767.129 203.015,777.280 188.249,777.280 Z M 188.249,936.000 C 291.603,936.000 376.499,851.103 376.499,747.751 C 376.499,644.398 291.603,559.501 188.249,559.501 C 84.897,559.501 0.000,644.398 0.000,747.751 C 0.000,851.103 84.897,936.000 188.249,936.000 Z"/>
|
||||
<Path Fill="#ff000000" Data="F1 M 845.839,349.199 C 831.382,335.009 813.479,327.914 792.130,327.914 C 778.478,327.914 765.777,331.775 754.028,339.498 C 742.280,347.220 733.167,358.505 726.688,373.351 L 705.915,424.458 C 705.197,426.107 704.117,426.932 702.676,426.932 C 700.979,426.932 700.131,425.874 700.131,423.758 L 700.131,128.275 C 700.131,104.088 692.955,84.794 678.604,70.395 C 664.253,55.996 645.289,48.796 621.712,48.796 C 614.343,48.796 607.394,49.966 600.865,52.305 C 594.336,54.645 588.457,58.024 583.228,62.443 C 579.571,43.046 571.278,27.789 558.350,16.674 C 545.423,5.558 529.206,0.000 509.701,0.000 C 490.500,0.000 474.342,5.610 461.228,16.830 C 448.115,28.049 439.600,43.020 435.683,61.742 C 426.043,53.112 414.366,48.796 400.654,48.796 C 378.746,48.796 361.022,55.788 347.483,69.772 C 333.945,83.756 327.175,102.040 327.175,124.622 L 327.175,160.747 C 322.389,156.209 316.647,152.730 309.951,150.310 C 303.254,147.891 296.234,146.682 288.888,146.682 C 266.980,146.682 249.077,153.968 235.179,168.541 C 221.281,183.114 214.332,202.087 214.332,225.460 L 214.332,508.446 C 235.287,510.924 255.750,516.158 275.475,524.104 L 275.475,232.478 C 275.475,225.177 277.661,219.235 282.032,214.654 C 286.403,210.074 292.133,207.783 299.223,207.783 C 306.269,207.783 312.083,210.074 316.664,214.654 C 321.244,219.235 323.534,225.177 323.534,232.478 L 323.534,429.758 C 323.534,437.762 326.365,444.401 332.026,449.677 C 337.686,454.952 344.179,457.590 351.504,457.590 C 359.297,457.590 366.063,454.952 371.804,449.677 C 377.544,444.401 380.414,437.762 380.414,429.758 L 380.414,134.006 C 380.414,126.704 382.536,120.710 386.780,116.024 C 391.023,111.337 396.692,108.994 403.786,108.994 C 410.879,108.994 416.717,111.337 421.298,116.024 C 425.878,120.710 428.168,126.704 428.168,134.006 L 428.168,409.800 C 428.168,417.804 430.986,424.443 436.620,429.719 C 442.255,434.994 448.865,437.632 456.450,437.632 C 464.031,437.632 470.680,434.994 476.399,429.719 C 482.117,424.443 484.977,417.804 484.977,409.800 L 484.977,85.449 C 484.977,78.195 487.267,72.173 491.848,67.383 C 496.429,62.593 502.266,60.198 509.359,60.198 C 516.242,60.198 521.921,62.593 526.396,67.383 C 530.871,72.173 533.108,78.195 533.108,85.449 L 533.108,405.459 C 533.108,413.203 535.875,419.777 541.407,425.180 C 546.940,430.583 553.603,433.285 561.395,433.285 C 569.140,433.285 575.830,430.583 581.467,425.180 C 587.104,419.777 589.922,413.203 589.922,405.459 L 589.922,134.006 C 589.922,126.704 592.136,120.710 596.566,116.024 C 600.995,111.337 606.756,108.994 613.850,108.994 C 620.944,108.994 626.740,111.337 631.239,116.024 C 635.738,120.710 637.987,126.704 637.987,134.006 L 637.987,515.518 C 637.987,526.396 641.071,534.828 647.239,540.814 C 653.407,546.800 660.979,549.793 669.958,549.793 C 677.590,549.749 684.695,547.732 691.272,543.742 C 697.849,539.752 703.400,532.671 707.927,522.500 L 763.112,399.003 C 766.414,391.355 771.035,386.286 776.974,383.797 C 782.915,381.308 788.837,381.203 794.741,383.483 C 801.324,386.062 805.620,390.327 807.630,396.279 C 809.640,402.231 809.168,409.406 806.214,417.806 L 734.915,614.392 C 711.179,679.569 679.347,725.963 639.419,753.576 C 599.491,781.189 551.862,794.995 496.533,794.995 C 470.493,794.995 446.532,791.938 424.637,785.846 C 421.591,805.184 416.182,824.071 408.423,842.300 C 407.750,843.879 407.056,845.446 406.352,847.008 C 434.695,855.217 465.461,859.330 498.659,859.330 C 569.325,859.330 629.221,840.488 678.347,802.806 C 727.472,765.124 765.314,709.031 791.873,634.529 L 860.155,442.896 C 865.074,429.083 867.533,415.750 867.533,402.896 C 867.533,381.287 860.302,363.388 845.839,349.199 Z"/>
|
||||
</Canvas>
|
||||
</Canvas>
|
||||
</Grid>
|
||||
</Viewbox>
|
|
@ -207,6 +207,14 @@
|
|||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Resource Include="Images\Hand_Lowered.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Resource>
|
||||
<Resource Include="Images\Hand_Raised.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Resource>
|
||||
<Page Include="Windows\AboutWindow.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
|
|
@ -29,9 +29,14 @@
|
|||
</Border>
|
||||
</Popup>
|
||||
<Button x:Name="NotificationButton" Padding="2" Template="{StaticResource ActionCenterButton}">
|
||||
<Viewbox Stretch="Uniform">
|
||||
<TextBlock x:Name="TextBlock" FontWeight="Bold" Margin="2" TextAlignment="Center" VerticalAlignment="Center" Text="L" />
|
||||
</Viewbox>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*" />
|
||||
<RowDefinition Height="3*" />
|
||||
</Grid.RowDefinitions>
|
||||
<ContentControl x:Name="Icon" />
|
||||
<TextBlock Grid.Row="1" x:Name="Text" FontSize="11" Foreground="White" TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" VerticalAlignment="Bottom" />
|
||||
</Grid>
|
||||
</Button>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -6,16 +6,19 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using SafeExamBrowser.Core.Contracts.Resources.Icons;
|
||||
using SafeExamBrowser.I18n.Contracts;
|
||||
using SafeExamBrowser.Proctoring.Contracts;
|
||||
using SafeExamBrowser.Settings.Proctoring;
|
||||
using SafeExamBrowser.UserInterface.Contracts.Shell;
|
||||
using SafeExamBrowser.UserInterface.Shared.Utilities;
|
||||
|
||||
namespace SafeExamBrowser.UserInterface.Mobile.Controls.ActionCenter
|
||||
{
|
||||
|
@ -25,6 +28,9 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.ActionCenter
|
|||
private readonly ProctoringSettings settings;
|
||||
private readonly IText text;
|
||||
|
||||
private IconResource LoweredIcon;
|
||||
private IconResource RaisedIcon;
|
||||
|
||||
public RaiseHandControl(IProctoringController controller, ProctoringSettings settings, IText text)
|
||||
{
|
||||
this.controller = controller;
|
||||
|
@ -45,6 +51,10 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.ActionCenter
|
|||
HandButton.Click += RaiseHandButton_Click;
|
||||
HandButtonText.Text = text.Get(TextKey.Notification_ProctoringRaiseHand);
|
||||
|
||||
LoweredIcon = new XamlIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/Hand_Lowered.xaml") };
|
||||
RaisedIcon = new XamlIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/Hand_Raised.xaml") };
|
||||
Icon.Content = IconResourceLoader.Load(LoweredIcon);
|
||||
|
||||
NotificationButton.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => Popup.IsOpen = Popup.IsMouseOver));
|
||||
NotificationButton.PreviewMouseLeftButtonUp += NotificationButton_PreviewMouseLeftButtonUp;
|
||||
NotificationButton.PreviewMouseRightButtonUp += NotificationButton_PreviewMouseRightButtonUp;
|
||||
|
@ -54,6 +64,8 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.ActionCenter
|
|||
Popup.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => Popup.IsOpen = IsMouseOver));
|
||||
Popup.Opened += (o, args) => Grid.Background = Brushes.Gray;
|
||||
Popup.Closed += (o, args) => Grid.Background = originalBrush;
|
||||
|
||||
Text.Text = text.Get(TextKey.Notification_ProctoringHandLowered);
|
||||
}
|
||||
|
||||
private void NotificationButton_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||
|
@ -102,17 +114,19 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.ActionCenter
|
|||
private void ShowLowered()
|
||||
{
|
||||
HandButtonText.Text = text.Get(TextKey.Notification_ProctoringRaiseHand);
|
||||
Icon.Content = IconResourceLoader.Load(LoweredIcon);
|
||||
Message.IsEnabled = true;
|
||||
NotificationButton.ToolTip = text.Get(TextKey.Notification_ProctoringHandLowered);
|
||||
TextBlock.Text = "L";
|
||||
Text.Text = text.Get(TextKey.Notification_ProctoringHandLowered);
|
||||
}
|
||||
|
||||
private void ShowRaised()
|
||||
{
|
||||
HandButtonText.Text = text.Get(TextKey.Notification_ProctoringLowerHand);
|
||||
Icon.Content = IconResourceLoader.Load(RaisedIcon);
|
||||
Message.IsEnabled = false;
|
||||
NotificationButton.ToolTip = text.Get(TextKey.Notification_ProctoringHandRaised);
|
||||
TextBlock.Text = "R";
|
||||
Text.Text = text.Get(TextKey.Notification_ProctoringHandRaised);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,9 +29,7 @@
|
|||
</Border>
|
||||
</Popup>
|
||||
<Button x:Name="NotificationButton" Background="Transparent" Template="{StaticResource TaskbarButton}" Padding="5" Width="60">
|
||||
<Viewbox Stretch="Uniform">
|
||||
<TextBlock x:Name="TextBlock" FontWeight="Bold" Margin="2" TextAlignment="Center" VerticalAlignment="Center" Text="L" />
|
||||
</Viewbox>
|
||||
<ContentControl Name="Icon" />
|
||||
</Button>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -6,16 +6,19 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using SafeExamBrowser.Core.Contracts.Resources.Icons;
|
||||
using SafeExamBrowser.I18n.Contracts;
|
||||
using SafeExamBrowser.Proctoring.Contracts;
|
||||
using SafeExamBrowser.Settings.Proctoring;
|
||||
using SafeExamBrowser.UserInterface.Contracts.Shell;
|
||||
using SafeExamBrowser.UserInterface.Shared.Utilities;
|
||||
|
||||
namespace SafeExamBrowser.UserInterface.Mobile.Controls.Taskbar
|
||||
{
|
||||
|
@ -25,6 +28,9 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.Taskbar
|
|||
private readonly ProctoringSettings settings;
|
||||
private readonly IText text;
|
||||
|
||||
private IconResource LoweredIcon;
|
||||
private IconResource RaisedIcon;
|
||||
|
||||
public RaiseHandControl(IProctoringController controller, ProctoringSettings settings, IText text)
|
||||
{
|
||||
this.controller = controller;
|
||||
|
@ -45,6 +51,10 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.Taskbar
|
|||
HandButton.Click += RaiseHandButton_Click;
|
||||
HandButtonText.Text = text.Get(TextKey.Notification_ProctoringRaiseHand);
|
||||
|
||||
LoweredIcon = new XamlIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/Hand_Lowered.xaml") };
|
||||
RaisedIcon = new XamlIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/Hand_Raised.xaml") };
|
||||
Icon.Content = IconResourceLoader.Load(LoweredIcon);
|
||||
|
||||
NotificationButton.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => Popup.IsOpen = Popup.IsMouseOver));
|
||||
NotificationButton.PreviewMouseLeftButtonUp += NotificationButton_PreviewMouseLeftButtonUp;
|
||||
NotificationButton.PreviewMouseRightButtonUp += NotificationButton_PreviewMouseRightButtonUp;
|
||||
|
@ -111,17 +121,17 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.Taskbar
|
|||
private void ShowLowered()
|
||||
{
|
||||
HandButtonText.Text = text.Get(TextKey.Notification_ProctoringRaiseHand);
|
||||
Icon.Content = IconResourceLoader.Load(LoweredIcon);
|
||||
Message.IsEnabled = true;
|
||||
NotificationButton.ToolTip = text.Get(TextKey.Notification_ProctoringHandLowered);
|
||||
TextBlock.Text = "L";
|
||||
}
|
||||
|
||||
private void ShowRaised()
|
||||
{
|
||||
HandButtonText.Text = text.Get(TextKey.Notification_ProctoringLowerHand);
|
||||
Icon.Content = IconResourceLoader.Load(RaisedIcon);
|
||||
Message.IsEnabled = false;
|
||||
NotificationButton.ToolTip = text.Get(TextKey.Notification_ProctoringHandRaised);
|
||||
TextBlock.Text = "R";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<Viewbox
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Grid>
|
||||
<Canvas Width="858.999" Height="862.000">
|
||||
<Path Fill="Black" Data="F1 M 425.701,794.995 C 379.929,794.995 340.560,785.583 307.594,766.759 C 274.629,747.934 249.228,720.533 231.394,684.556 C 213.560,648.578 204.643,605.004 204.643,553.835 L 204.643,232.478 C 204.643,225.177 206.828,219.235 211.200,214.654 C 215.571,210.074 221.301,207.783 228.391,207.783 C 235.437,207.783 241.250,210.074 245.831,214.654 C 250.412,219.235 252.702,225.177 252.702,232.478 L 252.702,429.758 C 252.702,437.762 255.532,444.401 261.193,449.677 C 266.854,454.952 273.347,457.590 280.672,457.590 C 288.464,457.590 295.231,454.952 300.971,449.677 C 306.712,444.401 309.582,437.762 309.582,429.758 L 309.582,134.006 C 309.582,126.704 311.704,120.710 315.947,116.024 C 320.191,111.337 325.860,108.994 332.954,108.994 C 340.047,108.994 345.884,111.337 350.465,116.024 C 355.046,120.710 357.336,126.704 357.336,134.006 L 357.336,409.800 C 357.336,417.804 360.153,424.443 365.788,429.719 C 371.423,434.994 378.033,437.632 385.618,437.632 C 393.198,437.632 399.848,434.994 405.566,429.719 C 411.285,424.443 414.145,417.804 414.145,409.800 L 414.145,85.449 C 414.145,78.195 416.435,72.173 421.015,67.383 C 425.596,62.593 431.434,60.198 438.527,60.198 C 445.410,60.198 451.088,62.593 455.563,67.383 C 460.038,72.173 462.276,78.195 462.276,85.449 L 462.276,405.459 C 462.276,413.203 465.042,419.777 470.575,425.180 C 476.108,430.583 482.770,433.285 490.563,433.285 C 498.308,433.285 504.998,430.583 510.635,425.180 C 516.271,419.777 519.089,413.203 519.089,405.459 L 519.089,134.006 C 519.089,126.704 521.304,120.710 525.733,116.024 C 530.163,111.337 535.924,108.994 543.017,108.994 C 550.111,108.994 555.908,111.337 560.407,116.024 C 564.906,120.710 567.155,126.704 567.155,134.006 L 567.155,515.518 C 567.155,526.396 570.239,534.828 576.407,540.814 C 582.574,546.800 590.147,549.793 599.125,549.793 C 606.758,549.749 613.863,547.732 620.440,543.742 C 627.016,539.752 632.568,532.671 637.095,522.500 L 692.280,399.003 C 695.582,391.355 700.202,386.286 706.142,383.797 C 712.082,381.308 718.005,381.203 723.909,383.483 C 730.492,386.062 734.788,390.327 736.798,396.279 C 738.808,402.231 738.336,409.407 735.382,417.806 L 664.082,614.392 C 640.346,679.569 608.514,725.963 568.587,753.576 C 528.659,781.189 481.030,794.995 425.701,794.995 Z M 427.827,859.330 C 498.493,859.330 558.389,840.488 607.515,802.806 C 656.640,765.124 694.482,709.031 721.040,634.529 L 789.323,442.896 C 794.241,429.083 796.700,415.750 796.700,402.896 C 796.700,381.287 789.469,363.388 775.007,349.199 C 760.550,335.009 742.647,327.914 721.298,327.914 C 707.645,327.914 694.945,331.775 683.196,339.498 C 671.448,347.220 662.334,358.505 655.855,373.351 L 635.083,424.458 C 634.364,426.107 633.285,426.932 631.844,426.932 C 630.147,426.932 629.298,425.874 629.298,423.758 L 629.298,128.275 C 629.298,104.087 622.123,84.794 607.772,70.395 C 593.421,55.996 574.457,48.796 550.880,48.796 C 543.511,48.796 536.562,49.966 530.033,52.305 C 523.504,54.645 517.625,58.024 512.395,62.443 C 508.739,43.046 500.446,27.789 487.518,16.674 C 474.590,5.558 458.374,0.000 438.868,0.000 C 419.667,0.000 403.510,5.610 390.396,16.830 C 377.282,28.049 368.767,43.020 364.851,61.742 C 355.210,53.112 343.534,48.796 329.821,48.796 C 307.913,48.796 290.190,55.788 276.651,69.772 C 263.112,83.756 256.343,102.040 256.343,124.622 L 256.343,160.747 C 251.556,156.209 245.815,152.730 239.118,150.310 C 232.422,147.891 225.401,146.682 218.056,146.682 C 196.148,146.682 178.245,153.968 164.347,168.541 C 150.448,183.114 143.499,202.087 143.499,225.460 L 143.499,560.451 C 143.499,622.072 155.334,675.223 179.002,719.906 C 202.671,764.588 235.828,798.996 278.474,823.130 C 321.121,847.263 370.905,859.330 427.827,859.330 Z"/>
|
||||
</Canvas>
|
||||
</Grid>
|
||||
</Viewbox>
|
12
SafeExamBrowser.UserInterface.Mobile/Images/Hand_Raised.xaml
Normal file
12
SafeExamBrowser.UserInterface.Mobile/Images/Hand_Raised.xaml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<Viewbox
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Grid>
|
||||
<Canvas Width="929.832" Height="936.000">
|
||||
<Canvas>
|
||||
<Path Fill="#ff000000" Data="F1 M 188.249,869.559 C 168.871,869.559 153.644,854.794 153.644,835.416 C 153.644,816.960 169.332,801.734 188.249,801.734 C 207.628,801.734 222.854,816.960 222.854,835.416 C 222.854,854.794 207.628,869.559 188.249,869.559 Z M 188.249,777.280 C 173.023,777.280 162.411,767.129 161.949,752.826 L 158.720,655.933 C 158.259,638.861 170.255,626.865 188.249,626.865 C 206.243,626.865 218.240,638.861 217.778,655.933 L 214.549,752.826 C 214.087,767.129 203.015,777.280 188.249,777.280 Z M 188.249,936.000 C 291.603,936.000 376.499,851.103 376.499,747.751 C 376.499,644.398 291.603,559.501 188.249,559.501 C 84.897,559.501 0.000,644.398 0.000,747.751 C 0.000,851.103 84.897,936.000 188.249,936.000 Z"/>
|
||||
<Path Fill="#ff000000" Data="F1 M 845.839,349.199 C 831.382,335.009 813.479,327.914 792.130,327.914 C 778.478,327.914 765.777,331.775 754.028,339.498 C 742.280,347.220 733.167,358.505 726.688,373.351 L 705.915,424.458 C 705.197,426.107 704.117,426.932 702.676,426.932 C 700.979,426.932 700.131,425.874 700.131,423.758 L 700.131,128.275 C 700.131,104.088 692.955,84.794 678.604,70.395 C 664.253,55.996 645.289,48.796 621.712,48.796 C 614.343,48.796 607.394,49.966 600.865,52.305 C 594.336,54.645 588.457,58.024 583.228,62.443 C 579.571,43.046 571.278,27.789 558.350,16.674 C 545.423,5.558 529.206,0.000 509.701,0.000 C 490.500,0.000 474.342,5.610 461.228,16.830 C 448.115,28.049 439.600,43.020 435.683,61.742 C 426.043,53.112 414.366,48.796 400.654,48.796 C 378.746,48.796 361.022,55.788 347.483,69.772 C 333.945,83.756 327.175,102.040 327.175,124.622 L 327.175,160.747 C 322.389,156.209 316.647,152.730 309.951,150.310 C 303.254,147.891 296.234,146.682 288.888,146.682 C 266.980,146.682 249.077,153.968 235.179,168.541 C 221.281,183.114 214.332,202.087 214.332,225.460 L 214.332,508.446 C 235.287,510.924 255.750,516.158 275.475,524.104 L 275.475,232.478 C 275.475,225.177 277.661,219.235 282.032,214.654 C 286.403,210.074 292.133,207.783 299.223,207.783 C 306.269,207.783 312.083,210.074 316.664,214.654 C 321.244,219.235 323.534,225.177 323.534,232.478 L 323.534,429.758 C 323.534,437.762 326.365,444.401 332.026,449.677 C 337.686,454.952 344.179,457.590 351.504,457.590 C 359.297,457.590 366.063,454.952 371.804,449.677 C 377.544,444.401 380.414,437.762 380.414,429.758 L 380.414,134.006 C 380.414,126.704 382.536,120.710 386.780,116.024 C 391.023,111.337 396.692,108.994 403.786,108.994 C 410.879,108.994 416.717,111.337 421.298,116.024 C 425.878,120.710 428.168,126.704 428.168,134.006 L 428.168,409.800 C 428.168,417.804 430.986,424.443 436.620,429.719 C 442.255,434.994 448.865,437.632 456.450,437.632 C 464.031,437.632 470.680,434.994 476.399,429.719 C 482.117,424.443 484.977,417.804 484.977,409.800 L 484.977,85.449 C 484.977,78.195 487.267,72.173 491.848,67.383 C 496.429,62.593 502.266,60.198 509.359,60.198 C 516.242,60.198 521.921,62.593 526.396,67.383 C 530.871,72.173 533.108,78.195 533.108,85.449 L 533.108,405.459 C 533.108,413.203 535.875,419.777 541.407,425.180 C 546.940,430.583 553.603,433.285 561.395,433.285 C 569.140,433.285 575.830,430.583 581.467,425.180 C 587.104,419.777 589.922,413.203 589.922,405.459 L 589.922,134.006 C 589.922,126.704 592.136,120.710 596.566,116.024 C 600.995,111.337 606.756,108.994 613.850,108.994 C 620.944,108.994 626.740,111.337 631.239,116.024 C 635.738,120.710 637.987,126.704 637.987,134.006 L 637.987,515.518 C 637.987,526.396 641.071,534.828 647.239,540.814 C 653.407,546.800 660.979,549.793 669.958,549.793 C 677.590,549.749 684.695,547.732 691.272,543.742 C 697.849,539.752 703.400,532.671 707.927,522.500 L 763.112,399.003 C 766.414,391.355 771.035,386.286 776.974,383.797 C 782.915,381.308 788.837,381.203 794.741,383.483 C 801.324,386.062 805.620,390.327 807.630,396.279 C 809.640,402.231 809.168,409.406 806.214,417.806 L 734.915,614.392 C 711.179,679.569 679.347,725.963 639.419,753.576 C 599.491,781.189 551.862,794.995 496.533,794.995 C 470.493,794.995 446.532,791.938 424.637,785.846 C 421.591,805.184 416.182,824.071 408.423,842.300 C 407.750,843.879 407.056,845.446 406.352,847.008 C 434.695,855.217 465.461,859.330 498.659,859.330 C 569.325,859.330 629.221,840.488 678.347,802.806 C 727.472,765.124 765.314,709.031 791.873,634.529 L 860.155,442.896 C 865.074,429.083 867.533,415.750 867.533,402.896 C 867.533,381.287 860.302,363.388 845.839,349.199 Z"/>
|
||||
</Canvas>
|
||||
</Canvas>
|
||||
</Grid>
|
||||
</Viewbox>
|
|
@ -265,6 +265,14 @@
|
|||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Resource Include="Images\Hand_Lowered.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Resource>
|
||||
<Resource Include="Images\Hand_Raised.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Resource>
|
||||
<Page Include="Windows\AboutWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
|
|
@ -12,7 +12,7 @@ assembly_info:
|
|||
file: AssemblyInfo.*
|
||||
assembly_version: '{version}'
|
||||
assembly_file_version: '{version}'
|
||||
assembly_informational_version: '3.3.1 BETA ($(platform))'
|
||||
assembly_informational_version: '3.3.1 ($(platform))'
|
||||
install:
|
||||
- appveyor DownloadFile "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
|
||||
build_script:
|
||||
|
|
Loading…
Reference in a new issue