コード例 #1
0
        public WinClassicTerminal(bool readOnly)
        {
            InitializeComponent();

            // Paint the classic borders
            btnCopy.Paint     += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 2);
            btnFont.Paint     += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 2);
            btnMark.Paint     += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 2);
            btnNothing.Paint  += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 2);
            btnPaste.Paint    += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 2);
            btnSettings.Paint += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 2);
            sizeSel.Paint     += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 2);

            // Set the default index to "Auto"
            sizeSel.SelectedIndex = 0;

            // Set the font and append the prefix text
            cmdPrompt.Font = new Font(TitleScreen.pfc.Families[1], 12F, FontStyle.Regular);

            cmdPrompt.BringToFront();

            if (readOnly)
            {
                actionPanel.Hide();
                cmdPrompt.ReadOnly = true;
            }
            else
            {
                cmdPrompt.AppendText("\nMicrosoft<R> Windows 95\n   <C>Copyright Microsoft Corp 1981-1995.\n\n");
                cmdPrompt.AppendText(prefix);
            }
        }
コード例 #2
0
        public WinClassicTimeDistorter(string currentYear, string yearToTravel, int counter, Action action = null)
        {
            InitializeComponent();

            btnGo.Paint     += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 2);
            lblYear.Text     = currentYear;
            lblDestYear.Text = yearToTravel;
            _action          = action;
            _counter         = counter;
        }
コード例 #3
0
        public TitleScreen()
        {
            InitializeComponent();
            this.startmenu.Paint += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 2);
            SeizureWarning sw = new SeizureWarning();

            sw.Size = programContent.Size;
            programContent.Controls.Add(sw);
            sw.BringToFront();
        }
コード例 #4
0
ファイル: 12padams1998.cs プロジェクト: SleepyyNet/Histacom2
 public _12padams1998()
 {
     InitializeComponent();
     button1.Paint += (s, args) => Paintbrush.PaintClassicBorders(s, args, 2);
     button2.Paint += (s, args) => Paintbrush.PaintClassicBorders(s, args, 2);
     button3.Paint += (s, args) => Paintbrush.PaintClassicBorders(s, args, 2);
     button4.Paint += (s, args) => Paintbrush.PaintClassicBorders(s, args, 2);
     button5.Paint += (s, args) => Paintbrush.PaintClassicBorders(s, args, 2);
     button6.Paint += (s, args) => Paintbrush.PaintClassicBorders(s, args, 2);
     button7.Paint += (s, args) => Paintbrush.PaintClassicBorders(s, args, 2);
 }
コード例 #5
0
ファイル: TitleScreen.cs プロジェクト: pashcovich/Histacom2
 public TitleScreen()
 {
     InitializeComponent();
     this.startmenu.Paint += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 2);
     if (!File.Exists(Path.Combine(DataDirectory, "o.k")))
     {
         SeizureWarning sw = new SeizureWarning();
         sw.Size = programContent.Size;
         programContent.Controls.Add(sw);
         sw.BringToFront();
     }
 }
コード例 #6
0
 public MineBestTimes()
 {
     InitializeComponent();
     foreach (Control c in Controls)
     {
         if (c is Button)
         {
             c.Font   = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(0)));
             c.Paint += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 2);
         }
         else
         {
             c.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
         }
     }
 }
コード例 #7
0
        public Infobox95(InfoboxType type, InfoboxButtons btns)
        {
            InitializeComponent();
            button1.Paint += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 2);
            button2.Paint += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 2);
            button3.Paint += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 2);

            switch (type)
            {
            case InfoboxType.Info:
                pictureBox1.Image = Properties.Resources.Win95Info;
                SoundPlayer spa = new SoundPlayer(SaveSystem.currentTheme.asteriskSound);
                spa.Play();
                break;

            case InfoboxType.Question:
                pictureBox1.Image = Properties.Resources.Win95Question;
                SoundPlayer spq = new SoundPlayer(SaveSystem.currentTheme.questionSound);
                spq.Play();
                break;

            case InfoboxType.Warning:
                pictureBox1.Image = Properties.Resources.Win95Warning;
                SoundPlayer spw = new SoundPlayer(SaveSystem.currentTheme.exclamationSound);
                spw.Play();
                break;

            case InfoboxType.Error:
                pictureBox1.Image = Properties.Resources.Win95Error;
                SoundPlayer spe = new SoundPlayer(SaveSystem.currentTheme.critStopSound);
                spe.Play();
                break;
            }

            btnStatus = (int)btns;
            switch (btns)
            {
            case InfoboxButtons.OK:
                button1.Text = "OK";
                button2.Hide();
                button3.Hide();
                break;
            }
        }
コード例 #8
0
 public WinClassicMinesweeper()
 {
     InitializeComponent();
     labelBombs.Font = new Font(TitleScreen.pfc.Families[2], 15, GraphicsUnit.Point);
     labelTime.Font  = new Font(TitleScreen.pfc.Families[2], 15, GraphicsUnit.Point);
     panel2.Paint   += (sender, args) => Paintbrush.PaintClassicBordersIndented(sender, args, 3);
     panel3.Paint   += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 3);
     panel4.Paint   += (sender, args) => Paintbrush.PaintClassicBordersIndented(sender, args, 2);
     foreach (ToolStripMenuItem item in menuStrip1.Items)
     {
         item.Font                  = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular);
         item.BackColor             = Color.Silver;
         item.BackgroundImage       = Properties.Resources.sliversilver;
         item.BackgroundImageLayout = ImageLayout.Center;
         item.DisplayStyle          = ToolStripItemDisplayStyle.Text;
     }
     toolStripSeparator1.Paint += Paintbrush.ExtendedToolStripSeparator_Paint;
     toolStripSeparator2.Paint += Paintbrush.ExtendedToolStripSeparator_Paint;
     toolStripSeparator3.Paint += Paintbrush.ExtendedToolStripSeparator_Paint;
     toolStripSeparator4.Paint += Paintbrush.ExtendedToolStripSeparator_Paint;
     toolStripSeparator5.Paint += Paintbrush.ExtendedToolStripSeparator_Paint;
 }