} // end sub

        private void TextFormatButton_Click(object sender, RoutedEventArgs e)
        {
            System.Threading.Thread.CurrentThread.CurrentUICulture = this.uiCulture;

            var c = new Net.Surviveplus.EditorPlus.UI.TextFormat()
            {
                Executable = this.executable
            };

            // ボタンが押されたら、Text プロパティを表示してみます。
            c.Executed += (s2, e2) =>
            {
                var c2 = s2 as TextFormat;
                //MessageBox.Show(c2.Text);
            };

            // メインウィンドウの Executable ボタンと連動して、ボタンの有効・無効を切り替えます。
            this.ExecutableChanged += (s2, e2) =>
            {
                c.Executable = this.executable;
            };

            var w = new ToolWindow()
            {
                Title = "Text Format", Content = c
            };

            this.UpdateResoures(w);
            toolWindows.Add(w);
            w.Show();
        } // end sub
        private void InsertSerialNumberButton_Click(object sender, RoutedEventArgs e)
        {
            System.Threading.Thread.CurrentThread.CurrentUICulture = this.uiCulture;

            var c = new Net.Surviveplus.EditorPlus.UI.InsertSerialNumber()
            {
                Executable = this.executable
            };

            // ボタンが押されたら、Text プロパティを表示してみます。
            c.Executed += (s2, e2) =>
            {
                MessageBox.Show("挿入:" + e2.InsertPosition.ToString() + " / スキップ:" + e2.Skip.ToString() + " / 埋め:" + e2.PaddingKind.ToString() + "\r\n" + "\r\n" + e2.StartNumberText);
            };

            // メインウィンドウの Executable ボタンと連動して、ボタンの有効・無効を切り替えます。
            this.ExecutableChanged += (s2, e2) =>
            {
                c.Executable = this.executable;
            };

            var w = new ToolWindow()
            {
                Title = "Insert Serial Number", Content = c
            };

            this.UpdateResoures(w);
            toolWindows.Add(w);
            w.Show();
        }
        } // end sub

        private void AboutButton_Click(object sender, RoutedEventArgs e)
        {
            System.Threading.Thread.CurrentThread.CurrentUICulture = this.uiCulture;

            var c = new Net.Surviveplus.EditorPlus.UI.About();

            var w = new ToolWindow()
            {
                Title = "About", Content = c
            };

            toolWindows.Add(w);
            w.Show();
        } // end sub
        } // end sub

        private void InsertTextButton_Click(object sender, RoutedEventArgs e)
        {
            System.Threading.Thread.CurrentThread.CurrentUICulture = this.uiCulture;

            var c = new Net.Surviveplus.EditorPlus.UI.InsertText()
            {
                Executable = this.executable
            };

            // ボタンが押されたら、Text プロパティを表示してみます。
            c.InsertToHeadExecuted += (s2, e2) =>
            {
                var c2 = s2 as InsertText;
                //MessageBox.Show("行頭挿入 / スキップ:" + c2.Skip.ToString() + "\r\n" + "\r\n" + c2.Text);
            };

            // ボタンが押されたら、Text プロパティを表示してみます。
            c.InsertToEndExecuted += (s2, e2) =>
            {
                var c2 = s2 as InsertText;
                //MessageBox.Show("行末挿入  / スキップ:" + c2.Skip.ToString() + "\r\n" + "\r\n" + c2.Text);
            };

            // メインウィンドウの Executable ボタンと連動して、ボタンの有効・無効を切り替えます。
            this.ExecutableChanged += (s2, e2) =>
            {
                c.Executable = this.executable;
            };

            var w = new ToolWindow()
            {
                Title = "Insert Text", Content = c
            };

            this.UpdateResoures(w);
            toolWindows.Add(w);
            w.Show();
        }