private void InitMenu()
        {
            mAr = new ArrayList();
            menu_item m;

            m   = new menu_item();
            m.m = new MenuItem("Customer Price", new EventHandler(this.MenuHandler));
            m.s = "Customer Price = " + mPrice.ToString("C");
            mAr.Add(m);

            m   = new menu_item();
            m.m = new MenuItem("Tools Needed", new EventHandler(this.MenuHandler));
            m.s = "Suggested Tools = " + mToolsNeeded;
            mAr.Add(m);

            for (int k = 0; k < mPartsCount; k++)
            {
                m   = new menu_item();
                m.m = new MenuItem("Item #" + k.ToString(), new EventHandler(this.MenuHandler));
                mAr.Add(m);
            }

            mAr.TrimToSize();
        }
        private void treeListView1_NodeCheckedEvent(object sender, TreeNodeCheckEventArgs e)
        {
            try
            {
                treeListView1.Enabled = false;
                if (e.CheckedNode.Tag != null)
                {
                    _helper_menu       = e.CheckedNode.Tag as SdaHelperManager.menu_item;
                    sdata.CURRENT_MENU = null;
                    if (mform != null)
                    {
                        mform.Hide();
                        mform = null;
                    }
                    if (_helper_menu != null && _helper_menu.FormObject != null && _helper_menu.FormObject.IsDisposed)
                    {
                        _helper_menu.FormObject = null;
                    }
                    Application.DoEvents();
                    if (_helper_menu.FormObject == null)
                    {
                        #region  Has Inner Form Object
                        switch ((em.fm)_helper_menu.m_id)
                        {
                        case em.fm.change_password:
                        {
                            mform = new ChangePwd();
                            break;
                        }

                        case em.fm.enter_offering:
                        {
                            mform = new OfferingManager();
                            break;
                        }

                        case em.fm.membershi:
                        {
                            mform = new MemberManager();
                            break;
                        }

                        case em.fm.group_policy:
                        {
                            mform = new group_policy();
                            break;
                        }

                        case em.fm.church_groups:
                        {
                            mform = new ChurchGroupManager2();
                            break;
                        }

                        case em.fm.view_church_members:
                        {
                            mform = new MemberViewerManager();
                            break;
                        }

                        case em.fm.log_off:
                        {
                            if (!dbm.WarningMessage("Are You Sure You Want To Log Off", "Log Off Warning"))
                            {
                                treeListView1.Enabled = true;
                                treeListView1.Focus();
                                return;
                            }
                            Application.DoEvents();
                            Application.DoEvents();
                            treeListView1.Nodes.Clear();
                            treeListView1.Columns.Clear();
                            treeListView1.Visible = false;
                            sdata.ClearFormCache(null);
                            sdata.PCU          = null;
                            sdata.CURRENT_MENU = null;
                            LGM();
                            datam.FillPcUserDetails();
                            break;
                        }

                        case em.fm.analyze_offering:
                        {
                            //mform = new OfferingSabAnalysis();
                            mform = new OffAnalysis();
                            break;
                        }

                        case em.fm.sabbath_cash_statement:
                        {
                            mform = new OfferingSabAnalysis();
                            break;
                        }

                        case em.fm.analyze_offering_weekly:
                        {
                            mform = new OfferingMonthAnalysis(); break;
                        }
                        //case em.fm.analyze_offering_range:
                        //    {

                        //        mform = new OffertoryRangeAnalysisA(); break;
                        //    }
                        case em.fm.banking_section:
                        {
                            mform = new BankingManager();
                            break;
                        }

                        case em.fm.deparments_manager:
                        {
                            mform = new DepartmentManager2();
                            break;
                        }

                        case em.fm.cash_account:
                        {
                            mform = new CashAccountManager();
                            break;
                        }

                        case em.fm.sms_mananger:
                        {
                            mform = new sms.SmsManager(); break;
                        }

                        case em.fm.chart_of_accounts:
                        {
                            mform = new COAccounts(); break;
                        }

                        case em.fm.incomes_manager:
                        {
                            mform = new OfferingManager(); break;
                        }

                        case em.fm.quarter_cash:
                        {
                            mform = new OfferingYearAnalysis(); break;
                        }

                        case em.fm.expenses_manager:
                        {
                            mform = new DailyExpensesManager(); break;
                        }

                        case em.fm.pledges_manager:
                        {
                            mform = new Pledge.PledgesManagerB(); break;
                        }

                        case em.fm.creditors:
                        {
                            mform = new CreditorsManager(); break;
                        }

                        case em.fm.member_statistics:
                        {
                            mform = new MemberStatistics(); break;
                        }

                        case em.fm.church_sub_units:
                        {
                            mform = new ChurchSubUnits(); break;
                        }

                        case em.fm.expense_account_settings:
                        {
                            mform = new ExpensesManager();
                            break;
                        }

                        case em.fm.view_accounts:
                        {
                            mform = new TrialBalanceForm(); break;
                        }

                        case em.fm.income_accounts_settings:
                        {
                            mform = new IncomeAccountsManager(); break;
                        }

                        case em.fm.offering_range_1:
                        {
                            mform = new OffertoryRangeAnalysisA(); break;
                        }

                        case em.fm.foreign_exch_manager:
                        {
                            mform = new ForeignExchangeManager(); break;
                        }

                        case em.fm.pending_cheques:
                        {
                            mform = new PendingChequesManager(); break;
                        }

                        case em.fm.expenses_analysis_year:
                        {
                            mform = new ExpensesYearAnalysis(); break;
                        }

                        case em.fm.accounts_balances_manager:
                        {
                            mform = new ClosingBalance.AcccountsBalancesManager();
                            break;
                        }

                        case em.fm.transfers_manager:
                        {
                            mform = new MonthlyTransferManager();
                            break;
                        }

                        case em.fm.lcb_periodic_statement:
                        {
                            mform = new LCBRangeStatement();
                            break;
                        }

                        case em.fm.bank_reconciliation_manager:
                        {
                            mform = new BankReconcManager();
                            break;
                        }

                        case em.fm.member_activity_analysis:
                        {
                            mform = new OfferingYearMemberActivity();
                            break;
                        }

                        case em.fm.system_default_settings:
                        {
                            mform = new PaymentSettings();
                            break;
                        }
                        }
                        #endregion
                    }
                    else
                    {
                        mform = _helper_menu.FormObject;
                    }
                    if (mform == null)
                    {
                        treeListView1.Enabled = true;
                        treeListView1.Focus();
                        return;
                    }
                    if (_helper_menu.FormObject == null)
                    {
                        _helper_menu.FormObject = mform;
                    }
                    sdata.CURRENT_MENU = _helper_menu;
                    mform.MdiParent    = this;
                    mform.MinimizeBox  = false;
                    mform.MaximizeBox  = false;
                    if (sdata.CURRENT_MENU.f_mode == emm.form_mode.full)
                    {
                        mform.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                        mform.Size            = this.ClientSize;
                        mform.Dock            = DockStyle.Fill;
                    }
                    else
                    {
                        mform.Left         = (this.ClientSize.Width - mform.Width) / 2;
                        mform.FormClosing -= new FormClosingEventHandler(mform_FormClosing);
                        mform.FormClosing += new FormClosingEventHandler(mform_FormClosing);
                    }
                    // this.Text = string.Format("Work Manager-(SPN)-{0}", mform.Text);
                    mform.Show();
                    treeListView1.Enabled = true;
                    treeListView1.Focus();
                }
            }
            catch (System.Exception ex)
            {
                MessageBox.Show(ex.Message);
                treeListView1.Enabled = true;
            }
        }