Ejemplo n.º 1
0
        internal CommitDialog(
            WindowOwner owner,
            Func <
                CommitDialog,
                BranchName,
                IEnumerable <CommitFile>,
                string,
                bool,
                CommitDialogViewModel> CommitDialogViewModelProvider,
            BranchName branchName,

            IEnumerable <CommitFile> files,
            string commitMessage,
            bool isMerging)
        {
            Owner = owner;
            InitializeComponent();
            viewModel = CommitDialogViewModelProvider(
                this,
                branchName,
                files,
                commitMessage,
                isMerging);

            DataContext = viewModel;

            if (string.IsNullOrWhiteSpace(viewModel.Subject))
            {
                SubjectText.Focus();
            }
            else
            {
                DescriptionText.Focus();
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            EmpDS.SelectCommand = "SELECT [Name], [EmpNo] FROM " + Tables.tblEmployees + " ORDER BY Name ASC";

            SubjectText.Focus();

            UpdateButton.ValidationGroup = Owner.ValidationGroup;
            UpdateButton.CommandName     = Mode == AdvancedFormMode.Edit ? "Update" : "Insert";

            if (Owner.AdvancedForm.EnableTimeZonesEditing)
            {
                PopulateTimeZonesDropDown();
            }
            else
            {
                TimeZonesDropDown.Visible = false;
            }

            if (!Owner.Reminders.Enabled)
            {
                ReminderDropDown.Visible = false;
            }

            InitializeStrings();
            InitializeRecurrenceEditor();

            if (!FormInitialized)
            {
                UpdateResetExceptionsVisibility();
            }
        }