コード例 #1
0
        public void ShowPopup(System.Windows.Forms.Form owner, System.Drawing.Rectangle pos, string caption, bool daikubun, bool showUsableOnly, bool embedded)
        {
            if (popup != null)
            {
                popup.Close();
                popup = null;
            }

            if (daikubun)
            {
                popup = new views.popup.YosanKamokuDaikubunPopup();
            }
            else
            {
                popup = new views.popup.YosanKamokuKubunPopup();
            }

            popup.FormClosed += delegate(object sender, System.Windows.Forms.FormClosedEventArgs e) {
                popup          = null;
                gridController = null;
            };

            if (popup is views.popup.YosanKamokuDaikubunPopup)
            {
                grid = (popup as views.popup.YosanKamokuDaikubunPopup).Grid as views.grid.PanelGrid <RowType>;
            }
            else if (popup is views.popup.YosanKamokuKubunPopup)
            {
                grid = (popup as views.popup.YosanKamokuKubunPopup).Grid as views.grid.PanelGrid <RowType>;
            }

            bufferedTable            = new models.db.vtables.BufferedYosanKamokuKubun(Context.KaikeiDatabase);
            bufferedTable.UsableOnly = showUsableOnly;

            gridController = new grid.DBPanelGridController <RowType>(grid, false);
            gridController.SetTable(bufferedTable);
            gridController.RowUpdated         += (row) => ChangeSumAmount();
            gridController.Row_GotFocusAction += (row) => RowSelectionChanged();

            //popup.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            //popup.Parent = owner;
            popup.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
            popup.Location      = pos.Location;
            popup.Size          = pos.Size;
            popup.Text          = caption;

            popup.Show(owner);

            stickyWindowController = new misc.StickyWindowController(owner, popup);
        }
コード例 #2
0
        public void ShowPopup(System.Windows.Forms.Form owner, System.Drawing.Point location)
        {
            if (popup != null)
            {
                popup.Close();
                popup = null;
            }

            popup              = new views.popup.YosanYobihiPopup();
            popup.PopupClosed += delegate() {
                popup   = null;
                rowData = null;
            };
            popup.Row.Column_UpdateValueAction += Column_UpdateValue;
            popup.Row.CheckDataButtonClicked   += (s, e) => CheckDataButtonClicked(s, e);

            popup.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
            popup.Location      = location;

            popup.Show(owner);

            stickyWindowController = new misc.StickyWindowController(owner, popup);
        }