コード例 #1
0
        void openRunMode(string arg)
        {
            var doc = new ControlWindowDocument(_parentNode, _dataModel, true);

            fullScreenWindow         = new Window();
            fullScreenWindow.Content = doc;
            fullScreenWindow.Owner   = this.GetParentByName <Window>(null);
            fullScreenWindow.GoFullscreen();
            fullScreenWindow.Closed += (s, e) => {
                bool cancel = false;
                doc.OnClose(ref cancel);
            };
            fullScreenWindow.ShowDialog();
        }
コード例 #2
0
 /// <summary>
 /// 打开窗口
 /// </summary>
 /// <param name="windowCode">窗口编号</param>
 void open(string windowCode)
 {
     Helper.Remote.Invoke <ControlWindow>("GetWindowInfo", (win, err) => {
         if (err != null)
         {
             MessageBox.Show(this.GetParentByName <Window>(null), err);
         }
         else
         {
             ControlWindowDocument doc = new ControlWindowDocument(null, win, true);
             doc.Title      = win.Name;
             Window window  = new Window();
             window.Content = doc;
             if (win.windowWidth != null)
             {
                 window.Width = win.windowWidth.Value;
             }
             if (win.windowHeight != null)
             {
                 window.Height = win.windowHeight.Value;
             }
             if (win.windowWidth == null && win.windowHeight == null)
             {
                 window.WindowState = WindowState.Maximized;
             }
             else if (win.windowWidth != null && win.windowHeight != null)
             {
                 window.ResizeMode = ResizeMode.NoResize;
             }
             window.Closed += (s, e) => {
                 bool c = false;
                 doc.OnClose(ref c);
             };
             window.Show();
         }
     }, 0, windowCode);
 }