Commit 5227cee6 authored by tsuji's avatar tsuji

Update GetADoc/MainWindow.xaml.cs :Helpボタン実装、その他微修正

parent 886393bd
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<RowDefinition Height="57*"/> <RowDefinition Height="57*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Label x:Name="TitleLabel" FontWeight="Bold" FontSize="18" Margin="0,0,14,29" Grid.RowSpan="3" Grid.ColumnSpan="2" Content="AsciiDocの雛形を作成します"/> <Label x:Name="TitleLabel" FontWeight="Bold" FontSize="18" Margin="3,0,14,29" Grid.RowSpan="3" Grid.ColumnSpan="2" Content="AsciiDocの雛形を作成します"/>
<Label x:Name="label1" Content="作成先のフォルダ:" HorizontalAlignment="Center" Margin="0,110,0,0" VerticalAlignment="Top" Height="26" Width="134" FontWeight="Bold" FontSize="14"/> <Label x:Name="label1" Content="作成先のフォルダ:" HorizontalAlignment="Center" Margin="0,110,0,0" VerticalAlignment="Top" Height="26" Width="134" FontWeight="Bold" FontSize="14"/>
<TextBox x:Name="FolderPathBox" Margin="22,144,101,0" AllowDrop="True" Drop="textBox_Drop" DragOver="textBox_PreviewDragOver" Panel.ZIndex="6" GotFocus="DeleteCompLabel" FontSize="14" Height="28" VerticalAlignment="Top" Grid.ColumnSpan="2" VerticalContentAlignment="Center"> <TextBox x:Name="FolderPathBox" Margin="22,144,101,0" AllowDrop="True" Drop="textBox_Drop" DragOver="textBox_PreviewDragOver" Panel.ZIndex="6" GotFocus="DeleteCompLabel" FontSize="14" Height="28" VerticalAlignment="Top" Grid.ColumnSpan="2" VerticalContentAlignment="Center">
<フォルダ指定> <フォルダ指定>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<CheckBox x:Name="IconCheckbox" Content="カスタムアイコン" Margin="6.5,44,0,0" Panel.ZIndex="2" Height="21" VerticalAlignment="Top" GotFocus="DeleteCompLabel" HorizontalAlignment="Left" Width="114" FontSize="14" Grid.Row="2" Grid.Column="1"/> <CheckBox x:Name="IconCheckbox" Content="カスタムアイコン" Margin="6.5,44,0,0" Panel.ZIndex="2" Height="21" VerticalAlignment="Top" GotFocus="DeleteCompLabel" HorizontalAlignment="Left" Width="114" FontSize="14" Grid.Row="2" Grid.Column="1"/>
<CheckBox x:Name="SepaDocCheckbox" Content="分割ドキュメント" Margin="35,71,10,0" Panel.ZIndex="2" GotFocus="DeleteCompLabel" FontSize="14" Grid.Row="2" Height="18" VerticalAlignment="Top"/> <CheckBox x:Name="SepaDocCheckbox" Content="分割ドキュメント" Margin="35,71,10,0" Panel.ZIndex="2" GotFocus="DeleteCompLabel" FontSize="14" Grid.Row="2" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="allBox" TextWrapping="Wrap" Opacity="0" Cursor="Arrow" Margin="0,7,0,-7" Grid.RowSpan="3" Grid.ColumnSpan="2"/> <TextBox x:Name="allBox" TextWrapping="Wrap" Opacity="0" Cursor="Arrow" Margin="0,7,0,-7" Grid.RowSpan="3" Grid.ColumnSpan="2"/>
<Label x:Name="CompletedLabel" Content="作成が完了しました!" HorizontalAlignment="Left" Margin="141,52,0,0" VerticalAlignment="Top" Width="133" FontWeight="Bold" Foreground="#FFD70B0B" Height="26" FontSize="14" Grid.Row="2" Grid.Column="1" Visibility="Hidden"/> <Label x:Name="CompletedLabel" Content="作成が完了しました!" HorizontalAlignment="Left" Margin="150,38,0,0" VerticalAlignment="Top" Width="133" FontWeight="Bold" Foreground="#FFD70B0B" Height="26" FontSize="14" Grid.Row="2" Grid.Column="1" Visibility="Hidden"/>
<!-- Visibility="Hidden" --> <!-- Visibility="Hidden" -->
<!--<CheckBox x:Name="MyPathCheckbox" Content="保存Path" Margin="8,118,290,0" Panel.ZIndex="2" Height="22" VerticalAlignment="Top" GotFocus="DeleteCompLabel" Click="MyPathClick" FontWeight="Bold" FontSize="14" Grid.Column="1"/>--> <!--<CheckBox x:Name="MyPathCheckbox" Content="保存Path" Margin="8,118,290,0" Panel.ZIndex="2" Height="22" VerticalAlignment="Top" GotFocus="DeleteCompLabel" Click="MyPathClick" FontWeight="Bold" FontSize="14" Grid.Column="1"/>-->
<Label x:Name="SavePathLabel" Content="Pathが未登録です&#xD;&#xA;これから出力するPathを登録します" HorizontalAlignment="Center" VerticalAlignment="Top" Width="184" FontWeight="Bold" Foreground="#FFD70B0B" Height="42" Margin="0,97,0,0" Grid.Column="1" Visibility="Hidden"/> <Label x:Name="SavePathLabel" Content="Pathが未登録です&#xD;&#xA;これから出力するPathを登録します" HorizontalAlignment="Center" VerticalAlignment="Top" Width="184" FontWeight="Bold" Foreground="#FFD70B0B" Height="42" Margin="0,97,0,0" Grid.Column="1" Visibility="Hidden"/>
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<!-- Visibility="Hidden" --> <!-- Visibility="Hidden" -->
<!-- ここから2024追加分 --> <!-- ここから2024追加分 -->
<Label x:Name="label4" Content="オプション:" HorizontalAlignment="Left" Margin="10,7,0,0" VerticalAlignment="Top" Height="26" Width="92" FontWeight="Bold" FontSize="14" Grid.Row="2"/> <Label x:Name="label4" Content="オプション:" HorizontalAlignment="Left" Margin="12,7,0,0" VerticalAlignment="Top" Height="26" Width="92" FontWeight="Bold" FontSize="14" Grid.Row="2"/>
<CheckBox x:Name="FreePageCheckbox" Content="フリーページ" Margin="6.5,71,306,0" Panel.ZIndex="2" GotFocus="DeleteCompLabel" Height="18" VerticalAlignment="Top" FontSize="14" Grid.Row="2" Grid.Column="1"/> <CheckBox x:Name="FreePageCheckbox" Content="フリーページ" Margin="6.5,71,306,0" Panel.ZIndex="2" GotFocus="DeleteCompLabel" Height="18" VerticalAlignment="Top" FontSize="14" Grid.Row="2" Grid.Column="1"/>
<Label x:Name="label5" Content="文書フォーマット:" HorizontalAlignment="Left" VerticalAlignment="Top" Height="26" Width="109" Margin="12,57,0,0" FontWeight="Bold" FontSize="14"/> <Label x:Name="label5" Content="文書フォーマット:" HorizontalAlignment="Left" VerticalAlignment="Top" Height="26" Width="109" Margin="12,57,0,0" FontWeight="Bold" FontSize="14"/>
<ComboBox HorizontalAlignment="Left" Name="DocStileBox" Margin="128,60,0,0" VerticalAlignment="Top" Width="306" Height="22" Grid.ColumnSpan="2"/> <ComboBox HorizontalAlignment="Left" Name="DocStileBox" Margin="128,60,0,0" VerticalAlignment="Top" Width="306" Height="22" Grid.ColumnSpan="2"/>
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<Button x:Name="ToggleChanger" Grid.Column="1" Content="Button" HorizontalAlignment="Left" Height="23" Margin="324,61,0,0" VerticalAlignment="Top" Width="52" Opacity="0" Click="LanguageChange"/> <Button x:Name="ToggleChanger" Grid.Column="1" Content="Button" HorizontalAlignment="Left" Height="23" Margin="324,61,0,0" VerticalAlignment="Top" Width="52" Opacity="0" Click="LanguageChange"/>
<Button x:Name="RightClickInstButton" Grid.Column="1" Content="右クリックショートカット追加" HorizontalAlignment="Left" Margin="15.5,11,0,0" Grid.Row="2" VerticalAlignment="Top" Width="148" FontWeight="Bold" Click="RightInstRun"/> <Button x:Name="RightClickInstButton" Grid.Column="1" Content="右クリックショートカット追加" HorizontalAlignment="Left" Margin="15.5,11,0,0" Grid.Row="2" VerticalAlignment="Top" Width="148" FontWeight="Bold" Click="RightInstRun"/>
<CheckBox x:Name="Drawiobox" Content="drawioファイル" Margin="135.5,71,159,0" Panel.ZIndex="2" GotFocus="DeleteCompLabel" Height="18" VerticalAlignment="Top" FontSize="14" Grid.Row="2" Grid.Column="1"/> <CheckBox x:Name="Drawiobox" Content="drawioファイル" Margin="135.5,71,159,0" Panel.ZIndex="2" GotFocus="DeleteCompLabel" Height="18" VerticalAlignment="Top" FontSize="14" Grid.Row="2" Grid.Column="1"/>
<Button x:Name="HelpPageButton" Grid.Column="1" Content="ヘルプ" HorizontalAlignment="Left" Margin="317,8,0,0" VerticalAlignment="Top" Width="64" FontWeight="Bold" Click="helpButton_Click"/>
</Grid> </Grid>
</Window> </Window>
\ No newline at end of file
...@@ -341,6 +341,26 @@ namespace GetADoc ...@@ -341,6 +341,26 @@ namespace GetADoc
Properties.Settings.Default.Save(); Properties.Settings.Default.Save();
} }
//Helpボタンクリック処理(Helpページをブラウザで開く)
private void helpButton_Click(object sender, RoutedEventArgs e)
{
//コンソール呼び出し
ProcessStartInfo processStartInfo = new ProcessStartInfo();
string appPath = System.Reflection.Assembly.GetExecutingAssembly().Location; //モジュールのパスを取得
string appDirectory = appPath.Substring(0, appPath.LastIndexOf(@"\") + 1); //モジュールの存在するディレクトリを取得
processStartInfo.FileName = System.IO.Path.Combine(appDirectory, "getADoc.Data", "getADoc.bat");
processStartInfo.CreateNoWindow = true; // コマンドプロンプトを非表示
processStartInfo.UseShellExecute = false; // シェル機能オフ
//チェックボックスの状況に応じて引数を指定
processStartInfo.Arguments = "/OpenAdocHelp";
//GetADoc.batを実行
Process process = Process.Start(processStartInfo);
process.WaitForExit();
process.Close();
}
private void RightInstRun(object sender, RoutedEventArgs e) private void RightInstRun(object sender, RoutedEventArgs e)
{ {
// カレントディレクトリを取得 // カレントディレクトリを取得
...@@ -391,6 +411,8 @@ namespace GetADoc ...@@ -391,6 +411,8 @@ namespace GetADoc
label4.Content = "オプション:"; label4.Content = "オプション:";
label5.Content = "文書フォーマット:"; label5.Content = "文書フォーマット:";
CompletedLabel.Content = "作成が完了しました!";
if (FolderPathBox.Text == "<select folder>" || FolderPathBox.Text == "") if (FolderPathBox.Text == "<select folder>" || FolderPathBox.Text == "")
{ {
FolderPathBox.Text = "<フォルダ指定>"; FolderPathBox.Text = "<フォルダ指定>";
...@@ -399,11 +421,13 @@ namespace GetADoc ...@@ -399,11 +421,13 @@ namespace GetADoc
button1.Content = "参照"; button1.Content = "参照";
button2.Content = "作成"; button2.Content = "作成";
RightClickInstButton.Content = "右クリックショートカット追加"; RightClickInstButton.Content = "右クリックショートカット追加";
HelpPageButton.Content = "ヘルプ";
//ScreenCheckbox.Content = "SCREEN Logo"; //ScreenCheckbox.Content = "SCREEN Logo";
IconCheckbox.Content = "カスタムアイコン"; IconCheckbox.Content = "カスタムアイコン";
SepaDocCheckbox.Content = "分割ドキュメント"; SepaDocCheckbox.Content = "分割ドキュメント";
FreePageCheckbox.Content = "フリーページ"; FreePageCheckbox.Content = "フリーページ";
Drawiobox.Content = "drawioファイル";
//RightClickCheckbox.Content = "右クリックショートカット追加(初回のみ)"; //RightClickCheckbox.Content = "右クリックショートカット追加(初回のみ)";
//MyPathCheckbox.Content = "保存Path"; //2024/12/27 保存Path廃止 //MyPathCheckbox.Content = "保存Path"; //2024/12/27 保存Path廃止
...@@ -420,26 +444,32 @@ namespace GetADoc ...@@ -420,26 +444,32 @@ namespace GetADoc
} }
else else
{ {
TitleLabel.Content = "Create a template for an AsciiDoc document"; TitleLabel.Content = "Create a Template for an AsciiDoc Document";
label1.Content = "Output Folder";
label2.Content = "File Name";
label4.Content = "Oputions";
label5.Content = "Format";
CompletedLabel.Content = "Completed!";
label1.Content = "output folder";
label2.Content = "file name";
label4.Content = "oputions";
label5.Content = "format";
if (FolderPathBox.Text == "<フォルダ指定>" || FolderPathBox.Text == "") if (FolderPathBox.Text == "<フォルダ指定>" || FolderPathBox.Text == "")
{ {
FolderPathBox.Text = "<select folder>"; FolderPathBox.Text = "<Select Folder>";
} }
button1.Content = "browse..."; button1.Content = "Browse...";
button2.Content = "Create"; button2.Content = "Create";
RightClickInstButton.Content = "Add right-click shortcut"; RightClickInstButton.Content = "Add Right-Click Shortcut";
HelpPageButton.Content = "Help";
//ScreenCheckbox.Content = "SCREEN Logo"; //ScreenCheckbox.Content = "SCREEN Logo";
IconCheckbox.Content = "custom icons"; IconCheckbox.Content = "Custom Icons";
SepaDocCheckbox.Content = "split document"; SepaDocCheckbox.Content = "Split Document";
FreePageCheckbox.Content = "free page"; FreePageCheckbox.Content = "Free Page";
Drawiobox.Content = "DrawIo File";
//RightClickCheckbox.Content = "add shortcut to right-click menu in Explorer (Just once)"; //RightClickCheckbox.Content = "add shortcut to right-click menu in Explorer (Just once)";
//MyPathCheckbox.Content = "saved path"; //2024/12/27 保存Path廃止 //MyPathCheckbox.Content = "saved path"; //2024/12/27 保存Path廃止
......
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