Ejemplo n.º 1
0
        /// <summary>
        /// メニューボタン
        /// </summary>
        private void InvokeScreen(CircleNumButton menuButton)
        {
            var screenId = menuButton.InternalCode;

            if (screenId == null)
            {
                return;
            }

            // メニュー画面を操作不可(画面移動は可)にして機能画面をモードレス表示する。
            // 表示位置とサイズがメニュー画面と一致するよう調整する。
            // 機能画面が閉じられたらメニューを操作可能にする。
            // Ownerになってしまうとメニュー画面最小化時に機能画面も最小化してしまうので、Ownerなしとする。

            var form = ApplicationContext.Create(screenId);

            form.StartPosition = FormStartPosition.Manual;
            form.SetBounds(this.Location.X, this.Location.Y, this.Width, this.Height);
            form.FormClosed += (sender, e) => SetClosing();
            try
            {
                ChangeAllEnabledStatus(this, false);

                form.FormClosed += (_, __) => ChangeAllEnabledStatus(this, true);
                form.Show(this);
            }
            catch
            {
                ChangeAllEnabledStatus(this, true);
                throw;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// ダイアログ画面を表示する。
        /// </summary>
        /// <typeparam name="TModel"></typeparam>
        /// <param name="formName"></param>
        /// <param name="gridLoader"></param>
        /// <param name="width"></param>
        /// <param name="height"></param>
        /// <returns></returns>
        /// <remarks>
        /// VOneScreenBaseから流用。
        /// </remarks>
        private TModel ShowSearchDialog <TModel>(string formName, IGridLoader <TModel> gridLoader, int width = 700, int height = 600)
            where TModel : class
        {
            using (var form = ApplicationContext.Create(nameof(PH9900)))
            {
                var screen = form.GetAll <PH9900>().FirstOrDefault();

                Debug.Assert(screen != null);
                screen.InitializeParentForm(formName, width, height);
                var result = screen.ShowDialog(ParentForm, gridLoader);
                if (result != null)
                {
                    return(result);
                }
            }
            return(default(TModel));
        }
Ejemplo n.º 3
0
        public IHttpActionResult Create(Application objModel)
        {
            var result = _application.Create(objModel);

            return(Ok());
        }