Пример #1
0
        public static void EventMenu(OrganizerCore core)
        {
            try
            {
                UIMessages.EventMenuMessage();
                UIMessages.PrintSelectMessage();
                byte userChoice = byte.Parse(UserInput.InputUser());

                switch (userChoice)
                {
                    case 0: MainMenu(core); break;
                    case 1: UserInput.InputCategory(core); break;
                    case 2: UserInput.InputNote(core); break;
                    case 3: UserInput.InputProject(core); break;
                    case 4: UserInput.InputTask(core); break;
                    case 5: UserInput.InputTaskWithReminder(core); break;
                    case 10: break;
                    default: throw new OrganizerException("Invalid Choice!");
                }
            }
            catch (OrganizerException oex)
            {
                Console.WriteLine(oex.Message);
                EventMenu(core);
            }
        }
Пример #2
0
 public static void InputProject(OrganizerCore core)
 {
     string name = NameInput();
     byte priority = PriorityInput();
     byte color = ColorInput();
     string comment = CommentInput();
     
     ObjectCreator.CreateProject(core, name, color, comment, priority);
 }
Пример #3
0
        public static void InputEmail(OrganizerCore core)
        {
            string sendTo = SentToInput();
            string subject = SubjectInput();
            string textBody = TextInput();
            string filePath = FilePathInput();

            ObjectCreator.CreateEmail(core, sendTo, subject, textBody, filePath);
        }
Пример #4
0
        public static void InputCategory(OrganizerCore core)
        {
            string name = NameInput();
            string project = ProjectInput();
            byte color = ColorInput();
            byte priority = PriorityInput();
            string comment = CommentInput();

            ObjectCreator.CreateCategory(core, name, project, color, priority, comment);
        }
Пример #5
0
        public static void InputNote(OrganizerCore core)
        {
            string name = NameInput();
            string text = TextInput();
            string filePath = FilePathInput();
            byte priority = PriorityInput();
            byte color = ColorInput();
            string comment = CommentInput();

            ObjectCreator.CreateNote(core, name, text, color, priority, filePath, comment);
        }
Пример #6
0
        public static void InputTask(OrganizerCore core)
        {
            string name = NameInput();
            string category = CategoryInput();
            byte priority = PriorityInput();
            byte color = ColorInput();
            string location = LocationInput();
            string comment = CommentInput();

            ObjectCreator.CreateTask(core, name, category, color, priority, location, comment);
        }
Пример #7
0
        public static void InputBusiness(OrganizerCore core)
        {
            string name = NameInput();
            string middleName = MiddleNameInput();
            string lastName = LastNameInput();
            string mobileNumber = MobileNumberInput();
            string organization = OrganizationInput();
            string occupation = OccupationInput();
            string email = EmailInput();
            string address = AddressInput();
            string birthdate = BirthDateInput();
            string comment = CommentInput();

            ObjectCreator.CreateBusiness(core, name, mobileNumber, organization, middleName, lastName, birthdate, occupation, address, email);
        }
Пример #8
0
        public static void InputCorporative(OrganizerCore core)
        {
            string name = NameInput();
            string phone = PhoneNumberInput();
            string mobileNumber = MobileNumberInput();
            string email = EmailInput();
            string website = WebSiteInput();
            string address = AddressInput();
            string attFile = FilePathInput();
            string bulstat = BulstatInput();
            string fax = FaxInput();
            string sector = SectorInput();
            string comment = CommentInput();

            ObjectCreator.CreateCorporative(core, name, sector, mobileNumber, phone, fax, bulstat, address, email, website);
        }
Пример #9
0
        public static void InputFriend(OrganizerCore core)
        {
            string name = NameInput();
            string nickname = NicknameInput();
            string middleName = MiddleNameInput();
            string lastName = LastNameInput();
            string mobileNumber = MobileNumberInput();
            string phoneNumber = PhoneNumberInput();
            string occupation = OccupationInput();
            string email = EmailInput();
            string website = WebSiteInput();
            string address = AddressInput();
            string birthdate = BirthDateInput();
            string comment = CommentInput();

            ObjectCreator.CreateFriend(core, name, mobileNumber, middleName, lastName, 
                nickname, birthdate, occupation, address, email, phoneNumber, website);
        }
Пример #10
0
        public static void InputFamilyMember(OrganizerCore core)
        {
            string name = NameInput();
            string middleName = MiddleNameInput();
            string lastName = LastNameInput();
            string mobileNumber = MobileNumberInput();
            string phoneNumber = PhoneNumberInput();
            byte familyMemberType = FamilyMemberTypeInput();
            string egn = EgnInput();
            byte bloodGroup = BloodGroupInput();
            string occupation = OccupationInput();
            string email = EmailInput();
            string website = WebSiteInput();
            string address = AddressInput();
            string birthdate = BirthDateInput();
            string comment = CommentInput();

            ObjectCreator.CreateFamilyMember(core, name, mobileNumber, familyMemberType, bloodGroup, middleName, lastName, birthdate,
                egn, occupation, address, email, phoneNumber, website);
        }
Пример #11
0
        public static void ContactMenu(OrganizerCore core)
        {
            try
            {
                UIMessages.ContactMenuMessage();
                UIMessages.PrintSelectMessage();
                byte userChoice = byte.Parse(Console.ReadLine());

                switch (userChoice)
                {
                    case 0: MainMenu(core); break;
                    case 1: UserInput.InputCorporative(core); break;
                    case 2: PersonMenu(core); break;
                    case 10: break;
                    default: throw new OrganizerException("Invalid Choice!");
                }
            }
            catch (OrganizerException oex)
            {
                Console.WriteLine(oex.Message);
                ContactMenu(core);
            }
        }
Пример #12
0
        public static void MainMenu(OrganizerCore core)
        {
            try
            {
                UIMessages.WelcomeMessage();
                UIMessages.MainMenuMessage();
                UIMessages.PrintSelectMessage();
                byte userChoice = byte.Parse(UserInput.InputUser());

                switch (userChoice)
                {
                    case 1: EventMenu(core); break;
                    case 2: ContactMenu(core); break;
                    case 3: UserInput.InputEmail(core); break;
                    case 10: break;
                    default: throw new OrganizerException("Invalid Choice!");
                }
            }
            catch (Exception oex)
            {
                Console.WriteLine(oex.Message);
                MainMenu(core);
            }
        }
Пример #13
0
        public static void PersonMenu(OrganizerCore core)
        {
            try
            {
                UIMessages.PersonMenuMessage();
                UIMessages.PrintSelectMessage();
                byte userChoice = byte.Parse(Console.ReadLine());

                switch (userChoice)
                {
                    case 0: ContactMenu(core); break;
                    case 1: UserInput.InputBusiness(core); break;
                    case 2: UserInput.InputFamilyMember(core); break;
                    case 3: UserInput.InputFriend(core); break;
                    case 10: break;
                    default: throw new OrganizerException("Invalid Choice!");
                }
            }
            catch (OrganizerException oex)
            {
                Console.WriteLine(oex.Message);
                PersonMenu(core);
            }
        }