[feature]修改设置页面UI和随机抽选UI
This commit is contained in:
parent
bd79ed90c9
commit
3a8d6b640f
@ -1 +1 @@
|
||||
4.5.6
|
||||
5.0.1
|
@ -205,9 +205,6 @@
|
||||
<DependentUpon>YesOrNoNotificationWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Resources\Settings.cs" />
|
||||
<Compile Include="Windows\SettingsPage.xaml.cs">
|
||||
<DependentUpon>SettingsPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Windows\CountdownTimerWindow.xaml.cs">
|
||||
<DependentUpon>CountdownTimerWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@ -268,10 +265,6 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Windows\SettingsPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Windows\CountdownTimerWindow.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
@ -90,7 +90,10 @@
|
||||
<Grid Name="GridBackgroundCover" Visibility="Collapsed" Background="#1F1F1F"/>
|
||||
</Grid>
|
||||
<Canvas IsHitTestVisible="False">
|
||||
<TextBlock Canvas.Left="25" Canvas.Top="15" Text="{Binding nowTime}" Name="WaterMarkTime" Visibility="Collapsed" FontSize="30" FontWeight="Bold" Foreground="White" Opacity="0.5"/>
|
||||
<ui:SimpleStackPanel Canvas.Left="25" Canvas.Top="15" Orientation="Vertical">
|
||||
<TextBlock Text="{Binding nowTime}" Name="WaterMarkTime" Visibility="Collapsed" FontSize="30" FontWeight="Bold" Foreground="White" Opacity="0.6"/>
|
||||
<TextBlock Text="{Binding nowDate}" Name="WaterMarkDate" Visibility="Collapsed" Margin="2,0,0,0" FontSize="16" Foreground="White" Opacity="0.45"/>
|
||||
</ui:SimpleStackPanel>
|
||||
<TextBlock Canvas.Right="25" Canvas.Top="15" Text="Helloworld" Name="BlackBoardWaterMark" Visibility="Collapsed" FontSize="30" FontWeight="Bold" Foreground="White" Opacity="0.5"/>
|
||||
</Canvas>
|
||||
<Canvas Name="Canvas"/>
|
||||
@ -810,29 +813,6 @@
|
||||
</GroupBox.Header>
|
||||
<ui:SimpleStackPanel Spacing="12">
|
||||
<ui:ToggleSwitch Name="ToggleSwitchIsAutoUpdate" Header="自动检查更新" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchIsAutoUpdate_Toggled"/>
|
||||
<Border BorderBrush="Black" BorderThickness="1" CornerRadius="5" Padding="12">
|
||||
<ui:SimpleStackPanel Spacing="12">
|
||||
<TextBlock Text="# 开启 自动检查更新 后,将在软件启动时检查版本号,若版本号落后则会尝试从 Github 下载最新版安装包,安装新版本后会自动删除安装包。更新代理设置文本框放空即为直接裸连 Github。" TextWrapping="Wrap" Foreground="#666666"/>
|
||||
<ui:ToggleSwitch Name="ToggleSwitchIsAutoUpdateWithProxy" Header="代理设置" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchIsAutoUpdateWithProxy_Toggled"/>
|
||||
<TextBlock x:Name="AutoUpdateWithProxy_Title" Text="更新代理设置" FontSize="15" FontWeight="Bold" TextWrapping="Wrap" Foreground="Black"/>
|
||||
<TextBox x:Name="AutoUpdateProxyTextBox" Visibility="{Binding ElementName=AutoUpdateWithProxy_Title, Path=Visibility}" Text="https://mirror.ghproxy.com/" TextWrapping="Wrap" TextChanged="AutoUpdateProxyTextBox_TextChanged" />
|
||||
<Grid Visibility="{Binding ElementName=AutoUpdateWithProxy_Title, Path=Visibility}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Grid.Column="0" Orientation="Horizontal">
|
||||
<Button Padding="15 7.5" Content="设置代理为 GHProxy" Click="BtnResetAutoUpdateProxyToGHProxy_Click"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Padding="15 7.5" Content="检查代理返回数据" Click="BtnCheckAutoUpdateProxyReturnedData_Click"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<TextBlock Visibility="{Binding ElementName=AutoUpdateWithProxy_Title, Path=Visibility}" Text='# 正确的代理返回数据应为三位版本号,例如 "4.0.0"。' TextWrapping="Wrap" Foreground="#666666"/>
|
||||
<TextBlock Visibility="{Binding ElementName=AutoUpdateWithProxy_Title, Path=Visibility}" Text='# 检查代理返回数据具有一定延迟,弹窗内容为空即无返回数据。' TextWrapping="Wrap" Foreground="#666666"/>
|
||||
</ui:SimpleStackPanel>
|
||||
</Border>
|
||||
|
||||
<ui:ToggleSwitch Name="ToggleSwitchIsAutoUpdateWithSilence" Header="静默更新" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchIsAutoUpdateWithSilence_Toggled"/>
|
||||
<Border BorderBrush="Black" BorderThickness="1" CornerRadius="5" Padding="12" Visibility="{Binding ElementName=ToggleSwitchIsAutoUpdateWithSilence, Path=Visibility}">
|
||||
<ui:SimpleStackPanel Spacing="12">
|
||||
@ -938,17 +918,30 @@
|
||||
<GroupBox.Header>
|
||||
<TextBlock Text="个性化" FontWeight="Bold" Foreground="#18181b" FontSize="26"/>
|
||||
</GroupBox.Header>
|
||||
<ui:SimpleStackPanel Spacing="12">
|
||||
<ui:SimpleStackPanel Spacing="6">
|
||||
<!--
|
||||
<ui:ToggleSwitch Header="显示“橡皮”按钮" IsOn="{Binding ElementName=ToggleSwitchShowButtonEraser, Path=IsOn}" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关"/>
|
||||
-->
|
||||
<ui:ToggleSwitch Name="ToggleSwitchEnableDisPlayNibModeToggle" Header="在调色盘窗口中显示 笔尖模式 按钮" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchEnableDisPlayNibModeToggle_Toggled"/>
|
||||
<ui:ToggleSwitch Name="ToggleSwitchColorfulViewboxFloatingBar" Header="浮动工具栏背景色" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchIsColorfulViewboxFloatingBar_Toggled"/>
|
||||
<ui:ToggleSwitch Name="ToggleSwitchEnableViewboxFloatingBarScaleTransform" Header="浮动工具栏 UI 85% 缩放" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchEnableViewboxFloatingBarScaleTransform_Toggled"/>
|
||||
<ui:ToggleSwitch Name="ToggleSwitchEnableViewboxBlackBoardScaleTransform" Header="画板 UI 80% 缩放" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchEnableViewboxBlackBoardScaleTransform_Toggled"/>
|
||||
<ui:ToggleSwitch Name="ToggleSwitchShowButtonPPTNavigation" Header="显示 PPT 浏览切页按钮(页码按钮)" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowButtonPPTNavigation_OnToggled"/>
|
||||
<ui:ToggleSwitch Name="ToggleSwitchShowBottomPPTNavigationPanel" Header="显示 PPT 下方翻页控制按钮" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowBottomPPTNavigationPanel_OnToggled"/>
|
||||
<ui:ToggleSwitch Name="ToggleSwitchShowSidePPTNavigationPanel" Header="显示 PPT 侧边翻页控制按钮" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowSidePPTNavigationPanel_OnToggled"/>
|
||||
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<TextBlock Text="在调色盘窗口中显示 笔尖模式 按钮" VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0"/>
|
||||
<ui:ToggleSwitch Name="ToggleSwitchEnableDisPlayNibModeToggle" IsOn="True" FontFamily="Microsoft YaHei UI" FontWeight="Bold" OnContent="开" OffContent="关" Toggled="ToggleSwitchEnableDisPlayNibModeToggle_Toggled" />
|
||||
</ui:SimpleStackPanel>
|
||||
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<TextBlock Text="浮动工具栏背景色" VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0"/>
|
||||
<ui:ToggleSwitch Name="ToggleSwitchColorfulViewboxFloatingBar" IsOn="True" FontFamily="Microsoft YaHei UI" FontWeight="Bold" OnContent="开" OffContent="关" Toggled="ToggleSwitchIsColorfulViewboxFloatingBar_Toggled" />
|
||||
</ui:SimpleStackPanel>
|
||||
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<TextBlock Text="浮动工具栏 UI 85% 缩放" VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0"/>
|
||||
<ui:ToggleSwitch Name="ToggleSwitchEnableViewboxFloatingBarScaleTransform" IsOn="True" FontFamily="Microsoft YaHei UI" FontWeight="Bold" OnContent="开" OffContent="关" Toggled="ToggleSwitchEnableViewboxFloatingBarScaleTransform_Toggled" />
|
||||
</ui:SimpleStackPanel>
|
||||
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<TextBlock Text="白板 UI 80% 缩放" VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0"/>
|
||||
<ui:ToggleSwitch Name="ToggleSwitchEnableViewboxBlackBoardScaleTransform" IsOn="True" FontFamily="Microsoft YaHei UI" FontWeight="Bold" OnContent="开" OffContent="关" Toggled="ToggleSwitchEnableViewboxBlackBoardScaleTransform_Toggled" />
|
||||
</ui:SimpleStackPanel>
|
||||
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<TextBlock Text="在白板中显示当前时间和日期" VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0"/>
|
||||
<ui:ToggleSwitch Name="ToggleSwitchEnableTimeDisplayInWhiteboardMode" IsOn="True" FontFamily="Microsoft YaHei UI" FontWeight="Bold" OnContent="开" OffContent="关" Toggled="ToggleSwitchEnableTimeDisplayInWhiteboardMode_Toggled"/>
|
||||
</ui:SimpleStackPanel>
|
||||
<!--
|
||||
<TextBlock Text="颜色主题" FontFamily="Microsoft YaHei UI" FontSize="14"/>
|
||||
<ComboBox Name="ComboBoxTheme" FontFamily="Microsoft YaHei UI" SelectedIndex="0" SelectionChanged="ComboBoxTheme_SelectionChanged">
|
||||
@ -977,6 +970,19 @@
|
||||
</ui:SimpleStackPanel>
|
||||
<TextBlock Text="# 不推荐使用 WPS Office,鉴于其对于触摸设备的较差支持及其自身的兼容性问题,对 WPS Office 支持时会导致 WPS Office 关闭时卡顿。" TextWrapping="Wrap" Foreground="#666666"/>
|
||||
<Line HorizontalAlignment="Center" X1="0" Y1="0" X2="400" Y2="0" Stroke="#3f3f46" StrokeThickness="1" Margin="0,4,0,4"/>
|
||||
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<TextBlock Text="显示 PPT 浏览切页按钮(页码按钮)" VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0"/>
|
||||
<ui:ToggleSwitch Name="ToggleSwitchShowButtonPPTNavigation" IsOn="True" FontFamily="Microsoft YaHei UI" FontWeight="Bold" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowButtonPPTNavigation_OnToggled" />
|
||||
</ui:SimpleStackPanel>
|
||||
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<TextBlock Text="显示 PPT 下方翻页控制按钮" VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0"/>
|
||||
<ui:ToggleSwitch Name="ToggleSwitchShowBottomPPTNavigationPanel" IsOn="True" FontFamily="Microsoft YaHei UI" FontWeight="Bold" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowBottomPPTNavigationPanel_OnToggled" />
|
||||
</ui:SimpleStackPanel>
|
||||
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<TextBlock Text="显示 PPT 侧边翻页控制按钮" VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0"/>
|
||||
<ui:ToggleSwitch Name="ToggleSwitchShowSidePPTNavigationPanel" IsOn="True" FontFamily="Microsoft YaHei UI" FontWeight="Bold" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowSidePPTNavigationPanel_OnToggled" />
|
||||
</ui:SimpleStackPanel>
|
||||
<Line HorizontalAlignment="Center" X1="0" Y1="0" X2="400" Y2="0" Stroke="#3f3f46" StrokeThickness="1" Margin="0,4,0,4"/>
|
||||
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<TextBlock Text="进入 PPT 放映时自动进入批注模式" VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0"/>
|
||||
<ui:ToggleSwitch Name="ToggleSwitchShowCanvasAtNewSlideShow" IsOn="True" FontFamily="Microsoft YaHei UI" FontWeight="Bold" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowCanvasAtNewSlideShow_Toggled" />
|
||||
|
@ -169,9 +169,9 @@ namespace Ink_Canvas {
|
||||
LogHelper.WriteLogToFile("Ink Canvas closing", LogHelper.LogType.Event);
|
||||
if (!CloseIsFromButton && Settings.Advanced.IsSecondConfimeWhenShutdownApp) {
|
||||
e.Cancel = true;
|
||||
if (MessageBox.Show("是否继续关闭 Ink Canvas 画板,这将丢失当前未保存的工作。", "Ink Canvas 画板", MessageBoxButton.OKCancel, MessageBoxImage.Warning) == MessageBoxResult.OK) {
|
||||
if (MessageBox.Show("真的狠心关闭 Ink Canvas 画板吗?", "Ink Canvas 画板", MessageBoxButton.OKCancel, MessageBoxImage.Error) == MessageBoxResult.OK) {
|
||||
if (MessageBox.Show("是否取消关闭 Ink Canvas 画板?", "Ink Canvas 画板", MessageBoxButton.OKCancel, MessageBoxImage.Error) != MessageBoxResult.OK) {
|
||||
if (MessageBox.Show("是否继续关闭 InkCanvasForClass,这将丢失当前未保存的墨迹。", "InkCanvasForClass", MessageBoxButton.OKCancel, MessageBoxImage.Warning) == MessageBoxResult.OK) {
|
||||
if (MessageBox.Show("真的狠心关闭 InkCanvasForClass吗?", "InkCanvasForClass", MessageBoxButton.OKCancel, MessageBoxImage.Error) == MessageBoxResult.OK) {
|
||||
if (MessageBox.Show("是否取消关闭 InkCanvasForClass?", "InkCanvasForClass", MessageBoxButton.OKCancel, MessageBoxImage.Error) != MessageBoxResult.OK) {
|
||||
e.Cancel = false;
|
||||
}
|
||||
}
|
||||
@ -187,17 +187,15 @@ namespace Ink_Canvas {
|
||||
}
|
||||
|
||||
private async void AutoUpdate() {
|
||||
if (Settings.Startup.IsAutoUpdateWithProxy) AvailableLatestVersion = await AutoUpdateHelper.CheckForUpdates(Settings.Startup.AutoUpdateProxy);
|
||||
else AvailableLatestVersion = await AutoUpdateHelper.CheckForUpdates();
|
||||
AvailableLatestVersion = await AutoUpdateHelper.CheckForUpdates();
|
||||
|
||||
if (AvailableLatestVersion != null) {
|
||||
bool IsDownloadSuccessful = false;
|
||||
if (Settings.Startup.IsAutoUpdateWithProxy) IsDownloadSuccessful = await AutoUpdateHelper.DownloadSetupFileAndSaveStatus(AvailableLatestVersion, Settings.Startup.AutoUpdateProxy);
|
||||
else IsDownloadSuccessful = await AutoUpdateHelper.DownloadSetupFileAndSaveStatus(AvailableLatestVersion);
|
||||
IsDownloadSuccessful = await AutoUpdateHelper.DownloadSetupFileAndSaveStatus(AvailableLatestVersion);
|
||||
|
||||
if (IsDownloadSuccessful) {
|
||||
if (!Settings.Startup.IsAutoUpdateWithSilence) {
|
||||
if (MessageBox.Show("ICA 新版本安装包已下载完成,是否立即更新?", "Ink Canvas Annotation New Version Available", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes) {
|
||||
if (MessageBox.Show("InkCanvasForClass 新版本安装包已下载完成,是否立即更新?", "InkCanvasForClass New Version Available", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes) {
|
||||
AutoUpdateHelper.InstallNewVersionApp(AvailableLatestVersion, false);
|
||||
}
|
||||
} else {
|
||||
|
@ -410,7 +410,11 @@ namespace Ink_Canvas {
|
||||
ToggleSwitchEnableTwoFingerTranslate.IsOn = true;
|
||||
if (isInMultiTouchMode) ToggleSwitchEnableMultiTouchMode.IsOn = false;
|
||||
}
|
||||
WaterMarkTime.Visibility = Visibility.Visible;
|
||||
if (Settings.Appearance.EnableTimeDisplayInWhiteboardMode == true)
|
||||
{
|
||||
WaterMarkTime.Visibility = Visibility.Visible;
|
||||
WaterMarkDate.Visibility = Visibility.Visible;
|
||||
}
|
||||
BlackBoardWaterMark.Visibility = Visibility.Visible;
|
||||
} else {
|
||||
//关闭黑板
|
||||
@ -456,6 +460,7 @@ namespace Ink_Canvas {
|
||||
// if (!isInMultiTouchMode) ToggleSwitchEnableMultiTouchMode.IsOn = true;
|
||||
}
|
||||
WaterMarkTime.Visibility = Visibility.Collapsed;
|
||||
WaterMarkDate.Visibility = Visibility.Collapsed;
|
||||
BlackBoardWaterMark.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
|
@ -28,28 +28,6 @@ namespace Ink_Canvas {
|
||||
SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchIsAutoUpdateWithProxy_Toggled(object sender, RoutedEventArgs e) {
|
||||
if (!isLoaded) return;
|
||||
Settings.Startup.IsAutoUpdateWithProxy = ToggleSwitchIsAutoUpdateWithProxy.IsOn;
|
||||
AutoUpdateWithProxy_Title.Visibility = Settings.Startup.IsAutoUpdateWithProxy ? Visibility.Visible : Visibility.Collapsed;
|
||||
SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void AutoUpdateProxyTextBox_TextChanged(object sender, RoutedEventArgs e) {
|
||||
if (!isLoaded) return;
|
||||
Settings.Startup.AutoUpdateProxy = AutoUpdateProxyTextBox.Text;
|
||||
SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void BtnResetAutoUpdateProxyToGHProxy_Click(object sender, RoutedEventArgs e) {
|
||||
AutoUpdateProxyTextBox.Text = "https://mirror.ghproxy.com/";
|
||||
}
|
||||
|
||||
private async void BtnCheckAutoUpdateProxyReturnedData_Click(object sender, RoutedEventArgs e) {
|
||||
string ProxyReturnedData = await AutoUpdateHelper.GetRemoteVersion(Settings.Startup.AutoUpdateProxy + "https://raw.githubusercontent.com/ChangSakura/Ink-Canvas/master/AutomaticUpdateVersionControl.txt");
|
||||
ShowNotification(ProxyReturnedData);
|
||||
}
|
||||
|
||||
private void AutoUpdateWithSilenceStartTimeComboBox_SelectionChanged(object sender, RoutedEventArgs e) {
|
||||
if (!isLoaded) return;
|
||||
Settings.Startup.AutoUpdateWithSilenceStartTime = (string)AutoUpdateWithSilenceStartTimeComboBox.SelectedItem;
|
||||
@ -151,6 +129,14 @@ namespace Ink_Canvas {
|
||||
LoadSettings();
|
||||
}
|
||||
|
||||
private void ToggleSwitchEnableTimeDisplayInWhiteboardMode_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
Settings.Appearance.EnableTimeDisplayInWhiteboardMode = ToggleSwitchEnableTimeDisplayInWhiteboardMode.IsOn;
|
||||
SaveSettingsToFile();
|
||||
LoadSettings();
|
||||
}
|
||||
|
||||
private void ToggleSwitchShowButtonPPTNavigation_OnToggled(object sender, RoutedEventArgs e) {
|
||||
if (!isLoaded) return;
|
||||
Settings.PowerPointSettings.IsShowPPTNavigation = ToggleSwitchShowButtonPPTNavigation.IsOn;
|
||||
@ -652,8 +638,6 @@ namespace Ink_Canvas {
|
||||
Settings.Startup.IsEnableNibMode = false;
|
||||
Settings.Startup.IsAutoUpdate = true;
|
||||
Settings.Startup.IsAutoUpdateWithSilence = true;
|
||||
Settings.Startup.IsAutoUpdateWithProxy = true;
|
||||
Settings.Startup.AutoUpdateProxy = "https://mirror.ghproxy.com/";
|
||||
Settings.Startup.AutoUpdateWithSilenceStartTime = "18:20";
|
||||
Settings.Startup.AutoUpdateWithSilenceEndTime = "07:40";
|
||||
Settings.Startup.IsFoldAtStartup = false;
|
||||
|
@ -55,9 +55,6 @@ namespace Ink_Canvas {
|
||||
ToggleSwitchIsAutoUpdate.IsOn = true;
|
||||
AutoUpdate();
|
||||
}
|
||||
ToggleSwitchIsAutoUpdateWithProxy.IsOn = Settings.Startup.IsAutoUpdateWithProxy;
|
||||
AutoUpdateWithProxy_Title.Visibility = Settings.Startup.IsAutoUpdateWithProxy ? Visibility.Visible : Visibility.Collapsed;
|
||||
AutoUpdateProxyTextBox.Text = Settings.Startup.AutoUpdateProxy;
|
||||
ToggleSwitchIsAutoUpdateWithSilence.Visibility = Settings.Startup.IsAutoUpdate ? Visibility.Visible : Visibility.Collapsed;
|
||||
if (Settings.Startup.IsAutoUpdateWithSilence) {
|
||||
ToggleSwitchIsAutoUpdateWithSilence.IsOn = true;
|
||||
@ -147,6 +144,13 @@ namespace Ink_Canvas {
|
||||
BtnExit.Background = new SolidColorBrush(StringToColor("#FF555555"));
|
||||
}
|
||||
}
|
||||
if (Settings.Appearance.EnableTimeDisplayInWhiteboardMode==true)
|
||||
{
|
||||
ToggleSwitchEnableTimeDisplayInWhiteboardMode.IsOn = true;
|
||||
} else
|
||||
{
|
||||
ToggleSwitchEnableTimeDisplayInWhiteboardMode.IsOn = false;
|
||||
}
|
||||
} else {
|
||||
Settings.Appearance = new Appearance();
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ namespace Ink_Canvas {
|
||||
public class TimeViewModel : INotifyPropertyChanged
|
||||
{
|
||||
private string _nowTime;
|
||||
private string _nowDate;
|
||||
|
||||
public string nowTime
|
||||
{
|
||||
@ -26,6 +27,19 @@ namespace Ink_Canvas {
|
||||
}
|
||||
}
|
||||
|
||||
public string nowDate
|
||||
{
|
||||
get { return _nowDate; }
|
||||
set
|
||||
{
|
||||
if (_nowDate != value)
|
||||
{
|
||||
_nowDate = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
||||
@ -43,6 +57,7 @@ namespace Ink_Canvas {
|
||||
bool isHidingSubPanelsWhenInking = false; // 避免书写时触发二次关闭二级菜单导致动画不连续
|
||||
|
||||
Timer timerDisplayTime = new Timer();
|
||||
Timer timerDisplayDate = new Timer();
|
||||
|
||||
private TimeViewModel nowTimeVM = new TimeViewModel();
|
||||
|
||||
@ -56,15 +71,26 @@ namespace Ink_Canvas {
|
||||
timerCheckAutoUpdateWithSilence.Elapsed += timerCheckAutoUpdateWithSilence_Elapsed;
|
||||
timerCheckAutoUpdateWithSilence.Interval = 1000 * 60 * 10;
|
||||
WaterMarkTime.DataContext = nowTimeVM;
|
||||
WaterMarkDate.DataContext = nowTimeVM;
|
||||
timerDisplayTime.Elapsed += TimerDisplayTime_Elapsed;
|
||||
timerDisplayTime.Interval = 1000;
|
||||
timerDisplayTime.Start();
|
||||
timerDisplayDate.Elapsed += TimerDisplayDate_Elapsed;
|
||||
timerDisplayDate.Interval = 1000 * 60 * 60 * 1;
|
||||
timerDisplayDate.Start();
|
||||
nowTimeVM.nowDate = DateTime.Now.ToShortDateString().ToString();
|
||||
nowTimeVM.nowTime = DateTime.Now.ToShortTimeString().ToString();
|
||||
}
|
||||
|
||||
private void TimerDisplayTime_Elapsed(object sender, System.Timers.ElapsedEventArgs e) {
|
||||
nowTimeVM.nowTime = DateTime.Now.ToShortTimeString().ToString();
|
||||
}
|
||||
|
||||
private void TimerDisplayDate_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
nowTimeVM.nowDate = DateTime.Now.ToShortDateString().ToString();
|
||||
}
|
||||
|
||||
private void TimerKillProcess_Elapsed(object sender, ElapsedEventArgs e) {
|
||||
try {
|
||||
// 希沃相关: easinote swenserver RemoteProcess EasiNote.MediaHttpService smartnote.cloud EasiUpdate smartnote EasiUpdate3 EasiUpdate3Protect SeewoP2P CefSharp.BrowserSubprocess SeewoUploadService
|
||||
|
@ -81,10 +81,6 @@ namespace Ink_Canvas
|
||||
{
|
||||
[JsonProperty("isAutoUpdate")]
|
||||
public bool IsAutoUpdate { get; set; } = true;
|
||||
[JsonProperty("isAutoUpdateWithProxy")]
|
||||
public bool IsAutoUpdateWithProxy { get; set; } = false;
|
||||
[JsonProperty("autoUpdateProxy")]
|
||||
public string AutoUpdateProxy { get; set; } = "https://mirror.ghproxy.com/";
|
||||
[JsonProperty("isAutoUpdateWithSilence")]
|
||||
public bool IsAutoUpdateWithSilence { get; set; } = false;
|
||||
[JsonProperty("isAutoUpdateWithSilenceStartTime")]
|
||||
@ -119,6 +115,8 @@ namespace Ink_Canvas
|
||||
public bool IsShowExitButton { get; set; } = true;
|
||||
[JsonProperty("isShowEraserButton")]
|
||||
public bool IsShowEraserButton { get; set; } = true;
|
||||
[JsonProperty("enableTimeDisplayInWhiteboardMode")]
|
||||
public bool EnableTimeDisplayInWhiteboardMode { get; set; } = true;
|
||||
[JsonProperty("isShowHideControlButton")]
|
||||
public bool IsShowHideControlButton { get; set; } = false;
|
||||
[JsonProperty("isShowLRSwitchButton")]
|
||||
|
@ -1,11 +0,0 @@
|
||||
<UserControl x:Class="Ink_Canvas.SettingsPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Ink_Canvas"
|
||||
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
||||
mc:Ignorable="d" FontFamily="Microsoft YaHei UI"
|
||||
ui:ThemeManager.RequestedTheme="Light">
|
||||
|
||||
</UserControl>
|
@ -1,27 +0,0 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace Ink_Canvas
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for SettingsPage.xaml
|
||||
/// </summary>
|
||||
public partial class SettingsPage : UserControl
|
||||
{
|
||||
public SettingsPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void ToggleSwitch_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Dispatcher.Invoke(() =>
|
||||
{
|
||||
var MW = Application.Current.MainWindow as MainWindow;
|
||||
MW.BtnExit.Visibility = Visibility.Visible;
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user