Example #1
0
        public static object ActionHandler(UserControlSettings settings)
        {
            using (var server = new DV_serverClient())
            {
                switch (settings.condition)
                {
                case UserConditions.saveEmail:
                    return(server.saveEmail(settings.email));

                case UserConditions.getUsers:
                    return(server.GetUsers());

                case UserConditions.getEmails:
                    return(server.GetEmails());

                case UserConditions.getTags:
                    return(server.GetTags());

                case UserConditions.changeEmail:
                    return(server.ChangeEmail(settings.email));

                case UserConditions.searchByDate:
                    return(server.SearchByDate(settings.dateFrom, settings.dateTo));
                }

                server.Close();
                return(null);
            }
        }
Example #2
0
 public EmailHandlerForm(UserControlSettings settings)
 {
     InitializeComponent();
     input_settings = settings;
 }