Exemple #1
0
 private void RemoveSelectedService()
 {
     if (uiServicesListBox.SelectedItem != null)
     {
         XmlWorker.RemoveService((Service)uiServicesListBox.SelectedItem);
         UpdateServicesInformation();
         UpdateClientInformation();
     }
 }
Exemple #2
0
        private void AddService()
        {
            var serviceForm = new ServiceForm();

            if (serviceForm.ShowDialog() == DialogResult.OK)
            {
                XmlWorker.AddService(serviceForm.CurrentService, false);
                UpdateServicesInformation();
            }
        }
Exemple #3
0
        private void UpdateClientInformation()
        {
            if (_selectedClient == null)
            {
                return;
            }
            var selectedClientServices = XmlWorker.GetServices(_selectedClient.Login);

            _selectedClient.Services           = selectedClientServices;
            uiClientServicesListBox.DataSource = _selectedClient.Services;
        }
Exemple #4
0
        private void EditService()
        {
            var serviceForm = new ServiceForm();

            if (uiServicesListBox.SelectedItem != null)
            {
                serviceForm.CurrentService = (Service)uiServicesListBox.SelectedItem;
                if (serviceForm.ShowDialog() == DialogResult.OK)
                {
                    XmlWorker.AddService(serviceForm.CurrentService, true);
                    UpdateServicesInformation();
                    UpdateClientInformation();
                }
            }
        }
Exemple #5
0
 public void SaveServices()
 {
     XmlWorker.SaveClientServices(Services, Login);
 }
Exemple #6
0
 private void LoadServicesAndClients()
 {
     UpdateServicesInformation();
     _clients = XmlWorker.GetClients();
     uiClientsComboBox.DataSource = _clients;
 }
Exemple #7
0
        private void UpdateServicesInformation()
        {
            var services = XmlWorker.GetServices();

            uiServicesListBox.DataSource = services;
        }
Exemple #8
0
 private void AutorizationForm_Load(object sender, EventArgs e)
 {
     AllUser = XmlWorker.GetUsers();
     uiPasswordTextBox.Text = XmlWorker.GetLastLogin();
 }