Commit 886393bd authored by tsuji's avatar tsuji

Update GetADocGui :heip以外の追加仕様対応

parent eded09e2
......@@ -6,7 +6,8 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:GetADoc"
mc:Ignorable="d"
Title="GetADoc" Height="380" Width="590" MinWidth="590" MinHeight="380" MaxHeight="380" MaxWidth="590">
Title="GetADoc" Height="380" Width="590" MinWidth="590" MinHeight="380" MaxHeight="380" MaxWidth="590"
Loaded="Window_Loaded">
<Grid>
<Grid.ColumnDefinitions>
......@@ -26,7 +27,7 @@
<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>
<Label x:Name="label2" Content="ドキュメント名:" HorizontalAlignment="Left" Width="97" Margin="10,10,0,11" FontWeight="Bold" FontSize="14" Grid.Row="1"/>
<Label x:Name="label2" Content="ドキュメント名:" HorizontalAlignment="Left" Width="97" Margin="10,12,0,9" FontWeight="Bold" FontSize="14" Grid.Row="1"/>
<TextBox x:Name="ADocNameBox" Margin="116,0,101,0" AllowDrop="True" Panel.ZIndex="2" GotFocus="DeleteCompLabel" Height="26" VerticalAlignment="Center" Grid.ColumnSpan="2" Grid.Row="1" VerticalContentAlignment="Center"/>
<Label x:Name="label3" Content="(.adoc)" Margin="327,14,20,11" FontWeight="Bold" FontSize="14" RenderTransformOrigin="0.5,0.5" Grid.Column="1" Grid.Row="1">
......@@ -42,27 +43,28 @@
<Button x:Name="button1" Content="参照" Margin="335,144,25,0" VerticalAlignment="Top" Click="button1_Click" Panel.ZIndex="2" Height="28" GotFocus="DeleteCompLabel" FontWeight="Bold" FontSize="14" RenderTransformOrigin="0.509,1.356" Grid.Column="1"/>
<Button x:Name="button2" Content="作成" Margin="0,0,25,14" Panel.ZIndex="2" Click="button2_Click" Height="50" VerticalAlignment="Bottom" GotFocus="DeleteCompLabel" RenderTransformOrigin="0.726,1.024" FontSize="14" FontWeight="Bold" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right" Width="97"/>
<CheckBox x:Name="ScreenCheckbox" Content="SCREEN Logo" Margin="35,44,15,0" Panel.ZIndex="2" Height="21" VerticalAlignment="Top" GotFocus="DeleteCompLabel" FontSize="14" Grid.Row="2"/>
<CheckBox x:Name="IconCheckbox" Content="カスタムアイコン" Margin="15,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"/>
<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"/>
<!-- 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"/>
<!-- Visibility="Hidden" -->
<Label x:Name="SavedLabel" Content="保存Pathを更新しました" Margin="151,113,0,0" VerticalAlignment="Top" FontWeight="Bold" Foreground="#FFD70B0B" Height="26" Grid.Column="1" Visibility="Hidden"/>
<!-- Visibility="Hidden" -->
<!-- ここから2024追加分 -->
<Label x:Name="label4" Content="オプション:" HorizontalAlignment="Left" Margin="10,5,0,0" VerticalAlignment="Top" Height="26" Width="92" FontWeight="Bold" FontSize="14" Grid.Row="2"/>
<CheckBox x:Name="FreePageCheckbox" Content="フリーページ" Margin="15,71,279,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,55,0,0" FontWeight="Bold" FontSize="14"/>
<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"/>
<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"/>
<ComboBox HorizontalAlignment="Left" Name="DocStileBox" Margin="128,60,0,0" VerticalAlignment="Top" Width="306" Height="22" Grid.ColumnSpan="2"/>
<Label x:Name="label6" Content="JP      En" Margin="295,59,0,0" VerticalAlignment="Top" Height="26" HorizontalAlignment="Left" Width="112" Grid.Column="1"/>
<local:ToggleSwitch x:Name="ToggleButton" HorizontalAlignment="Left" Height="26" VerticalAlignment="Top" Width="60" Margin="318,59,0,0" TrackBackgroundOnColor="#FF1C87EA" TrackBackgroundOffColor="#FFECEAEA" CircleBackgroundColor="#FFBFD8FF" IsOn="{Binding Ts_Status()}" Grid.Column="1"/>
<!--<CheckBox x:Name="RightClickCheckbox" Content="右クリックショートカット追加(初回のみ)" Margin="15,94,25,0" Panel.ZIndex="2" GotFocus="DeleteCompLabel" Height="18" VerticalAlignment="Top" FontSize="14" Grid.Row="2" Grid.Column="1"/>-->
<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,13,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"/>
</Grid>
......
......@@ -54,14 +54,19 @@ namespace GetADoc
if (argPathBox.Length == 2)
{
FolderPathBox.Text = argPathBox[1];//第一引数を入力
FolderPathBox.ScrollToHorizontalOffset(FolderPathBox.ExtentWidth);
}
else
{
FolderPathBox.Text = Properties.Settings.Default.box1Setting;//前回の値を入力
FolderPathBox.ScrollToHorizontalOffset(FolderPathBox.ExtentWidth);
}
//Pathのテキストボックスを右端にスクロール
FolderPathBox.ScrollToHorizontalOffset(FolderPathBox.ExtentWidth);
//保存PathはデフォルトOFF
MyPathCheckbox.IsChecked = false;
//MyPathCheckbox.IsChecked = false; //2024/12/27 保存Path廃止
//文書スタイルのコンボボックス定義
string NormalItem = "";
......@@ -103,28 +108,35 @@ namespace GetADoc
FolderPathBox.AddHandler(TextBox.DropEvent, new DragEventHandler(textBox_Drop), true);
}
//保存Pathのチェックボックスをクリックする(ONにする)と登録したPahtをTextBoxに表示
private void MyPathClick(object sender, RoutedEventArgs e)
{
//ONにしたとき
if(MyPathCheckbox.IsChecked == true)
//ファイル名指定のテキストボックスにフォーカスする(起動時:xamlヘッダで定義,<Loaded="Window_Loaded">)
private void Window_Loaded(object sender, RoutedEventArgs e)
{
FolderPathBox.Text = Properties.Settings.Default.savePathSetting;
if (FolderPathBox.Text == "")
{
SavePathLabel.Visibility = Visibility.Visible;
}
FolderPathBox.ScrollToHorizontalOffset(FolderPathBox.ExtentWidth);//フォルダPathで浅い階層が見えるように
ADocNameBox.Focus();
}
//OFFにしたとき
if (MyPathCheckbox.IsChecked == false)
{
SavePathLabel.Visibility = Visibility.Hidden;
FolderPathBox.Text = Properties.Settings.Default.box1Setting;
}
//保存Pathのチェックボックスをクリックする(ONにする)と登録したPahtをTextBoxに表示  //2024/12/27 保存Path廃止
//private void MyPathClick(object sender, RoutedEventArgs e)
//{
// //ONにしたとき
// if(MyPathCheckbox.IsChecked == true)
// {
// FolderPathBox.Text = Properties.Settings.Default.savePathSetting;
// if (FolderPathBox.Text == "")
// {
// SavePathLabel.Visibility = Visibility.Visible;
// }
// }
// //OFFにしたとき
// if (MyPathCheckbox.IsChecked == false)
// {
// SavePathLabel.Visibility = Visibility.Hidden;
// FolderPathBox.Text = Properties.Settings.Default.box1Setting;
// }
}
//}
//フォルダ指定のためにファイルをドラッグ
private void textBox_PreviewDragOver(object sender, System.Windows.DragEventArgs e)
......@@ -195,6 +207,12 @@ namespace GetADoc
{
FreeFlag = true;
}
//drawio
bool drawioFlag = false;
if (Drawiobox.IsChecked == true)
{
drawioFlag = true;
}
//言語
bool languageFlag = false;
......@@ -292,7 +310,7 @@ namespace GetADoc
string selectedTmpText = DocStileBox.Text;
//バッチファイルの実行
RunBatch.runBatch(IconFlag, SCREENFlag, SepaFlag, FreeFlag, languageFlag, fileName, filePath, selectedTmpText);
RunBatch.runBatch(IconFlag, SCREENFlag, SepaFlag, FreeFlag, languageFlag, drawioFlag, fileName, filePath, selectedTmpText);
//保存Pathのラベルが表示されていれば、表示を隠す
if (SavePathLabel.Visibility == Visibility.Visible)
......@@ -313,11 +331,11 @@ namespace GetADoc
Properties.Settings.Default.languageSetting = ((bool)ToggleButton.IsOn);
//保存PahtがTrueなら、そのときTextBoxに記載されているPathを保存
if (MyPathCheckbox.IsChecked == true)
{
Properties.Settings.Default.savePathSetting = FolderPathBox.Text;
SavedLabel.Visibility = Visibility.Visible;
}
//if (MyPathCheckbox.IsChecked == true) //2024/12/27 保存Path廃止
//{
// Properties.Settings.Default.savePathSetting = FolderPathBox.Text;
// SavedLabel.Visibility = Visibility.Visible;
//}
Properties.Settings.Default.Save();
......@@ -387,7 +405,7 @@ namespace GetADoc
SepaDocCheckbox.Content = "分割ドキュメント";
FreePageCheckbox.Content = "フリーページ";
//RightClickCheckbox.Content = "右クリックショートカット追加(初回のみ)";
MyPathCheckbox.Content = "保存Path";
//MyPathCheckbox.Content = "保存Path"; //2024/12/27 保存Path廃止
int SelectNum = DocStileBox.SelectedIndex;
DocStileBox.Items.Clear();
......@@ -423,7 +441,7 @@ namespace GetADoc
SepaDocCheckbox.Content = "split document";
FreePageCheckbox.Content = "free page";
//RightClickCheckbox.Content = "add shortcut to right-click menu in Explorer (Just once)";
MyPathCheckbox.Content = "saved path";
//MyPathCheckbox.Content = "saved path"; //2024/12/27 保存Path廃止
int SelectNum = DocStileBox.SelectedIndex;
DocStileBox.Items.Clear();
......
......@@ -23,7 +23,7 @@ namespace GetADoc
}
//バッチファイルの実行
public static void runBatch(bool icon, bool screen, bool sepa, bool free, bool language, string fileName, string filePath, string tempType)
public static void runBatch(bool icon, bool screen, bool sepa, bool free, bool language, bool drawio, string fileName, string filePath, string tempType)
{
......@@ -56,6 +56,16 @@ namespace GetADoc
processStartInfo.Arguments += "/FreePage 0 ";
}
//drawioのコピー有無
if (drawio)
{
processStartInfo.Arguments += "/CopyDrawio 1 ";//コピーする
}
else
{
processStartInfo.Arguments += "/CopyDrawio 0 ";
}
//言語選択
if (language)//ture:En flase:Jp
{
......
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