private void MenuItemReloadSettings_Click(object sender, RoutedEventArgs e) { Setting.Load(); GetTitleColor(); if (pw != null) { pw.ApplySettings(); } }
public MainWindow() { SynSocketListener.mw = this; Session.New("", "", ""); Setting.Load(); GetTitleColor(); InitializeComponent(); WindowMainWindow.Title = "TextPresenter51456 (Beta) - " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); }
public PresenterWindow(MainWindow mw) { double dpiX = PresentationSource.FromVisual(Application.Current.MainWindow).CompositionTarget.TransformToDevice.M11; double dpiY = PresentationSource.FromVisual(Application.Current.MainWindow).CompositionTarget.TransformToDevice.M22; this.mw = mw; Setting.Load(); ContentRendered += PresenterWindow_ContentRendered; // single monitor warning if (sc.Length < 2) { MessageBox.Show("화면 표시 장치가 하나입니다. 이 경우 별도의 설정이 없으면 화면을 모두 덮는 창이 나타나며, Shift+ESC로 닫을 수 있습니다.", "TextPresenter51456"); } // load and apply presenterScreen property if (!int.TryParse(Setting.GetAttribute("presenterScreen"), out presenterScreen)) { presenterScreen = sc.Length; } if (presenterScreen > sc.Length) { presenterScreen = sc.Length; } // specify the position and the size of PresenterWindow // default: top-left of last monitor on fullscreen System.Drawing.Rectangle r = sc[presenterScreen - 1].Bounds; Left = r.Left / dpiX; Top = r.Top / dpiY; Width = r.Width / dpiX; Height = r.Height / dpiY; InitializeComponent(); ApplySettings(); }