Inheritance: PeerstLib.Controls.Glow.GlowForm
示例#1
0
		static void Main()
		{
			Logger.Instance.Info("START:PeerstPlayer");
	
			Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);

			// プロトコル違反しているPeerCastに対応
			WebUtil.SettingDisableResponseError();

			// メインスレッドの未処理例外
			Application.ThreadException += (sender, e) => Logger.Instance.Fatal(e.Exception);

			// メインスレッド以外の未処理例外
			Thread.GetDomain().UnhandledException += (sender, e) => Logger.Instance.Fatal(e.ExceptionObject as Exception);

			PlayerView playerView = new PlayerView();
			Application.Run(playerView);

			Logger.Instance.Info("END:PeerstPlayer");
		}
示例#2
0
		//-------------------------------------------------------------
		// 概要:初期化
		//-------------------------------------------------------------
		public void Init(PlayerView playerView, PecaPlayerControl pecaPlayer, StatusBarControl statusBar)
		{
			// コマンド作成
			CreateCommand(playerView, pecaPlayer, statusBar);

			// ショートカット設定の読み込み
			try
			{
				settings = SettingSerializer.LoadSettings<ShortcutSettings>("ShortcutSettings.xml");
			}
			catch
			{
				Logger.Instance.Error("ショートカット設定ファイルの読み込みに失敗したため、デフォルト設定を読み込みます。");
				LoadDefaultSettings();
			}

			// 設定ファイルが壊れている場合
			if ((settings.EventMap == null) || (settings.GestureMap == null) || (settings.KeyMap == null))
			{
				Logger.Instance.Error("ショートカット設定ファイルが壊れているため、デフォルト設定を読み込みます。");
				LoadDefaultSettings();
			}
		}