diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 900711a..639e266 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 900711a..639e266 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index f127496..f0b8f7d 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -60,7 +60,7 @@ } conn.Close(); - if (!Utility.userRole.Equals("事件编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Equals("事件编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 900711a..639e266 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index f127496..f0b8f7d 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -60,7 +60,7 @@ } conn.Close(); - if (!Utility.userRole.Equals("事件编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Equals("事件编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index e4c3928..c5c43b5 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -77,7 +77,7 @@ comboBox_state.Items.Add("任务执行中"); comboBox_state.Items.Add("结束任务"); - if (!Utility.userRole.Contains("工单创建")) + if (Utility.isNeedLogin&&!Utility.userRole.Contains("工单创建")) { button_new.Visible = false; } diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 900711a..639e266 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index f127496..f0b8f7d 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -60,7 +60,7 @@ } conn.Close(); - if (!Utility.userRole.Equals("事件编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Equals("事件编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index e4c3928..c5c43b5 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -77,7 +77,7 @@ comboBox_state.Items.Add("任务执行中"); comboBox_state.Items.Add("结束任务"); - if (!Utility.userRole.Contains("工单创建")) + if (Utility.isNeedLogin&&!Utility.userRole.Contains("工单创建")) { button_new.Visible = false; } diff --git a/FrmEquipmentManage.cs b/FrmEquipmentManage.cs index 3acd653..9a558a6 100644 --- a/FrmEquipmentManage.cs +++ b/FrmEquipmentManage.cs @@ -44,15 +44,15 @@ private void initForm() { - if (!Utility.userRole.Contains("探测仪新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪新增")) { btnAddDev.Visible = false; } - if (!Utility.userRole.Contains("探测仪删除")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪删除")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; } - if (!Utility.userRole.Contains("探测仪编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } @@ -129,7 +129,7 @@ /// private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) { - if (!Utility.userRole.Contains("探测仪编辑")) return; + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) return; DataGridView grid = sender as DataGridView; if (grid != null && grid.SelectedRows.Count > 0) diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 900711a..639e266 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index f127496..f0b8f7d 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -60,7 +60,7 @@ } conn.Close(); - if (!Utility.userRole.Equals("事件编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Equals("事件编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index e4c3928..c5c43b5 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -77,7 +77,7 @@ comboBox_state.Items.Add("任务执行中"); comboBox_state.Items.Add("结束任务"); - if (!Utility.userRole.Contains("工单创建")) + if (Utility.isNeedLogin&&!Utility.userRole.Contains("工单创建")) { button_new.Visible = false; } diff --git a/FrmEquipmentManage.cs b/FrmEquipmentManage.cs index 3acd653..9a558a6 100644 --- a/FrmEquipmentManage.cs +++ b/FrmEquipmentManage.cs @@ -44,15 +44,15 @@ private void initForm() { - if (!Utility.userRole.Contains("探测仪新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪新增")) { btnAddDev.Visible = false; } - if (!Utility.userRole.Contains("探测仪删除")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪删除")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; } - if (!Utility.userRole.Contains("探测仪编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } @@ -129,7 +129,7 @@ /// private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) { - if (!Utility.userRole.Contains("探测仪编辑")) return; + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) return; DataGridView grid = sender as DataGridView; if (grid != null && grid.SelectedRows.Count > 0) diff --git a/FrmLogin.cs b/FrmLogin.cs index 294cf14..baf7f52 100644 --- a/FrmLogin.cs +++ b/FrmLogin.cs @@ -117,7 +117,7 @@ private void FrmLogin_Load(object sender, EventArgs e) {//global::Cyberpipe.Properties.Resources.登录页3; this.pictureBox1.BackgroundImage = Image.FromFile(Application.StartupPath + Utility.LoginImgPath); ; - Utility.SetParams(); +// Utility.SetParams(); StartPosition = FormStartPosition.CenterScreen; diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 900711a..639e266 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index f127496..f0b8f7d 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -60,7 +60,7 @@ } conn.Close(); - if (!Utility.userRole.Equals("事件编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Equals("事件编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index e4c3928..c5c43b5 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -77,7 +77,7 @@ comboBox_state.Items.Add("任务执行中"); comboBox_state.Items.Add("结束任务"); - if (!Utility.userRole.Contains("工单创建")) + if (Utility.isNeedLogin&&!Utility.userRole.Contains("工单创建")) { button_new.Visible = false; } diff --git a/FrmEquipmentManage.cs b/FrmEquipmentManage.cs index 3acd653..9a558a6 100644 --- a/FrmEquipmentManage.cs +++ b/FrmEquipmentManage.cs @@ -44,15 +44,15 @@ private void initForm() { - if (!Utility.userRole.Contains("探测仪新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪新增")) { btnAddDev.Visible = false; } - if (!Utility.userRole.Contains("探测仪删除")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪删除")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; } - if (!Utility.userRole.Contains("探测仪编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } @@ -129,7 +129,7 @@ /// private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) { - if (!Utility.userRole.Contains("探测仪编辑")) return; + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) return; DataGridView grid = sender as DataGridView; if (grid != null && grid.SelectedRows.Count > 0) diff --git a/FrmLogin.cs b/FrmLogin.cs index 294cf14..baf7f52 100644 --- a/FrmLogin.cs +++ b/FrmLogin.cs @@ -117,7 +117,7 @@ private void FrmLogin_Load(object sender, EventArgs e) {//global::Cyberpipe.Properties.Resources.登录页3; this.pictureBox1.BackgroundImage = Image.FromFile(Application.StartupPath + Utility.LoginImgPath); ; - Utility.SetParams(); +// Utility.SetParams(); StartPosition = FormStartPosition.CenterScreen; diff --git a/FrmPatrolerManager.cs b/FrmPatrolerManager.cs index b802788..7134bc7 100644 --- a/FrmPatrolerManager.cs +++ b/FrmPatrolerManager.cs @@ -177,15 +177,15 @@ private void initForm() { - if (!Utility.userRole.Contains("巡检员新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员新增")) { btn_add_person.Visible = false; } - if (!Utility.userRole.Contains("巡检员编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员编辑")) { 编辑ToolStripMenuItem.Visible = false; } - if (!Utility.userRole.Contains("巡检员注销")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员注销")) { 注销ToolStripMenuItem.Visible = false; } diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 900711a..639e266 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index f127496..f0b8f7d 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -60,7 +60,7 @@ } conn.Close(); - if (!Utility.userRole.Equals("事件编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Equals("事件编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index e4c3928..c5c43b5 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -77,7 +77,7 @@ comboBox_state.Items.Add("任务执行中"); comboBox_state.Items.Add("结束任务"); - if (!Utility.userRole.Contains("工单创建")) + if (Utility.isNeedLogin&&!Utility.userRole.Contains("工单创建")) { button_new.Visible = false; } diff --git a/FrmEquipmentManage.cs b/FrmEquipmentManage.cs index 3acd653..9a558a6 100644 --- a/FrmEquipmentManage.cs +++ b/FrmEquipmentManage.cs @@ -44,15 +44,15 @@ private void initForm() { - if (!Utility.userRole.Contains("探测仪新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪新增")) { btnAddDev.Visible = false; } - if (!Utility.userRole.Contains("探测仪删除")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪删除")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; } - if (!Utility.userRole.Contains("探测仪编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } @@ -129,7 +129,7 @@ /// private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) { - if (!Utility.userRole.Contains("探测仪编辑")) return; + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) return; DataGridView grid = sender as DataGridView; if (grid != null && grid.SelectedRows.Count > 0) diff --git a/FrmLogin.cs b/FrmLogin.cs index 294cf14..baf7f52 100644 --- a/FrmLogin.cs +++ b/FrmLogin.cs @@ -117,7 +117,7 @@ private void FrmLogin_Load(object sender, EventArgs e) {//global::Cyberpipe.Properties.Resources.登录页3; this.pictureBox1.BackgroundImage = Image.FromFile(Application.StartupPath + Utility.LoginImgPath); ; - Utility.SetParams(); +// Utility.SetParams(); StartPosition = FormStartPosition.CenterScreen; diff --git a/FrmPatrolerManager.cs b/FrmPatrolerManager.cs index b802788..7134bc7 100644 --- a/FrmPatrolerManager.cs +++ b/FrmPatrolerManager.cs @@ -177,15 +177,15 @@ private void initForm() { - if (!Utility.userRole.Contains("巡检员新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员新增")) { btn_add_person.Visible = false; } - if (!Utility.userRole.Contains("巡检员编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员编辑")) { 编辑ToolStripMenuItem.Visible = false; } - if (!Utility.userRole.Contains("巡检员注销")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员注销")) { 注销ToolStripMenuItem.Visible = false; } diff --git a/FrmRoleInfoManager.cs b/FrmRoleInfoManager.cs index c02635d..55348ce 100644 --- a/FrmRoleInfoManager.cs +++ b/FrmRoleInfoManager.cs @@ -16,11 +16,11 @@ private void FrmRoleInfoManager_Load(object sender, EventArgs e) { reloadGrid(); - if (Utility.userRole.IndexOf("角色新增") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色新增")) { btn_add.Visible = false; } - if (Utility.userRole.IndexOf("角色删除") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色删除")) { dataGridViewX1.Columns["btndel"].Visible = false; } diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 900711a..639e266 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index f127496..f0b8f7d 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -60,7 +60,7 @@ } conn.Close(); - if (!Utility.userRole.Equals("事件编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Equals("事件编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index e4c3928..c5c43b5 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -77,7 +77,7 @@ comboBox_state.Items.Add("任务执行中"); comboBox_state.Items.Add("结束任务"); - if (!Utility.userRole.Contains("工单创建")) + if (Utility.isNeedLogin&&!Utility.userRole.Contains("工单创建")) { button_new.Visible = false; } diff --git a/FrmEquipmentManage.cs b/FrmEquipmentManage.cs index 3acd653..9a558a6 100644 --- a/FrmEquipmentManage.cs +++ b/FrmEquipmentManage.cs @@ -44,15 +44,15 @@ private void initForm() { - if (!Utility.userRole.Contains("探测仪新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪新增")) { btnAddDev.Visible = false; } - if (!Utility.userRole.Contains("探测仪删除")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪删除")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; } - if (!Utility.userRole.Contains("探测仪编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } @@ -129,7 +129,7 @@ /// private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) { - if (!Utility.userRole.Contains("探测仪编辑")) return; + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) return; DataGridView grid = sender as DataGridView; if (grid != null && grid.SelectedRows.Count > 0) diff --git a/FrmLogin.cs b/FrmLogin.cs index 294cf14..baf7f52 100644 --- a/FrmLogin.cs +++ b/FrmLogin.cs @@ -117,7 +117,7 @@ private void FrmLogin_Load(object sender, EventArgs e) {//global::Cyberpipe.Properties.Resources.登录页3; this.pictureBox1.BackgroundImage = Image.FromFile(Application.StartupPath + Utility.LoginImgPath); ; - Utility.SetParams(); +// Utility.SetParams(); StartPosition = FormStartPosition.CenterScreen; diff --git a/FrmPatrolerManager.cs b/FrmPatrolerManager.cs index b802788..7134bc7 100644 --- a/FrmPatrolerManager.cs +++ b/FrmPatrolerManager.cs @@ -177,15 +177,15 @@ private void initForm() { - if (!Utility.userRole.Contains("巡检员新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员新增")) { btn_add_person.Visible = false; } - if (!Utility.userRole.Contains("巡检员编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员编辑")) { 编辑ToolStripMenuItem.Visible = false; } - if (!Utility.userRole.Contains("巡检员注销")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员注销")) { 注销ToolStripMenuItem.Visible = false; } diff --git a/FrmRoleInfoManager.cs b/FrmRoleInfoManager.cs index c02635d..55348ce 100644 --- a/FrmRoleInfoManager.cs +++ b/FrmRoleInfoManager.cs @@ -16,11 +16,11 @@ private void FrmRoleInfoManager_Load(object sender, EventArgs e) { reloadGrid(); - if (Utility.userRole.IndexOf("角色新增") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色新增")) { btn_add.Visible = false; } - if (Utility.userRole.IndexOf("角色删除") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色删除")) { dataGridViewX1.Columns["btndel"].Visible = false; } diff --git a/FrmRoleRescManager.cs b/FrmRoleRescManager.cs index 13640ce..3e30a2d 100644 --- a/FrmRoleRescManager.cs +++ b/FrmRoleRescManager.cs @@ -20,7 +20,7 @@ IS_OPEN = true; initForm(""); initCombox(); - if (Utility.userRole.IndexOf("角色授权") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色授权")) { btn_ok.Visible = false; } diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 900711a..639e266 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index f127496..f0b8f7d 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -60,7 +60,7 @@ } conn.Close(); - if (!Utility.userRole.Equals("事件编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Equals("事件编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index e4c3928..c5c43b5 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -77,7 +77,7 @@ comboBox_state.Items.Add("任务执行中"); comboBox_state.Items.Add("结束任务"); - if (!Utility.userRole.Contains("工单创建")) + if (Utility.isNeedLogin&&!Utility.userRole.Contains("工单创建")) { button_new.Visible = false; } diff --git a/FrmEquipmentManage.cs b/FrmEquipmentManage.cs index 3acd653..9a558a6 100644 --- a/FrmEquipmentManage.cs +++ b/FrmEquipmentManage.cs @@ -44,15 +44,15 @@ private void initForm() { - if (!Utility.userRole.Contains("探测仪新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪新增")) { btnAddDev.Visible = false; } - if (!Utility.userRole.Contains("探测仪删除")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪删除")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; } - if (!Utility.userRole.Contains("探测仪编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } @@ -129,7 +129,7 @@ /// private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) { - if (!Utility.userRole.Contains("探测仪编辑")) return; + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) return; DataGridView grid = sender as DataGridView; if (grid != null && grid.SelectedRows.Count > 0) diff --git a/FrmLogin.cs b/FrmLogin.cs index 294cf14..baf7f52 100644 --- a/FrmLogin.cs +++ b/FrmLogin.cs @@ -117,7 +117,7 @@ private void FrmLogin_Load(object sender, EventArgs e) {//global::Cyberpipe.Properties.Resources.登录页3; this.pictureBox1.BackgroundImage = Image.FromFile(Application.StartupPath + Utility.LoginImgPath); ; - Utility.SetParams(); +// Utility.SetParams(); StartPosition = FormStartPosition.CenterScreen; diff --git a/FrmPatrolerManager.cs b/FrmPatrolerManager.cs index b802788..7134bc7 100644 --- a/FrmPatrolerManager.cs +++ b/FrmPatrolerManager.cs @@ -177,15 +177,15 @@ private void initForm() { - if (!Utility.userRole.Contains("巡检员新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员新增")) { btn_add_person.Visible = false; } - if (!Utility.userRole.Contains("巡检员编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员编辑")) { 编辑ToolStripMenuItem.Visible = false; } - if (!Utility.userRole.Contains("巡检员注销")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员注销")) { 注销ToolStripMenuItem.Visible = false; } diff --git a/FrmRoleInfoManager.cs b/FrmRoleInfoManager.cs index c02635d..55348ce 100644 --- a/FrmRoleInfoManager.cs +++ b/FrmRoleInfoManager.cs @@ -16,11 +16,11 @@ private void FrmRoleInfoManager_Load(object sender, EventArgs e) { reloadGrid(); - if (Utility.userRole.IndexOf("角色新增") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色新增")) { btn_add.Visible = false; } - if (Utility.userRole.IndexOf("角色删除") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色删除")) { dataGridViewX1.Columns["btndel"].Visible = false; } diff --git a/FrmRoleRescManager.cs b/FrmRoleRescManager.cs index 13640ce..3e30a2d 100644 --- a/FrmRoleRescManager.cs +++ b/FrmRoleRescManager.cs @@ -20,7 +20,7 @@ IS_OPEN = true; initForm(""); initCombox(); - if (Utility.userRole.IndexOf("角色授权") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色授权")) { btn_ok.Visible = false; } diff --git a/FrmSysUserInfoManger.cs b/FrmSysUserInfoManger.cs index 4d1b7da..d9492a9 100644 --- a/FrmSysUserInfoManger.cs +++ b/FrmSysUserInfoManger.cs @@ -22,11 +22,11 @@ { IS_OPEN = true; reloadGrid(currentpage); - if (Utility.userRole.IndexOf("用户新增") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("用户新增")) { btn_add.Visible = false; } - if (Utility.userRole.IndexOf("用户删除") == -1) + if (Utility.isNeedLogin && Utility.userRole.Contains("用户删除")) { dataGridViewX1.Columns["btndel"].Visible = false; } diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 900711a..639e266 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index f127496..f0b8f7d 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -60,7 +60,7 @@ } conn.Close(); - if (!Utility.userRole.Equals("事件编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Equals("事件编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index e4c3928..c5c43b5 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -77,7 +77,7 @@ comboBox_state.Items.Add("任务执行中"); comboBox_state.Items.Add("结束任务"); - if (!Utility.userRole.Contains("工单创建")) + if (Utility.isNeedLogin&&!Utility.userRole.Contains("工单创建")) { button_new.Visible = false; } diff --git a/FrmEquipmentManage.cs b/FrmEquipmentManage.cs index 3acd653..9a558a6 100644 --- a/FrmEquipmentManage.cs +++ b/FrmEquipmentManage.cs @@ -44,15 +44,15 @@ private void initForm() { - if (!Utility.userRole.Contains("探测仪新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪新增")) { btnAddDev.Visible = false; } - if (!Utility.userRole.Contains("探测仪删除")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪删除")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; } - if (!Utility.userRole.Contains("探测仪编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } @@ -129,7 +129,7 @@ /// private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) { - if (!Utility.userRole.Contains("探测仪编辑")) return; + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) return; DataGridView grid = sender as DataGridView; if (grid != null && grid.SelectedRows.Count > 0) diff --git a/FrmLogin.cs b/FrmLogin.cs index 294cf14..baf7f52 100644 --- a/FrmLogin.cs +++ b/FrmLogin.cs @@ -117,7 +117,7 @@ private void FrmLogin_Load(object sender, EventArgs e) {//global::Cyberpipe.Properties.Resources.登录页3; this.pictureBox1.BackgroundImage = Image.FromFile(Application.StartupPath + Utility.LoginImgPath); ; - Utility.SetParams(); +// Utility.SetParams(); StartPosition = FormStartPosition.CenterScreen; diff --git a/FrmPatrolerManager.cs b/FrmPatrolerManager.cs index b802788..7134bc7 100644 --- a/FrmPatrolerManager.cs +++ b/FrmPatrolerManager.cs @@ -177,15 +177,15 @@ private void initForm() { - if (!Utility.userRole.Contains("巡检员新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员新增")) { btn_add_person.Visible = false; } - if (!Utility.userRole.Contains("巡检员编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员编辑")) { 编辑ToolStripMenuItem.Visible = false; } - if (!Utility.userRole.Contains("巡检员注销")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员注销")) { 注销ToolStripMenuItem.Visible = false; } diff --git a/FrmRoleInfoManager.cs b/FrmRoleInfoManager.cs index c02635d..55348ce 100644 --- a/FrmRoleInfoManager.cs +++ b/FrmRoleInfoManager.cs @@ -16,11 +16,11 @@ private void FrmRoleInfoManager_Load(object sender, EventArgs e) { reloadGrid(); - if (Utility.userRole.IndexOf("角色新增") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色新增")) { btn_add.Visible = false; } - if (Utility.userRole.IndexOf("角色删除") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色删除")) { dataGridViewX1.Columns["btndel"].Visible = false; } diff --git a/FrmRoleRescManager.cs b/FrmRoleRescManager.cs index 13640ce..3e30a2d 100644 --- a/FrmRoleRescManager.cs +++ b/FrmRoleRescManager.cs @@ -20,7 +20,7 @@ IS_OPEN = true; initForm(""); initCombox(); - if (Utility.userRole.IndexOf("角色授权") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色授权")) { btn_ok.Visible = false; } diff --git a/FrmSysUserInfoManger.cs b/FrmSysUserInfoManger.cs index 4d1b7da..d9492a9 100644 --- a/FrmSysUserInfoManger.cs +++ b/FrmSysUserInfoManger.cs @@ -22,11 +22,11 @@ { IS_OPEN = true; reloadGrid(currentpage); - if (Utility.userRole.IndexOf("用户新增") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("用户新增")) { btn_add.Visible = false; } - if (Utility.userRole.IndexOf("用户删除") == -1) + if (Utility.isNeedLogin && Utility.userRole.Contains("用户删除")) { dataGridViewX1.Columns["btndel"].Visible = false; } diff --git a/FrmUserRole.cs b/FrmUserRole.cs index b5feef0..e9f7c0d 100644 --- a/FrmUserRole.cs +++ b/FrmUserRole.cs @@ -19,7 +19,7 @@ IS_OPEN = true; reloadGrid(-1); initCombox(); - if (Utility.userRole.IndexOf("用户授权") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("用户授权")) { btn_ok.Visible = false; } diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 900711a..639e266 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index f127496..f0b8f7d 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -60,7 +60,7 @@ } conn.Close(); - if (!Utility.userRole.Equals("事件编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Equals("事件编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index e4c3928..c5c43b5 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -77,7 +77,7 @@ comboBox_state.Items.Add("任务执行中"); comboBox_state.Items.Add("结束任务"); - if (!Utility.userRole.Contains("工单创建")) + if (Utility.isNeedLogin&&!Utility.userRole.Contains("工单创建")) { button_new.Visible = false; } diff --git a/FrmEquipmentManage.cs b/FrmEquipmentManage.cs index 3acd653..9a558a6 100644 --- a/FrmEquipmentManage.cs +++ b/FrmEquipmentManage.cs @@ -44,15 +44,15 @@ private void initForm() { - if (!Utility.userRole.Contains("探测仪新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪新增")) { btnAddDev.Visible = false; } - if (!Utility.userRole.Contains("探测仪删除")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪删除")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; } - if (!Utility.userRole.Contains("探测仪编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } @@ -129,7 +129,7 @@ /// private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) { - if (!Utility.userRole.Contains("探测仪编辑")) return; + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) return; DataGridView grid = sender as DataGridView; if (grid != null && grid.SelectedRows.Count > 0) diff --git a/FrmLogin.cs b/FrmLogin.cs index 294cf14..baf7f52 100644 --- a/FrmLogin.cs +++ b/FrmLogin.cs @@ -117,7 +117,7 @@ private void FrmLogin_Load(object sender, EventArgs e) {//global::Cyberpipe.Properties.Resources.登录页3; this.pictureBox1.BackgroundImage = Image.FromFile(Application.StartupPath + Utility.LoginImgPath); ; - Utility.SetParams(); +// Utility.SetParams(); StartPosition = FormStartPosition.CenterScreen; diff --git a/FrmPatrolerManager.cs b/FrmPatrolerManager.cs index b802788..7134bc7 100644 --- a/FrmPatrolerManager.cs +++ b/FrmPatrolerManager.cs @@ -177,15 +177,15 @@ private void initForm() { - if (!Utility.userRole.Contains("巡检员新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员新增")) { btn_add_person.Visible = false; } - if (!Utility.userRole.Contains("巡检员编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员编辑")) { 编辑ToolStripMenuItem.Visible = false; } - if (!Utility.userRole.Contains("巡检员注销")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员注销")) { 注销ToolStripMenuItem.Visible = false; } diff --git a/FrmRoleInfoManager.cs b/FrmRoleInfoManager.cs index c02635d..55348ce 100644 --- a/FrmRoleInfoManager.cs +++ b/FrmRoleInfoManager.cs @@ -16,11 +16,11 @@ private void FrmRoleInfoManager_Load(object sender, EventArgs e) { reloadGrid(); - if (Utility.userRole.IndexOf("角色新增") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色新增")) { btn_add.Visible = false; } - if (Utility.userRole.IndexOf("角色删除") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色删除")) { dataGridViewX1.Columns["btndel"].Visible = false; } diff --git a/FrmRoleRescManager.cs b/FrmRoleRescManager.cs index 13640ce..3e30a2d 100644 --- a/FrmRoleRescManager.cs +++ b/FrmRoleRescManager.cs @@ -20,7 +20,7 @@ IS_OPEN = true; initForm(""); initCombox(); - if (Utility.userRole.IndexOf("角色授权") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色授权")) { btn_ok.Visible = false; } diff --git a/FrmSysUserInfoManger.cs b/FrmSysUserInfoManger.cs index 4d1b7da..d9492a9 100644 --- a/FrmSysUserInfoManger.cs +++ b/FrmSysUserInfoManger.cs @@ -22,11 +22,11 @@ { IS_OPEN = true; reloadGrid(currentpage); - if (Utility.userRole.IndexOf("用户新增") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("用户新增")) { btn_add.Visible = false; } - if (Utility.userRole.IndexOf("用户删除") == -1) + if (Utility.isNeedLogin && Utility.userRole.Contains("用户删除")) { dataGridViewX1.Columns["btndel"].Visible = false; } diff --git a/FrmUserRole.cs b/FrmUserRole.cs index b5feef0..e9f7c0d 100644 --- a/FrmUserRole.cs +++ b/FrmUserRole.cs @@ -19,7 +19,7 @@ IS_OPEN = true; reloadGrid(-1); initCombox(); - if (Utility.userRole.IndexOf("用户授权") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("用户授权")) { btn_ok.Visible = false; } diff --git a/MainFrm.cs b/MainFrm.cs index d1a2b2f..cb461f5 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -152,8 +152,11 @@ balloonEx2 = new GSOBalloonEx(globeControl2.Handle); Utility.SetBallons(featureTooltip, balloonEx); panelOfTable.Height = 200; - RigthMenuSet(); - MenuSet(); + if (Utility.isNeedLogin) + { + RigthMenuSet(); + MenuSet(); + } } /// diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 900711a..639e266 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index f127496..f0b8f7d 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -60,7 +60,7 @@ } conn.Close(); - if (!Utility.userRole.Equals("事件编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Equals("事件编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index e4c3928..c5c43b5 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -77,7 +77,7 @@ comboBox_state.Items.Add("任务执行中"); comboBox_state.Items.Add("结束任务"); - if (!Utility.userRole.Contains("工单创建")) + if (Utility.isNeedLogin&&!Utility.userRole.Contains("工单创建")) { button_new.Visible = false; } diff --git a/FrmEquipmentManage.cs b/FrmEquipmentManage.cs index 3acd653..9a558a6 100644 --- a/FrmEquipmentManage.cs +++ b/FrmEquipmentManage.cs @@ -44,15 +44,15 @@ private void initForm() { - if (!Utility.userRole.Contains("探测仪新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪新增")) { btnAddDev.Visible = false; } - if (!Utility.userRole.Contains("探测仪删除")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪删除")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; } - if (!Utility.userRole.Contains("探测仪编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } @@ -129,7 +129,7 @@ /// private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) { - if (!Utility.userRole.Contains("探测仪编辑")) return; + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) return; DataGridView grid = sender as DataGridView; if (grid != null && grid.SelectedRows.Count > 0) diff --git a/FrmLogin.cs b/FrmLogin.cs index 294cf14..baf7f52 100644 --- a/FrmLogin.cs +++ b/FrmLogin.cs @@ -117,7 +117,7 @@ private void FrmLogin_Load(object sender, EventArgs e) {//global::Cyberpipe.Properties.Resources.登录页3; this.pictureBox1.BackgroundImage = Image.FromFile(Application.StartupPath + Utility.LoginImgPath); ; - Utility.SetParams(); +// Utility.SetParams(); StartPosition = FormStartPosition.CenterScreen; diff --git a/FrmPatrolerManager.cs b/FrmPatrolerManager.cs index b802788..7134bc7 100644 --- a/FrmPatrolerManager.cs +++ b/FrmPatrolerManager.cs @@ -177,15 +177,15 @@ private void initForm() { - if (!Utility.userRole.Contains("巡检员新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员新增")) { btn_add_person.Visible = false; } - if (!Utility.userRole.Contains("巡检员编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员编辑")) { 编辑ToolStripMenuItem.Visible = false; } - if (!Utility.userRole.Contains("巡检员注销")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员注销")) { 注销ToolStripMenuItem.Visible = false; } diff --git a/FrmRoleInfoManager.cs b/FrmRoleInfoManager.cs index c02635d..55348ce 100644 --- a/FrmRoleInfoManager.cs +++ b/FrmRoleInfoManager.cs @@ -16,11 +16,11 @@ private void FrmRoleInfoManager_Load(object sender, EventArgs e) { reloadGrid(); - if (Utility.userRole.IndexOf("角色新增") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色新增")) { btn_add.Visible = false; } - if (Utility.userRole.IndexOf("角色删除") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色删除")) { dataGridViewX1.Columns["btndel"].Visible = false; } diff --git a/FrmRoleRescManager.cs b/FrmRoleRescManager.cs index 13640ce..3e30a2d 100644 --- a/FrmRoleRescManager.cs +++ b/FrmRoleRescManager.cs @@ -20,7 +20,7 @@ IS_OPEN = true; initForm(""); initCombox(); - if (Utility.userRole.IndexOf("角色授权") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色授权")) { btn_ok.Visible = false; } diff --git a/FrmSysUserInfoManger.cs b/FrmSysUserInfoManger.cs index 4d1b7da..d9492a9 100644 --- a/FrmSysUserInfoManger.cs +++ b/FrmSysUserInfoManger.cs @@ -22,11 +22,11 @@ { IS_OPEN = true; reloadGrid(currentpage); - if (Utility.userRole.IndexOf("用户新增") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("用户新增")) { btn_add.Visible = false; } - if (Utility.userRole.IndexOf("用户删除") == -1) + if (Utility.isNeedLogin && Utility.userRole.Contains("用户删除")) { dataGridViewX1.Columns["btndel"].Visible = false; } diff --git a/FrmUserRole.cs b/FrmUserRole.cs index b5feef0..e9f7c0d 100644 --- a/FrmUserRole.cs +++ b/FrmUserRole.cs @@ -19,7 +19,7 @@ IS_OPEN = true; reloadGrid(-1); initCombox(); - if (Utility.userRole.IndexOf("用户授权") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("用户授权")) { btn_ok.Visible = false; } diff --git a/MainFrm.cs b/MainFrm.cs index d1a2b2f..cb461f5 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -152,8 +152,11 @@ balloonEx2 = new GSOBalloonEx(globeControl2.Handle); Utility.SetBallons(featureTooltip, balloonEx); panelOfTable.Height = 200; - RigthMenuSet(); - MenuSet(); + if (Utility.isNeedLogin) + { + RigthMenuSet(); + MenuSet(); + } } /// diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index e9a299a..4c0dec2 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -245,6 +245,13 @@ this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.定位ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl(); + this.ribbonPanel6 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar6 = new DevComponents.DotNetBar.RibbonBar(); + this.buttonItemSPSZ = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem8 = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItemLocation = new DevComponents.DotNetBar.ButtonItem(); + this.sliderItem2 = new DevComponents.DotNetBar.SliderItem(); + this.buttonItemGBJC = new DevComponents.DotNetBar.ButtonItem(); this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); @@ -351,13 +358,6 @@ this.btnlegendSet = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem89 = new DevComponents.DotNetBar.ButtonItem(); this.btnOutputJPG = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel6 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar6 = new DevComponents.DotNetBar.RibbonBar(); - this.buttonItemSPSZ = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem8 = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItemLocation = new DevComponents.DotNetBar.ButtonItem(); - this.sliderItem2 = new DevComponents.DotNetBar.SliderItem(); - this.buttonItemGBJC = new DevComponents.DotNetBar.ButtonItem(); this.ribbonTabItem1 = new DevComponents.DotNetBar.RibbonTabItem(); this.ribbonTabItem11 = new DevComponents.DotNetBar.RibbonTabItem(); this.ribbonTabItem6 = new DevComponents.DotNetBar.RibbonTabItem(); @@ -529,6 +529,7 @@ this.contextMenuStrip3.SuspendLayout(); this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); + this.ribbonPanel6.SuspendLayout(); this.ribbonPanel2.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); @@ -537,7 +538,6 @@ this.ribbonPanel12.SuspendLayout(); this.ribbonPanel4.SuspendLayout(); this.ribbonPanel1.SuspendLayout(); - this.ribbonPanel6.SuspendLayout(); this.panelOfTable.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX1)).BeginInit(); this.statusStrip2.SuspendLayout(); @@ -720,7 +720,7 @@ this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image"))); this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripDropDownButton1.Name = "toolStripDropDownButton1"; - this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 21); + this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 20); this.toolStripDropDownButton1.Text = "帮助"; this.toolStripDropDownButton1.Visible = false; // @@ -2213,6 +2213,116 @@ this.ribbonControl1.Text = "ribbonControl1"; this.ribbonControl1.UseCustomizeDialog = false; // + // ribbonPanel6 + // + this.ribbonPanel6.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel6.Controls.Add(this.ribbonBar6); + this.ribbonPanel6.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel6.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel6.Name = "ribbonPanel6"; + this.ribbonPanel6.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel6.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel6.Style.Class = ""; + this.ribbonPanel6.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel6.StyleMouseDown.Class = ""; + this.ribbonPanel6.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel6.StyleMouseOver.Class = ""; + this.ribbonPanel6.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel6.TabIndex = 38; + // + // ribbonBar6 + // + this.ribbonBar6.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar6.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar6.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar6.BackgroundStyle.Class = ""; + this.ribbonBar6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar6.ContainerControlProcessDialogKey = true; + this.ribbonBar6.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar6.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.buttonItemSPSZ, + this.buttonItem8, + this.buttonItemLocation, + this.sliderItem2, + this.buttonItemGBJC}); + this.ribbonBar6.Location = new System.Drawing.Point(3, 0); + this.ribbonBar6.Name = "ribbonBar6"; + this.ribbonBar6.Size = new System.Drawing.Size(427, 59); + this.ribbonBar6.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar6.TabIndex = 0; + // + // + // + this.ribbonBar6.TitleStyle.Class = ""; + this.ribbonBar6.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar6.TitleStyleMouseOver.Class = ""; + this.ribbonBar6.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar6.TitleVisible = false; + // + // buttonItemSPSZ + // + this.buttonItemSPSZ.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemSPSZ.Image"))); + this.buttonItemSPSZ.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemSPSZ.Name = "buttonItemSPSZ"; + this.buttonItemSPSZ.SubItemsExpandWidth = 14; + this.buttonItemSPSZ.Text = "双屏设置"; + this.buttonItemSPSZ.Click += new System.EventHandler(this.buttonItemSPSZ_Click); + // + // buttonItem8 + // + this.buttonItem8.Image = ((System.Drawing.Image)(resources.GetObject("buttonItem8.Image"))); + this.buttonItem8.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem8.Name = "buttonItem8"; + this.buttonItem8.SubItemsExpandWidth = 14; + this.buttonItem8.Text = "双屏分析"; + this.buttonItem8.Click += new System.EventHandler(this.buttonItem8_Click); + // + // buttonItemLocation + // + this.buttonItemLocation.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemLocation.Image"))); + this.buttonItemLocation.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemLocation.Name = "buttonItemLocation"; + this.buttonItemLocation.SubItemsExpandWidth = 14; + this.buttonItemLocation.Text = "快速定位"; + this.buttonItemLocation.Click += new System.EventHandler(this.buttonItemLocation_Click); + // + // sliderItem2 + // + this.sliderItem2.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.sliderItem2.LabelWidth = 50; + this.sliderItem2.Name = "sliderItem2"; + this.sliderItem2.Text = "地面透明度"; + this.sliderItem2.TextColor = System.Drawing.Color.Black; + this.sliderItem2.Value = 0; + this.sliderItem2.ValueChanged += new System.EventHandler(this.sliderItem2_ValueChanged); + // + // buttonItemGBJC + // + this.buttonItemGBJC.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemGBJC.Image"))); + this.buttonItemGBJC.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemGBJC.Name = "buttonItemGBJC"; + this.buttonItemGBJC.SubItemsExpandWidth = 14; + this.buttonItemGBJC.Text = "国标检测"; + this.buttonItemGBJC.Click += new System.EventHandler(this.buttonItemGBJC_Click); + // // ribbonPanel2 // this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -3513,116 +3623,6 @@ this.btnOutputJPG.Text = "导出图片"; this.btnOutputJPG.Click += new System.EventHandler(this.btnOutputJPG_Click); // - // ribbonPanel6 - // - this.ribbonPanel6.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel6.Controls.Add(this.ribbonBar6); - this.ribbonPanel6.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel6.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel6.Name = "ribbonPanel6"; - this.ribbonPanel6.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel6.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel6.Style.Class = ""; - this.ribbonPanel6.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel6.StyleMouseDown.Class = ""; - this.ribbonPanel6.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel6.StyleMouseOver.Class = ""; - this.ribbonPanel6.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel6.TabIndex = 38; - // - // ribbonBar6 - // - this.ribbonBar6.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar6.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar6.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar6.BackgroundStyle.Class = ""; - this.ribbonBar6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar6.ContainerControlProcessDialogKey = true; - this.ribbonBar6.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar6.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.buttonItemSPSZ, - this.buttonItem8, - this.buttonItemLocation, - this.sliderItem2, - this.buttonItemGBJC}); - this.ribbonBar6.Location = new System.Drawing.Point(3, 0); - this.ribbonBar6.Name = "ribbonBar6"; - this.ribbonBar6.Size = new System.Drawing.Size(427, 59); - this.ribbonBar6.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar6.TabIndex = 0; - // - // - // - this.ribbonBar6.TitleStyle.Class = ""; - this.ribbonBar6.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar6.TitleStyleMouseOver.Class = ""; - this.ribbonBar6.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar6.TitleVisible = false; - // - // buttonItemSPSZ - // - this.buttonItemSPSZ.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemSPSZ.Image"))); - this.buttonItemSPSZ.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemSPSZ.Name = "buttonItemSPSZ"; - this.buttonItemSPSZ.SubItemsExpandWidth = 14; - this.buttonItemSPSZ.Text = "双屏设置"; - this.buttonItemSPSZ.Click += new System.EventHandler(this.buttonItemSPSZ_Click); - // - // buttonItem8 - // - this.buttonItem8.Image = ((System.Drawing.Image)(resources.GetObject("buttonItem8.Image"))); - this.buttonItem8.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem8.Name = "buttonItem8"; - this.buttonItem8.SubItemsExpandWidth = 14; - this.buttonItem8.Text = "双屏分析"; - this.buttonItem8.Click += new System.EventHandler(this.buttonItem8_Click); - // - // buttonItemLocation - // - this.buttonItemLocation.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemLocation.Image"))); - this.buttonItemLocation.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemLocation.Name = "buttonItemLocation"; - this.buttonItemLocation.SubItemsExpandWidth = 14; - this.buttonItemLocation.Text = "快速定位"; - this.buttonItemLocation.Click += new System.EventHandler(this.buttonItemLocation_Click); - // - // sliderItem2 - // - this.sliderItem2.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.sliderItem2.LabelWidth = 50; - this.sliderItem2.Name = "sliderItem2"; - this.sliderItem2.Text = "地面透明度"; - this.sliderItem2.TextColor = System.Drawing.Color.Black; - this.sliderItem2.Value = 0; - this.sliderItem2.ValueChanged += new System.EventHandler(this.sliderItem2_ValueChanged); - // - // buttonItemGBJC - // - this.buttonItemGBJC.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemGBJC.Image"))); - this.buttonItemGBJC.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemGBJC.Name = "buttonItemGBJC"; - this.buttonItemGBJC.SubItemsExpandWidth = 14; - this.buttonItemGBJC.Text = "国标检测"; - this.buttonItemGBJC.Click += new System.EventHandler(this.buttonItemGBJC_Click); - // // ribbonTabItem1 // this.ribbonTabItem1.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; @@ -4469,7 +4469,7 @@ this.dataGridViewX2.ReadOnly = true; this.dataGridViewX2.RowHeadersVisible = false; this.dataGridViewX2.RowTemplate.Height = 23; - this.dataGridViewX2.Size = new System.Drawing.Size(33457, 92); + this.dataGridViewX2.Size = new System.Drawing.Size(33754, 92); this.dataGridViewX2.TabIndex = 11; // // dataGridViewTextBoxColumn10 @@ -4563,7 +4563,7 @@ this.dataGridViewX3.ReadOnly = true; this.dataGridViewX3.RowHeadersVisible = false; this.dataGridViewX3.RowTemplate.Height = 23; - this.dataGridViewX3.Size = new System.Drawing.Size(33456, 127); + this.dataGridViewX3.Size = new System.Drawing.Size(33753, 127); this.dataGridViewX3.TabIndex = 5; this.dataGridViewX3.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX3_MouseDoubleClick); // @@ -5791,6 +5791,7 @@ this.contextMenuStripDeleteLayerNode.ResumeLayout(false); this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); + this.ribbonPanel6.ResumeLayout(false); this.ribbonPanel2.ResumeLayout(false); this.ribbonPanel3.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); @@ -5799,7 +5800,6 @@ this.ribbonPanel12.ResumeLayout(false); this.ribbonPanel4.ResumeLayout(false); this.ribbonPanel1.ResumeLayout(false); - this.ribbonPanel6.ResumeLayout(false); this.panelOfTable.ResumeLayout(false); this.panelOfTable.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX1)).EndInit(); diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 900711a..639e266 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index f127496..f0b8f7d 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -60,7 +60,7 @@ } conn.Close(); - if (!Utility.userRole.Equals("事件编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Equals("事件编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index e4c3928..c5c43b5 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -77,7 +77,7 @@ comboBox_state.Items.Add("任务执行中"); comboBox_state.Items.Add("结束任务"); - if (!Utility.userRole.Contains("工单创建")) + if (Utility.isNeedLogin&&!Utility.userRole.Contains("工单创建")) { button_new.Visible = false; } diff --git a/FrmEquipmentManage.cs b/FrmEquipmentManage.cs index 3acd653..9a558a6 100644 --- a/FrmEquipmentManage.cs +++ b/FrmEquipmentManage.cs @@ -44,15 +44,15 @@ private void initForm() { - if (!Utility.userRole.Contains("探测仪新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪新增")) { btnAddDev.Visible = false; } - if (!Utility.userRole.Contains("探测仪删除")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪删除")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; } - if (!Utility.userRole.Contains("探测仪编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } @@ -129,7 +129,7 @@ /// private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) { - if (!Utility.userRole.Contains("探测仪编辑")) return; + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) return; DataGridView grid = sender as DataGridView; if (grid != null && grid.SelectedRows.Count > 0) diff --git a/FrmLogin.cs b/FrmLogin.cs index 294cf14..baf7f52 100644 --- a/FrmLogin.cs +++ b/FrmLogin.cs @@ -117,7 +117,7 @@ private void FrmLogin_Load(object sender, EventArgs e) {//global::Cyberpipe.Properties.Resources.登录页3; this.pictureBox1.BackgroundImage = Image.FromFile(Application.StartupPath + Utility.LoginImgPath); ; - Utility.SetParams(); +// Utility.SetParams(); StartPosition = FormStartPosition.CenterScreen; diff --git a/FrmPatrolerManager.cs b/FrmPatrolerManager.cs index b802788..7134bc7 100644 --- a/FrmPatrolerManager.cs +++ b/FrmPatrolerManager.cs @@ -177,15 +177,15 @@ private void initForm() { - if (!Utility.userRole.Contains("巡检员新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员新增")) { btn_add_person.Visible = false; } - if (!Utility.userRole.Contains("巡检员编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员编辑")) { 编辑ToolStripMenuItem.Visible = false; } - if (!Utility.userRole.Contains("巡检员注销")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员注销")) { 注销ToolStripMenuItem.Visible = false; } diff --git a/FrmRoleInfoManager.cs b/FrmRoleInfoManager.cs index c02635d..55348ce 100644 --- a/FrmRoleInfoManager.cs +++ b/FrmRoleInfoManager.cs @@ -16,11 +16,11 @@ private void FrmRoleInfoManager_Load(object sender, EventArgs e) { reloadGrid(); - if (Utility.userRole.IndexOf("角色新增") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色新增")) { btn_add.Visible = false; } - if (Utility.userRole.IndexOf("角色删除") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色删除")) { dataGridViewX1.Columns["btndel"].Visible = false; } diff --git a/FrmRoleRescManager.cs b/FrmRoleRescManager.cs index 13640ce..3e30a2d 100644 --- a/FrmRoleRescManager.cs +++ b/FrmRoleRescManager.cs @@ -20,7 +20,7 @@ IS_OPEN = true; initForm(""); initCombox(); - if (Utility.userRole.IndexOf("角色授权") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色授权")) { btn_ok.Visible = false; } diff --git a/FrmSysUserInfoManger.cs b/FrmSysUserInfoManger.cs index 4d1b7da..d9492a9 100644 --- a/FrmSysUserInfoManger.cs +++ b/FrmSysUserInfoManger.cs @@ -22,11 +22,11 @@ { IS_OPEN = true; reloadGrid(currentpage); - if (Utility.userRole.IndexOf("用户新增") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("用户新增")) { btn_add.Visible = false; } - if (Utility.userRole.IndexOf("用户删除") == -1) + if (Utility.isNeedLogin && Utility.userRole.Contains("用户删除")) { dataGridViewX1.Columns["btndel"].Visible = false; } diff --git a/FrmUserRole.cs b/FrmUserRole.cs index b5feef0..e9f7c0d 100644 --- a/FrmUserRole.cs +++ b/FrmUserRole.cs @@ -19,7 +19,7 @@ IS_OPEN = true; reloadGrid(-1); initCombox(); - if (Utility.userRole.IndexOf("用户授权") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("用户授权")) { btn_ok.Visible = false; } diff --git a/MainFrm.cs b/MainFrm.cs index d1a2b2f..cb461f5 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -152,8 +152,11 @@ balloonEx2 = new GSOBalloonEx(globeControl2.Handle); Utility.SetBallons(featureTooltip, balloonEx); panelOfTable.Height = 200; - RigthMenuSet(); - MenuSet(); + if (Utility.isNeedLogin) + { + RigthMenuSet(); + MenuSet(); + } } /// diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index e9a299a..4c0dec2 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -245,6 +245,13 @@ this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.定位ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl(); + this.ribbonPanel6 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar6 = new DevComponents.DotNetBar.RibbonBar(); + this.buttonItemSPSZ = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem8 = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItemLocation = new DevComponents.DotNetBar.ButtonItem(); + this.sliderItem2 = new DevComponents.DotNetBar.SliderItem(); + this.buttonItemGBJC = new DevComponents.DotNetBar.ButtonItem(); this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); @@ -351,13 +358,6 @@ this.btnlegendSet = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem89 = new DevComponents.DotNetBar.ButtonItem(); this.btnOutputJPG = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel6 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar6 = new DevComponents.DotNetBar.RibbonBar(); - this.buttonItemSPSZ = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem8 = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItemLocation = new DevComponents.DotNetBar.ButtonItem(); - this.sliderItem2 = new DevComponents.DotNetBar.SliderItem(); - this.buttonItemGBJC = new DevComponents.DotNetBar.ButtonItem(); this.ribbonTabItem1 = new DevComponents.DotNetBar.RibbonTabItem(); this.ribbonTabItem11 = new DevComponents.DotNetBar.RibbonTabItem(); this.ribbonTabItem6 = new DevComponents.DotNetBar.RibbonTabItem(); @@ -529,6 +529,7 @@ this.contextMenuStrip3.SuspendLayout(); this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); + this.ribbonPanel6.SuspendLayout(); this.ribbonPanel2.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); @@ -537,7 +538,6 @@ this.ribbonPanel12.SuspendLayout(); this.ribbonPanel4.SuspendLayout(); this.ribbonPanel1.SuspendLayout(); - this.ribbonPanel6.SuspendLayout(); this.panelOfTable.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX1)).BeginInit(); this.statusStrip2.SuspendLayout(); @@ -720,7 +720,7 @@ this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image"))); this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripDropDownButton1.Name = "toolStripDropDownButton1"; - this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 21); + this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 20); this.toolStripDropDownButton1.Text = "帮助"; this.toolStripDropDownButton1.Visible = false; // @@ -2213,6 +2213,116 @@ this.ribbonControl1.Text = "ribbonControl1"; this.ribbonControl1.UseCustomizeDialog = false; // + // ribbonPanel6 + // + this.ribbonPanel6.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel6.Controls.Add(this.ribbonBar6); + this.ribbonPanel6.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel6.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel6.Name = "ribbonPanel6"; + this.ribbonPanel6.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel6.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel6.Style.Class = ""; + this.ribbonPanel6.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel6.StyleMouseDown.Class = ""; + this.ribbonPanel6.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel6.StyleMouseOver.Class = ""; + this.ribbonPanel6.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel6.TabIndex = 38; + // + // ribbonBar6 + // + this.ribbonBar6.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar6.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar6.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar6.BackgroundStyle.Class = ""; + this.ribbonBar6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar6.ContainerControlProcessDialogKey = true; + this.ribbonBar6.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar6.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.buttonItemSPSZ, + this.buttonItem8, + this.buttonItemLocation, + this.sliderItem2, + this.buttonItemGBJC}); + this.ribbonBar6.Location = new System.Drawing.Point(3, 0); + this.ribbonBar6.Name = "ribbonBar6"; + this.ribbonBar6.Size = new System.Drawing.Size(427, 59); + this.ribbonBar6.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar6.TabIndex = 0; + // + // + // + this.ribbonBar6.TitleStyle.Class = ""; + this.ribbonBar6.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar6.TitleStyleMouseOver.Class = ""; + this.ribbonBar6.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar6.TitleVisible = false; + // + // buttonItemSPSZ + // + this.buttonItemSPSZ.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemSPSZ.Image"))); + this.buttonItemSPSZ.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemSPSZ.Name = "buttonItemSPSZ"; + this.buttonItemSPSZ.SubItemsExpandWidth = 14; + this.buttonItemSPSZ.Text = "双屏设置"; + this.buttonItemSPSZ.Click += new System.EventHandler(this.buttonItemSPSZ_Click); + // + // buttonItem8 + // + this.buttonItem8.Image = ((System.Drawing.Image)(resources.GetObject("buttonItem8.Image"))); + this.buttonItem8.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem8.Name = "buttonItem8"; + this.buttonItem8.SubItemsExpandWidth = 14; + this.buttonItem8.Text = "双屏分析"; + this.buttonItem8.Click += new System.EventHandler(this.buttonItem8_Click); + // + // buttonItemLocation + // + this.buttonItemLocation.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemLocation.Image"))); + this.buttonItemLocation.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemLocation.Name = "buttonItemLocation"; + this.buttonItemLocation.SubItemsExpandWidth = 14; + this.buttonItemLocation.Text = "快速定位"; + this.buttonItemLocation.Click += new System.EventHandler(this.buttonItemLocation_Click); + // + // sliderItem2 + // + this.sliderItem2.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.sliderItem2.LabelWidth = 50; + this.sliderItem2.Name = "sliderItem2"; + this.sliderItem2.Text = "地面透明度"; + this.sliderItem2.TextColor = System.Drawing.Color.Black; + this.sliderItem2.Value = 0; + this.sliderItem2.ValueChanged += new System.EventHandler(this.sliderItem2_ValueChanged); + // + // buttonItemGBJC + // + this.buttonItemGBJC.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemGBJC.Image"))); + this.buttonItemGBJC.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemGBJC.Name = "buttonItemGBJC"; + this.buttonItemGBJC.SubItemsExpandWidth = 14; + this.buttonItemGBJC.Text = "国标检测"; + this.buttonItemGBJC.Click += new System.EventHandler(this.buttonItemGBJC_Click); + // // ribbonPanel2 // this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -3513,116 +3623,6 @@ this.btnOutputJPG.Text = "导出图片"; this.btnOutputJPG.Click += new System.EventHandler(this.btnOutputJPG_Click); // - // ribbonPanel6 - // - this.ribbonPanel6.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel6.Controls.Add(this.ribbonBar6); - this.ribbonPanel6.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel6.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel6.Name = "ribbonPanel6"; - this.ribbonPanel6.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel6.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel6.Style.Class = ""; - this.ribbonPanel6.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel6.StyleMouseDown.Class = ""; - this.ribbonPanel6.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel6.StyleMouseOver.Class = ""; - this.ribbonPanel6.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel6.TabIndex = 38; - // - // ribbonBar6 - // - this.ribbonBar6.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar6.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar6.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar6.BackgroundStyle.Class = ""; - this.ribbonBar6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar6.ContainerControlProcessDialogKey = true; - this.ribbonBar6.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar6.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.buttonItemSPSZ, - this.buttonItem8, - this.buttonItemLocation, - this.sliderItem2, - this.buttonItemGBJC}); - this.ribbonBar6.Location = new System.Drawing.Point(3, 0); - this.ribbonBar6.Name = "ribbonBar6"; - this.ribbonBar6.Size = new System.Drawing.Size(427, 59); - this.ribbonBar6.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar6.TabIndex = 0; - // - // - // - this.ribbonBar6.TitleStyle.Class = ""; - this.ribbonBar6.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar6.TitleStyleMouseOver.Class = ""; - this.ribbonBar6.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar6.TitleVisible = false; - // - // buttonItemSPSZ - // - this.buttonItemSPSZ.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemSPSZ.Image"))); - this.buttonItemSPSZ.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemSPSZ.Name = "buttonItemSPSZ"; - this.buttonItemSPSZ.SubItemsExpandWidth = 14; - this.buttonItemSPSZ.Text = "双屏设置"; - this.buttonItemSPSZ.Click += new System.EventHandler(this.buttonItemSPSZ_Click); - // - // buttonItem8 - // - this.buttonItem8.Image = ((System.Drawing.Image)(resources.GetObject("buttonItem8.Image"))); - this.buttonItem8.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem8.Name = "buttonItem8"; - this.buttonItem8.SubItemsExpandWidth = 14; - this.buttonItem8.Text = "双屏分析"; - this.buttonItem8.Click += new System.EventHandler(this.buttonItem8_Click); - // - // buttonItemLocation - // - this.buttonItemLocation.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemLocation.Image"))); - this.buttonItemLocation.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemLocation.Name = "buttonItemLocation"; - this.buttonItemLocation.SubItemsExpandWidth = 14; - this.buttonItemLocation.Text = "快速定位"; - this.buttonItemLocation.Click += new System.EventHandler(this.buttonItemLocation_Click); - // - // sliderItem2 - // - this.sliderItem2.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.sliderItem2.LabelWidth = 50; - this.sliderItem2.Name = "sliderItem2"; - this.sliderItem2.Text = "地面透明度"; - this.sliderItem2.TextColor = System.Drawing.Color.Black; - this.sliderItem2.Value = 0; - this.sliderItem2.ValueChanged += new System.EventHandler(this.sliderItem2_ValueChanged); - // - // buttonItemGBJC - // - this.buttonItemGBJC.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemGBJC.Image"))); - this.buttonItemGBJC.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemGBJC.Name = "buttonItemGBJC"; - this.buttonItemGBJC.SubItemsExpandWidth = 14; - this.buttonItemGBJC.Text = "国标检测"; - this.buttonItemGBJC.Click += new System.EventHandler(this.buttonItemGBJC_Click); - // // ribbonTabItem1 // this.ribbonTabItem1.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; @@ -4469,7 +4469,7 @@ this.dataGridViewX2.ReadOnly = true; this.dataGridViewX2.RowHeadersVisible = false; this.dataGridViewX2.RowTemplate.Height = 23; - this.dataGridViewX2.Size = new System.Drawing.Size(33457, 92); + this.dataGridViewX2.Size = new System.Drawing.Size(33754, 92); this.dataGridViewX2.TabIndex = 11; // // dataGridViewTextBoxColumn10 @@ -4563,7 +4563,7 @@ this.dataGridViewX3.ReadOnly = true; this.dataGridViewX3.RowHeadersVisible = false; this.dataGridViewX3.RowTemplate.Height = 23; - this.dataGridViewX3.Size = new System.Drawing.Size(33456, 127); + this.dataGridViewX3.Size = new System.Drawing.Size(33753, 127); this.dataGridViewX3.TabIndex = 5; this.dataGridViewX3.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX3_MouseDoubleClick); // @@ -5791,6 +5791,7 @@ this.contextMenuStripDeleteLayerNode.ResumeLayout(false); this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); + this.ribbonPanel6.ResumeLayout(false); this.ribbonPanel2.ResumeLayout(false); this.ribbonPanel3.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); @@ -5799,7 +5800,6 @@ this.ribbonPanel12.ResumeLayout(false); this.ribbonPanel4.ResumeLayout(false); this.ribbonPanel1.ResumeLayout(false); - this.ribbonPanel6.ResumeLayout(false); this.panelOfTable.ResumeLayout(false); this.panelOfTable.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX1)).EndInit(); diff --git a/Program.cs b/Program.cs index a76d0d4..2aff883 100644 --- a/Program.cs +++ b/Program.cs @@ -48,18 +48,28 @@ Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - FrmLogin frm = new FrmLogin(); - if (frm.ShowDialog() == DialogResult.OK) + Utility.SetParams(); + + if (Utility.isNeedLogin)//是否需要登录功能 { - if (Utility.userRole != null) + FrmLogin frm = new FrmLogin(); + if (frm.ShowDialog() == DialogResult.OK) { - Application.Run(new MainFrm()); - } - else - { - MessageBox.Show("该用户没有分配任何角色!"); + if (Utility.userRole != null) + { + Application.Run(new MainFrm()); + } + else + { + MessageBox.Show("该用户没有分配任何角色!"); + } } } + else + { + Application.Run(new MainFrm()); + } + } private static void remoteUpDate() diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 900711a..639e266 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index f127496..f0b8f7d 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -60,7 +60,7 @@ } conn.Close(); - if (!Utility.userRole.Equals("事件编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Equals("事件编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index e4c3928..c5c43b5 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -77,7 +77,7 @@ comboBox_state.Items.Add("任务执行中"); comboBox_state.Items.Add("结束任务"); - if (!Utility.userRole.Contains("工单创建")) + if (Utility.isNeedLogin&&!Utility.userRole.Contains("工单创建")) { button_new.Visible = false; } diff --git a/FrmEquipmentManage.cs b/FrmEquipmentManage.cs index 3acd653..9a558a6 100644 --- a/FrmEquipmentManage.cs +++ b/FrmEquipmentManage.cs @@ -44,15 +44,15 @@ private void initForm() { - if (!Utility.userRole.Contains("探测仪新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪新增")) { btnAddDev.Visible = false; } - if (!Utility.userRole.Contains("探测仪删除")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪删除")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; } - if (!Utility.userRole.Contains("探测仪编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } @@ -129,7 +129,7 @@ /// private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) { - if (!Utility.userRole.Contains("探测仪编辑")) return; + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) return; DataGridView grid = sender as DataGridView; if (grid != null && grid.SelectedRows.Count > 0) diff --git a/FrmLogin.cs b/FrmLogin.cs index 294cf14..baf7f52 100644 --- a/FrmLogin.cs +++ b/FrmLogin.cs @@ -117,7 +117,7 @@ private void FrmLogin_Load(object sender, EventArgs e) {//global::Cyberpipe.Properties.Resources.登录页3; this.pictureBox1.BackgroundImage = Image.FromFile(Application.StartupPath + Utility.LoginImgPath); ; - Utility.SetParams(); +// Utility.SetParams(); StartPosition = FormStartPosition.CenterScreen; diff --git a/FrmPatrolerManager.cs b/FrmPatrolerManager.cs index b802788..7134bc7 100644 --- a/FrmPatrolerManager.cs +++ b/FrmPatrolerManager.cs @@ -177,15 +177,15 @@ private void initForm() { - if (!Utility.userRole.Contains("巡检员新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员新增")) { btn_add_person.Visible = false; } - if (!Utility.userRole.Contains("巡检员编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员编辑")) { 编辑ToolStripMenuItem.Visible = false; } - if (!Utility.userRole.Contains("巡检员注销")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员注销")) { 注销ToolStripMenuItem.Visible = false; } diff --git a/FrmRoleInfoManager.cs b/FrmRoleInfoManager.cs index c02635d..55348ce 100644 --- a/FrmRoleInfoManager.cs +++ b/FrmRoleInfoManager.cs @@ -16,11 +16,11 @@ private void FrmRoleInfoManager_Load(object sender, EventArgs e) { reloadGrid(); - if (Utility.userRole.IndexOf("角色新增") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色新增")) { btn_add.Visible = false; } - if (Utility.userRole.IndexOf("角色删除") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色删除")) { dataGridViewX1.Columns["btndel"].Visible = false; } diff --git a/FrmRoleRescManager.cs b/FrmRoleRescManager.cs index 13640ce..3e30a2d 100644 --- a/FrmRoleRescManager.cs +++ b/FrmRoleRescManager.cs @@ -20,7 +20,7 @@ IS_OPEN = true; initForm(""); initCombox(); - if (Utility.userRole.IndexOf("角色授权") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色授权")) { btn_ok.Visible = false; } diff --git a/FrmSysUserInfoManger.cs b/FrmSysUserInfoManger.cs index 4d1b7da..d9492a9 100644 --- a/FrmSysUserInfoManger.cs +++ b/FrmSysUserInfoManger.cs @@ -22,11 +22,11 @@ { IS_OPEN = true; reloadGrid(currentpage); - if (Utility.userRole.IndexOf("用户新增") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("用户新增")) { btn_add.Visible = false; } - if (Utility.userRole.IndexOf("用户删除") == -1) + if (Utility.isNeedLogin && Utility.userRole.Contains("用户删除")) { dataGridViewX1.Columns["btndel"].Visible = false; } diff --git a/FrmUserRole.cs b/FrmUserRole.cs index b5feef0..e9f7c0d 100644 --- a/FrmUserRole.cs +++ b/FrmUserRole.cs @@ -19,7 +19,7 @@ IS_OPEN = true; reloadGrid(-1); initCombox(); - if (Utility.userRole.IndexOf("用户授权") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("用户授权")) { btn_ok.Visible = false; } diff --git a/MainFrm.cs b/MainFrm.cs index d1a2b2f..cb461f5 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -152,8 +152,11 @@ balloonEx2 = new GSOBalloonEx(globeControl2.Handle); Utility.SetBallons(featureTooltip, balloonEx); panelOfTable.Height = 200; - RigthMenuSet(); - MenuSet(); + if (Utility.isNeedLogin) + { + RigthMenuSet(); + MenuSet(); + } } /// diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index e9a299a..4c0dec2 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -245,6 +245,13 @@ this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.定位ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl(); + this.ribbonPanel6 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar6 = new DevComponents.DotNetBar.RibbonBar(); + this.buttonItemSPSZ = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem8 = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItemLocation = new DevComponents.DotNetBar.ButtonItem(); + this.sliderItem2 = new DevComponents.DotNetBar.SliderItem(); + this.buttonItemGBJC = new DevComponents.DotNetBar.ButtonItem(); this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); @@ -351,13 +358,6 @@ this.btnlegendSet = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem89 = new DevComponents.DotNetBar.ButtonItem(); this.btnOutputJPG = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel6 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar6 = new DevComponents.DotNetBar.RibbonBar(); - this.buttonItemSPSZ = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem8 = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItemLocation = new DevComponents.DotNetBar.ButtonItem(); - this.sliderItem2 = new DevComponents.DotNetBar.SliderItem(); - this.buttonItemGBJC = new DevComponents.DotNetBar.ButtonItem(); this.ribbonTabItem1 = new DevComponents.DotNetBar.RibbonTabItem(); this.ribbonTabItem11 = new DevComponents.DotNetBar.RibbonTabItem(); this.ribbonTabItem6 = new DevComponents.DotNetBar.RibbonTabItem(); @@ -529,6 +529,7 @@ this.contextMenuStrip3.SuspendLayout(); this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); + this.ribbonPanel6.SuspendLayout(); this.ribbonPanel2.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); @@ -537,7 +538,6 @@ this.ribbonPanel12.SuspendLayout(); this.ribbonPanel4.SuspendLayout(); this.ribbonPanel1.SuspendLayout(); - this.ribbonPanel6.SuspendLayout(); this.panelOfTable.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX1)).BeginInit(); this.statusStrip2.SuspendLayout(); @@ -720,7 +720,7 @@ this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image"))); this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripDropDownButton1.Name = "toolStripDropDownButton1"; - this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 21); + this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 20); this.toolStripDropDownButton1.Text = "帮助"; this.toolStripDropDownButton1.Visible = false; // @@ -2213,6 +2213,116 @@ this.ribbonControl1.Text = "ribbonControl1"; this.ribbonControl1.UseCustomizeDialog = false; // + // ribbonPanel6 + // + this.ribbonPanel6.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel6.Controls.Add(this.ribbonBar6); + this.ribbonPanel6.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel6.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel6.Name = "ribbonPanel6"; + this.ribbonPanel6.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel6.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel6.Style.Class = ""; + this.ribbonPanel6.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel6.StyleMouseDown.Class = ""; + this.ribbonPanel6.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel6.StyleMouseOver.Class = ""; + this.ribbonPanel6.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel6.TabIndex = 38; + // + // ribbonBar6 + // + this.ribbonBar6.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar6.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar6.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar6.BackgroundStyle.Class = ""; + this.ribbonBar6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar6.ContainerControlProcessDialogKey = true; + this.ribbonBar6.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar6.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.buttonItemSPSZ, + this.buttonItem8, + this.buttonItemLocation, + this.sliderItem2, + this.buttonItemGBJC}); + this.ribbonBar6.Location = new System.Drawing.Point(3, 0); + this.ribbonBar6.Name = "ribbonBar6"; + this.ribbonBar6.Size = new System.Drawing.Size(427, 59); + this.ribbonBar6.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar6.TabIndex = 0; + // + // + // + this.ribbonBar6.TitleStyle.Class = ""; + this.ribbonBar6.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar6.TitleStyleMouseOver.Class = ""; + this.ribbonBar6.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar6.TitleVisible = false; + // + // buttonItemSPSZ + // + this.buttonItemSPSZ.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemSPSZ.Image"))); + this.buttonItemSPSZ.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemSPSZ.Name = "buttonItemSPSZ"; + this.buttonItemSPSZ.SubItemsExpandWidth = 14; + this.buttonItemSPSZ.Text = "双屏设置"; + this.buttonItemSPSZ.Click += new System.EventHandler(this.buttonItemSPSZ_Click); + // + // buttonItem8 + // + this.buttonItem8.Image = ((System.Drawing.Image)(resources.GetObject("buttonItem8.Image"))); + this.buttonItem8.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem8.Name = "buttonItem8"; + this.buttonItem8.SubItemsExpandWidth = 14; + this.buttonItem8.Text = "双屏分析"; + this.buttonItem8.Click += new System.EventHandler(this.buttonItem8_Click); + // + // buttonItemLocation + // + this.buttonItemLocation.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemLocation.Image"))); + this.buttonItemLocation.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemLocation.Name = "buttonItemLocation"; + this.buttonItemLocation.SubItemsExpandWidth = 14; + this.buttonItemLocation.Text = "快速定位"; + this.buttonItemLocation.Click += new System.EventHandler(this.buttonItemLocation_Click); + // + // sliderItem2 + // + this.sliderItem2.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.sliderItem2.LabelWidth = 50; + this.sliderItem2.Name = "sliderItem2"; + this.sliderItem2.Text = "地面透明度"; + this.sliderItem2.TextColor = System.Drawing.Color.Black; + this.sliderItem2.Value = 0; + this.sliderItem2.ValueChanged += new System.EventHandler(this.sliderItem2_ValueChanged); + // + // buttonItemGBJC + // + this.buttonItemGBJC.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemGBJC.Image"))); + this.buttonItemGBJC.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemGBJC.Name = "buttonItemGBJC"; + this.buttonItemGBJC.SubItemsExpandWidth = 14; + this.buttonItemGBJC.Text = "国标检测"; + this.buttonItemGBJC.Click += new System.EventHandler(this.buttonItemGBJC_Click); + // // ribbonPanel2 // this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -3513,116 +3623,6 @@ this.btnOutputJPG.Text = "导出图片"; this.btnOutputJPG.Click += new System.EventHandler(this.btnOutputJPG_Click); // - // ribbonPanel6 - // - this.ribbonPanel6.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel6.Controls.Add(this.ribbonBar6); - this.ribbonPanel6.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel6.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel6.Name = "ribbonPanel6"; - this.ribbonPanel6.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel6.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel6.Style.Class = ""; - this.ribbonPanel6.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel6.StyleMouseDown.Class = ""; - this.ribbonPanel6.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel6.StyleMouseOver.Class = ""; - this.ribbonPanel6.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel6.TabIndex = 38; - // - // ribbonBar6 - // - this.ribbonBar6.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar6.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar6.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar6.BackgroundStyle.Class = ""; - this.ribbonBar6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar6.ContainerControlProcessDialogKey = true; - this.ribbonBar6.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar6.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.buttonItemSPSZ, - this.buttonItem8, - this.buttonItemLocation, - this.sliderItem2, - this.buttonItemGBJC}); - this.ribbonBar6.Location = new System.Drawing.Point(3, 0); - this.ribbonBar6.Name = "ribbonBar6"; - this.ribbonBar6.Size = new System.Drawing.Size(427, 59); - this.ribbonBar6.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar6.TabIndex = 0; - // - // - // - this.ribbonBar6.TitleStyle.Class = ""; - this.ribbonBar6.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar6.TitleStyleMouseOver.Class = ""; - this.ribbonBar6.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar6.TitleVisible = false; - // - // buttonItemSPSZ - // - this.buttonItemSPSZ.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemSPSZ.Image"))); - this.buttonItemSPSZ.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemSPSZ.Name = "buttonItemSPSZ"; - this.buttonItemSPSZ.SubItemsExpandWidth = 14; - this.buttonItemSPSZ.Text = "双屏设置"; - this.buttonItemSPSZ.Click += new System.EventHandler(this.buttonItemSPSZ_Click); - // - // buttonItem8 - // - this.buttonItem8.Image = ((System.Drawing.Image)(resources.GetObject("buttonItem8.Image"))); - this.buttonItem8.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem8.Name = "buttonItem8"; - this.buttonItem8.SubItemsExpandWidth = 14; - this.buttonItem8.Text = "双屏分析"; - this.buttonItem8.Click += new System.EventHandler(this.buttonItem8_Click); - // - // buttonItemLocation - // - this.buttonItemLocation.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemLocation.Image"))); - this.buttonItemLocation.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemLocation.Name = "buttonItemLocation"; - this.buttonItemLocation.SubItemsExpandWidth = 14; - this.buttonItemLocation.Text = "快速定位"; - this.buttonItemLocation.Click += new System.EventHandler(this.buttonItemLocation_Click); - // - // sliderItem2 - // - this.sliderItem2.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.sliderItem2.LabelWidth = 50; - this.sliderItem2.Name = "sliderItem2"; - this.sliderItem2.Text = "地面透明度"; - this.sliderItem2.TextColor = System.Drawing.Color.Black; - this.sliderItem2.Value = 0; - this.sliderItem2.ValueChanged += new System.EventHandler(this.sliderItem2_ValueChanged); - // - // buttonItemGBJC - // - this.buttonItemGBJC.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemGBJC.Image"))); - this.buttonItemGBJC.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemGBJC.Name = "buttonItemGBJC"; - this.buttonItemGBJC.SubItemsExpandWidth = 14; - this.buttonItemGBJC.Text = "国标检测"; - this.buttonItemGBJC.Click += new System.EventHandler(this.buttonItemGBJC_Click); - // // ribbonTabItem1 // this.ribbonTabItem1.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; @@ -4469,7 +4469,7 @@ this.dataGridViewX2.ReadOnly = true; this.dataGridViewX2.RowHeadersVisible = false; this.dataGridViewX2.RowTemplate.Height = 23; - this.dataGridViewX2.Size = new System.Drawing.Size(33457, 92); + this.dataGridViewX2.Size = new System.Drawing.Size(33754, 92); this.dataGridViewX2.TabIndex = 11; // // dataGridViewTextBoxColumn10 @@ -4563,7 +4563,7 @@ this.dataGridViewX3.ReadOnly = true; this.dataGridViewX3.RowHeadersVisible = false; this.dataGridViewX3.RowTemplate.Height = 23; - this.dataGridViewX3.Size = new System.Drawing.Size(33456, 127); + this.dataGridViewX3.Size = new System.Drawing.Size(33753, 127); this.dataGridViewX3.TabIndex = 5; this.dataGridViewX3.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX3_MouseDoubleClick); // @@ -5791,6 +5791,7 @@ this.contextMenuStripDeleteLayerNode.ResumeLayout(false); this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); + this.ribbonPanel6.ResumeLayout(false); this.ribbonPanel2.ResumeLayout(false); this.ribbonPanel3.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); @@ -5799,7 +5800,6 @@ this.ribbonPanel12.ResumeLayout(false); this.ribbonPanel4.ResumeLayout(false); this.ribbonPanel1.ResumeLayout(false); - this.ribbonPanel6.ResumeLayout(false); this.panelOfTable.ResumeLayout(false); this.panelOfTable.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX1)).EndInit(); diff --git a/Program.cs b/Program.cs index a76d0d4..2aff883 100644 --- a/Program.cs +++ b/Program.cs @@ -48,18 +48,28 @@ Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - FrmLogin frm = new FrmLogin(); - if (frm.ShowDialog() == DialogResult.OK) + Utility.SetParams(); + + if (Utility.isNeedLogin)//是否需要登录功能 { - if (Utility.userRole != null) + FrmLogin frm = new FrmLogin(); + if (frm.ShowDialog() == DialogResult.OK) { - Application.Run(new MainFrm()); - } - else - { - MessageBox.Show("该用户没有分配任何角色!"); + if (Utility.userRole != null) + { + Application.Run(new MainFrm()); + } + else + { + MessageBox.Show("该用户没有分配任何角色!"); + } } } + else + { + Application.Run(new MainFrm()); + } + } private static void remoteUpDate() diff --git a/SysRescInfoManager.cs b/SysRescInfoManager.cs index 7e643a0..5bb9699 100644 --- a/SysRescInfoManager.cs +++ b/SysRescInfoManager.cs @@ -19,11 +19,11 @@ { IS_OPEN = true; reloadGrid(); - if (Utility.userRole.IndexOf("资源新增") == -1) + if (Utility.isNeedLogin&&!Utility.userRole.Contains("资源新增")) { btn_add.Visible = false; } - if (Utility.userRole.IndexOf("资源删除") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("资源删除")) { dataGridViewX1.Columns["btndel"].Visible = false; } diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 900711a..639e266 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index f127496..f0b8f7d 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -60,7 +60,7 @@ } conn.Close(); - if (!Utility.userRole.Equals("事件编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Equals("事件编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index e4c3928..c5c43b5 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -77,7 +77,7 @@ comboBox_state.Items.Add("任务执行中"); comboBox_state.Items.Add("结束任务"); - if (!Utility.userRole.Contains("工单创建")) + if (Utility.isNeedLogin&&!Utility.userRole.Contains("工单创建")) { button_new.Visible = false; } diff --git a/FrmEquipmentManage.cs b/FrmEquipmentManage.cs index 3acd653..9a558a6 100644 --- a/FrmEquipmentManage.cs +++ b/FrmEquipmentManage.cs @@ -44,15 +44,15 @@ private void initForm() { - if (!Utility.userRole.Contains("探测仪新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪新增")) { btnAddDev.Visible = false; } - if (!Utility.userRole.Contains("探测仪删除")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪删除")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; } - if (!Utility.userRole.Contains("探测仪编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } @@ -129,7 +129,7 @@ /// private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) { - if (!Utility.userRole.Contains("探测仪编辑")) return; + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) return; DataGridView grid = sender as DataGridView; if (grid != null && grid.SelectedRows.Count > 0) diff --git a/FrmLogin.cs b/FrmLogin.cs index 294cf14..baf7f52 100644 --- a/FrmLogin.cs +++ b/FrmLogin.cs @@ -117,7 +117,7 @@ private void FrmLogin_Load(object sender, EventArgs e) {//global::Cyberpipe.Properties.Resources.登录页3; this.pictureBox1.BackgroundImage = Image.FromFile(Application.StartupPath + Utility.LoginImgPath); ; - Utility.SetParams(); +// Utility.SetParams(); StartPosition = FormStartPosition.CenterScreen; diff --git a/FrmPatrolerManager.cs b/FrmPatrolerManager.cs index b802788..7134bc7 100644 --- a/FrmPatrolerManager.cs +++ b/FrmPatrolerManager.cs @@ -177,15 +177,15 @@ private void initForm() { - if (!Utility.userRole.Contains("巡检员新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员新增")) { btn_add_person.Visible = false; } - if (!Utility.userRole.Contains("巡检员编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员编辑")) { 编辑ToolStripMenuItem.Visible = false; } - if (!Utility.userRole.Contains("巡检员注销")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员注销")) { 注销ToolStripMenuItem.Visible = false; } diff --git a/FrmRoleInfoManager.cs b/FrmRoleInfoManager.cs index c02635d..55348ce 100644 --- a/FrmRoleInfoManager.cs +++ b/FrmRoleInfoManager.cs @@ -16,11 +16,11 @@ private void FrmRoleInfoManager_Load(object sender, EventArgs e) { reloadGrid(); - if (Utility.userRole.IndexOf("角色新增") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色新增")) { btn_add.Visible = false; } - if (Utility.userRole.IndexOf("角色删除") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色删除")) { dataGridViewX1.Columns["btndel"].Visible = false; } diff --git a/FrmRoleRescManager.cs b/FrmRoleRescManager.cs index 13640ce..3e30a2d 100644 --- a/FrmRoleRescManager.cs +++ b/FrmRoleRescManager.cs @@ -20,7 +20,7 @@ IS_OPEN = true; initForm(""); initCombox(); - if (Utility.userRole.IndexOf("角色授权") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色授权")) { btn_ok.Visible = false; } diff --git a/FrmSysUserInfoManger.cs b/FrmSysUserInfoManger.cs index 4d1b7da..d9492a9 100644 --- a/FrmSysUserInfoManger.cs +++ b/FrmSysUserInfoManger.cs @@ -22,11 +22,11 @@ { IS_OPEN = true; reloadGrid(currentpage); - if (Utility.userRole.IndexOf("用户新增") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("用户新增")) { btn_add.Visible = false; } - if (Utility.userRole.IndexOf("用户删除") == -1) + if (Utility.isNeedLogin && Utility.userRole.Contains("用户删除")) { dataGridViewX1.Columns["btndel"].Visible = false; } diff --git a/FrmUserRole.cs b/FrmUserRole.cs index b5feef0..e9f7c0d 100644 --- a/FrmUserRole.cs +++ b/FrmUserRole.cs @@ -19,7 +19,7 @@ IS_OPEN = true; reloadGrid(-1); initCombox(); - if (Utility.userRole.IndexOf("用户授权") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("用户授权")) { btn_ok.Visible = false; } diff --git a/MainFrm.cs b/MainFrm.cs index d1a2b2f..cb461f5 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -152,8 +152,11 @@ balloonEx2 = new GSOBalloonEx(globeControl2.Handle); Utility.SetBallons(featureTooltip, balloonEx); panelOfTable.Height = 200; - RigthMenuSet(); - MenuSet(); + if (Utility.isNeedLogin) + { + RigthMenuSet(); + MenuSet(); + } } /// diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index e9a299a..4c0dec2 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -245,6 +245,13 @@ this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.定位ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl(); + this.ribbonPanel6 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar6 = new DevComponents.DotNetBar.RibbonBar(); + this.buttonItemSPSZ = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem8 = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItemLocation = new DevComponents.DotNetBar.ButtonItem(); + this.sliderItem2 = new DevComponents.DotNetBar.SliderItem(); + this.buttonItemGBJC = new DevComponents.DotNetBar.ButtonItem(); this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); @@ -351,13 +358,6 @@ this.btnlegendSet = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem89 = new DevComponents.DotNetBar.ButtonItem(); this.btnOutputJPG = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel6 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar6 = new DevComponents.DotNetBar.RibbonBar(); - this.buttonItemSPSZ = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem8 = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItemLocation = new DevComponents.DotNetBar.ButtonItem(); - this.sliderItem2 = new DevComponents.DotNetBar.SliderItem(); - this.buttonItemGBJC = new DevComponents.DotNetBar.ButtonItem(); this.ribbonTabItem1 = new DevComponents.DotNetBar.RibbonTabItem(); this.ribbonTabItem11 = new DevComponents.DotNetBar.RibbonTabItem(); this.ribbonTabItem6 = new DevComponents.DotNetBar.RibbonTabItem(); @@ -529,6 +529,7 @@ this.contextMenuStrip3.SuspendLayout(); this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); + this.ribbonPanel6.SuspendLayout(); this.ribbonPanel2.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); @@ -537,7 +538,6 @@ this.ribbonPanel12.SuspendLayout(); this.ribbonPanel4.SuspendLayout(); this.ribbonPanel1.SuspendLayout(); - this.ribbonPanel6.SuspendLayout(); this.panelOfTable.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX1)).BeginInit(); this.statusStrip2.SuspendLayout(); @@ -720,7 +720,7 @@ this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image"))); this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripDropDownButton1.Name = "toolStripDropDownButton1"; - this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 21); + this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 20); this.toolStripDropDownButton1.Text = "帮助"; this.toolStripDropDownButton1.Visible = false; // @@ -2213,6 +2213,116 @@ this.ribbonControl1.Text = "ribbonControl1"; this.ribbonControl1.UseCustomizeDialog = false; // + // ribbonPanel6 + // + this.ribbonPanel6.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel6.Controls.Add(this.ribbonBar6); + this.ribbonPanel6.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel6.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel6.Name = "ribbonPanel6"; + this.ribbonPanel6.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel6.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel6.Style.Class = ""; + this.ribbonPanel6.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel6.StyleMouseDown.Class = ""; + this.ribbonPanel6.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel6.StyleMouseOver.Class = ""; + this.ribbonPanel6.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel6.TabIndex = 38; + // + // ribbonBar6 + // + this.ribbonBar6.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar6.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar6.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar6.BackgroundStyle.Class = ""; + this.ribbonBar6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar6.ContainerControlProcessDialogKey = true; + this.ribbonBar6.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar6.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.buttonItemSPSZ, + this.buttonItem8, + this.buttonItemLocation, + this.sliderItem2, + this.buttonItemGBJC}); + this.ribbonBar6.Location = new System.Drawing.Point(3, 0); + this.ribbonBar6.Name = "ribbonBar6"; + this.ribbonBar6.Size = new System.Drawing.Size(427, 59); + this.ribbonBar6.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar6.TabIndex = 0; + // + // + // + this.ribbonBar6.TitleStyle.Class = ""; + this.ribbonBar6.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar6.TitleStyleMouseOver.Class = ""; + this.ribbonBar6.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar6.TitleVisible = false; + // + // buttonItemSPSZ + // + this.buttonItemSPSZ.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemSPSZ.Image"))); + this.buttonItemSPSZ.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemSPSZ.Name = "buttonItemSPSZ"; + this.buttonItemSPSZ.SubItemsExpandWidth = 14; + this.buttonItemSPSZ.Text = "双屏设置"; + this.buttonItemSPSZ.Click += new System.EventHandler(this.buttonItemSPSZ_Click); + // + // buttonItem8 + // + this.buttonItem8.Image = ((System.Drawing.Image)(resources.GetObject("buttonItem8.Image"))); + this.buttonItem8.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem8.Name = "buttonItem8"; + this.buttonItem8.SubItemsExpandWidth = 14; + this.buttonItem8.Text = "双屏分析"; + this.buttonItem8.Click += new System.EventHandler(this.buttonItem8_Click); + // + // buttonItemLocation + // + this.buttonItemLocation.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemLocation.Image"))); + this.buttonItemLocation.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemLocation.Name = "buttonItemLocation"; + this.buttonItemLocation.SubItemsExpandWidth = 14; + this.buttonItemLocation.Text = "快速定位"; + this.buttonItemLocation.Click += new System.EventHandler(this.buttonItemLocation_Click); + // + // sliderItem2 + // + this.sliderItem2.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.sliderItem2.LabelWidth = 50; + this.sliderItem2.Name = "sliderItem2"; + this.sliderItem2.Text = "地面透明度"; + this.sliderItem2.TextColor = System.Drawing.Color.Black; + this.sliderItem2.Value = 0; + this.sliderItem2.ValueChanged += new System.EventHandler(this.sliderItem2_ValueChanged); + // + // buttonItemGBJC + // + this.buttonItemGBJC.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemGBJC.Image"))); + this.buttonItemGBJC.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemGBJC.Name = "buttonItemGBJC"; + this.buttonItemGBJC.SubItemsExpandWidth = 14; + this.buttonItemGBJC.Text = "国标检测"; + this.buttonItemGBJC.Click += new System.EventHandler(this.buttonItemGBJC_Click); + // // ribbonPanel2 // this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -3513,116 +3623,6 @@ this.btnOutputJPG.Text = "导出图片"; this.btnOutputJPG.Click += new System.EventHandler(this.btnOutputJPG_Click); // - // ribbonPanel6 - // - this.ribbonPanel6.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel6.Controls.Add(this.ribbonBar6); - this.ribbonPanel6.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel6.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel6.Name = "ribbonPanel6"; - this.ribbonPanel6.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel6.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel6.Style.Class = ""; - this.ribbonPanel6.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel6.StyleMouseDown.Class = ""; - this.ribbonPanel6.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel6.StyleMouseOver.Class = ""; - this.ribbonPanel6.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel6.TabIndex = 38; - // - // ribbonBar6 - // - this.ribbonBar6.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar6.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar6.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar6.BackgroundStyle.Class = ""; - this.ribbonBar6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar6.ContainerControlProcessDialogKey = true; - this.ribbonBar6.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar6.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.buttonItemSPSZ, - this.buttonItem8, - this.buttonItemLocation, - this.sliderItem2, - this.buttonItemGBJC}); - this.ribbonBar6.Location = new System.Drawing.Point(3, 0); - this.ribbonBar6.Name = "ribbonBar6"; - this.ribbonBar6.Size = new System.Drawing.Size(427, 59); - this.ribbonBar6.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar6.TabIndex = 0; - // - // - // - this.ribbonBar6.TitleStyle.Class = ""; - this.ribbonBar6.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar6.TitleStyleMouseOver.Class = ""; - this.ribbonBar6.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar6.TitleVisible = false; - // - // buttonItemSPSZ - // - this.buttonItemSPSZ.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemSPSZ.Image"))); - this.buttonItemSPSZ.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemSPSZ.Name = "buttonItemSPSZ"; - this.buttonItemSPSZ.SubItemsExpandWidth = 14; - this.buttonItemSPSZ.Text = "双屏设置"; - this.buttonItemSPSZ.Click += new System.EventHandler(this.buttonItemSPSZ_Click); - // - // buttonItem8 - // - this.buttonItem8.Image = ((System.Drawing.Image)(resources.GetObject("buttonItem8.Image"))); - this.buttonItem8.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem8.Name = "buttonItem8"; - this.buttonItem8.SubItemsExpandWidth = 14; - this.buttonItem8.Text = "双屏分析"; - this.buttonItem8.Click += new System.EventHandler(this.buttonItem8_Click); - // - // buttonItemLocation - // - this.buttonItemLocation.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemLocation.Image"))); - this.buttonItemLocation.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemLocation.Name = "buttonItemLocation"; - this.buttonItemLocation.SubItemsExpandWidth = 14; - this.buttonItemLocation.Text = "快速定位"; - this.buttonItemLocation.Click += new System.EventHandler(this.buttonItemLocation_Click); - // - // sliderItem2 - // - this.sliderItem2.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.sliderItem2.LabelWidth = 50; - this.sliderItem2.Name = "sliderItem2"; - this.sliderItem2.Text = "地面透明度"; - this.sliderItem2.TextColor = System.Drawing.Color.Black; - this.sliderItem2.Value = 0; - this.sliderItem2.ValueChanged += new System.EventHandler(this.sliderItem2_ValueChanged); - // - // buttonItemGBJC - // - this.buttonItemGBJC.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemGBJC.Image"))); - this.buttonItemGBJC.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemGBJC.Name = "buttonItemGBJC"; - this.buttonItemGBJC.SubItemsExpandWidth = 14; - this.buttonItemGBJC.Text = "国标检测"; - this.buttonItemGBJC.Click += new System.EventHandler(this.buttonItemGBJC_Click); - // // ribbonTabItem1 // this.ribbonTabItem1.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; @@ -4469,7 +4469,7 @@ this.dataGridViewX2.ReadOnly = true; this.dataGridViewX2.RowHeadersVisible = false; this.dataGridViewX2.RowTemplate.Height = 23; - this.dataGridViewX2.Size = new System.Drawing.Size(33457, 92); + this.dataGridViewX2.Size = new System.Drawing.Size(33754, 92); this.dataGridViewX2.TabIndex = 11; // // dataGridViewTextBoxColumn10 @@ -4563,7 +4563,7 @@ this.dataGridViewX3.ReadOnly = true; this.dataGridViewX3.RowHeadersVisible = false; this.dataGridViewX3.RowTemplate.Height = 23; - this.dataGridViewX3.Size = new System.Drawing.Size(33456, 127); + this.dataGridViewX3.Size = new System.Drawing.Size(33753, 127); this.dataGridViewX3.TabIndex = 5; this.dataGridViewX3.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX3_MouseDoubleClick); // @@ -5791,6 +5791,7 @@ this.contextMenuStripDeleteLayerNode.ResumeLayout(false); this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); + this.ribbonPanel6.ResumeLayout(false); this.ribbonPanel2.ResumeLayout(false); this.ribbonPanel3.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); @@ -5799,7 +5800,6 @@ this.ribbonPanel12.ResumeLayout(false); this.ribbonPanel4.ResumeLayout(false); this.ribbonPanel1.ResumeLayout(false); - this.ribbonPanel6.ResumeLayout(false); this.panelOfTable.ResumeLayout(false); this.panelOfTable.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX1)).EndInit(); diff --git a/Program.cs b/Program.cs index a76d0d4..2aff883 100644 --- a/Program.cs +++ b/Program.cs @@ -48,18 +48,28 @@ Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - FrmLogin frm = new FrmLogin(); - if (frm.ShowDialog() == DialogResult.OK) + Utility.SetParams(); + + if (Utility.isNeedLogin)//是否需要登录功能 { - if (Utility.userRole != null) + FrmLogin frm = new FrmLogin(); + if (frm.ShowDialog() == DialogResult.OK) { - Application.Run(new MainFrm()); - } - else - { - MessageBox.Show("该用户没有分配任何角色!"); + if (Utility.userRole != null) + { + Application.Run(new MainFrm()); + } + else + { + MessageBox.Show("该用户没有分配任何角色!"); + } } } + else + { + Application.Run(new MainFrm()); + } + } private static void remoteUpDate() diff --git a/SysRescInfoManager.cs b/SysRescInfoManager.cs index 7e643a0..5bb9699 100644 --- a/SysRescInfoManager.cs +++ b/SysRescInfoManager.cs @@ -19,11 +19,11 @@ { IS_OPEN = true; reloadGrid(); - if (Utility.userRole.IndexOf("资源新增") == -1) + if (Utility.isNeedLogin&&!Utility.userRole.Contains("资源新增")) { btn_add.Visible = false; } - if (Utility.userRole.IndexOf("资源删除") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("资源删除")) { dataGridViewX1.Columns["btndel"].Visible = false; } diff --git a/Utility.cs b/Utility.cs index 6672086..26cdcec 100644 --- a/Utility.cs +++ b/Utility.cs @@ -37,10 +37,12 @@ public static string PicRootURL; public static string PicDefaultURL; // public static double dFlyAboveLine = 2; - public static string userName; + public static string userName ="游客"; public static string projectStr; public static string userRole; + public static Boolean isNeedLogin = false;//设定是否需要登录的开关 + //数据配置 public static List listDb; public static string backupurl; diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 900711a..639e266 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index f127496..f0b8f7d 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -60,7 +60,7 @@ } conn.Close(); - if (!Utility.userRole.Equals("事件编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Equals("事件编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index e4c3928..c5c43b5 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -77,7 +77,7 @@ comboBox_state.Items.Add("任务执行中"); comboBox_state.Items.Add("结束任务"); - if (!Utility.userRole.Contains("工单创建")) + if (Utility.isNeedLogin&&!Utility.userRole.Contains("工单创建")) { button_new.Visible = false; } diff --git a/FrmEquipmentManage.cs b/FrmEquipmentManage.cs index 3acd653..9a558a6 100644 --- a/FrmEquipmentManage.cs +++ b/FrmEquipmentManage.cs @@ -44,15 +44,15 @@ private void initForm() { - if (!Utility.userRole.Contains("探测仪新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪新增")) { btnAddDev.Visible = false; } - if (!Utility.userRole.Contains("探测仪删除")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪删除")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; } - if (!Utility.userRole.Contains("探测仪编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } @@ -129,7 +129,7 @@ /// private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) { - if (!Utility.userRole.Contains("探测仪编辑")) return; + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) return; DataGridView grid = sender as DataGridView; if (grid != null && grid.SelectedRows.Count > 0) diff --git a/FrmLogin.cs b/FrmLogin.cs index 294cf14..baf7f52 100644 --- a/FrmLogin.cs +++ b/FrmLogin.cs @@ -117,7 +117,7 @@ private void FrmLogin_Load(object sender, EventArgs e) {//global::Cyberpipe.Properties.Resources.登录页3; this.pictureBox1.BackgroundImage = Image.FromFile(Application.StartupPath + Utility.LoginImgPath); ; - Utility.SetParams(); +// Utility.SetParams(); StartPosition = FormStartPosition.CenterScreen; diff --git a/FrmPatrolerManager.cs b/FrmPatrolerManager.cs index b802788..7134bc7 100644 --- a/FrmPatrolerManager.cs +++ b/FrmPatrolerManager.cs @@ -177,15 +177,15 @@ private void initForm() { - if (!Utility.userRole.Contains("巡检员新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员新增")) { btn_add_person.Visible = false; } - if (!Utility.userRole.Contains("巡检员编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员编辑")) { 编辑ToolStripMenuItem.Visible = false; } - if (!Utility.userRole.Contains("巡检员注销")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员注销")) { 注销ToolStripMenuItem.Visible = false; } diff --git a/FrmRoleInfoManager.cs b/FrmRoleInfoManager.cs index c02635d..55348ce 100644 --- a/FrmRoleInfoManager.cs +++ b/FrmRoleInfoManager.cs @@ -16,11 +16,11 @@ private void FrmRoleInfoManager_Load(object sender, EventArgs e) { reloadGrid(); - if (Utility.userRole.IndexOf("角色新增") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色新增")) { btn_add.Visible = false; } - if (Utility.userRole.IndexOf("角色删除") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色删除")) { dataGridViewX1.Columns["btndel"].Visible = false; } diff --git a/FrmRoleRescManager.cs b/FrmRoleRescManager.cs index 13640ce..3e30a2d 100644 --- a/FrmRoleRescManager.cs +++ b/FrmRoleRescManager.cs @@ -20,7 +20,7 @@ IS_OPEN = true; initForm(""); initCombox(); - if (Utility.userRole.IndexOf("角色授权") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色授权")) { btn_ok.Visible = false; } diff --git a/FrmSysUserInfoManger.cs b/FrmSysUserInfoManger.cs index 4d1b7da..d9492a9 100644 --- a/FrmSysUserInfoManger.cs +++ b/FrmSysUserInfoManger.cs @@ -22,11 +22,11 @@ { IS_OPEN = true; reloadGrid(currentpage); - if (Utility.userRole.IndexOf("用户新增") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("用户新增")) { btn_add.Visible = false; } - if (Utility.userRole.IndexOf("用户删除") == -1) + if (Utility.isNeedLogin && Utility.userRole.Contains("用户删除")) { dataGridViewX1.Columns["btndel"].Visible = false; } diff --git a/FrmUserRole.cs b/FrmUserRole.cs index b5feef0..e9f7c0d 100644 --- a/FrmUserRole.cs +++ b/FrmUserRole.cs @@ -19,7 +19,7 @@ IS_OPEN = true; reloadGrid(-1); initCombox(); - if (Utility.userRole.IndexOf("用户授权") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("用户授权")) { btn_ok.Visible = false; } diff --git a/MainFrm.cs b/MainFrm.cs index d1a2b2f..cb461f5 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -152,8 +152,11 @@ balloonEx2 = new GSOBalloonEx(globeControl2.Handle); Utility.SetBallons(featureTooltip, balloonEx); panelOfTable.Height = 200; - RigthMenuSet(); - MenuSet(); + if (Utility.isNeedLogin) + { + RigthMenuSet(); + MenuSet(); + } } /// diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index e9a299a..4c0dec2 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -245,6 +245,13 @@ this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.定位ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl(); + this.ribbonPanel6 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar6 = new DevComponents.DotNetBar.RibbonBar(); + this.buttonItemSPSZ = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem8 = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItemLocation = new DevComponents.DotNetBar.ButtonItem(); + this.sliderItem2 = new DevComponents.DotNetBar.SliderItem(); + this.buttonItemGBJC = new DevComponents.DotNetBar.ButtonItem(); this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); @@ -351,13 +358,6 @@ this.btnlegendSet = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem89 = new DevComponents.DotNetBar.ButtonItem(); this.btnOutputJPG = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel6 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar6 = new DevComponents.DotNetBar.RibbonBar(); - this.buttonItemSPSZ = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem8 = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItemLocation = new DevComponents.DotNetBar.ButtonItem(); - this.sliderItem2 = new DevComponents.DotNetBar.SliderItem(); - this.buttonItemGBJC = new DevComponents.DotNetBar.ButtonItem(); this.ribbonTabItem1 = new DevComponents.DotNetBar.RibbonTabItem(); this.ribbonTabItem11 = new DevComponents.DotNetBar.RibbonTabItem(); this.ribbonTabItem6 = new DevComponents.DotNetBar.RibbonTabItem(); @@ -529,6 +529,7 @@ this.contextMenuStrip3.SuspendLayout(); this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); + this.ribbonPanel6.SuspendLayout(); this.ribbonPanel2.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); @@ -537,7 +538,6 @@ this.ribbonPanel12.SuspendLayout(); this.ribbonPanel4.SuspendLayout(); this.ribbonPanel1.SuspendLayout(); - this.ribbonPanel6.SuspendLayout(); this.panelOfTable.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX1)).BeginInit(); this.statusStrip2.SuspendLayout(); @@ -720,7 +720,7 @@ this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image"))); this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripDropDownButton1.Name = "toolStripDropDownButton1"; - this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 21); + this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 20); this.toolStripDropDownButton1.Text = "帮助"; this.toolStripDropDownButton1.Visible = false; // @@ -2213,6 +2213,116 @@ this.ribbonControl1.Text = "ribbonControl1"; this.ribbonControl1.UseCustomizeDialog = false; // + // ribbonPanel6 + // + this.ribbonPanel6.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel6.Controls.Add(this.ribbonBar6); + this.ribbonPanel6.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel6.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel6.Name = "ribbonPanel6"; + this.ribbonPanel6.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel6.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel6.Style.Class = ""; + this.ribbonPanel6.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel6.StyleMouseDown.Class = ""; + this.ribbonPanel6.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel6.StyleMouseOver.Class = ""; + this.ribbonPanel6.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel6.TabIndex = 38; + // + // ribbonBar6 + // + this.ribbonBar6.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar6.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar6.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar6.BackgroundStyle.Class = ""; + this.ribbonBar6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar6.ContainerControlProcessDialogKey = true; + this.ribbonBar6.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar6.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.buttonItemSPSZ, + this.buttonItem8, + this.buttonItemLocation, + this.sliderItem2, + this.buttonItemGBJC}); + this.ribbonBar6.Location = new System.Drawing.Point(3, 0); + this.ribbonBar6.Name = "ribbonBar6"; + this.ribbonBar6.Size = new System.Drawing.Size(427, 59); + this.ribbonBar6.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar6.TabIndex = 0; + // + // + // + this.ribbonBar6.TitleStyle.Class = ""; + this.ribbonBar6.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar6.TitleStyleMouseOver.Class = ""; + this.ribbonBar6.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar6.TitleVisible = false; + // + // buttonItemSPSZ + // + this.buttonItemSPSZ.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemSPSZ.Image"))); + this.buttonItemSPSZ.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemSPSZ.Name = "buttonItemSPSZ"; + this.buttonItemSPSZ.SubItemsExpandWidth = 14; + this.buttonItemSPSZ.Text = "双屏设置"; + this.buttonItemSPSZ.Click += new System.EventHandler(this.buttonItemSPSZ_Click); + // + // buttonItem8 + // + this.buttonItem8.Image = ((System.Drawing.Image)(resources.GetObject("buttonItem8.Image"))); + this.buttonItem8.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem8.Name = "buttonItem8"; + this.buttonItem8.SubItemsExpandWidth = 14; + this.buttonItem8.Text = "双屏分析"; + this.buttonItem8.Click += new System.EventHandler(this.buttonItem8_Click); + // + // buttonItemLocation + // + this.buttonItemLocation.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemLocation.Image"))); + this.buttonItemLocation.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemLocation.Name = "buttonItemLocation"; + this.buttonItemLocation.SubItemsExpandWidth = 14; + this.buttonItemLocation.Text = "快速定位"; + this.buttonItemLocation.Click += new System.EventHandler(this.buttonItemLocation_Click); + // + // sliderItem2 + // + this.sliderItem2.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.sliderItem2.LabelWidth = 50; + this.sliderItem2.Name = "sliderItem2"; + this.sliderItem2.Text = "地面透明度"; + this.sliderItem2.TextColor = System.Drawing.Color.Black; + this.sliderItem2.Value = 0; + this.sliderItem2.ValueChanged += new System.EventHandler(this.sliderItem2_ValueChanged); + // + // buttonItemGBJC + // + this.buttonItemGBJC.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemGBJC.Image"))); + this.buttonItemGBJC.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemGBJC.Name = "buttonItemGBJC"; + this.buttonItemGBJC.SubItemsExpandWidth = 14; + this.buttonItemGBJC.Text = "国标检测"; + this.buttonItemGBJC.Click += new System.EventHandler(this.buttonItemGBJC_Click); + // // ribbonPanel2 // this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -3513,116 +3623,6 @@ this.btnOutputJPG.Text = "导出图片"; this.btnOutputJPG.Click += new System.EventHandler(this.btnOutputJPG_Click); // - // ribbonPanel6 - // - this.ribbonPanel6.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel6.Controls.Add(this.ribbonBar6); - this.ribbonPanel6.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel6.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel6.Name = "ribbonPanel6"; - this.ribbonPanel6.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel6.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel6.Style.Class = ""; - this.ribbonPanel6.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel6.StyleMouseDown.Class = ""; - this.ribbonPanel6.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel6.StyleMouseOver.Class = ""; - this.ribbonPanel6.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel6.TabIndex = 38; - // - // ribbonBar6 - // - this.ribbonBar6.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar6.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar6.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar6.BackgroundStyle.Class = ""; - this.ribbonBar6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar6.ContainerControlProcessDialogKey = true; - this.ribbonBar6.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar6.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.buttonItemSPSZ, - this.buttonItem8, - this.buttonItemLocation, - this.sliderItem2, - this.buttonItemGBJC}); - this.ribbonBar6.Location = new System.Drawing.Point(3, 0); - this.ribbonBar6.Name = "ribbonBar6"; - this.ribbonBar6.Size = new System.Drawing.Size(427, 59); - this.ribbonBar6.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar6.TabIndex = 0; - // - // - // - this.ribbonBar6.TitleStyle.Class = ""; - this.ribbonBar6.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar6.TitleStyleMouseOver.Class = ""; - this.ribbonBar6.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar6.TitleVisible = false; - // - // buttonItemSPSZ - // - this.buttonItemSPSZ.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemSPSZ.Image"))); - this.buttonItemSPSZ.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemSPSZ.Name = "buttonItemSPSZ"; - this.buttonItemSPSZ.SubItemsExpandWidth = 14; - this.buttonItemSPSZ.Text = "双屏设置"; - this.buttonItemSPSZ.Click += new System.EventHandler(this.buttonItemSPSZ_Click); - // - // buttonItem8 - // - this.buttonItem8.Image = ((System.Drawing.Image)(resources.GetObject("buttonItem8.Image"))); - this.buttonItem8.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem8.Name = "buttonItem8"; - this.buttonItem8.SubItemsExpandWidth = 14; - this.buttonItem8.Text = "双屏分析"; - this.buttonItem8.Click += new System.EventHandler(this.buttonItem8_Click); - // - // buttonItemLocation - // - this.buttonItemLocation.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemLocation.Image"))); - this.buttonItemLocation.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemLocation.Name = "buttonItemLocation"; - this.buttonItemLocation.SubItemsExpandWidth = 14; - this.buttonItemLocation.Text = "快速定位"; - this.buttonItemLocation.Click += new System.EventHandler(this.buttonItemLocation_Click); - // - // sliderItem2 - // - this.sliderItem2.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.sliderItem2.LabelWidth = 50; - this.sliderItem2.Name = "sliderItem2"; - this.sliderItem2.Text = "地面透明度"; - this.sliderItem2.TextColor = System.Drawing.Color.Black; - this.sliderItem2.Value = 0; - this.sliderItem2.ValueChanged += new System.EventHandler(this.sliderItem2_ValueChanged); - // - // buttonItemGBJC - // - this.buttonItemGBJC.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemGBJC.Image"))); - this.buttonItemGBJC.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemGBJC.Name = "buttonItemGBJC"; - this.buttonItemGBJC.SubItemsExpandWidth = 14; - this.buttonItemGBJC.Text = "国标检测"; - this.buttonItemGBJC.Click += new System.EventHandler(this.buttonItemGBJC_Click); - // // ribbonTabItem1 // this.ribbonTabItem1.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; @@ -4469,7 +4469,7 @@ this.dataGridViewX2.ReadOnly = true; this.dataGridViewX2.RowHeadersVisible = false; this.dataGridViewX2.RowTemplate.Height = 23; - this.dataGridViewX2.Size = new System.Drawing.Size(33457, 92); + this.dataGridViewX2.Size = new System.Drawing.Size(33754, 92); this.dataGridViewX2.TabIndex = 11; // // dataGridViewTextBoxColumn10 @@ -4563,7 +4563,7 @@ this.dataGridViewX3.ReadOnly = true; this.dataGridViewX3.RowHeadersVisible = false; this.dataGridViewX3.RowTemplate.Height = 23; - this.dataGridViewX3.Size = new System.Drawing.Size(33456, 127); + this.dataGridViewX3.Size = new System.Drawing.Size(33753, 127); this.dataGridViewX3.TabIndex = 5; this.dataGridViewX3.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX3_MouseDoubleClick); // @@ -5791,6 +5791,7 @@ this.contextMenuStripDeleteLayerNode.ResumeLayout(false); this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); + this.ribbonPanel6.ResumeLayout(false); this.ribbonPanel2.ResumeLayout(false); this.ribbonPanel3.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); @@ -5799,7 +5800,6 @@ this.ribbonPanel12.ResumeLayout(false); this.ribbonPanel4.ResumeLayout(false); this.ribbonPanel1.ResumeLayout(false); - this.ribbonPanel6.ResumeLayout(false); this.panelOfTable.ResumeLayout(false); this.panelOfTable.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX1)).EndInit(); diff --git a/Program.cs b/Program.cs index a76d0d4..2aff883 100644 --- a/Program.cs +++ b/Program.cs @@ -48,18 +48,28 @@ Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - FrmLogin frm = new FrmLogin(); - if (frm.ShowDialog() == DialogResult.OK) + Utility.SetParams(); + + if (Utility.isNeedLogin)//是否需要登录功能 { - if (Utility.userRole != null) + FrmLogin frm = new FrmLogin(); + if (frm.ShowDialog() == DialogResult.OK) { - Application.Run(new MainFrm()); - } - else - { - MessageBox.Show("该用户没有分配任何角色!"); + if (Utility.userRole != null) + { + Application.Run(new MainFrm()); + } + else + { + MessageBox.Show("该用户没有分配任何角色!"); + } } } + else + { + Application.Run(new MainFrm()); + } + } private static void remoteUpDate() diff --git a/SysRescInfoManager.cs b/SysRescInfoManager.cs index 7e643a0..5bb9699 100644 --- a/SysRescInfoManager.cs +++ b/SysRescInfoManager.cs @@ -19,11 +19,11 @@ { IS_OPEN = true; reloadGrid(); - if (Utility.userRole.IndexOf("资源新增") == -1) + if (Utility.isNeedLogin&&!Utility.userRole.Contains("资源新增")) { btn_add.Visible = false; } - if (Utility.userRole.IndexOf("资源删除") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("资源删除")) { dataGridViewX1.Columns["btndel"].Visible = false; } diff --git a/Utility.cs b/Utility.cs index 6672086..26cdcec 100644 --- a/Utility.cs +++ b/Utility.cs @@ -37,10 +37,12 @@ public static string PicRootURL; public static string PicDefaultURL; // public static double dFlyAboveLine = 2; - public static string userName; + public static string userName ="游客"; public static string projectStr; public static string userRole; + public static Boolean isNeedLogin = false;//设定是否需要登录的开关 + //数据配置 public static List listDb; public static string backupurl; diff --git a/bin/x86/Debug/glVersion.txt b/bin/x86/Debug/glVersion.txt index cd82eca..755455e 100644 --- a/bin/x86/Debug/glVersion.txt +++ b/bin/x86/Debug/glVersion.txt Binary files differ diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 900711a..639e266 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index f127496..f0b8f7d 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -60,7 +60,7 @@ } conn.Close(); - if (!Utility.userRole.Equals("事件编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Equals("事件编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index e4c3928..c5c43b5 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -77,7 +77,7 @@ comboBox_state.Items.Add("任务执行中"); comboBox_state.Items.Add("结束任务"); - if (!Utility.userRole.Contains("工单创建")) + if (Utility.isNeedLogin&&!Utility.userRole.Contains("工单创建")) { button_new.Visible = false; } diff --git a/FrmEquipmentManage.cs b/FrmEquipmentManage.cs index 3acd653..9a558a6 100644 --- a/FrmEquipmentManage.cs +++ b/FrmEquipmentManage.cs @@ -44,15 +44,15 @@ private void initForm() { - if (!Utility.userRole.Contains("探测仪新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪新增")) { btnAddDev.Visible = false; } - if (!Utility.userRole.Contains("探测仪删除")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪删除")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; } - if (!Utility.userRole.Contains("探测仪编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) { winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } @@ -129,7 +129,7 @@ /// private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) { - if (!Utility.userRole.Contains("探测仪编辑")) return; + if (Utility.isNeedLogin && !Utility.userRole.Contains("探测仪编辑")) return; DataGridView grid = sender as DataGridView; if (grid != null && grid.SelectedRows.Count > 0) diff --git a/FrmLogin.cs b/FrmLogin.cs index 294cf14..baf7f52 100644 --- a/FrmLogin.cs +++ b/FrmLogin.cs @@ -117,7 +117,7 @@ private void FrmLogin_Load(object sender, EventArgs e) {//global::Cyberpipe.Properties.Resources.登录页3; this.pictureBox1.BackgroundImage = Image.FromFile(Application.StartupPath + Utility.LoginImgPath); ; - Utility.SetParams(); +// Utility.SetParams(); StartPosition = FormStartPosition.CenterScreen; diff --git a/FrmPatrolerManager.cs b/FrmPatrolerManager.cs index b802788..7134bc7 100644 --- a/FrmPatrolerManager.cs +++ b/FrmPatrolerManager.cs @@ -177,15 +177,15 @@ private void initForm() { - if (!Utility.userRole.Contains("巡检员新增")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员新增")) { btn_add_person.Visible = false; } - if (!Utility.userRole.Contains("巡检员编辑")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员编辑")) { 编辑ToolStripMenuItem.Visible = false; } - if (!Utility.userRole.Contains("巡检员注销")) + if (Utility.isNeedLogin && !Utility.userRole.Contains("巡检员注销")) { 注销ToolStripMenuItem.Visible = false; } diff --git a/FrmRoleInfoManager.cs b/FrmRoleInfoManager.cs index c02635d..55348ce 100644 --- a/FrmRoleInfoManager.cs +++ b/FrmRoleInfoManager.cs @@ -16,11 +16,11 @@ private void FrmRoleInfoManager_Load(object sender, EventArgs e) { reloadGrid(); - if (Utility.userRole.IndexOf("角色新增") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色新增")) { btn_add.Visible = false; } - if (Utility.userRole.IndexOf("角色删除") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色删除")) { dataGridViewX1.Columns["btndel"].Visible = false; } diff --git a/FrmRoleRescManager.cs b/FrmRoleRescManager.cs index 13640ce..3e30a2d 100644 --- a/FrmRoleRescManager.cs +++ b/FrmRoleRescManager.cs @@ -20,7 +20,7 @@ IS_OPEN = true; initForm(""); initCombox(); - if (Utility.userRole.IndexOf("角色授权") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("角色授权")) { btn_ok.Visible = false; } diff --git a/FrmSysUserInfoManger.cs b/FrmSysUserInfoManger.cs index 4d1b7da..d9492a9 100644 --- a/FrmSysUserInfoManger.cs +++ b/FrmSysUserInfoManger.cs @@ -22,11 +22,11 @@ { IS_OPEN = true; reloadGrid(currentpage); - if (Utility.userRole.IndexOf("用户新增") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("用户新增")) { btn_add.Visible = false; } - if (Utility.userRole.IndexOf("用户删除") == -1) + if (Utility.isNeedLogin && Utility.userRole.Contains("用户删除")) { dataGridViewX1.Columns["btndel"].Visible = false; } diff --git a/FrmUserRole.cs b/FrmUserRole.cs index b5feef0..e9f7c0d 100644 --- a/FrmUserRole.cs +++ b/FrmUserRole.cs @@ -19,7 +19,7 @@ IS_OPEN = true; reloadGrid(-1); initCombox(); - if (Utility.userRole.IndexOf("用户授权") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("用户授权")) { btn_ok.Visible = false; } diff --git a/MainFrm.cs b/MainFrm.cs index d1a2b2f..cb461f5 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -152,8 +152,11 @@ balloonEx2 = new GSOBalloonEx(globeControl2.Handle); Utility.SetBallons(featureTooltip, balloonEx); panelOfTable.Height = 200; - RigthMenuSet(); - MenuSet(); + if (Utility.isNeedLogin) + { + RigthMenuSet(); + MenuSet(); + } } /// diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index e9a299a..4c0dec2 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -245,6 +245,13 @@ this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.定位ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl(); + this.ribbonPanel6 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar6 = new DevComponents.DotNetBar.RibbonBar(); + this.buttonItemSPSZ = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItem8 = new DevComponents.DotNetBar.ButtonItem(); + this.buttonItemLocation = new DevComponents.DotNetBar.ButtonItem(); + this.sliderItem2 = new DevComponents.DotNetBar.SliderItem(); + this.buttonItemGBJC = new DevComponents.DotNetBar.ButtonItem(); this.ribbonPanel2 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); this.btn_user_info = new DevComponents.DotNetBar.ButtonItem(); @@ -351,13 +358,6 @@ this.btnlegendSet = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem89 = new DevComponents.DotNetBar.ButtonItem(); this.btnOutputJPG = new DevComponents.DotNetBar.ButtonItem(); - this.ribbonPanel6 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar6 = new DevComponents.DotNetBar.RibbonBar(); - this.buttonItemSPSZ = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItem8 = new DevComponents.DotNetBar.ButtonItem(); - this.buttonItemLocation = new DevComponents.DotNetBar.ButtonItem(); - this.sliderItem2 = new DevComponents.DotNetBar.SliderItem(); - this.buttonItemGBJC = new DevComponents.DotNetBar.ButtonItem(); this.ribbonTabItem1 = new DevComponents.DotNetBar.RibbonTabItem(); this.ribbonTabItem11 = new DevComponents.DotNetBar.RibbonTabItem(); this.ribbonTabItem6 = new DevComponents.DotNetBar.RibbonTabItem(); @@ -529,6 +529,7 @@ this.contextMenuStrip3.SuspendLayout(); this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); + this.ribbonPanel6.SuspendLayout(); this.ribbonPanel2.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); @@ -537,7 +538,6 @@ this.ribbonPanel12.SuspendLayout(); this.ribbonPanel4.SuspendLayout(); this.ribbonPanel1.SuspendLayout(); - this.ribbonPanel6.SuspendLayout(); this.panelOfTable.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX1)).BeginInit(); this.statusStrip2.SuspendLayout(); @@ -720,7 +720,7 @@ this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image"))); this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripDropDownButton1.Name = "toolStripDropDownButton1"; - this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 21); + this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 20); this.toolStripDropDownButton1.Text = "帮助"; this.toolStripDropDownButton1.Visible = false; // @@ -2213,6 +2213,116 @@ this.ribbonControl1.Text = "ribbonControl1"; this.ribbonControl1.UseCustomizeDialog = false; // + // ribbonPanel6 + // + this.ribbonPanel6.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel6.Controls.Add(this.ribbonBar6); + this.ribbonPanel6.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel6.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel6.Name = "ribbonPanel6"; + this.ribbonPanel6.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel6.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel6.Style.Class = ""; + this.ribbonPanel6.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel6.StyleMouseDown.Class = ""; + this.ribbonPanel6.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel6.StyleMouseOver.Class = ""; + this.ribbonPanel6.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel6.TabIndex = 38; + // + // ribbonBar6 + // + this.ribbonBar6.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar6.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar6.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar6.BackgroundStyle.Class = ""; + this.ribbonBar6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar6.ContainerControlProcessDialogKey = true; + this.ribbonBar6.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar6.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.buttonItemSPSZ, + this.buttonItem8, + this.buttonItemLocation, + this.sliderItem2, + this.buttonItemGBJC}); + this.ribbonBar6.Location = new System.Drawing.Point(3, 0); + this.ribbonBar6.Name = "ribbonBar6"; + this.ribbonBar6.Size = new System.Drawing.Size(427, 59); + this.ribbonBar6.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar6.TabIndex = 0; + // + // + // + this.ribbonBar6.TitleStyle.Class = ""; + this.ribbonBar6.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar6.TitleStyleMouseOver.Class = ""; + this.ribbonBar6.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar6.TitleVisible = false; + // + // buttonItemSPSZ + // + this.buttonItemSPSZ.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemSPSZ.Image"))); + this.buttonItemSPSZ.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemSPSZ.Name = "buttonItemSPSZ"; + this.buttonItemSPSZ.SubItemsExpandWidth = 14; + this.buttonItemSPSZ.Text = "双屏设置"; + this.buttonItemSPSZ.Click += new System.EventHandler(this.buttonItemSPSZ_Click); + // + // buttonItem8 + // + this.buttonItem8.Image = ((System.Drawing.Image)(resources.GetObject("buttonItem8.Image"))); + this.buttonItem8.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItem8.Name = "buttonItem8"; + this.buttonItem8.SubItemsExpandWidth = 14; + this.buttonItem8.Text = "双屏分析"; + this.buttonItem8.Click += new System.EventHandler(this.buttonItem8_Click); + // + // buttonItemLocation + // + this.buttonItemLocation.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemLocation.Image"))); + this.buttonItemLocation.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemLocation.Name = "buttonItemLocation"; + this.buttonItemLocation.SubItemsExpandWidth = 14; + this.buttonItemLocation.Text = "快速定位"; + this.buttonItemLocation.Click += new System.EventHandler(this.buttonItemLocation_Click); + // + // sliderItem2 + // + this.sliderItem2.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.sliderItem2.LabelWidth = 50; + this.sliderItem2.Name = "sliderItem2"; + this.sliderItem2.Text = "地面透明度"; + this.sliderItem2.TextColor = System.Drawing.Color.Black; + this.sliderItem2.Value = 0; + this.sliderItem2.ValueChanged += new System.EventHandler(this.sliderItem2_ValueChanged); + // + // buttonItemGBJC + // + this.buttonItemGBJC.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemGBJC.Image"))); + this.buttonItemGBJC.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.buttonItemGBJC.Name = "buttonItemGBJC"; + this.buttonItemGBJC.SubItemsExpandWidth = 14; + this.buttonItemGBJC.Text = "国标检测"; + this.buttonItemGBJC.Click += new System.EventHandler(this.buttonItemGBJC_Click); + // // ribbonPanel2 // this.ribbonPanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -3513,116 +3623,6 @@ this.btnOutputJPG.Text = "导出图片"; this.btnOutputJPG.Click += new System.EventHandler(this.btnOutputJPG_Click); // - // ribbonPanel6 - // - this.ribbonPanel6.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel6.Controls.Add(this.ribbonBar6); - this.ribbonPanel6.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel6.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel6.Name = "ribbonPanel6"; - this.ribbonPanel6.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel6.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel6.Style.Class = ""; - this.ribbonPanel6.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel6.StyleMouseDown.Class = ""; - this.ribbonPanel6.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel6.StyleMouseOver.Class = ""; - this.ribbonPanel6.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel6.TabIndex = 38; - // - // ribbonBar6 - // - this.ribbonBar6.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar6.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar6.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar6.BackgroundStyle.Class = ""; - this.ribbonBar6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar6.ContainerControlProcessDialogKey = true; - this.ribbonBar6.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar6.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.buttonItemSPSZ, - this.buttonItem8, - this.buttonItemLocation, - this.sliderItem2, - this.buttonItemGBJC}); - this.ribbonBar6.Location = new System.Drawing.Point(3, 0); - this.ribbonBar6.Name = "ribbonBar6"; - this.ribbonBar6.Size = new System.Drawing.Size(427, 59); - this.ribbonBar6.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar6.TabIndex = 0; - // - // - // - this.ribbonBar6.TitleStyle.Class = ""; - this.ribbonBar6.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar6.TitleStyleMouseOver.Class = ""; - this.ribbonBar6.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar6.TitleVisible = false; - // - // buttonItemSPSZ - // - this.buttonItemSPSZ.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemSPSZ.Image"))); - this.buttonItemSPSZ.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemSPSZ.Name = "buttonItemSPSZ"; - this.buttonItemSPSZ.SubItemsExpandWidth = 14; - this.buttonItemSPSZ.Text = "双屏设置"; - this.buttonItemSPSZ.Click += new System.EventHandler(this.buttonItemSPSZ_Click); - // - // buttonItem8 - // - this.buttonItem8.Image = ((System.Drawing.Image)(resources.GetObject("buttonItem8.Image"))); - this.buttonItem8.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItem8.Name = "buttonItem8"; - this.buttonItem8.SubItemsExpandWidth = 14; - this.buttonItem8.Text = "双屏分析"; - this.buttonItem8.Click += new System.EventHandler(this.buttonItem8_Click); - // - // buttonItemLocation - // - this.buttonItemLocation.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemLocation.Image"))); - this.buttonItemLocation.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemLocation.Name = "buttonItemLocation"; - this.buttonItemLocation.SubItemsExpandWidth = 14; - this.buttonItemLocation.Text = "快速定位"; - this.buttonItemLocation.Click += new System.EventHandler(this.buttonItemLocation_Click); - // - // sliderItem2 - // - this.sliderItem2.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.sliderItem2.LabelWidth = 50; - this.sliderItem2.Name = "sliderItem2"; - this.sliderItem2.Text = "地面透明度"; - this.sliderItem2.TextColor = System.Drawing.Color.Black; - this.sliderItem2.Value = 0; - this.sliderItem2.ValueChanged += new System.EventHandler(this.sliderItem2_ValueChanged); - // - // buttonItemGBJC - // - this.buttonItemGBJC.Image = ((System.Drawing.Image)(resources.GetObject("buttonItemGBJC.Image"))); - this.buttonItemGBJC.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.buttonItemGBJC.Name = "buttonItemGBJC"; - this.buttonItemGBJC.SubItemsExpandWidth = 14; - this.buttonItemGBJC.Text = "国标检测"; - this.buttonItemGBJC.Click += new System.EventHandler(this.buttonItemGBJC_Click); - // // ribbonTabItem1 // this.ribbonTabItem1.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; @@ -4469,7 +4469,7 @@ this.dataGridViewX2.ReadOnly = true; this.dataGridViewX2.RowHeadersVisible = false; this.dataGridViewX2.RowTemplate.Height = 23; - this.dataGridViewX2.Size = new System.Drawing.Size(33457, 92); + this.dataGridViewX2.Size = new System.Drawing.Size(33754, 92); this.dataGridViewX2.TabIndex = 11; // // dataGridViewTextBoxColumn10 @@ -4563,7 +4563,7 @@ this.dataGridViewX3.ReadOnly = true; this.dataGridViewX3.RowHeadersVisible = false; this.dataGridViewX3.RowTemplate.Height = 23; - this.dataGridViewX3.Size = new System.Drawing.Size(33456, 127); + this.dataGridViewX3.Size = new System.Drawing.Size(33753, 127); this.dataGridViewX3.TabIndex = 5; this.dataGridViewX3.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX3_MouseDoubleClick); // @@ -5791,6 +5791,7 @@ this.contextMenuStripDeleteLayerNode.ResumeLayout(false); this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); + this.ribbonPanel6.ResumeLayout(false); this.ribbonPanel2.ResumeLayout(false); this.ribbonPanel3.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); @@ -5799,7 +5800,6 @@ this.ribbonPanel12.ResumeLayout(false); this.ribbonPanel4.ResumeLayout(false); this.ribbonPanel1.ResumeLayout(false); - this.ribbonPanel6.ResumeLayout(false); this.panelOfTable.ResumeLayout(false); this.panelOfTable.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX1)).EndInit(); diff --git a/Program.cs b/Program.cs index a76d0d4..2aff883 100644 --- a/Program.cs +++ b/Program.cs @@ -48,18 +48,28 @@ Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - FrmLogin frm = new FrmLogin(); - if (frm.ShowDialog() == DialogResult.OK) + Utility.SetParams(); + + if (Utility.isNeedLogin)//是否需要登录功能 { - if (Utility.userRole != null) + FrmLogin frm = new FrmLogin(); + if (frm.ShowDialog() == DialogResult.OK) { - Application.Run(new MainFrm()); - } - else - { - MessageBox.Show("该用户没有分配任何角色!"); + if (Utility.userRole != null) + { + Application.Run(new MainFrm()); + } + else + { + MessageBox.Show("该用户没有分配任何角色!"); + } } } + else + { + Application.Run(new MainFrm()); + } + } private static void remoteUpDate() diff --git a/SysRescInfoManager.cs b/SysRescInfoManager.cs index 7e643a0..5bb9699 100644 --- a/SysRescInfoManager.cs +++ b/SysRescInfoManager.cs @@ -19,11 +19,11 @@ { IS_OPEN = true; reloadGrid(); - if (Utility.userRole.IndexOf("资源新增") == -1) + if (Utility.isNeedLogin&&!Utility.userRole.Contains("资源新增")) { btn_add.Visible = false; } - if (Utility.userRole.IndexOf("资源删除") == -1) + if (Utility.isNeedLogin && !Utility.userRole.Contains("资源删除")) { dataGridViewX1.Columns["btndel"].Visible = false; } diff --git a/Utility.cs b/Utility.cs index 6672086..26cdcec 100644 --- a/Utility.cs +++ b/Utility.cs @@ -37,10 +37,12 @@ public static string PicRootURL; public static string PicDefaultURL; // public static double dFlyAboveLine = 2; - public static string userName; + public static string userName ="游客"; public static string projectStr; public static string userRole; + public static Boolean isNeedLogin = false;//设定是否需要登录的开关 + //数据配置 public static List listDb; public static string backupurl; diff --git a/bin/x86/Debug/glVersion.txt b/bin/x86/Debug/glVersion.txt index cd82eca..755455e 100644 --- a/bin/x86/Debug/glVersion.txt +++ b/bin/x86/Debug/glVersion.txt Binary files differ diff --git a/bin/x86/Debug/log.txt b/bin/x86/Debug/log.txt index 55049fb..48a2e64 100644 --- a/bin/x86/Debug/log.txt +++ b/bin/x86/Debug/log.txt @@ -580,3 +580,387 @@ exception over ------------------------------------------------------------ + + exception begin -----------------2016/12/13 13:51:30--------------------- + + + + e.Message:未将对象引用设置到对象的实例。 + + e.Source:Cyberpipe + + e.TargetSite:Void saveLog(System.String, System.String) + + e.StackTrace: 在 Cyberpipe.LogManager.saveLog(String username, String operation) 位置 E:\wxl\work\GHFX_REFACTOR\LogManager.cs:行号 22 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2016/12/13 13:51:31--------------------- + + + + e.Message:未将对象引用设置到对象的实例。 + + e.Source:Cyberpipe + + e.TargetSite:Void saveLog(System.String, System.String) + + e.StackTrace: 在 Cyberpipe.LogManager.saveLog(String username, String operation) 位置 E:\wxl\work\GHFX_REFACTOR\LogManager.cs:行号 22 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2016/12/13 13:51:32--------------------- + + + + e.Message:未将对象引用设置到对象的实例。 + + e.Source:Cyberpipe + + e.TargetSite:Void saveLog(System.String, System.String) + + e.StackTrace: 在 Cyberpipe.LogManager.saveLog(String username, String operation) 位置 E:\wxl\work\GHFX_REFACTOR\LogManager.cs:行号 22 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2016/12/13 13:51:33--------------------- + + + + e.Message:未将对象引用设置到对象的实例。 + + e.Source:Cyberpipe + + e.TargetSite:Void saveLog(System.String, System.String) + + e.StackTrace: 在 Cyberpipe.LogManager.saveLog(String username, String operation) 位置 E:\wxl\work\GHFX_REFACTOR\LogManager.cs:行号 22 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2016/12/13 13:54:25--------------------- + + + + e.Message:未将对象引用设置到对象的实例。 + + e.Source:Cyberpipe + + e.TargetSite:Void saveLog(System.String, System.String) + + e.StackTrace: 在 Cyberpipe.LogManager.saveLog(String username, String operation) 位置 E:\wxl\work\GHFX_REFACTOR\LogManager.cs:行号 22 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2016/12/13 13:54:26--------------------- + + + + e.Message:未将对象引用设置到对象的实例。 + + e.Source:Cyberpipe + + e.TargetSite:Void saveLog(System.String, System.String) + + e.StackTrace: 在 Cyberpipe.LogManager.saveLog(String username, String operation) 位置 E:\wxl\work\GHFX_REFACTOR\LogManager.cs:行号 22 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2016/12/13 13:54:26--------------------- + + + + e.Message:未将对象引用设置到对象的实例。 + + e.Source:Cyberpipe + + e.TargetSite:Void saveLog(System.String, System.String) + + e.StackTrace: 在 Cyberpipe.LogManager.saveLog(String username, String operation) 位置 E:\wxl\work\GHFX_REFACTOR\LogManager.cs:行号 22 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2016/12/13 13:54:27--------------------- + + + + e.Message:未将对象引用设置到对象的实例。 + + e.Source:Cyberpipe + + e.TargetSite:Void saveLog(System.String, System.String) + + e.StackTrace: 在 Cyberpipe.LogManager.saveLog(String username, String operation) 位置 E:\wxl\work\GHFX_REFACTOR\LogManager.cs:行号 22 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2016/12/13 13:56:35--------------------- + + + + e.Message:未将对象引用设置到对象的实例。 + + e.Source:Cyberpipe + + e.TargetSite:Void saveLog(System.String, System.String) + + e.StackTrace: 在 Cyberpipe.LogManager.saveLog(String username, String operation) 位置 E:\wxl\work\GHFX_REFACTOR\LogManager.cs:行号 22 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2016/12/13 13:56:36--------------------- + + + + e.Message:未将对象引用设置到对象的实例。 + + e.Source:Cyberpipe + + e.TargetSite:Void saveLog(System.String, System.String) + + e.StackTrace: 在 Cyberpipe.LogManager.saveLog(String username, String operation) 位置 E:\wxl\work\GHFX_REFACTOR\LogManager.cs:行号 22 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2016/12/13 13:56:37--------------------- + + + + e.Message:未将对象引用设置到对象的实例。 + + e.Source:Cyberpipe + + e.TargetSite:Void saveLog(System.String, System.String) + + e.StackTrace: 在 Cyberpipe.LogManager.saveLog(String username, String operation) 位置 E:\wxl\work\GHFX_REFACTOR\LogManager.cs:行号 22 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2016/12/13 13:56:37--------------------- + + + + e.Message:未将对象引用设置到对象的实例。 + + e.Source:Cyberpipe + + e.TargetSite:Void saveLog(System.String, System.String) + + e.StackTrace: 在 Cyberpipe.LogManager.saveLog(String username, String operation) 位置 E:\wxl\work\GHFX_REFACTOR\LogManager.cs:行号 22 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2016/12/13 13:57:10--------------------- + + + + e.Message:未将对象引用设置到对象的实例。 + + e.Source:Cyberpipe + + e.TargetSite:Void saveLog(System.String, System.String) + + e.StackTrace: 在 Cyberpipe.LogManager.saveLog(String username, String operation) 位置 E:\wxl\work\GHFX_REFACTOR\LogManager.cs:行号 22 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2016/12/13 13:57:11--------------------- + + + + e.Message:未将对象引用设置到对象的实例。 + + e.Source:Cyberpipe + + e.TargetSite:Void saveLog(System.String, System.String) + + e.StackTrace: 在 Cyberpipe.LogManager.saveLog(String username, String operation) 位置 E:\wxl\work\GHFX_REFACTOR\LogManager.cs:行号 22 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2016/12/13 13:57:11--------------------- + + + + e.Message:未将对象引用设置到对象的实例。 + + e.Source:Cyberpipe + + e.TargetSite:Void saveLog(System.String, System.String) + + e.StackTrace: 在 Cyberpipe.LogManager.saveLog(String username, String operation) 位置 E:\wxl\work\GHFX_REFACTOR\LogManager.cs:行号 22 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2016/12/13 13:57:12--------------------- + + + + e.Message:未将对象引用设置到对象的实例。 + + e.Source:Cyberpipe + + e.TargetSite:Void saveLog(System.String, System.String) + + e.StackTrace: 在 Cyberpipe.LogManager.saveLog(String username, String operation) 位置 E:\wxl\work\GHFX_REFACTOR\LogManager.cs:行号 22 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2016/12/13 14:03:54--------------------- + + + + e.Message:未将对象引用设置到对象的实例。 + + e.Source:Cyberpipe + + e.TargetSite:Void saveLog(System.String, System.String) + + e.StackTrace: 在 Cyberpipe.LogManager.saveLog(String username, String operation) 位置 E:\wxl\work\GHFX_REFACTOR\LogManager.cs:行号 22 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2016/12/13 14:03:55--------------------- + + + + e.Message:未将对象引用设置到对象的实例。 + + e.Source:Cyberpipe + + e.TargetSite:Void saveLog(System.String, System.String) + + e.StackTrace: 在 Cyberpipe.LogManager.saveLog(String username, String operation) 位置 E:\wxl\work\GHFX_REFACTOR\LogManager.cs:行号 22 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2016/12/13 14:03:56--------------------- + + + + e.Message:未将对象引用设置到对象的实例。 + + e.Source:Cyberpipe + + e.TargetSite:Void saveLog(System.String, System.String) + + e.StackTrace: 在 Cyberpipe.LogManager.saveLog(String username, String operation) 位置 E:\wxl\work\GHFX_REFACTOR\LogManager.cs:行号 22 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2016/12/13 14:03:56--------------------- + + + + e.Message:未将对象引用设置到对象的实例。 + + e.Source:Cyberpipe + + e.TargetSite:Void saveLog(System.String, System.String) + + e.StackTrace: 在 Cyberpipe.LogManager.saveLog(String username, String operation) 位置 E:\wxl\work\GHFX_REFACTOR\LogManager.cs:行号 22 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2016/12/14 13:43:42--------------------- + + + + e.Message:未将对象引用设置到对象的实例。 + + e.Source:Cyberpipe + + e.TargetSite:Void saveLog(System.String, System.String) + + e.StackTrace: 在 Cyberpipe.LogManager.saveLog(String username, String operation) 位置 E:\wxl\work\GHFX_REFACTOR\LogManager.cs:行号 22 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2016/12/14 13:43:44--------------------- + + + + e.Message:未将对象引用设置到对象的实例。 + + e.Source:Cyberpipe + + e.TargetSite:Void saveLog(System.String, System.String) + + e.StackTrace: 在 Cyberpipe.LogManager.saveLog(String username, String operation) 位置 E:\wxl\work\GHFX_REFACTOR\LogManager.cs:行号 22 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2016/12/14 13:43:45--------------------- + + + + e.Message:未将对象引用设置到对象的实例。 + + e.Source:Cyberpipe + + e.TargetSite:Void saveLog(System.String, System.String) + + e.StackTrace: 在 Cyberpipe.LogManager.saveLog(String username, String operation) 位置 E:\wxl\work\GHFX_REFACTOR\LogManager.cs:行号 22 + + + + exception over ------------------------------------------------------------ + + exception begin -----------------2016/12/14 13:43:46--------------------- + + + + e.Message:未将对象引用设置到对象的实例。 + + e.Source:Cyberpipe + + e.TargetSite:Void saveLog(System.String, System.String) + + e.StackTrace: 在 Cyberpipe.LogManager.saveLog(String username, String operation) 位置 E:\wxl\work\GHFX_REFACTOR\LogManager.cs:行号 22 + + + + exception over ------------------------------------------------------------