public StatusBarProxy(IDlc dlc) { StatusBarDlc = dlc as StatusBarDlc; if (StatusBarDlc != null) { StatusBarControl = Reflector.GetInstanceFieldByName(StatusBarDlc, "m_StatusBarControl", ReflectionWays.SystemReflection) as StatusBarControl; } }
//------------------------------------------------------------- // 概要:コマンド作成 //------------------------------------------------------------- private void CreateCommand(Form form, PecaPlayerControl pecaPlayer, StatusBarControl statusBar) { commandMap = new Dictionary <Commands, ShortcutCommand>() { { Commands.None, new ShortcutCommand(new NullCommand(), new CommandArgs()) }, // 処理なし { Commands.VolumeUp, new ShortcutCommand(new VolumeUpCommand(pecaPlayer), new CommandArgs()) }, // 音量UP { Commands.VolumeDown, new ShortcutCommand(new VolumeDownCommand(pecaPlayer), new CommandArgs()) }, // 音量DOWN { Commands.VolumeBalanceLeft, new ShortcutCommand(new VolumeBalanceCommand(pecaPlayer), new VolumeBalanceCommandArgs(VolumeBalanceCommandArgs.BalanceLeft)) }, // 音量バランス:左 { Commands.VolumeBalanceMiddle, new ShortcutCommand(new VolumeBalanceCommand(pecaPlayer), new VolumeBalanceCommandArgs(VolumeBalanceCommandArgs.BalanceMiddle)) }, // 音量バランス:中央 { Commands.VolumeBalanceRight, new ShortcutCommand(new VolumeBalanceCommand(pecaPlayer), new VolumeBalanceCommandArgs(VolumeBalanceCommandArgs.BalanceRight)) }, // 音量バランス:右 { Commands.Mute, new ShortcutCommand(new MuteCommand(pecaPlayer), new CommandArgs()) }, // ミュート切替 { Commands.WindowMinimize, new ShortcutCommand(new WindowMinimize(form), new CommandArgs()) }, // ウィンドウを最小化 { Commands.WindowMaximize, new ShortcutCommand(new WindowMaximize(form), new CommandArgs()) }, // ウィンドウを最大化 { Commands.MiniMute, new ShortcutCommand(new MiniMuteCommand(form, pecaPlayer), new CommandArgs()) }, // 最小化ミュート { Commands.Close, new ShortcutCommand(new CloseCommand(form, pecaPlayer), new CommandArgs()) }, // 閉じる { Commands.VisibleStatusBar, new ShortcutCommand(new VisibleStatusBarCommand(form, statusBar), new CommandArgs()) }, // ステータスバーの表示切り替え { Commands.OpenPeerstViewer, new ShortcutCommand(new OpenPeerstViewerCommand(statusBar), new CommandArgs()) }, // PeerstViewerを開く { Commands.UpdateChannelInfo, new ShortcutCommand(new UpdateChannelInfoCommand(pecaPlayer), new CommandArgs()) }, // チャンネル情報更新 //{ Commands.ShowNewRes, new ShortcutCommand(new ShowNewResCommand(form, statusBar), new CommandArgs()) }, // 新着レス表示 { Commands.TopMost, new ShortcutCommand(new TopMostCommand(form), new CommandArgs()) }, // 最前列表示切り替え { Commands.WindowSizeUp, new ShortcutCommand(new WindowSizeUpCommand(form, pecaPlayer), new CommandArgs()) }, // ウィンドウサイズUP { Commands.WindowSizeDown, new ShortcutCommand(new WindowSizeDownCommand(form, pecaPlayer), new CommandArgs()) }, // ウィンドウサイズDOWN { Commands.DisconnectRelay, new ShortcutCommand(new DisconnectRelayCommand(form, pecaPlayer), new CommandArgs()) }, // リレー切断 { Commands.Bump, new ShortcutCommand(new BumpCommand(pecaPlayer), new CommandArgs()) }, // Bump { Commands.RetryPlayer, new ShortcutCommand(new RetryPlayerCommand(pecaPlayer), new CommandArgs()) }, // 再接続(プレイヤー) { Commands.WmpMenu, new ShortcutCommand(new WmpMenuCommand(pecaPlayer), new CommandArgs()) }, // WMPメニュー表示 { Commands.FitMovieSize, new ShortcutCommand(new FitMovieSizeCommand(form, pecaPlayer), new CommandArgs()) }, // 黒枠を消す { Commands.WindowSize160x120, new ShortcutCommand(new WindowSizeCommand(form, pecaPlayer), new WindowSizeCommandArgs(160, 120)) }, // ウィンドウサイズ指定 { Commands.WindowSize320x240, new ShortcutCommand(new WindowSizeCommand(form, pecaPlayer), new WindowSizeCommandArgs(320, 240)) }, // ウィンドウサイズ指定 { Commands.WindowSize480x360, new ShortcutCommand(new WindowSizeCommand(form, pecaPlayer), new WindowSizeCommandArgs(480, 360)) }, // ウィンドウサイズ指定 { Commands.WindowSize640x480, new ShortcutCommand(new WindowSizeCommand(form, pecaPlayer), new WindowSizeCommandArgs(640, 480)) }, // ウィンドウサイズ指定 { Commands.WindowSize800x600, new ShortcutCommand(new WindowSizeCommand(form, pecaPlayer), new WindowSizeCommandArgs(800, 600)) }, // ウィンドウサイズ指定 { Commands.WindowScale25Per, new ShortcutCommand(new WindowScaleCommand(form, pecaPlayer), new WindowScaleCommandArgs(0.25f)) }, // ウィンドウサイズ拡大率指定 { Commands.WindowScale50Per, new ShortcutCommand(new WindowScaleCommand(form, pecaPlayer), new WindowScaleCommandArgs(0.5f)) }, // ウィンドウサイズ拡大率指定 { Commands.WindowScale75Per, new ShortcutCommand(new WindowScaleCommand(form, pecaPlayer), new WindowScaleCommandArgs(0.75f)) }, // ウィンドウサイズ拡大率指定 { Commands.WindowScale100Per, new ShortcutCommand(new WindowScaleCommand(form, pecaPlayer), new WindowScaleCommandArgs(1.0f)) }, // ウィンドウサイズ拡大率指定 { Commands.WindowScale150Per, new ShortcutCommand(new WindowScaleCommand(form, pecaPlayer), new WindowScaleCommandArgs(1.5f)) }, // ウィンドウサイズ拡大率指定 { Commands.WindowScale200Per, new ShortcutCommand(new WindowScaleCommand(form, pecaPlayer), new WindowScaleCommandArgs(2.0f)) }, // ウィンドウサイズ拡大率指定 { Commands.ScreenSplitWidthx5, new ShortcutCommand(new ScreenSplitCommand(form, pecaPlayer), new ScreenSplitCommandArgs(5, -1)) }, // 画面分割 { Commands.ScreenSplitWidthx4, new ShortcutCommand(new ScreenSplitCommand(form, pecaPlayer), new ScreenSplitCommandArgs(4, -1)) }, // 画面分割 { Commands.ScreenSplitWidthx3, new ShortcutCommand(new ScreenSplitCommand(form, pecaPlayer), new ScreenSplitCommandArgs(3, -1)) }, // 画面分割 { Commands.ScreenSplitWidthx2, new ShortcutCommand(new ScreenSplitCommand(form, pecaPlayer), new ScreenSplitCommandArgs(2, -1)) }, // 画面分割 { Commands.ScreenSplitWidthx1, new ShortcutCommand(new ScreenSplitCommand(form, pecaPlayer), new ScreenSplitCommandArgs(1, -1)) }, // 画面分割 { Commands.ScreenSplitHeightx5, new ShortcutCommand(new ScreenSplitCommand(form, pecaPlayer), new ScreenSplitCommandArgs(-1, 5)) }, // 画面分割 { Commands.ScreenSplitHeightx4, new ShortcutCommand(new ScreenSplitCommand(form, pecaPlayer), new ScreenSplitCommandArgs(-1, 4)) }, // 画面分割 { Commands.ScreenSplitHeightx3, new ShortcutCommand(new ScreenSplitCommand(form, pecaPlayer), new ScreenSplitCommandArgs(-1, 3)) }, // 画面分割 { Commands.ScreenSplitHeightx2, new ShortcutCommand(new ScreenSplitCommand(form, pecaPlayer), new ScreenSplitCommandArgs(-1, 2)) }, // 画面分割 { Commands.ScreenSplitHeightx1, new ShortcutCommand(new ScreenSplitCommand(form, pecaPlayer), new ScreenSplitCommandArgs(-1, 1)) }, // 画面分割 { Commands.Screenshot, new ShortcutCommand(new ScreenshotCommand(pecaPlayer), new CommandArgs()) }, // スクリーンショット { Commands.OpenScreenshotFolder, new ShortcutCommand(new OpenScreenshotFolderCommand(), new CommandArgs()) }, // スクリーンショットフォルダを開く }; }
public ViewForm() { editor = new StandardEditor(Settings.Get <EditorSettings>()); statusBar = new StatusBarControl(editor); commandBar = new CommandBarControl(editor); header = new HeaderControl(editor); Initialize(); if (!ReadState()) { Width = 800 * Dpi.GetWidth(1); Height = 600 * Dpi.GetWidth(1); } }
private void Initialize() { ReadState(); ed = new EditorControl { Dock = DockStyle.Fill }; commandBar = new CommandBarControl(ed) { Dock = DockStyle.Top }; ed.LeftMargins.Add(new LineNumberMargin(ed) { MarkCurrentLine = true }); ed.LeftMargins.Add(new FoldingMargin(ed)); ed.RightMargins.Add(new VerticalScrollBarMargin(ed)); ed.BottomMargins.Add(new ScrollBarMargin(ed, Orientation.Horizontal)); ed.TopMargins.Add(new TopMargin(ed)); var statusBar = new StatusBarControl(ed) { Dock = DockStyle.Bottom }; statusBar.Tiles.Add(new HelpTile()); statusBar.Tiles.Add(new ModeTile(ed)); statusBar.Tiles.Add(new EolTile(ed)); statusBar.Tiles.Add(new EncodingTile(ed)); //statusBar.Tiles.Add(new OutputToggleTile(this)); statusBar.Tiles.Add(new PosTile(ed)); //statusBar.Tiles.Add(new ErrorsTile(ed)); statusBar.Tiles.Add(new OvrTile(ed)); statusBar.Tiles.Add(new WrapTile()); splitContainer.Panel1.Controls.Add(ed); splitContainer.Panel1.Controls.Add(commandBar); splitContainer.Panel1.Controls.Add(statusBar); //statusBar.BringToFront(); ed.Paint += (o, e) => { statusBar.Invalidate(); commandBar.Invalidate(); }; }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// relation ontent. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { TVInputSettings.SetDefaults(); // This control is purely here to capture focus and prevent it slipping out and on to the menu. Control.FromHandle(Window.Handle).Controls.Add(new TextBox() { Top = -100 }); statusBarControl = new StatusBarControl(this); menuControl = new MenuControl(this); menuControl.PopulateLanguages(); DrawColors.Initialize(menuControl); Localize(statusBarControl); Localize(menuControl); drawWorldTiles = new DrawWorldTiles(); drawScaleRuler = new DrawScaleRuler(); DrawArea = new DrawArea(drawScaleRuler); drawAreaInset = new ShadowDrawArea(null); drawAreaInset.StrictChecking = true; fontManager = FontManager.Instance; setSubwindowSizes(); this.IsMouseVisible = true; // install folder if (String.IsNullOrEmpty(Properties.Settings.Default.installDirectory)) { try { Properties.Settings.Default.installDirectory = MSTS.MSTSPath.Base(); } catch {} } InstallFolder = new Folder("default", Properties.Settings.Default.installDirectory); findRoutes(InstallFolder); drawPathChart = new DrawPathChart(); base.Initialize(); }
//------------------------------------------------------------- // 概要:初期化 //------------------------------------------------------------- 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(); } }
/// <summary> /// 初期化 /// </summary> public static void Init(StatusBarControl statusBar) { ToastMessage.statusBar = statusBar; }
private void TiaForm_Load(object sender, EventArgs e) { StatusBarControl = new StatusBarControl(TiaStarter.m_ViewApplicationContext); Controls.Add(StatusBarControl); SizeChanged += TiaForm_SizeChanged; }
public ShowNewResCommand(Form form, StatusBarControl statusBar) { this.form = form; this.statusBar = statusBar; }
public OutOfOfficeControl(StatusBarControl statusBarControl) { _statusBarControl = statusBarControl; logger = OSvCLogService.GetLog(); InitializeComponent(); }
public VisibleStatusBarCommand(Form form, StatusBarControl statusBar) { this.form = form; this.statusBar = statusBar; }
public OpenPeerstViewerCommand(StatusBarControl statusBar) { this.statusBar = statusBar; }
/// <summary> /// 初期化 /// </summary> public static void Init(StatusBarControl statusBar) { ToastMessage.statusBar = statusBar; }