Exemple #1
0
        private static void Main()
        {
            Application.SetHighDpiMode(HighDpiMode.SystemAware);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            window screen = new window();

            windows.Add(screen);
            Import();
            Lib.Write("hello");
            Application.Run(screen);
        }
Exemple #2
0
        public static void UpdateBtn()
        {
            window w = (Program.windows[0] as window);

            w.MainPanel.Controls.Clear();
            foreach (Pakage p in Program.Pakages)
            {
                Button text = new Button()
                {
                    BackColor = System.Drawing.SystemColors.HotTrack,
                    Dock      = DockStyle.Top,
                    Location  = new System.Drawing.Point(0, 19),
                    Name      = p.JName,
                    Text      = p.Name,
                    Size      = new System.Drawing.Size(200, 34)
                };
                text.Click += new EventHandler(Click);
                w.MainPanel.Controls.Add(text);
            }
        }
Exemple #3
0
        private static void Click(object sender, EventArgs s)
        {
            String name;

            if (sender is Button)
            {
                name = (sender as Button).Name;
                foreach (Pakage p in Program.Pakages)
                {
                    if (name == p.JName)
                    {
                        Program.current = p;
                    }
                }
                window w = (Program.windows[0] as window);
                w.DescriptionLabel.Text = "Description: \n" + Program.current.Description;
                w.PakageNameLabel.Text  = "Name: \n" + Program.current.Name;
                Program.UpdateIsInstalled();
            }
        }
Exemple #4
0
        public static void UpdateIsInstalled()
        {
            window w = (windows[0] as window);

            if (current.IsInstalled)
            {
                w.IsInstalled.ForeColor = Color.Chartreuse;
                w.IsInstalled.Text      = current.Name + "\nInstalled";
                Bitmap image = Icon.ExtractAssociatedIcon(Lib.path + "Apps/" + current.JName + "/" + current.exe).ToBitmap();
                image            = new Bitmap(image, new Size(image.Width * 4, image.Height * 4));
                w.ImageBox.Image = image;
            }
            else
            {
                w.IsInstalled.ForeColor = Color.Red;
                w.IsInstalled.Text      = current.Name + "\nNOT Installed";
                Icon   icon  = Icon.ExtractAssociatedIcon(Application.ExecutablePath);
                Bitmap image = new Bitmap(
                    icon.ToBitmap(),
                    new Size(icon.ToBitmap().Width * 4, icon.ToBitmap().Height * 4));
                w.ImageBox.Image = image;
            }
        }