Skip to content

Commit

Permalink
update to v0.4.0.
Browse files Browse the repository at this point in the history
Fix crash bug when open document by double clicking
  • Loading branch information
chenguanzhou committed Jun 21, 2017
1 parent d5ad38d commit 39a940a
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 34 deletions.
6 changes: 3 additions & 3 deletions LatestVersion.json
@@ -1,8 +1,8 @@
{
"AppName": "MarkDownEditor",
"LatestVersion": {
"Version": "0.3.9.0",
"UpdateTime": "2016/9/17",
"Description": "1. Customized Qiniu Key; 2. Fix win7 crash bug"
"Version": "0.4.0.0",
"UpdateTime": "2017/6/21",
"Description": "1. Async preview; 2. Insert local image in absolute url or relative path; 3. Make SM.MS as the default image storage service; 4. Fix crash bug in no css condition; 5. Fix crash bug when open document by double clicking"
}
}
1 change: 1 addition & 0 deletions MarkDownEditor.Setup/MarkDownEditor.Setup.wixproj
Expand Up @@ -62,6 +62,7 @@
<ItemGroup>
<Content Include="license.rtf" />
<Content Include="Microsoft_VC120_CRT_x86.msm" />
<Content Include="Microsoft_VC140_CRT_x86.msm" />
</ItemGroup>
<Import Project="$(WixTargetsPath)" />
<!--
Expand Down
17 changes: 11 additions & 6 deletions MarkDownEditor.Setup/Product.wxs
Expand Up @@ -2,8 +2,8 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<?define MarkDownEditor_TargetDir=$(var.MarkDownEditor.TargetDir)?>
<Product Id="{325B5305-18DC-4086-B39E-3B07BEBA76EB}" Name="MarkDownEditor" Language="1033" Version="0.3.8" Manufacturer="Chen Guanzhou" UpgradeCode="5d30c639-0761-41c7-b4ef-e0c1b75eeb3f">
<Package Id="{835D85DC-1CC7-473A-BDD9-9C1F044763E7}" InstallerVersion="405" Compressed="yes" InstallScope="perMachine"/>
<Product Id="{7AECC89E-7BB9-4C9C-A813-FBD02FC0C9F8}" Name="MarkDownEditor" Language="1033" Version="0.4.0" Manufacturer="Chen Guanzhou" UpgradeCode="5d30c639-0761-41c7-b4ef-e0c1b75eeb3f">
<Package Id="{36DA66A4-4374-4381-9729-1E00D913455B}" InstallerVersion="405" Compressed="yes" InstallScope="perMachine"/>

<MajorUpgrade Schedule="afterInstallInitialize"
DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit."/>
Expand Down Expand Up @@ -36,8 +36,12 @@
<Icon Id="icon.ico" SourceFile="..\MarkDOwnEditor\MarkdownEditorLogo.ico"/>
<Property Id="ARPPRODUCTICON" Value="icon.ico" />

<Feature Id="VCRedist" Title="Visual C++ 2013 Runtime" AllowAdvertise="no" Display="hidden" Level="1">
<MergeRef Id="VCRedist"/>
<Feature Id="VCRedist12" Title="Visual C++ 2013 Runtime" AllowAdvertise="no" Display="hidden" Level="1">
<MergeRef Id="VCRedist12"/>
</Feature>

<Feature Id="VCRedist14" Title="Visual C++ 2015 Runtime" AllowAdvertise="no" Display="hidden" Level="1">
<MergeRef Id="VCRedist14"/>
</Feature>

<PropertyRef Id="NETFRAMEWORK45"/>
Expand Down Expand Up @@ -143,7 +147,8 @@
</Component>
</DirectoryRef>
<DirectoryRef Id="INSTALLFOLDER">
<Merge Id="VCRedist" SourceFile="Microsoft_VC120_CRT_x86.msm" DiskId="1" Language="0"/>
<Merge Id="VCRedist12" SourceFile="Microsoft_VC120_CRT_x86.msm" DiskId="1" Language="0"/>
<Merge Id="VCRedist14" SourceFile="Microsoft_VC140_CRT_x86.msm" DiskId="1" Language="0"/>
</DirectoryRef>
</Fragment>

Expand All @@ -155,7 +160,6 @@
<File Id="CefSharp.Core.dll" Name="CefSharp.Core.dll" Source="$(var.MarkDownEditor_TargetDir)CefSharp.Core.dll" />
<File Id="CefSharp.dll" Name="CefSharp.dll" Source="$(var.MarkDownEditor_TargetDir)CefSharp.dll" />
<File Id="CefSharp.Wpf.dll" Name="CefSharp.Wpf.dll" Source="$(var.MarkDownEditor_TargetDir)CefSharp.Wpf.dll" />
<File Id="d3dcompiler_43.dll" Name="d3dcompiler_43.dll" Source="$(var.MarkDownEditor_TargetDir)d3dcompiler_43.dll" />
<File Id="d3dcompiler_47.dll" Name="d3dcompiler_47.dll" Source="$(var.MarkDownEditor_TargetDir)d3dcompiler_47.dll" />
<File Id="MahApps.Metro.dll" Name="MahApps.Metro.dll" Source="$(var.MarkDownEditor_TargetDir)MahApps.Metro.dll" />
<File Id="GalaSoft.MvvmLight.dll" Name="GalaSoft.MvvmLight.dll" Source="$(var.MarkDownEditor_TargetDir)GalaSoft.MvvmLight.dll" />
Expand All @@ -172,6 +176,7 @@

<File Id="Microsoft.Practices.ServiceLocation.dll" Name="Microsoft.Practices.ServiceLocation.dll" Source="$(var.MarkDownEditor_TargetDir)Microsoft.Practices.ServiceLocation.dll" />
<File Id="libcef.dll" Name="libcef.dll" Source="$(var.MarkDownEditor_TargetDir)libcef.dll" />
<File Id="chrome_elf.dll" Name="chrome_elf.dll" Source="$(var.MarkDownEditor_TargetDir)chrome_elf.dll" />
<File Id="libEGL.dll" Name="libEGL.dll" Source="$(var.MarkDownEditor_TargetDir)libEGL.dll" />
<File Id="libGLESv2.dll" Name="libGLESv2.dll" Source="$(var.MarkDownEditor_TargetDir)libGLESv2.dll" />
<File Id="widevinecdmadapter.dll" Name="widevinecdmadapter.dll" Source="$(var.MarkDownEditor_TargetDir)widevinecdmadapter.dll" />
Expand Down
19 changes: 5 additions & 14 deletions MarkDownEditor/App.xaml.cs
Expand Up @@ -23,26 +23,17 @@ public partial class App : Application
};

public App()
{
var settings = new CefSettings()
{
Environment.CurrentDirectory = AppDomain.CurrentDomain.SetupInformation.ApplicationBase;

var settings = new CefSettings()
{

//By default CefSharp will use an in-memory cache, you need to specify a Cache Folder to persist data

CachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "CefSharp\\Cache")

CachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "CefSharp\\Cache")
};

settings.DisableGpuAcceleration();
//settings.CefCommandLineArgs.Add("disable-gpu", "1");
//settings.CefCommandLineArgs.Add("disable-gpu-compositing", "1");


//Perform dependency check to make sure all relevant resources are in our output directory.

Cef.Initialize(settings, performDependencyCheck: true, browserProcessHandler: null);
Cef.EnableHighDPISupport();
Cef.Initialize(settings, performDependencyCheck: true, browserProcessHandler: null);

}

Expand Down
1 change: 0 additions & 1 deletion MarkDownEditor/MarkDownEditor.csproj
Expand Up @@ -404,7 +404,6 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="WkHtmlToXDotNet.dll" />
<Resource Include="alipay.jpg" />
<Content Include="css\Light\Modest.css">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Expand Down
4 changes: 2 additions & 2 deletions MarkDownEditor/Properties/AssemblyInfo.cs
Expand Up @@ -51,5 +51,5 @@
// 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("0.3.9.0")]
[assembly: AssemblyFileVersion("0.3.9.0")]
[assembly: AssemblyVersion("0.4.0.0")]
[assembly: AssemblyFileVersion("0.4.0.0")]
10 changes: 4 additions & 6 deletions MarkDownEditor/View/AboutControl.xaml
Expand Up @@ -24,6 +24,7 @@
</StackPanel.Resources>
<TextBlock Text="{Binding ApplicationName}" FontSize="25"></TextBlock>
<TextBlock Text="{Binding VersionNumber}" FontSize="16"></TextBlock>
<TextBlock Text="By Chen Guanzhou" FontSize="16"></TextBlock>
<TextBlock FontSize="16">
<Hyperlink Command="{Binding ClickSourceCodeWebCommand}">
<TextBlock Text="{x:Static p:Resources.SourceCode}">
Expand All @@ -36,15 +37,12 @@
<TextBlock FontSize="16">
<Hyperlink Command="{Binding CheckForUpdateCommand}">
<TextBlock Text="{x:Static p:Resources.CheckForUpdate}">
<TextBlock.Style>
<Style></Style>
</TextBlock.Style>
<TextBlock.Style>
<Style></Style>
</TextBlock.Style>
</TextBlock>
</Hyperlink>
</TextBlock>
<Expander Margin="0,20,0,0" IsExpanded="True" Header="{x:Static p:Resources.Donate}" FontSize="16">
<Image Source="/MarkDownEditor;component/alipay.jpg"></Image>
</Expander>
</StackPanel>
</StackPanel>
</ScrollViewer>
Expand Down
4 changes: 2 additions & 2 deletions MarkDownEditor/ViewModel/MainViewModel.cs
Expand Up @@ -1249,12 +1249,12 @@ private async void LoadDefaultDocument()
{
var content = await Open(args[1]);

DocumentPath = args[1];
DocumentTitle = Path.GetFileName(args[1]);
SourceCode = new TextDocument(content);
SourceCode.TextChanged += new EventHandler((object obj, EventArgs e) => UpdatePreview());
UpdatePreview();
SourceCode.TextChanged += new EventHandler((object obj, EventArgs e) => IsModified = CanUndo);
DocumentPath = args[1];
DocumentTitle = Path.GetFileName(args[1]);
IsModified = false;
StatusBarText = $"{Properties.Resources.Document} \"{args[1]}\" {Properties.Resources.OpenedSuccessfully}";
}
Expand Down
Binary file removed MarkDownEditor/alipay.jpg
Binary file not shown.

0 comments on commit 39a940a

Please sign in to comment.