Esempio n. 1
0
        private void настройкиToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Settings settings          = new Settings();
            bool     prevHideClosed    = AppConfigManager.GetBoolKeyValue(Properties.Resources.TAG_HIDE_CLOSED);
            int      prevHideAllowance = AppConfigManager.GetIntKeyValue(Properties.Resources.TAG_HIDE_ALLOWANCE);

            settings.ShowDialog();
            if (prevHideClosed != AppConfigManager.GetBoolKeyValue(Properties.Resources.TAG_HIDE_CLOSED))
            {
                if (prevHideClosed)
                {
                    eventManager.ShowClosedEvents();
                }
                else
                {
                    eventManager.HideClosedEventsAccordingToConfigValue();
                }
            }
            else
            {
                if (prevHideClosed && (prevHideAllowance != AppConfigManager.GetIntKeyValue(Properties.Resources.TAG_HIDE_ALLOWANCE)))
                {
                    eventManager.HideClosedEventsAccordingToConfigValue();
                }
            }
        }
Esempio n. 2
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();
     }
 }