Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            // upd label if admin
            if (ConfigurationSetting.loginUserIsAdmin)
            {
                LogHistoryNSettingForm logForm = new LogHistoryNSettingForm();

                for (int i = ConfigurationSetting.logHistoryIndex - 1; i >= 0; i--)
                {
                    ListViewItem listViewItem = new ListViewItem();
                    listViewItem.Text = (string)ConfigurationSetting.logHistory.ToArray().ToList()[i];
                    logForm.logHistoryListView.Items.Add(listViewItem);
                }

                logForm.ShowDialog();
            }
            if (!ConfigurationSetting.configVerbPerfect && !ConfigurationSetting.loginUserIsAdmin)
            {
                String logMessage = "You will be logged out. Please contact your system administrator.";
                MessageBox.Show(logMessage, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                _gContext.Logout();
            }
        }
Пример #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            // upd label if admin
            if (ConfigurationSetting.loginUserIsAdmin)
            {
                LogHistoryNSettingForm logForm = new LogHistoryNSettingForm();

                for (int i = ConfigurationSetting.logHistoryIndex - 1; i >= 0; i--)
                {
                    ListViewItem listViewItem = new ListViewItem();
                    listViewItem.Text = (string) ConfigurationSetting.logHistory.ToArray().ToList()[i];
                    logForm.logHistoryListView.Items.Add(listViewItem);
                }

            logForm.ShowDialog();

            }
            if (!ConfigurationSetting.configVerbPerfect && !ConfigurationSetting.loginUserIsAdmin)
            {
                String logMessage = "You will be logged out. Please contact your system administrator.";
                MessageBox.Show(logMessage, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                _gContext.Logout();
            }
        }