protected override void initAfterSettings()
        {
            base.initAfterSettings();



            ImplDataReference ref_ = ToolMobile.getEnvironment().getReference(this.Intent.GetStringExtra(ConstCmdLine.cmd)) as ImplDataReference;

            if (ref_ != null)
            {
                reference = ref_;
            }

            getBtnCancel().Click += BtnCancel_Click;
            getBtnOk().Click     += BtnOk_Click;


            getBtnOk().Visibility = showMode ? ViewStates.Invisible : ViewStates.Visible;


            string col_ = Intent.GetStringExtra(TableDUMMY.COLUMN);
            string val_ = Intent.GetStringExtra(TableDUMMY.VALUE);

            if (col_ != null && !string.IsNullOrEmpty(val_))
            {
                setValue(val_);
            }
        }
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            //helper = null;
            reference = null;
            //   source = null;
            // extender = null;
            //  topMessanger = null;
            _table = null;

            getBtnCancel().Click -= BtnCancel_Click;
            getBtnOk().Click     -= BtnOk_Click;
        }
Ejemplo n.º 3
0
        void MobDataReferenceGridFormBase_Closed(object sender, EventArgs e)
        {
            reference = null;

            extender = null;
            if (topMessanger != null)
            {
                topMessanger.Dispose();
            }
            topMessanger = null;
            formEditor   = null;
            menuItems    = null;
            stateHelper  = null;
        }
Ejemplo n.º 4
0
        protected override void initAfterSettings()
        {
            base.initAfterSettings();



            getGrid().isSortEnabled = true;
            getGrid().userDesc      = "Main Grid";
            //
            topMessanger = new UserMessangerParentControlText(this);

            //check take from referense

            ImplDataReference ref_ = ToolMobile.getEnvironment().getReference(this.Intent.GetStringExtra(ConstCmdLine.cmd)) as ImplDataReference;

            if (ref_ != null)
            {
                this.setSource(ref_.getPagedSource());

                reference = ref_;

                if (reference.getReferenceMode() != null && reference.getReferenceMode().batchModeIndexes != null)
                {
                    string[] indx_ = reference.getReferenceMode().batchModeIndexes;
                    if (indx_.Length > 0 && !string.IsNullOrEmpty(indx_[0]))
                    {
                        getBtnOk().Text = indx_[0];
                    }
                }
            }

            getBtnCancel().Click += BtnCancel_Click;
            getBtnOk().Click     += BtnOk_Click;

            getBtnClean().Click  += BtnClean_Click;
            getBtnSearch().Click += BtnSearch_Click;


            getBtnAdd().Click += BtnAdd_Click;



            //////////////////////////////



            getBtnOk().Visible  = !showMode;
            getBtnAdd().Visible = canAdd();

            try
            {
                stopRefreshOnFilterChanged = true;
                getGrid().beginDataLoad();

                loadFilterStruct();
                loadFilterData();

                refresh();

                loadRecordId();
            }
            finally
            {
                stopRefreshOnFilterChanged = false;
                getGrid().endDataLoad();
            }


            getGrid().RowClick     += MobDataReferenceGridFormBase_RowClick;
            getGrid().RowLongClick += MobDataReferenceGridFormBase_RowLongClick;
            getGrid().RowSelected  += MobDataReferenceGridFormBase_RowSelected;
            //

            //
            RegisterForContextMenu(getGrid()); //before adapter
            getBtnMenu().Click += MobDataReferenceGridFormBase_Click;

            //
            string col_ = Intent.GetStringExtra(TableDUMMY.COLUMN);
            string val_ = Intent.GetStringExtra(TableDUMMY.VALUE);

            if (col_ != null && !string.IsNullOrEmpty(val_))
            {
                this.extender.requiredSortedData(col_, true);
                this.extender.searchData(val_);
            }


            getQuiqFilterPanel().Visible = (getQuiqFilterColumn(null) != null);

            getQuiqFilterText().KeyPress += QuiqFilterText_KeyPress;
        }