コード例 #1
0
        public void ProcessWindowGridViewCell(int rowIndex, int columnIndex)
        {
            if (rowIndex >= 0)
            {
                Window       window     = GetWindowByIndex(rowIndex);
                WindowDetail detailForm = new WindowDetail(this, window);
                switch (columnIndex)
                {
                // this is delete button, we add delete columns first, then format binding columns
                // so delete button columns index while be 0, even we setting displayIndex is 2
                case 0:
                    CloseWindowDetailForm(window);
                    RemoveWindow(window);
                    break;

                case 1:
                    Form      openedForm    = ExistForm(window);
                    WindowAdd windowAddForm = new WindowAdd(this, window);
                    windowAddForm.ShowDialog();
                    if (openedForm != null)
                    {
                        openedForm.Refresh();
                    }
                    break;

                case 4:
                    window.IsEnable = !window.IsEnable;
                    break;

                default:
                    OpenWindowDetailForm(window, detailForm);
                    break;
                }
            }
        }
コード例 #2
0
        public void ProcessWindowGridViewCell(int rowIndex, int columnIndex)
        {
            if (rowIndex >= 0)
            {
                Window window = GetWindowByIndex(rowIndex);
                WindowDetail detailForm = new WindowDetail(this, window);
                switch (columnIndex)
                {
                    // this is delete button, we add delete columns first, then format binding columns
                    // so delete button columns index while be 0, even we setting displayIndex is 2
                    case 0:
                        CloseWindowDetailForm(window);
                        RemoveWindow(window);
                        break;

                    case 1:
                        Form openedForm = ExistForm(window);
                        WindowAdd windowAddForm = new WindowAdd(this, window);
                        windowAddForm.ShowDialog();
                        if(openedForm != null)
                            openedForm.Refresh();
                        break;

                    case 4:
                        window.IsEnable = !window.IsEnable;
                        break;

                    default:
                        OpenWindowDetailForm(window, detailForm);
                        break;
                }
            }
        }