Add Installer and Fix bug, also trying new things out, not tested yet
This commit is contained in:
parent
b9f0fe9ec9
commit
8de882df9a
3
.gitignore
vendored
3
.gitignore
vendored
@ -6,6 +6,9 @@
|
|||||||
# History Versions
|
# History Versions
|
||||||
History Versions/
|
History Versions/
|
||||||
|
|
||||||
|
#Installer
|
||||||
|
Installer/
|
||||||
|
|
||||||
# User-specific files
|
# User-specific files
|
||||||
*.rsuser
|
*.rsuser
|
||||||
*.suo
|
*.suo
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<!--服务器端口-->
|
<!--服务器端口-->
|
||||||
<add key="ServerPort" value="19570"/>
|
<add key="ServerPort" value="19570"/>
|
||||||
<!--升级完成后,将被回调的可执行程序的名称-->
|
<!--升级完成后,将被回调的可执行程序的名称-->
|
||||||
<add key="CallbackExeName" value="InkCanvas.exe"/>
|
<add key="CallbackExeName" value="Ink Canvas.exe"/>
|
||||||
<!--主窗体的Title-->
|
<!--主窗体的Title-->
|
||||||
<add key="Title" value="Ink Canvas 画板 - 自动更新"/>
|
<add key="Title" value="Ink Canvas 画板 - 自动更新"/>
|
||||||
</appSettings>
|
</appSettings>
|
||||||
|
@ -26,12 +26,16 @@
|
|||||||
CanExecute="CommandBinding_CanExecute"
|
CanExecute="CommandBinding_CanExecute"
|
||||||
Executed="KeyExit"/>
|
Executed="KeyExit"/>
|
||||||
</Window.CommandBindings>
|
</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="GridBackgroundCoverHolder">
|
||||||
<Grid Name="GridBackgroundCover" Visibility="Hidden" Background="#FFF2F2F2"/>
|
<Grid Name="GridBackgroundCover" Visibility="Hidden" Background="#FFF2F2F2"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Label Name="Label" Visibility="Collapsed" Content="0"/>
|
<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>
|
<!--<InkCanvas.DefaultDrawingAttributes>
|
||||||
<DrawingAttributes StylusTip="Ellipse" Height="8" Width="4" IgnorePressure="False" FitToCurve="True" >
|
<DrawingAttributes StylusTip="Ellipse" Height="8" Width="4" IgnorePressure="False" FitToCurve="True" >
|
||||||
<DrawingAttributes.StylusTipTransform>
|
<DrawingAttributes.StylusTipTransform>
|
||||||
|
@ -226,6 +226,7 @@ namespace Ink_Canvas
|
|||||||
if (response.Contains("Special Version"))
|
if (response.Contains("Special Version"))
|
||||||
{
|
{
|
||||||
isAutoUpdateEnabled = true;
|
isAutoUpdateEnabled = true;
|
||||||
|
|
||||||
if (response.Contains("<notice>"))
|
if (response.Contains("<notice>"))
|
||||||
{
|
{
|
||||||
string str = Strings.Mid(response, response.IndexOf("<notice>") + 9);
|
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 { }
|
catch { }
|
||||||
@ -500,9 +512,11 @@ namespace Ink_Canvas
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
bool isTouchDown = false;
|
||||||
private void Main_Grid_TouchDown(object sender, TouchEventArgs e)
|
private void Main_Grid_TouchDown(object sender, TouchEventArgs e)
|
||||||
{
|
{
|
||||||
if (forceEraser) return;
|
if (forceEraser) return;
|
||||||
|
|
||||||
//Label.Content = e.GetTouchPoint(null).Bounds.Width.ToString();
|
//Label.Content = e.GetTouchPoint(null).Bounds.Width.ToString();
|
||||||
if (ToggleSwitchAutoWeight.IsOn && e.GetTouchPoint(null).Bounds.Width != 0)
|
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;
|
int currentMode = 0;
|
||||||
|
|
||||||
private void BtnSwitch_Click(object sender, RoutedEventArgs e)
|
private void BtnSwitch_Click(object sender, RoutedEventArgs e)
|
||||||
@ -1128,16 +1158,16 @@ namespace Ink_Canvas
|
|||||||
|
|
||||||
private void Window_Closed(object sender, EventArgs e)
|
private void Window_Closed(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (!isAutoUpdateEnabled) return;
|
//if (!isAutoUpdateEnabled) return;
|
||||||
try
|
//try
|
||||||
{
|
//{
|
||||||
if (OAUS.Core.VersionHelper.HasNewVersion(GetIp("ink.wxriw.cn"), 19570))
|
// if (OAUS.Core.VersionHelper.HasNewVersion(GetIp("ink.wxriw.cn"), 19570))
|
||||||
{
|
// {
|
||||||
string updateExePath = AppDomain.CurrentDomain.BaseDirectory + "AutoUpdater\\AutoUpdater.exe";
|
// string updateExePath = AppDomain.CurrentDomain.BaseDirectory + "AutoUpdater\\AutoUpdater.exe";
|
||||||
System.Diagnostics.Process myProcess = System.Diagnostics.Process.Start(updateExePath);
|
// System.Diagnostics.Process myProcess = System.Diagnostics.Process.Start(updateExePath);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
catch { }
|
//catch { }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -51,5 +51,5 @@ using System.Windows;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2.0.3.0")]
|
[assembly: AssemblyVersion("2.0.4.0")]
|
||||||
[assembly: AssemblyFileVersion("2.0.3.0")]
|
[assembly: AssemblyFileVersion("2.0.4.0")]
|
||||||
|
Loading…
Reference in New Issue
Block a user