Skip to content
This repository was archived by the owner on Jan 7, 2024. It is now read-only.

Commit a0a38d6

Browse files
committed
Crash maybe because my user account cannot elevate to administrator #81
1 parent 851929f commit a0a38d6

4 files changed

Lines changed: 14 additions & 8 deletions

File tree

Sources/MicSwitch/MainWindow/ViewModels/MainWindowViewModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public MainWindowViewModel(
171171
ShowAppCommand = CommandWrapper.Create(ShowAppCommandExecuted);
172172
OpenAppDataDirectoryCommand = CommandWrapper.Create(OpenAppDataDirectory);
173173
ResetOverlayPositionCommand = CommandWrapper.Create(ResetOverlayPositionCommandExecuted);
174-
RunAtLoginToggleCommand = CommandWrapper.Create<bool>(RunAtLoginCommandExecuted);
174+
RunAtLoginToggleCommand = CommandWrapper.Create<bool>(RunAtLoginCommandExecuted, startupManager.WhenAnyValue(x => x.IsReady));
175175
SelectMicrophoneIconCommand = CommandWrapper.Create(SelectMicrophoneIconCommandExecuted);
176176
SelectMutedMicrophoneIconCommand = CommandWrapper.Create(SelectMutedMicrophoneIconCommandExecuted);
177177
ResetMicrophoneIconsCommand = CommandWrapper.Create(ResetMicrophoneIconsCommandExecuted);
@@ -330,8 +330,8 @@ public MainWindowViewModel(
330330
public bool RunAtLogin => startupManager.IsRegistered;
331331

332332
public Size MinSize { get; } = new Size(600, 430);
333-
public Size MaxSize { get; } = new Size(600, 680);
334-
public Size DefaultSize { get; } = new Size(550, 680);
333+
public Size MaxSize { get; } = new Size(900, 680);
334+
public Size DefaultSize { get; } = new Size(600, 680);
335335

336336
public WindowState WindowState
337337
{

Sources/MicSwitch/MainWindow/ViewModels/MicSwitchOverlayViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
using PoeShared.Scaffolding.WPF;
1717
using ReactiveUI;
1818
using Unity;
19-
using Size = System.Windows.Size;
19+
using Size = System.Drawing.Size;
2020

2121
namespace MicSwitch.MainWindow.ViewModels
2222
{

Sources/MicSwitch/MainWindow/Views/MainWindow.xaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,13 +325,19 @@
325325
IsChecked="{Binding MinimizeOnClose}" />
326326
</st:StackPanel>
327327

328-
<TextBlock Style="{StaticResource SettingsLabelStyle}" Text="Run at start:" />
329-
<st:StackPanel>
328+
<TextBlock Style="{StaticResource SettingsLabelStyle}"
329+
IsEnabled="{Binding ElementName=RunAtLoginCheckbox, Path=IsEnabled}"
330+
Text="Run at start:" />
331+
<st:StackPanel Orientation="Horizontal">
330332
<CheckBox
331333
HorizontalAlignment="Left"
334+
x:Name="RunAtLoginCheckbox"
332335
IsChecked="{Binding RunAtLogin, Mode=OneWay}"
333336
Command="{Binding RunAtLoginToggleCommand}"
334337
CommandParameter="{Binding IsChecked, RelativeSource={RelativeSource Self}}" />
338+
<TextBlock Style="{StaticResource WarningIconTextBlock}"
339+
Visibility="{Binding ElementName=RunAtLoginCheckbox, Path=IsEnabled, Converter={StaticResource TrueToCollapsedFalseToVisibleConverter}}"
340+
ToolTip="This functionality is not available" />
335341
</st:StackPanel>
336342

337343
<TextBlock Style="{StaticResource SettingsLabelStyle}" Text="Start minimized:" />
@@ -349,7 +355,7 @@
349355
ToolTip="Periodically check for updates and report if new version is available"
350356
IsChecked="{Binding ApplicationUpdater.CheckForUpdates, Mode=TwoWay}" />
351357
<TextBlock IsHitTestVisible="True">
352-
<Run Text="update source:" />
358+
<Run Text="source:" />
353359
<Hyperlink NavigateUri="{Binding ApplicationUpdater.UpdateSource.Uri}"
354360
Command="{Binding ApplicationUpdater.OpenUri}"
355361
CommandParameter="{Binding ApplicationUpdater.UpdateSource.Uri}"

Submodules/PoeEye

Submodule PoeEye updated 648 files

0 commit comments

Comments
 (0)