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

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

            _selectedClient.Services           = selectedClientServices;
            uiClientServicesListBox.DataSource = _selectedClient.Services;
        }
Esempio n. 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();
                }
            }
        }
Esempio n. 5
0
 public void SaveServices()
 {
     XmlWorker.SaveClientServices(Services, Login);
 }
Esempio n. 6
0
 private void LoadServicesAndClients()
 {
     UpdateServicesInformation();
     _clients = XmlWorker.GetClients();
     uiClientsComboBox.DataSource = _clients;
 }
Esempio n. 7
0
        private void UpdateServicesInformation()
        {
            var services = XmlWorker.GetServices();

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