Ejemplo n.º 1
0
        public MainForm(Form_Log logForm)
        {
            gdb          = Program.gdbDrive;
            this.logForm = logForm;

            InitializeComponent();
            VisualToView("china", axMapControl_Main.Map, false);
            VisualToView("site", axMapControl_Main.Map, true);

            if (logForm.flag == 1) // 游客模式,只能查找和查看热力图
            {
                报名ToolStripMenuItem.Visible = false;
                添加ToolStripMenuItem.Visible = false;
                修改ToolStripMenuItem.Visible = false;
            }

            if (logForm.flag == 2) // 报名者模式,只能查找、查看热力图和报名
            {
                添加ToolStripMenuItem.Visible = false;
                修改ToolStripMenuItem.Visible = false;
            }

            if (logForm.flag == 3) // 组织者模式,不能报名
            {
                报名ToolStripMenuItem.Visible   = false;
                组织者ToolStripMenuItem.Visible  = false;
                学生ToolStripMenuItem.Visible   = false;
                组织者ToolStripMenuItem1.Visible = false;
                地理位置ToolStripMenuItem.Visible = false;
            }

            if (logForm.flag == 4) // 管理员模式,不能报名
            {
                报名ToolStripMenuItem.Visible    = false;
                支教活动ToolStripMenuItem.Visible  = false;
                支教活动ToolStripMenuItem1.Visible = false;
            }
        }
Ejemplo n.º 2
0
        static void Main()
        {
            //ESRI License Initializer generated code.
            m_AOLicenseInitializer.InitializeApplication(new esriLicenseProductCode[] { esriLicenseProductCode.esriLicenseProductCodeEngine },
                                                         new esriLicenseExtensionCode[] { });
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //ESRI License Initializer generated code.
            //Do not make any call to ArcObjects after ShutDownApplication()
            m_AOLicenseInitializer.ShutdownApplication();

            //Form_Log f1 = new Form_Log();
            //f1.ShowDialog();

            //while (true)
            //{
            //    MainForm newform = new MainForm(ref f1);

            //    // 打开主窗口
            //    if (f1.DialogResult == DialogResult.OK)
            //    {
            //        newform.ShowDialog();
            //    }

            //    // 打开登录窗口
            //    if (newform.DialogResult == DialogResult.OK)
            //    {
            //        f1.ShowDialog();
            //    }
            //}

            gdbDrive = new GdbDrive();

            logForm = new Form_Log();

            logForm.ShowDialog();
        }