public MainWindow(EventPSO2 pso)
        {
            InitializeComponent();
            pso.TimeTick+=this.timer_Tick;

            this.messageText.Text = pso.GetCurentEventMessageTxt();
            this.StateChanged+=new EventHandler(MainWindow_StateChanged);
            this.pso = pso;
            this.pso.Quest += new EventHandler(pso_Quest);
        }
        /*
        private string messageTxt;
        /// <summary>
        /// イベント状況のテキスト出力
        /// </summary>
        public string MessageTxt
        {
            get { return messageTxt; }
        }

        private string timeTick;
        /// <summary>
        /// 現在の時間出力
        /// </summary>
        public string TiemTick
        {
            get { return timeTick; }
        }*/
        public NotifyIconWrapper(App app)
        {
            InitializeComponent();

            this.app = app;

            // タスクトレイ用のアイコンを設定
            System.IO.Stream iconStream = System.Windows.Application.GetResourceStream(new Uri("pack://application:,,,/Resources/img/Icon1.ico",UriKind.RelativeOrAbsolute )).Stream;
            this.notifyIcon1.Icon = new System.Drawing.Icon(iconStream);

            //contextmenustrip内のtextBoxのクリックイベントをハンドルします
            this.EndText.Click+=new EventHandler(EndText_Click);
            this.SettingText.Click+= new EventHandler(SettingText_Click);

            pso = new EventPSO2();
            pso.Quest += Pso2_Event;
            pso.Start();

            win = new MainWindow(pso);
        }