Пример #1
0
        public ScrollBox()
        {
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            Image = IconService.GetBitmap("Icons.AboutImage");

            Font = WinFormsResourceService.LoadFont("Tahoma", 10);
            text = new string[] {
                "\"The most successful method of programming is to begin a program as simply as possible, test it, and then add to the program until it performs the required job.\"\n    -- PDP8 handbook, Pg 9-64",
                "\"The primary purpose of the DATA statement is to give names to constants; instead of referring to pi as 3.141592653589793 at every\n appearance, the variable PI can be given that value with a DATA statement and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of pi change.\"\n    -- FORTRAN manual for Xerox computers",
                "\"No proper program contains an indication which as an operator-applied occurrence identifies an operator-defining occurrence which as an indication-applied occurrence identifies an indication-defining occurrence different from the one identified by the given indication as an indication- applied occurrence.\"\n   -- ALGOL 68 Report",
                "\"The '#pragma' command is specified in the ANSI standard to have an arbitrary implementation-defined effect. In the GNU C preprocessor, `#pragma' first attempts to run the game rogue; if that fails, it tries to run the game hack; if that fails, it tries to run GNU Emacs displaying the Tower of Hanoi; if that fails, it reports a fatal error. In any case, preprocessing does not continue.\"\n   --From an old GNU C Preprocessor document",
                "\"There are two ways of constructing a software design: one way is to make it so simple that there are obviously no deficiencies; the other is to make it so complicated that there are no obvious deficiencies.\"\n    -- C.A.R. Hoare",
                "On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question.\"\n   -- Charles Babbage (1791-1871)"
            };

            // randomize the order in which the texts are displayed
            Random rnd = new Random();

            for (int i = 0; i < text.Length; i++)
            {
                Swap(ref text[i], ref text[rnd.Next(i, text.Length)]);
            }

            timer          = new Timer();
            timer.Interval = 40;
            timer.Tick    += new EventHandler(ScrollDown);
            timer.Start();
        }
Пример #2
0
        public ScrollBox()
        {
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            //Image = IconService.GetBitmap("Icons.AboutImage");
            Image = null;

            Font = WinFormsResourceService.LoadFont("Tahoma", 10);
            text = new string[] {
                "FanHai Hemera MES System"
                //"\"Habit 1: Be Proactive",
                //"\"Habit 2: Begin with the End in Mind",
                //"\"Habit 3: put First Things First",
                //"\"Habit 4: Think Win/Win",
                //"\"Habit 5: Put First to Understand, Then To be Understood",
                //"\"Habit 6: Synergize",
                //"\"Habit 7: Sharpen the Saw"
            };

            // randomize the order in which the texts are displayed
            //Random rnd = new Random();
            //for (int i = 0; i < text.Length; i++)
            //{
            //    Swap(ref text[i], ref text[rnd.Next(i, text.Length)]);
            //}

            timer          = new Timer();
            timer.Interval = 40;
            timer.Tick    += new EventHandler(ScrollDown);
            timer.Start();
        }
        public override void LoadOptions()
        {
            base.LoadOptions();
            CodeEditorOptions options = CodeEditorOptions.Instance;

            fontSelectionPanel.CurrentFont = WinFormsResourceService.LoadFont(
                options.FontFamily, (int)Math.Round(options.FontSize * 72.0 / 96.0));
        }
        public CurrentPanelPanel(WizardDialog wizard)
        {
            normalFont = WinFormsResourceService.LoadFont("SansSerif", 18, GraphicsUnit.World);

            this.wizard  = wizard;
            Size         = new Size(wizard.Width - 220, 30);
            ResizeRedraw = false;

            SetStyle(ControlStyles.UserPaint, true);
        }
Пример #5
0
        public AboutSharpDevelopTabPage()
        {
            versionTextBox.Text = RevisionClass.Major + "." + RevisionClass.Minor + "." + RevisionClass.Build;
            buildTextBox.Text   = RevisionClass.Revision;

            versionLabel.Location = new System.Drawing.Point(8, 8);
            versionLabel.Text     = ResourceService.GetString("Dialog.About.label1Text");
            versionLabel.Size     = new System.Drawing.Size(64, 16);
            versionLabel.TabIndex = 1;
            Controls.Add(versionLabel);

            versionTextBox.Location = new System.Drawing.Point(64 + 8 + 4, 8);
            versionTextBox.ReadOnly = true;
            versionTextBox.TabIndex = 4;
            versionTextBox.Size     = new System.Drawing.Size(48, 20);
            Controls.Add(versionTextBox);

            buildLabel.Location = new System.Drawing.Point(64 + 12 + 48 + 4, 8);
            buildLabel.Text     = ResourceService.GetString("Dialog.About.label2Text");
            buildLabel.Size     = new System.Drawing.Size(48, 16);
            buildLabel.TabIndex = 2;
            Controls.Add(buildLabel);

            buildTextBox.Location = new System.Drawing.Point(64 + 12 + 48 + 4 + 48 + 4, 8);
            buildTextBox.ReadOnly = true;
            buildTextBox.TabIndex = 3;
            buildTextBox.Size     = new System.Drawing.Size(72, 20);
            Controls.Add(buildTextBox);

            sponsorLabel.Location = new System.Drawing.Point(8, 34);
            sponsorLabel.Text     = LicenseSentence;
            sponsorLabel.Size     = new System.Drawing.Size(362, 24);
            sponsorLabel.TabIndex = 8;
            Controls.Add(sponsorLabel);

            versionInfoTextBox.Location    = new System.Drawing.Point(8, 34 + 28);
            versionInfoTextBox.Size        = new System.Drawing.Size(362, 100);
            versionInfoTextBox.Multiline   = true;
            versionInfoTextBox.ReadOnly    = true;
            versionInfoTextBox.WordWrap    = false;
            versionInfoTextBox.Text        = GetVersionInformationString();
            versionInfoTextBox.ScrollBars  = ScrollBars.Both;
            versionInfoTextBox.TabIndex    = 9;
            versionInfoTextBox.Font        = WinFormsResourceService.LoadFont("Courier New", 8);
            versionInfoTextBox.KeyDown    += new KeyEventHandler(versionInfoTextBox_KeyDown);
            versionInfoTextBox.RightToLeft = RightToLeft.No;
            Controls.Add(versionInfoTextBox);

            Dock = DockStyle.Fill;
        }
Пример #6
0
        public StatusPanel(WizardDialog wizard)
        {
            smallFont  = WinFormsResourceService.LoadFont("Tahoma", 14, GraphicsUnit.World);
            normalFont = WinFormsResourceService.LoadFont("Tahoma", 14, GraphicsUnit.World);
            boldFont   = WinFormsResourceService.LoadFont("Tahoma", 14, FontStyle.Bold, GraphicsUnit.World);

            this.wizard          = wizard;
            this.BackgroundImage = WinFormsResourceService.GetBitmap("GeneralWizardBackground");
            Size         = new Size(198, 400);
            ResizeRedraw = false;

            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
        }
Пример #7
0
        public BinaryView(ResourceItem item)
        {
            byteDataTextBox.ReadOnly  = true;
            byteDataTextBox.Multiline = true;

            byteDataTextBox.Top        = 24;
            byteDataTextBox.Left       = 0;
            byteDataTextBox.Width      = Width;
            byteDataTextBox.Height     = Height - 24;
            byteDataTextBox.Anchor     = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Top;
            byteDataTextBox.Font       = WinFormsResourceService.LoadFont("Courier New", 10);
            byteDataTextBox.ScrollBars = ScrollBars.Both;
            byteDataTextBox.BackColor  = SystemColors.Window;

            viewHexDumpCheckBox.Location        = new Point(8, 4);
            viewHexDumpCheckBox.Size            = new Size(Width - 16, 16);
            viewHexDumpCheckBox.Text            = StringParser.Parse("${res:ResourceEditor.ResourceEdit.ShowAsHexDump}");
            viewHexDumpCheckBox.CheckedChanged += new EventHandler(CheckEvt);

            Controls.Add(byteDataTextBox);
            Controls.Add(viewHexDumpCheckBox);
            byteDataTextBox.Select();
            ResourceItem = item;
        }
Пример #8
0
 public GradientHeaderPanel(int fontSize) : this()
 {
     Font = WinFormsResourceService.LoadFont("Tahoma", fontSize);
 }
Пример #9
0
 public Font LoadFont(string fontName, int size, FontStyle style)
 {
     return(WinFormsResourceService.LoadFont(fontName, size, style));
 }
Пример #10
0
 public Font LoadFont(Font baseFont, FontStyle newStyle)
 {
     return(WinFormsResourceService.LoadFont(baseFont, newStyle));
 }