Add Installer and Fix bug, also trying new things out, not tested yet

This commit is contained in:
XY Wang 2021-09-23 00:58:21 +08:00
parent b9f0fe9ec9
commit 8de882df9a
5 changed files with 52 additions and 15 deletions

3
.gitignore vendored
View File

@ -6,6 +6,9 @@
# History Versions
History Versions/
#Installer
Installer/
# User-specific files
*.rsuser
*.suo

View File

@ -26,12 +26,16 @@
CanExecute="CommandBinding_CanExecute"
Executed="KeyExit"/>
</Window.CommandBindings>
<Grid x:Name="Main_Grid" Background="#01FFFFFF" TouchDown="Main_Grid_TouchDown">
<Grid x:Name="Main_Grid" Background="#01FFFFFF">
<Grid Name="GridBackgroundCoverHolder">
<Grid Name="GridBackgroundCover" Visibility="Hidden" Background="#FFF2F2F2"/>
</Grid>
<Label Name="Label" Visibility="Collapsed" Content="0"/>
<InkCanvas Name="inkCanvas" Background="Transparent">
<InkCanvas Name="inkCanvas" Background="Transparent"
TouchUp="Main_Grid_TouchUp" TouchDown="Main_Grid_TouchDown"
ManipulationDelta="Main_Grid_ManipulationDelta"
ManipulationCompleted="Main_Grid_ManipulationCompleted"
IsManipulationEnabled="True">
<!--<InkCanvas.DefaultDrawingAttributes>
<DrawingAttributes StylusTip="Ellipse" Height="8" Width="4" IgnorePressure="False" FitToCurve="True" >
<DrawingAttributes.StylusTipTransform>

View File

@ -226,6 +226,7 @@ namespace Ink_Canvas
if (response.Contains("Special Version"))
{
isAutoUpdateEnabled = true;
if (response.Contains("<notice>"))
{
string str = Strings.Mid(response, response.IndexOf("<notice>") + 9);
@ -242,6 +243,17 @@ namespace Ink_Canvas
}
}
}
if (OAUS.Core.VersionHelper.HasNewVersion(GetIp("ink.wxriw.cn"), 19570))
{
string updateExePath = AppDomain.CurrentDomain.BaseDirectory + "AutoUpdater\\AutoUpdater.exe";
System.Diagnostics.Process myProcess = System.Diagnostics.Process.Start(updateExePath);
Application.Current.Dispatcher.Invoke(() =>
{
Close();
});
}
}
}
catch { }
@ -500,9 +512,11 @@ namespace Ink_Canvas
#endregion
bool isTouchDown = false;
private void Main_Grid_TouchDown(object sender, TouchEventArgs e)
{
if (forceEraser) return;
//Label.Content = e.GetTouchPoint(null).Bounds.Width.ToString();
if (ToggleSwitchAutoWeight.IsOn && e.GetTouchPoint(null).Bounds.Width != 0)
{
@ -522,6 +536,22 @@ namespace Ink_Canvas
}
}
private void Main_Grid_TouchUp(object sender, TouchEventArgs e)
{
}
private void Main_Grid_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
{
if (e.Manipulators.Count() == 0)
{
inkCanvas.EditingMode = InkCanvasEditingMode.EraseByStroke;
}
}
private void Main_Grid_ManipulationDelta(object sender, ManipulationDeltaEventArgs e)
{
}
int currentMode = 0;
private void BtnSwitch_Click(object sender, RoutedEventArgs e)
@ -1128,16 +1158,16 @@ namespace Ink_Canvas
private void Window_Closed(object sender, EventArgs e)
{
if (!isAutoUpdateEnabled) return;
try
{
if (OAUS.Core.VersionHelper.HasNewVersion(GetIp("ink.wxriw.cn"), 19570))
{
string updateExePath = AppDomain.CurrentDomain.BaseDirectory + "AutoUpdater\\AutoUpdater.exe";
System.Diagnostics.Process myProcess = System.Diagnostics.Process.Start(updateExePath);
}
}
catch { }
//if (!isAutoUpdateEnabled) return;
//try
//{
// if (OAUS.Core.VersionHelper.HasNewVersion(GetIp("ink.wxriw.cn"), 19570))
// {
// string updateExePath = AppDomain.CurrentDomain.BaseDirectory + "AutoUpdater\\AutoUpdater.exe";
// System.Diagnostics.Process myProcess = System.Diagnostics.Process.Start(updateExePath);
// }
//}
//catch { }
}
/// <summary>

View File

@ -51,5 +51,5 @@ using System.Windows;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.3.0")]
[assembly: AssemblyFileVersion("2.0.3.0")]
[assembly: AssemblyVersion("2.0.4.0")]
[assembly: AssemblyFileVersion("2.0.4.0")]