コード例 #1
0
        public frmSalarySchedule_Add()
        {
            InitializeComponent();
            StartPosition = FormStartPosition.CenterParent;


            #region Initialize DirtyHandler

            DirtyStatus = new DirtyFormHandler(this);

            this.AskToSaveOnDirtyClosing();
            this.ConvertEnterToTab();
            Shown += (s, e) =>
            {
                ShowData();
                DirtyStatus.Clear();
            };

            CancelButton = btnCancel;
            btnOk.Click += (s, e) => FileSave();

            #endregion


            InitializeSGGrid();

            InitializePositionGrid();

            tabControl1.SelectedTabChanged += (s, e) =>
            {
                SelectNextControl(e.NewTab.AttachedControl, true, true, true, true);
            };
        }
コード例 #2
0
        public frmContacts_Add()
        {
            InitializeComponent();

            #region Initialize DirtyHandler

            DirtyStatus = new DirtyFormHandler(this);

            this.AskToSaveOnDirtyClosing();
            this.ConvertEnterToTab();
            Load += (s, e) =>
            {
                ShowData();
                DirtyStatus.Clear();
            };

            #endregion


            InputControls.LoadToComboBox(cboCountry, InputControls.Address.GetCountryList().OrderBy(_ => _));
            cboCountry.SelectedIndexChanged += CboCountry_SelectedIndexChanged;

            InputControls.Address.LoadProvinceListTo(cboProvince);
            cboProvince.SelectedIndexChanged += cboProvince_SelectedIndexChanged;


            RecordInfoPanel.Groups[0].ItemAlignment = eItemAlignment.Far;
        }
コード例 #3
0
        public frmDeduction_Add()
        {
            InitializeComponent();

            #region Initialize DirtyHandler

            DirtyStatus = new DirtyFormHandler(this);

            this.AskToSaveOnDirtyClosing();
            this.ConvertEnterToTab();
            Load += (s, e) =>
            {
                ShowData();
                DirtyStatus.Clear();
            };

            CancelButton = btnCancel;
            btnOk.Click += (s, e) => FileSave();

            #endregion
        }