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;
                }
            }
        }
Example #2
0
        //新增軟體button click事件
        private void ClickAddButton(object sender, EventArgs e)
        {
            WindowAdd modeAddForm = new WindowAdd(_presentationModel);

            _presentationModel.ProcessAddForm(modeAddForm);
        }
 //新增軟體button click事件
 private void ClickAddButton(object sender, EventArgs e)
 {
     WindowAdd modeAddForm = new WindowAdd(_presentationModel);
     _presentationModel.ProcessAddForm(modeAddForm);
 }
 public void ProcessAddForm(WindowAdd windowAddForm)
 {
     windowAddForm.ShowDialog();
 }
 public void ProcessAddForm(WindowAdd windowAddForm)
 {
     windowAddForm.ShowDialog();
 }