Example #1
0
        public TileBuilder(bool itemChecked)
        {
            _control = new DevExpress.XtraEditors.TileControl();

            if (itemChecked) {

                _control.ItemCheckMode = TileItemCheckMode.Single;
            }
        }
Example #2
0
        public void AddTileGroup(string name, string title)
        {
            bool isExists = false;

            DevExpress.XtraEditors.TileControl control = _control;
            if (control == null)
            {
                _control = control = new DevExpress.XtraEditors.TileControl();
            }
            DevExpress.XtraEditors.TileGroup group = new DevExpress.XtraEditors.TileGroup();
            group.Name = name;
            group.Text = title;

            foreach (TileGroup tileGroup in control.Groups) {

                if (tileGroup.Name.Equals(name)) {
                    isExists = true;
                    break;
                }
            }

            if (! isExists )
                control.Groups.Add(group);
        }
Example #3
0
        private void menu_Click(object sender, EventArgs e)
        {
            DevExpress.XtraEditors.TileControl menu = sender as DevExpress.XtraEditors.TileControl;

            if (menu != selectedMenu)
            {
                previousSelectedMenu = selectedMenu;
            }

            selectedMenu = menu;
            for (int index = 0; index < tileMenus.Length; index++)
            {
                DevExpress.XtraEditors.TileControl tileMenu = tileMenus[index];
                if (selectedMenu == tileMenu)
                {
                    tileMenu.BackgroundImage = tileMenu.AppearanceItem.Selected.Image;
                }
                else
                {
                    tileMenu.BackgroundImage = tileMenu.AppearanceItem.Normal.Image;
                }
            }

            string name = ((TileControl)sender).Name;

            switch (name)
            {
            case "menu_home":
                SelectMenu(new MenuHome()
                {
                    Opener = this,
                    MachineInformations = this.machineInformations
                });
                break;

            case "menu_monitor":
                Cursor = Cursors.WaitCursor;
                SelectMenu(new MenuMonitoring()
                {
                    Opener = this,
                    MachineInformations = machineInformations
                });
                Cursor = Cursors.Default;
                break;

            case "menu_mapSetting":
                SelectMenu(new memorymapMain());
                break;

            case "menu_status":
                SelectMenu(new ctl_InjectionCondition()
                {
                    Opener = this
                });
                break;

            case "menu_performance":
                SelectMenu(new WorkPerformanceMain());
                break;

            case "menu_logout":
                frm_login login = new frm_login();
                OpenNewForm(login);
                break;
            }
        }