Commit 6873e93e authored by tsuji's avatar tsuji

Update GetADoc :2024業務改善GUI更新(※GetADoc.batはまだ)

parent e5818614
...@@ -28,6 +28,18 @@ ...@@ -28,6 +28,18 @@
<setting name="argPathSetting" serializeAs="String"> <setting name="argPathSetting" serializeAs="String">
<value /> <value />
</setting> </setting>
<setting name="formatSetting" serializeAs="String">
<value>0</value>
</setting>
<setting name="checkboxFree" serializeAs="String">
<value>False</value>
</setting>
<setting name="checkboxRight" serializeAs="String">
<value>False</value>
</setting>
<setting name="languageSetting" serializeAs="String">
<value>False</value>
</setting>
</GetADoc.Properties.Settings> </GetADoc.Properties.Settings>
</userSettings> </userSettings>
</configuration> </configuration>
\ No newline at end of file
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType> <DebugType>none</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
...@@ -38,6 +38,12 @@ ...@@ -38,6 +38,12 @@
<ApplicationIcon>adoc.ico</ApplicationIcon> <ApplicationIcon>adoc.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\netstandard2.0\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.8.0.1\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.WindowsAPICodePack-Core.1.1.0.2\lib\Microsoft.WindowsAPICodePack.dll</HintPath> <HintPath>..\packages\Microsoft.WindowsAPICodePack-Core.1.1.0.2\lib\Microsoft.WindowsAPICodePack.dll</HintPath>
</Reference> </Reference>
...@@ -49,6 +55,12 @@ ...@@ -49,6 +55,12 @@
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
...@@ -67,7 +79,12 @@ ...@@ -67,7 +79,12 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</ApplicationDefinition> </ApplicationDefinition>
<Compile Include="RightClickInst.cs" />
<Compile Include="TemporaryFolder.cs" /> <Compile Include="TemporaryFolder.cs" />
<Compile Include="ToggleSwitch.xaml.cs">
<DependentUpon>ToggleSwitch.xaml</DependentUpon>
</Compile>
<Compile Include="ViewModel.cs" />
<Page Include="MainWindow.xaml"> <Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
...@@ -82,6 +99,14 @@ ...@@ -82,6 +99,14 @@
<DependentUpon>MainWindow.xaml</DependentUpon> <DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Page Include="Themes\Generic.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ToggleSwitch.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs"> <Compile Include="Properties\AssemblyInfo.cs">
...@@ -116,4 +141,14 @@ ...@@ -116,4 +141,14 @@
</None> </None>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- <Target Name="PostBuild" AfterTargets="PostBuildEvent">
<MakeDir Directories="$(OutputPath)Subset" />
<Copy SourceFiles="$(ProjectDir)bin\Debug\Microsoft.Bcl.AsyncInterfaces.dll" DestinationFolder="$(ProjectDir)bin\Debug\Subset" />
<Copy SourceFiles="$(ProjectDir)bin\Debug\*.xml" DestinationFolder="$(ProjectDir)bin\Debug\Subset" />
<Copy SourceFiles="$(ProjectDir)bin\Debug\*.pdb" DestinationFolder="$(ProjectDir)bin\Debug\Subset" />
</Target> -->
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project> </Project>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
...@@ -12,7 +12,7 @@ namespace GetADoc.Properties { ...@@ -12,7 +12,7 @@ namespace GetADoc.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
...@@ -94,5 +94,53 @@ namespace GetADoc.Properties { ...@@ -94,5 +94,53 @@ namespace GetADoc.Properties {
this["argPathSetting"] = value; this["argPathSetting"] = value;
} }
} }
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int formatSetting {
get {
return ((int)(this["formatSetting"]));
}
set {
this["formatSetting"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool checkboxFree {
get {
return ((bool)(this["checkboxFree"]));
}
set {
this["checkboxFree"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool checkboxRight {
get {
return ((bool)(this["checkboxRight"]));
}
set {
this["checkboxRight"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool languageSetting {
get {
return ((bool)(this["languageSetting"]));
}
set {
this["languageSetting"] = value;
}
}
} }
} }
...@@ -20,5 +20,17 @@ ...@@ -20,5 +20,17 @@
<Setting Name="argPathSetting" Type="System.String" Scope="User"> <Setting Name="argPathSetting" Type="System.String" Scope="User">
<Value Profile="(Default)" /> <Value Profile="(Default)" />
</Setting> </Setting>
<Setting Name="formatSetting" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="checkboxFree" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="checkboxRight" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="languageSetting" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings> </Settings>
</SettingsFile> </SettingsFile>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GetADoc
{
internal class RightClickInst
{
public static string RunInst()
{
string ErrTxt = "";
try
{
// カレントディレクトリを取得
string currentDirectory = Environment.CurrentDirectory;
// プロセス情報を設定
ProcessStartInfo processInfo = new ProcessStartInfo();
processInfo.FileName = "cmd.exe";
processInfo.Arguments = $"/c \"{currentDirectory}\\InstAdocUI.js.bat\" /Inst"; // /c:プロセス終了後にcmd.exeを終了
processInfo.WorkingDirectory = currentDirectory;
processInfo.CreateNoWindow = false;
//processInfo.RedirectStandardError = true;
processInfo.UseShellExecute = true; //false
processInfo.Verb = "runas"; //管理者権限で実行
// プロセスを開始
Process process = new Process();
process.StartInfo = processInfo;
process.Start();
//ErrTxt = process.StandardError.ReadToEnd();
// プロセスの終了を待機
process.WaitForExit();
}catch(Exception ex)
{
ErrTxt = ex.Message;
}
return ErrTxt;
}
}
}
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:GetADoc">
</ResourceDictionary>
<UserControl x:Class="GetADoc.ToggleSwitch"
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:GetADoc"
mc:Ignorable="d"
d:DesignHeight="24.582" d:DesignWidth="43.626">
<UserControl.Resources>
<Style x:Key="FocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="2" SnapsToDevicePixels="true"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ToggleSwitchButton" TargetType="{x:Type Button}">
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="border" SnapsToDevicePixels="true">
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsDefaulted" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<Viewbox>
<Button x:Name="buttonToggle" Tag="Off" Style="{DynamicResource ToggleSwitchButton}" Cursor="Hand" Click="ButtonToggle_Click" Padding="0" Height="25" Width="44">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Border x:Name="borderTrack" CornerRadius="11" BorderThickness="1" BorderBrush="Black" Margin="0" Padding="0" Width="44" Height="24" Background="#FFCDCDCD"/>
<Ellipse x:Name="ellipseToggle" Fill="SteelBlue" Stroke="White" HorizontalAlignment="Center" Width="20" Height="20" Margin="0">
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform x:Name="translateTransform" X="-10"/>
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
</Grid>
</Button>
</Viewbox>
</UserControl>
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.ComponentModel;
namespace GetADoc
{
public partial class ToggleSwitch : UserControl
{
public ToggleSwitch()
{
InitializeComponent();
borderTrack.Background = new SolidColorBrush(Colors.Gray); ;
}
private void ButtonToggle_Click(object sender, RoutedEventArgs e)
{
IsOn = !IsOn;
}
#region ******************************* TrackBackgroundOnColor
[Category("Switch")]
public Color TrackBackgroundOnColor
{
get { return (Color)this.GetValue(TrackBackgroundOnColorProperty); }
set { this.SetValue(TrackBackgroundOnColorProperty, value); }
}
public static readonly DependencyProperty TrackBackgroundOnColorProperty =
DependencyProperty.Register("TrackBackgroundOnColor", typeof(Color),
typeof(ToggleSwitch),
new FrameworkPropertyMetadata(Colors.DeepSkyBlue,
FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
TrackBackgroundOnColorChangeFunc,
TrackBackgroundOnColorCoerceFunc));
static void TrackBackgroundOnColorChangeFunc(DependencyObject target,
DependencyPropertyChangedEventArgs e)
{
var of = (Color)e.OldValue;
var nf = (Color)e.NewValue;
var obj = (ToggleSwitch)target;
}
static object TrackBackgroundOnColorCoerceFunc(DependencyObject target, object baseValue)
{
var obj = (ToggleSwitch)target;
var val = (Color)baseValue;
return val;
}
#endregion
#region ******************************* TrackBackgroundOffColor
[Category("Switch")]
public Color TrackBackgroundOffColor
{
get { return (Color)this.GetValue(TrackBackgroundOffColorProperty); }
set { this.SetValue(TrackBackgroundOffColorProperty, value); }
}
public static readonly DependencyProperty TrackBackgroundOffColorProperty =
DependencyProperty.Register("TrackBackgroundOffColor", typeof(Color),
typeof(ToggleSwitch),
new FrameworkPropertyMetadata(Colors.Gray,
FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
TrackBackgroundOffColorChangeFunc));
static void TrackBackgroundOffColorChangeFunc(DependencyObject target,
DependencyPropertyChangedEventArgs e)
{
var of = (Color)e.OldValue;
var nf = (Color)e.NewValue;
var obj = (ToggleSwitch)target;
obj.borderTrack.Background = new SolidColorBrush(nf);
}
#endregion
#region ******************************* CircleBackgroundColor
[Category("Switch")]
public Color CircleBackgroundColor
{
get { return (Color)this.GetValue(CircleBackgroundColorProperty); }
set { this.SetValue(CircleBackgroundColorProperty, value); }
}
public static readonly DependencyProperty CircleBackgroundColorProperty =
DependencyProperty.Register("CircleBackgroundColor", typeof(Color),
typeof(ToggleSwitch),
new FrameworkPropertyMetadata(Colors.SteelBlue,
FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
CircleBackgroundColorChangeFunc));
static void CircleBackgroundColorChangeFunc(DependencyObject target,
DependencyPropertyChangedEventArgs e)
{
var of = (Color)e.OldValue;
var nf = (Color)e.NewValue;
var obj = (ToggleSwitch)target;
obj.ellipseToggle.Fill = new SolidColorBrush(nf);
}
#endregion
#region ******************************* CircleBorderColor
[Category("Switch")]
public Color CircleBorderColor
{
get { return (Color)this.GetValue(CircleBorderColorProperty); }
set { this.SetValue(CircleBorderColorProperty, value); }
}
public static readonly DependencyProperty CircleBorderColorProperty =
DependencyProperty.Register("CircleBorderColor", typeof(Color),
typeof(ToggleSwitch),
new FrameworkPropertyMetadata(Colors.White,
FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
CircleBorderColorChangeFunc));
static void CircleBorderColorChangeFunc(DependencyObject target,
DependencyPropertyChangedEventArgs e)
{
var of = (Color)e.OldValue;
var nf = (Color)e.NewValue;
var obj = (ToggleSwitch)target;
obj.ellipseToggle.Stroke = new SolidColorBrush(nf);
}
#endregion
//BindsTwoWayByDefaultを設定する事
#region ******************************* IsOn
[Category("Switch")]
[Description("Switch status")]
public bool IsOn
{
get { return (bool)this.GetValue(IsOnProperty); }
set { this.SetValue(IsOnProperty, value); }
}
public static readonly DependencyProperty IsOnProperty =
DependencyProperty.Register("IsOn", typeof(bool),
typeof(ToggleSwitch),
new FrameworkPropertyMetadata(false,
FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
IsOnChangeFunc));
static void IsOnChangeFunc(DependencyObject target,
DependencyPropertyChangedEventArgs e)
{
var of = (bool)e.OldValue;
var nf = (bool)e.NewValue;
var obj = (ToggleSwitch)target;
if (nf)
{
obj.borderTrack.Background = new SolidColorBrush(obj.TrackBackgroundOffColor);
var ca = new ColorAnimation(obj.TrackBackgroundOnColor, TimeSpan.FromSeconds(obj.Duration));
obj.borderTrack.Background.BeginAnimation(SolidColorBrush.ColorProperty, ca);
var da = new DoubleAnimation(10, TimeSpan.FromSeconds(obj.Duration));
obj.translateTransform.BeginAnimation(TranslateTransform.XProperty, da);
}
else
{
obj.borderTrack.Background = new SolidColorBrush(obj.TrackBackgroundOnColor);
var ca = new ColorAnimation(obj.TrackBackgroundOffColor, TimeSpan.FromSeconds(obj.Duration));
obj.borderTrack.Background.BeginAnimation(SolidColorBrush.ColorProperty, ca);
var da = new DoubleAnimation(-10, TimeSpan.FromSeconds(obj.Duration));
obj.translateTransform.BeginAnimation(TranslateTransform.XProperty, da);
}
}
#endregion
#region ******************************* Duration
[Category("Switch")]
[Description("Change Duration (sec)")]
public double Duration
{
get { return (double)this.GetValue(DurationProperty); }
set { this.SetValue(DurationProperty, value); }
}
public static readonly DependencyProperty DurationProperty =
DependencyProperty.Register("ChangeDuration", typeof(double),
typeof(ToggleSwitch),
new PropertyMetadata(0.05));
#endregion
}
}
\ No newline at end of file
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
public class MainWindowViewModel : INotifyPropertyChanged
{
private bool ts_Status;
public bool Ts_Status
{
get { return ts_Status; }
set
{
SetProperty(ref ts_Status, value);
if (!processError)
{
Task.Run(() => Ts_Process(value));
}
else
{
processError = false;
}
}
}
private string titleLabelContent;
public string TitleLabelContent
{
get { return titleLabelContent; }
set { SetProperty(ref titleLabelContent, value); }
}
private string label1Content;
public string Label1Content
{
get { return label1Content; }
set { SetProperty(ref label1Content, value); }
}
private string label2Content;
public string Label2Content
{
get { return label2Content; }
set { SetProperty(ref label2Content, value); }
}
private string label4Content;
public string Label4Content
{
get { return label4Content; }
set { SetProperty(ref label4Content, value); }
}
private string label5Content;
public string Label5Content
{
get { return label5Content; }
set { SetProperty(ref label5Content, value); }
}
private string folderPathBoxText;
public string FolderPathBoxText
{
get { return folderPathBoxText; }
set { SetProperty(ref folderPathBoxText, value); }
}
private string button1Content;
public string Button1Content
{
get { return button1Content; }
set { SetProperty(ref button1Content, value); }
}
private string button2Content;
public string Button2Content
{
get { return button2Content; }
set { SetProperty(ref button2Content, value); }
}
private string iconCheckboxContent;
public string IconCheckboxContent
{
get { return iconCheckboxContent; }
set { SetProperty(ref iconCheckboxContent, value); }
}
private string sepaDocCheckboxContent;
public string SepaDocCheckboxContent
{
get { return sepaDocCheckboxContent; }
set { SetProperty(ref sepaDocCheckboxContent, value); }
}
private string freePageCheckboxContent;
public string FreePageCheckboxContent
{
get { return freePageCheckboxContent; }
set { SetProperty(ref freePageCheckboxContent, value); }
}
private string rightClickCheckboxContent;
public string RightClickCheckboxContent
{
get { return rightClickCheckboxContent; }
set { SetProperty(ref rightClickCheckboxContent, value); }
}
private string myPathCheckboxContent;
public string MyPathCheckboxContent
{
get { return myPathCheckboxContent; }
set { SetProperty(ref myPathCheckboxContent, value); }
}
private bool process_Status;
public bool Process_Status
{
get { return process_Status; }
set { SetProperty(ref process_Status, value); }
}
private bool processError = false;
private bool dummyFlag = false;
public bool DummyFlag
{
get { return dummyFlag; }
set { SetProperty(ref dummyFlag, value); }
}
public async void Ts_Process(bool val)
{
if (val)
{
bool ret = await Task.Run(() => TsTaskOn());
if (!ret)
{
processError = true;
Ts_Status = false;
}
}
else
{
bool ret = await Task.Run(() => TsTaskOff());
if (!ret)
{
processError = true;
Ts_Status = true;
}
}
}
public bool TsTaskOn()
{
bool ret = (true && !DummyFlag);
// 表記を英語に切替
TitleLabelContent = "Create a template for an AsciiDoc document";
Label1Content = "output folder";
Label2Content = "file name";
Label4Content = "options";
Label5Content = "format";
FolderPathBoxText = "<select folder>";
Button1Content = "browse...";
Button2Content = "Create";
IconCheckboxContent = "custom icons";
SepaDocCheckboxContent = "split document";
FreePageCheckboxContent = "free page";
RightClickCheckboxContent = "add shortcut to right-click menu in Explorer (Just once)";
MyPathCheckboxContent = "saved path";
if (ret) Process_Status = true;
return ret;
}
public bool TsTaskOff()
{
bool ret = (true && !DummyFlag);
// 表記を日本語に切替
TitleLabelContent = "AsciiDocの雛形を作成します";
Label1Content = "作成先のフォルダ:";
Label2Content = "ドキュメント名:";
Label4Content = "オプション:";
Label5Content = "文書フォーマット:";
FolderPathBoxText = "<フォルダ指定>";
Button1Content = "参照";
Button2Content = "作成";
IconCheckboxContent = "カスタムアイコン";
SepaDocCheckboxContent = "分割ドキュメント";
FreePageCheckboxContent = "フリーページ";
RightClickCheckboxContent = "右クリックショートカット追加(初回のみ)";
MyPathCheckboxContent = "保存Path";
if (ret) Process_Status = false;
return ret;
}
public event PropertyChangedEventHandler PropertyChanged;
protected bool SetProperty<T>(ref T storage, T value, [CallerMemberName] string propertyName = null)
{
if (Equals(storage, value)) return false;
storage = value;
OnPropertyChanged(propertyName);
return true;
}
protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net461" />
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="8.0.1" targetFramework="net461" />
<package id="Microsoft.WindowsAPICodePack-Core" version="1.1.0.2" targetFramework="net461" /> <package id="Microsoft.WindowsAPICodePack-Core" version="1.1.0.2" targetFramework="net461" />
<package id="Microsoft.WindowsAPICodePack-Shell" version="1.1.0.0" targetFramework="net461" /> <package id="Microsoft.WindowsAPICodePack-Shell" version="1.1.0.0" targetFramework="net461" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.3" targetFramework="net461" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net461" />
</packages> </packages>
\ No newline at end of file
No preview for this file type
This diff is collapsed.
...@@ -47,7 +47,6 @@ var pm = uParam({ ...@@ -47,7 +47,6 @@ var pm = uParam({
var NAME_REG = "ZGetAdocUI"; var NAME_REG = "ZGetAdocUI";
var NAME_DISP = "GetAdocUI"; var NAME_DISP = "GetAdocUI";
if ( pm.bInst ) { if ( pm.bInst ) {
installClickMenu(NAME_REG,NAME_DISP); installClickMenu(NAME_REG,NAME_DISP);
echo("installed GetAdocUI items!"); echo("installed GetAdocUI items!");
...@@ -90,12 +89,13 @@ function installClickMenu(regName,dispName,bUninst) { ...@@ -90,12 +89,13 @@ function installClickMenu(regName,dispName,bUninst) {
/* /*
管理者権限に昇格して実行する(batの再起動) 管理者権限に昇格して実行する(batの再起動)
*/ */
rebootAdmin(); // rebootAdmin();
if ( bUninst ) { if ( bUninst ) {
/* /*
アンインストール アンインストール
*/ */
rebootAdmin();
// レジストリをバックアップ // レジストリをバックアップ
registoryBackup("preUnistall"); registoryBackup("preUnistall");
/* /*
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment