Skip to content

Commit

Permalink
release v1.0.0-launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
tsukumijima committed Aug 13, 2020
1 parent 4e54beb commit acea5da
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 19 deletions.
4 changes: 2 additions & 2 deletions App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.Cyan.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.LightGreen.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Lime.xaml" />
<!--Material Design: MahApps統合設定 -->
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.MahApps;component/Themes/MaterialDesignTheme.MahApps.Defaults.xaml"/>
<!-- Dragablz Material Design -->
Expand Down Expand Up @@ -52,7 +52,7 @@
</Setter.Value>
</Setter>
</Style>
<Style TargetType="Button">
<Style TargetType="Button">
</Style>
</ResourceDictionary>
</Application.Resources>
Expand Down
18 changes: 9 additions & 9 deletions App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,18 +214,18 @@ public void OnProcessExited(object sender, System.EventArgs e)
$"Exit code : {this.Apache.ExitCode}\n" +
$"Elapsed time : {Math.Round((this.Apache.ExitTime - this.Apache.StartTime).TotalMilliseconds)}");

// エラーダイアログ
var dialog = new TaskDialog();
dialog.Caption = "エラー";
dialog.InstructionText = "サーバー (Apache) が異常終了しました";
dialog.Text = "サーバー (Apache) の設定を開き、ログを確認してください。";
dialog.Icon = TaskDialogStandardIcon.Error;
dialog.StandardButtons = TaskDialogStandardButtons.Ok;
dialog.Show();

// ログを全てのページで見られるように保存
if (this.Log != null && Application.Current != null) // 正常終了時に行わない
{
// エラーダイアログ
var dialog = new TaskDialog();
dialog.Caption = "エラー";
dialog.InstructionText = "サーバー (Apache) が異常終了しました";
dialog.Text = "サーバー (Apache) の設定を開き、ログを確認してください。";
dialog.Icon = TaskDialogStandardIcon.Error;
dialog.StandardButtons = TaskDialogStandardButtons.Ok;
dialog.Show();

this.Log.Add("サーバー (Apache) が異常終了しました。 " +
"終了コード: " + this.Apache.ExitCode + " 終了時刻: " + this.Apache.ExitTime + " " +
"経過時間: " + Math.Round((this.Apache.ExitTime - this.Apache.StartTime).TotalMilliseconds) + "ms");
Expand Down
9 changes: 9 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The MIT License (MIT)

Copyright (c) 2019-2020 tsukumijima

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10 changes: 5 additions & 5 deletions MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<Label Content="サーバーのローカル IP アドレス" Width="300">
<Label.ToolTip>
<TextBlock>
TVRemotePlus をインストールしている PC のローカル IP アドレス<LineBreak />
TVRemotePlus をインストールした PC のローカル IP アドレス<LineBreak />
(通常は 192.168. から始まるアドレス)を指定します。
</TextBlock>
</Label.ToolTip>
Expand All @@ -102,7 +102,7 @@
<Label Content="サーバーの HTTP ポート" Width="300">
<Label.ToolTip>
<TextBlock>
サーバーの HTTP 用のポートを指定します。デフォルトは 8000 です。
サーバーの HTTP 用ポートを指定します。デフォルトは 8000 です。
</TextBlock>
</Label.ToolTip>
</Label>
Expand All @@ -120,7 +120,7 @@
<Label Content="サーバーの HTTPS ポート" Width="300">
<Label.ToolTip>
<TextBlock>
サーバーの HTTPS 用のポートを指定します。デフォルトは 8100 です。<LineBreak />
サーバーの HTTPS 用ポートを指定します。デフォルトは 8100 です。<LineBreak />
TVRemotePlus に HTTPS で アクセスする場合は、別途端末に<LineBreak />
自己署名証明書をインポートしておく必要があります。
</TextBlock>
Expand All @@ -137,9 +137,9 @@
</TextBox>
</StackPanel>
</StackPanel>
<Label Margin="0, 40, 0, 0" VerticalAlignment="Bottom" >
<Label FontSize="16" Margin="0, 40, 0, 0" VerticalAlignment="Bottom" >
<TextBlock>
現時点ではこの画面での設定変更はできません。TVRemotePlus をインストールした<LineBreak />
現時点ではこの画面からの設定変更はできません。TVRemotePlus をインストールした<LineBreak />
 フォルダの bin/Apache/conf/httpd.conf を手動で編集してください。
</TextBlock>
</Label>
Expand Down
2 changes: 1 addition & 1 deletion MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private void CopyClipboard(object sender, RoutedEventArgs e)
}
else
{
// 最後の行は改行なし
// 最後の行は改行をつけない
items += ListBox.SelectedItems[i].ToString();
}
}
Expand Down
2 changes: 1 addition & 1 deletion NotifyIconWrapper.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion NotifyIconWrapper.resx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="contextMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>121, 3</value>
<value>17, 59</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="toolStripMenuItem_Access.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
Expand Down
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

# TVRemotePlus-Launcher

TVRemotePlus を起動するためのランチャーアプリです。C# (WPF) で構築されています。

TVRemotePlus の起動中、サーバー (Apache) のコンソールウインドウがずっとタスクバーに居座ってしまう問題を解消するために開発されました。
起動するとタスクトレイに格納され、Apache はバックグラウンドで実行されます。

## Usage

TVRemotePlus.exe をダブルクリックして起動すると、タスクトレイにアイコンが表示されます。少し時間がかかるかもしれません。
実行には .NET Framework 4.8 以降が必要です。もしインストールしていない場合は Windows Update を実行するか、[こちら](https://www.ipentec.com/document/windows-install-dotnet-framework-48-runtime) を参考にランタイムのインストールを行ってください。

![Screenshot](https://user-images.githubusercontent.com/39271166/90086206-d8a67380-dd54-11ea-8734-7217648429c5.png)

タスクトレイのアイコンを右クリックするとメニューが表示されます。
[TVRemotePlus にアクセス][TVRemotePlus にアクセス (HTTPS)] をクリックすると、TVRemotePlus の Web アプリに遷移します。

![Screenshot](https://user-images.githubusercontent.com/39271166/90086195-d47a5600-dd54-11ea-8f79-25b69ec91885.png)

[サーバー (Apache) の設定] をクリックすると、設定ウインドウが表示されます。

\[設定] タブではサーバーの設定を行えるようにする予定ですが、現時点ではこの画面からの設定変更はできません。
サーバーの設定を編集する場合は TVRemotePlus をインストールしたフォルダの bin/Apache/conf/httpd.conf を手動で編集してください。

![Screenshot](https://user-images.githubusercontent.com/39271166/90086201-d6dcb000-dd54-11ea-9961-de63909c43c3.png)

\[ログ] タブではサーバーの起動ログを閲覧できます。
ログは複数選択でき、右クリックでクリップボードにコピーできます。Apache を起動できなかった / 異常終了したときのログもここに表示されます。

[サーバー (Apache) を終了] をクリックすると、TVRemotePlus を終了できます。
サーバーを終了すると、TVRemotePlus の Web アプリにもアクセスできなくなります。再度アクセスするときはもう一度 TVRemotePlus.exe を実行してください。
スタートアップに TVRemotePlus.exe のショートカットを登録しておくと、PC 起動時に自動で TVRemotePlus サーバーを起動できます。

## License

本体のライセンスに準じます。

[MIT License](LICENSE.txt)

0 comments on commit acea5da

Please sign in to comment.