SetTitle() 공개 메소드

public SetTitle ( string titleText ) : void
titleText string
리턴 void
예제 #1
0
        private void propertiesMenu_Click(object sender, EventArgs e)
        {
            if (controller.CanChangeCourseProperties()) {
                // Initialize the dialog
                AddCourse addCourseDialog = new AddCourse();
                InitializeCoursePropertiesDialogWithCurrentValues(addCourseDialog);
                addCourseDialog.SetTitle(MiscText.CoursePropertiesTitle);
                addCourseDialog.HelpTopic = "CourseProperties.htm";

                // Display the dialog
                DialogResult result = addCourseDialog.ShowDialog();

                // If the dialog completed successfully, then change the course.
                if (result == DialogResult.OK) {
                    controller.ChangeCurrentCourseProperties(addCourseDialog.CourseKind, addCourseDialog.CourseName, addCourseDialog.ControlLabelKind, addCourseDialog.ScoreColumn, addCourseDialog.SecondaryTitle,
                        addCourseDialog.PrintScale, addCourseDialog.Climb, addCourseDialog.Length, addCourseDialog.DescKind, addCourseDialog.FirstControlOrdinal);
                }
            }
            else {
                // Change properties of all controls.
                float printScale;
                DescriptionKind descKind;
                controller.GetAllControlsProperties(out printScale, out descKind);

                // Initialize the dialog
                AllControlsProperties allControlsDialog = new AllControlsProperties();
                allControlsDialog.InitializePrintScales(controller.MapScale);
                allControlsDialog.PrintScale = printScale;
                allControlsDialog.DescKind = descKind;

                // Display the dialog
                DialogResult result = allControlsDialog.ShowDialog();

                // If the dialog completed successfully, then change the course.
                if (result == DialogResult.OK) {
                    controller.ChangeAllControlsProperties(allControlsDialog.PrintScale, allControlsDialog.DescKind);
                }
            }
        }
예제 #2
0
        private void duplicateCourseMenu_Click(object sender, EventArgs e)
        {
            if (controller.CanDuplicateCurrentCourse()) {
                // Initialize the dialog
                AddCourse addCourseDialog = new AddCourse();
                InitializeCoursePropertiesDialogWithCurrentValues(addCourseDialog);
                addCourseDialog.SetTitle(MiscText.DuplicateCourseTitle);
                addCourseDialog.HelpTopic = "CourseDuplicate.htm";
                addCourseDialog.CourseName = "";
                addCourseDialog.CanChangeCourseKind = false;

                // Display the dialog
                DialogResult result = addCourseDialog.ShowDialog();

                // If the dialog completed successfully, then add the course.
                if (result == DialogResult.OK) {
                    controller.DuplicateCurrentCourse(addCourseDialog.CourseName, addCourseDialog.ControlLabelKind, addCourseDialog.ScoreColumn, addCourseDialog.SecondaryTitle,
                                                      addCourseDialog.PrintScale, addCourseDialog.Climb, addCourseDialog.Length, addCourseDialog.DescKind, addCourseDialog.FirstControlOrdinal);
                }

            }
        }