mirror of
https://github.com/modernw/App-Installer-For-Windows-8.x-Reset.git
synced 2026-06-14 03:16:38 +10:00
Update
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("WAShell")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("WAShell")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2026")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//将 ComVisible 设置为 false 将使此程序集中的类型
|
||||
//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible (true)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("4ec16578-efbf-41e6-8d7f-976e3646dd1d")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
|
||||
// 方法是按如下所示使用“*”: :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
Generated
+83
@@ -0,0 +1,83 @@
|
||||
namespace WAShell
|
||||
{
|
||||
partial class SplashForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose (bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose ();
|
||||
}
|
||||
base.Dispose (disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent ()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.picbox = new System.Windows.Forms.PictureBox();
|
||||
this.timer = new System.Windows.Forms.Timer(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.picbox)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// picbox
|
||||
//
|
||||
this.picbox.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.picbox.BackColor = System.Drawing.Color.Transparent;
|
||||
this.picbox.Location = new System.Drawing.Point(6, 47);
|
||||
this.picbox.Name = "picbox";
|
||||
this.picbox.Size = new System.Drawing.Size(620, 300);
|
||||
this.picbox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.picbox.TabIndex = 0;
|
||||
this.picbox.TabStop = false;
|
||||
//
|
||||
// timer
|
||||
//
|
||||
this.timer.Tick += new System.EventHandler(this.timer_Tick);
|
||||
//
|
||||
// SplashForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.Window;
|
||||
this.ClientSize = new System.Drawing.Size(632, 425);
|
||||
this.Controls.Add(this.picbox);
|
||||
this.DoubleBuffered = true;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "SplashForm";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Splash Screen";
|
||||
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.SplashForm_FormClosed);
|
||||
this.Load += new System.EventHandler(this.SplashForm_Load);
|
||||
this.Shown += new System.EventHandler(this.SplashForm_Shown);
|
||||
this.Resize += new System.EventHandler(this.SplashForm_Resize);
|
||||
((System.ComponentModel.ISupportInitialize)(this.picbox)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.PictureBox picbox;
|
||||
private System.Windows.Forms.Timer timer;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,229 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using DataUtils;
|
||||
namespace WAShell
|
||||
{
|
||||
[ComVisible (true)]
|
||||
[ClassInterface (ClassInterfaceType.AutoDual)]
|
||||
public partial class SplashForm: Form
|
||||
{
|
||||
public enum FadeType
|
||||
{
|
||||
Gradually,
|
||||
Immediately
|
||||
};
|
||||
private Image splashImage = null;
|
||||
private Color background = Color.Transparent;
|
||||
private FadeType fadeMode = FadeType.Gradually;
|
||||
double opastep = 0.05;
|
||||
private Control _host = null;
|
||||
public Control Host
|
||||
{
|
||||
get { return _host; }
|
||||
set
|
||||
{
|
||||
if (ReferenceEquals (_host, value)) return;
|
||||
DetachHostEvents (_host);
|
||||
_host = value;
|
||||
AttachHostEvents (_host);
|
||||
if (this.Visible)
|
||||
{
|
||||
ResizeSplashScreen ();
|
||||
}
|
||||
}
|
||||
}
|
||||
private void AttachHostEvents (Control host)
|
||||
{
|
||||
if (host == null) return;
|
||||
host.Resize += Host_Changed;
|
||||
host.LocationChanged += Host_Changed;
|
||||
}
|
||||
private void DetachHostEvents (Control host)
|
||||
{
|
||||
if (host == null) return;
|
||||
|
||||
host.Resize -= Host_Changed;
|
||||
host.LocationChanged -= Host_Changed;
|
||||
}
|
||||
private void Host_Changed (object sender, EventArgs e)
|
||||
{
|
||||
if (!this.IsHandleCreated) return;
|
||||
ResizeSplashScreen ();
|
||||
}
|
||||
public SplashForm ()
|
||||
{
|
||||
InitializeComponent ();
|
||||
Init ();
|
||||
}
|
||||
private void Init ()
|
||||
{
|
||||
this.AllowTransparency = true;
|
||||
picbox.Size = new Size (
|
||||
(int)(620 * UITheme.DPIDouble),
|
||||
(int)(300 * UITheme.DPIDouble)
|
||||
);
|
||||
try { picbox.Image = splashImage; } catch (Exception) { }
|
||||
try { this.BackColor = background; } catch (Exception) { }
|
||||
}
|
||||
public Image SplashImage
|
||||
{
|
||||
get { return splashImage; }
|
||||
set
|
||||
{
|
||||
splashImage = value;
|
||||
if (picbox != null && picbox.IsHandleCreated)
|
||||
{
|
||||
splashImage = picbox.Image;
|
||||
}
|
||||
}
|
||||
}
|
||||
public Color SplashBackgroundColor
|
||||
{
|
||||
get { try { return background = this.BackColor; } catch (Exception) { return background; } }
|
||||
set
|
||||
{
|
||||
background = value;
|
||||
try { this.BackColor = background; }
|
||||
catch (Exception) { background = this.BackColor; }
|
||||
}
|
||||
}
|
||||
private void SplashForm_Load (object sender, EventArgs e)
|
||||
{
|
||||
ResizeSplashScreen ();
|
||||
}
|
||||
private void ResizeSplashScreen ()
|
||||
{
|
||||
Control owner = this.Owner;
|
||||
if (owner == null) owner = this.Parent;
|
||||
if (owner == null) return;
|
||||
owner.Update ();
|
||||
var pt = owner.PointToScreen (owner.ClientRectangle.Location);
|
||||
Location = pt;
|
||||
Size = owner.ClientSize;
|
||||
ResizeSplashImage ();
|
||||
}
|
||||
private void ResizeSplashImage ()
|
||||
{
|
||||
if (picbox != null && picbox.IsHandleCreated)
|
||||
{
|
||||
var sz = this.ClientSize;
|
||||
picbox.Location = new Point (
|
||||
(int)((sz.Width - picbox.Width) * 0.5),
|
||||
(int)((sz.Height - picbox.Height) * 0.5)
|
||||
);
|
||||
}
|
||||
}
|
||||
private void SplashForm_Resize (object sender, EventArgs e)
|
||||
{
|
||||
ResizeSplashImage ();
|
||||
}
|
||||
private bool fadeAwayArmed = false; // 用于 FadeAway 的“第一次 / 第二次”
|
||||
private bool fading = false; // 防止重复启动 Timer
|
||||
protected virtual void OnFormFade ()
|
||||
{
|
||||
switch (fadeMode)
|
||||
{
|
||||
case FadeType.Gradually:
|
||||
if (this.Opacity > 0)
|
||||
{
|
||||
this.Opacity -= opastep;
|
||||
if (this.Opacity < 0) this.Opacity = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
timer.Stop ();
|
||||
this.Visible = false;
|
||||
fading = false;
|
||||
}
|
||||
break;
|
||||
|
||||
case FadeType.Immediately:
|
||||
if (fadeAwayArmed)
|
||||
{
|
||||
this.Opacity = 0;
|
||||
timer.Stop ();
|
||||
this.Visible = false;
|
||||
fading = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
fadeAwayArmed = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
private void timer_Tick (object sender, EventArgs e)
|
||||
{
|
||||
OnFormFade ();
|
||||
}
|
||||
public void OwnerWnd_Resize (object sender, EventArgs e)
|
||||
{
|
||||
if (this != null && this.IsHandleCreated && this.picbox != null && this.picbox.IsHandleCreated)
|
||||
{
|
||||
ResizeSplashScreen ();
|
||||
}
|
||||
}
|
||||
// 渐变消失
|
||||
public void FadeOut ()
|
||||
{
|
||||
if (fading) return;
|
||||
fadeMode = FadeType.Gradually;
|
||||
fadeAwayArmed = false;
|
||||
fading = true;
|
||||
this.Opacity = Math.Min (this.Opacity, 1.0);
|
||||
timer.Interval = 15;
|
||||
timer.Start ();
|
||||
}
|
||||
// 立即消失
|
||||
public void FadeAway ()
|
||||
{
|
||||
if (fading) return;
|
||||
fadeMode = FadeType.Immediately;
|
||||
fadeAwayArmed = false;
|
||||
fading = true;
|
||||
timer.Interval = 15;
|
||||
timer.Start ();
|
||||
}
|
||||
public void ResetSplash ()
|
||||
{
|
||||
this.Opacity = 1.0;
|
||||
this.Visible = false;
|
||||
this.Enabled = true;
|
||||
fadeMode = FadeType.Gradually;
|
||||
fadeAwayArmed = false;
|
||||
fading = false;
|
||||
if (timer != null) timer.Stop ();
|
||||
if (picbox != null)
|
||||
{
|
||||
picbox.Image = splashImage;
|
||||
picbox.BackColor = background;
|
||||
}
|
||||
ResizeSplashScreen ();
|
||||
}
|
||||
private void SplashForm_FormClosed (object sender, FormClosedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
DetachHostEvents (_host);
|
||||
_host = null;
|
||||
base.OnFormClosed (e);
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
private void SplashForm_Shown (object sender, EventArgs e)
|
||||
{
|
||||
base.OnShown (e);
|
||||
this.Opacity = 1.0;
|
||||
this.Visible = true;
|
||||
this.Enabled = true;
|
||||
ResizeSplashScreen ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="timer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>WAShell</RootNamespace>
|
||||
<AssemblyName>WAShell</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>2</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SplashForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SplashForm.Designer.cs">
|
||||
<DependentUpon>SplashForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebAppForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebAppForm.Designer.cs">
|
||||
<DependentUpon>WebAppForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AppxPackage\AppxPackage.csproj">
|
||||
<Project>{bd681a4f-eb60-4bb8-90b5-65968fc7da59}</Project>
|
||||
<Name>AppxPackage</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Bridge\Bridge.csproj">
|
||||
<Project>{3c2f5446-33f0-41d5-813a-64a94aa474af}</Project>
|
||||
<Name>Bridge</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\DataUtils\DataUtils.csproj">
|
||||
<Project>{ffd3fd52-37a8-4f43-883c-de8d996cb0e0}</Project>
|
||||
<Name>DataUtils</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\PrivateInit\PrivateInit.csproj">
|
||||
<Project>{8e708d9a-6325-4aa9-b5a5-d1b5eca8eef7}</Project>
|
||||
<Name>PrivateInit</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="SplashForm.resx">
|
||||
<DependentUpon>SplashForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="WebAppForm.resx">
|
||||
<DependentUpon>WebAppForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
Generated
+60
@@ -0,0 +1,60 @@
|
||||
namespace WAShell
|
||||
{
|
||||
partial class WebAppForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose (bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose ();
|
||||
}
|
||||
base.Dispose (disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent ()
|
||||
{
|
||||
this.webui = new System.Windows.Forms.WebBrowser();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// webui
|
||||
//
|
||||
this.webui.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.webui.Location = new System.Drawing.Point(0, 0);
|
||||
this.webui.MinimumSize = new System.Drawing.Size(20, 20);
|
||||
this.webui.Name = "webui";
|
||||
this.webui.Size = new System.Drawing.Size(661, 416);
|
||||
this.webui.TabIndex = 0;
|
||||
//
|
||||
// WebAppForm
|
||||
//
|
||||
this.AllowDrop = true;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(661, 416);
|
||||
this.Controls.Add(this.webui);
|
||||
this.Name = "WebAppForm";
|
||||
this.Text = "Main Web App Form";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.WebBrowser webui;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using DataUtils;
|
||||
namespace WAShell
|
||||
{
|
||||
[ComVisible (true)]
|
||||
[ClassInterface (ClassInterfaceType.AutoDual)]
|
||||
public partial class WebAppForm: Form, IScriptBridge, IWebBrowserPageScale
|
||||
{
|
||||
SplashForm splash;
|
||||
ITaskbarList3 taskbar = null;
|
||||
public WebAppForm ()
|
||||
{
|
||||
InitializeComponent ();
|
||||
}
|
||||
public int PageScale
|
||||
{
|
||||
get
|
||||
{
|
||||
var web2 = WebBrowserHelper.GetWebBrowser2 (webui);
|
||||
if (web2 == null) return 0;
|
||||
object inArg = null;
|
||||
object outArg = null;
|
||||
try
|
||||
{
|
||||
web2.ExecWB (
|
||||
OLECMDID.OLECMDID_OPTICAL_ZOOM,
|
||||
OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT,
|
||||
ref inArg,
|
||||
ref outArg
|
||||
);
|
||||
if (outArg is int) return (int)outArg;
|
||||
}
|
||||
catch { }
|
||||
return 0;
|
||||
}
|
||||
set
|
||||
{
|
||||
var web2 = WebBrowserHelper.GetWebBrowser2 (webui);
|
||||
if (web2 == null) return;
|
||||
object inArg = value;
|
||||
object outArg = null;
|
||||
try
|
||||
{
|
||||
web2.ExecWB (
|
||||
OLECMDID.OLECMDID_OPTICAL_ZOOM,
|
||||
OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER,
|
||||
ref inArg,
|
||||
ref outArg
|
||||
);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
public object CallEvent (string funcName, object e)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
Reference in New Issue
Block a user