Exemplo n.º 1
0
        static Appbar LoadAppbar(Stream fs)
        {
            var obj = new Appbar(ReadString(fs), ReadInt(fs), ReadFont(fs), ReadFont(fs), (Skewworks.Tinkr.DockLocation)fs.ReadByte(), ReadBool(fs))
            {
                Enabled    = ReadBool(fs),
                Visible    = ReadBool(fs),
                BackColor  = ReadColor(fs),
                ForeColor  = ReadColor(fs),
                TimeFormat = (TimeFormat)fs.ReadByte()
            };

            int i;
            var c = ReadInt(fs);

            Debug.GC(true);
            for (i = 0; i < c; i++)
            {
                obj.AddIcon(new AppbarIcon("icon" + i, ReadImage(fs)));
                Debug.GC(true);
            }

            c = ReadInt(fs);
            for (i = 0; i < c; i++)
            {
                obj.AddMenuItem(new AppbarMenuItem("mnu" + i, ReadString(fs)));
            }

            return(obj);
        }
Exemplo n.º 2
0
        void Home()
        {
            frmMain = new Form("frmMain");
            frmMain.BackgroundImage = Resources.GetBitmap(Resources.BitmapResources.CP7Background);

            // Appbar
            frmMainAppbar = new Appbar("ab1", Fonts.Calibri9, Fonts.Calibri24);
            frmMainAppbar.AddMenuItems(new string[] { "Launch Pacman" });
            frmMainAppbar.AppMenuSelected += new OnAppMenuSelected((object sender, int id, string value) => new Thread(AppbarItemSelected).Start());
            frmMain.AddControl(frmMainAppbar);

            // Activate
            Graphics.ActiveContainer = frmMain;
        }
Exemplo n.º 3
0
        private Appbar BuildAppBar(string currentForm)
        {
            var appBar = new Appbar("appBar",_fntVerdana12, _fntVerdanaBold24);

            // Add menu items.
            foreach (var menuItem in _menuItems)
            {
                if (menuItem != currentForm)
                {
                    appBar.AddMenuItem(menuItem);
                }
            }
            appBar.AppMenuSelected += OnAppMenuSelected;
            return appBar;
        }