This file contains hidden or 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
| Application.Current.Dispatcher.Invoke(Application.Current.Shutdown); |
This file contains hidden or 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
| MainWindow mainWindowInstance; | |
| public SearchDeviceView(MainWindow mainWindow) | |
| { | |
| InitializeComponent(); | |
| mainWindowInstance = mainWindow; | |
| var viewModel = (Presenter)mainWindow.DataContext; | |
| viewModel.ViewEvent += ViewModel_ViewEvent; | |
| SearchDeviceViewShowing = true; | |
| } |
This file contains hidden or 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
| <Window.Resources> | |
| <Style TargetType="Image"> | |
| <Setter Property="RenderOptions.BitmapScalingMode" Value="HighQuality" /> | |
| </Style> | |
| <Style TargetType="ContentControl"> | |
| <Setter Property="FocusVisualStyle" Value="{x:Null}"/> | |
| </Style> | |
| </Window.Resources> |
This file contains hidden or 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
| <Window.InputBindings> | |
| <KeyBinding Command="{Binding Command}" Key="F10"></KeyBinding> | |
| </Window.InputBindings> |
This file contains hidden or 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
| <Style x:Key="MaterialDesignAccentButtonStyle" TargetType="{x:Type Button}"> | |
| <Setter Property="FocusVisualStyle" Value="{x:Null}"/> | |
| <Setter Property="Background" Value="{StaticResource Accent}"/> | |
| <Setter Property="BorderBrush" Value="{StaticResource AccentDark}"/> | |
| <Setter Property="BorderThickness" Value="1"/> | |
| <Setter Property="Foreground" Value="White"/> | |
| <Setter Property="HorizontalContentAlignment" Value="Center"/> | |
| <Setter Property="VerticalContentAlignment" Value="Center"/> | |
| <Setter Property="Padding" Value="16,3,16,3"/> | |
| <Setter Property="FontSize" Value="16"/> |
This file contains hidden or 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
| <Style x:Key="TransparentButtonStyle" TargetType="{x:Type Button}"> | |
| <Setter Property="FocusVisualStyle" Value="{x:Null}"/> | |
| <Setter Property="Background" Value="{x:Null}"/> | |
| <Setter Property="BorderBrush" Value="Transparent"/> | |
| <Setter Property="BorderThickness" Value="1"/> | |
| <Setter Property="Foreground" Value="{StaticResource PrimaryDark}"/> | |
| <Setter Property="HorizontalContentAlignment" Value="Center"/> | |
| <Setter Property="VerticalContentAlignment" Value="Center"/> | |
| <Setter Property="Padding" Value="3"/> | |
| <Setter Property="Template"> |
This file contains hidden or 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
| <TargetType="{x:Type ProgressBar}"> | |
| <Setter Property="Foreground" Value="{StaticResource Primary}"/> | |
| <Setter Property="Background" Value="#EEEEEE"/> | |
| <Setter Property="BorderThickness" Value="0"/> | |
| <Setter Property="Template"> | |
| <Setter.Value> | |
| <ControlTemplate TargetType="{x:Type ProgressBar}"> | |
| <Grid Name="TemplateRoot" SnapsToDevicePixels="true"> | |
| <Rectangle Fill="{TemplateBinding Background}"/> | |
| <Rectangle Name="PART_Track" Margin="0"/> |
This file contains hidden or 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
| public static bool CheckConnection() | |
| { | |
| try | |
| { | |
| HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://www.microsoft.com"); | |
| request.Timeout = 5000; | |
| request.Credentials = CredentialCache.DefaultNetworkCredentials; | |
| HttpWebResponse response = (HttpWebResponse)request.GetResponse(); | |
| if (response.StatusCode == HttpStatusCode.OK) |
This file contains hidden or 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
| if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop) | |
| { | |
| Window.ClearFlags(WindowManagerFlags.TranslucentStatus); | |
| Window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds); | |
| var color = Color.Argb(210, 57, 169, 220); | |
| Window.SetStatusBarColor(color); | |
| } |
This file contains hidden or 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
| SetContentView(Resource.Layout.FrameContainer); |