Exemplo n.º 1
0
        private void AddStatusesForSenderAccordingToSender(BllUser sender)
        {
            var statusesForOwner = StatusesForOwner.GetStatusesForOwner();

            foreach (var status in statusesForOwner)
            {
                comboBox1.Items.Remove(status.Name);
                AvailableStatusesForSelectedEvent.Remove(status);
                if (AreUsersEqual(client.GetUser(), sender))
                {
                    comboBox1.Items.Add(status.Name);
                    AvailableStatusesForSelectedEvent.Add(status);
                }
            }
        }
Exemplo n.º 2
0
 private void HandleStatusChanging()  //fix
 {
     if (SelectedEvent.EventData.StatusLib.SelectedEntities.Count > 0)
     {
         if (StatusesForOwner.IsStatusForOwner(EventHelper.GetCurrentEventStatus(SelectedEvent.EventData)))
         {
             if (client.GetUser().Login != SelectedEvent.EventData.Sender.Login)
             {
                 DisableStatusControls();
                 HideChecklistAndCheckbox();
             }
         }
     }
     if (!EventHelper.IsEventAcceptedByUser(SelectedEvent.EventData, client.GetUser()))
     {
         DisableStatusControls();
     }
 }
Exemplo n.º 3
0
 private void Form1_Load(object sender, EventArgs e)
 {
     eventManager = new UiEventManager(dataGridView1, this);
     indication   = new Indication(this);
     InitializeAppProperties();
     try
     {
         client = new ClientLauncher(eventManager, this);
         client.Launch();
         eventManager.client = client;
         StatusesForOwner.Init(client.GetServerInstance());
         eventManager.GetEventList();
         eventManager.HideClosedEventsAccordingToConfigValue();
     }
     catch (UserIsNullException) //user has not logged in
     {
         ExitApp();
     }
 }