Esempio n. 1
0
        protected virtual void FillTopToolbar()
        {
            Collection <ToolbarButton.SelectOption> options;

            ToolbarButton.SelectOption option;

            TopToolbar.Buttons.Add(new ToolbarButton.Undo());
            TopToolbar.Buttons.Add(new ToolbarButton.Redo());
            TopToolbar.Buttons.Add(new ToolbarButton.HorizontalSeparator());
            TopToolbar.Buttons.Add(new ToolbarButton.Bold());
            TopToolbar.Buttons.Add(new ToolbarButton.Italic());
            TopToolbar.Buttons.Add(new ToolbarButton.Underline());
            TopToolbar.Buttons.Add(new ToolbarButton.StrikeThrough());
            TopToolbar.Buttons.Add(new ToolbarButton.SubScript());
            TopToolbar.Buttons.Add(new ToolbarButton.SuperScript());
            TopToolbar.Buttons.Add(new ToolbarButton.HorizontalSeparator());
            TopToolbar.Buttons.Add(new ToolbarButton.Ltr());
            TopToolbar.Buttons.Add(new ToolbarButton.Rtl());
            TopToolbar.Buttons.Add(new ToolbarButton.HorizontalSeparator());

            ToolbarButton.FixedForeColor FixedForeColor = new ToolbarButton.FixedForeColor();
            TopToolbar.Buttons.Add(FixedForeColor);
            ToolbarButton.ForeColorSelector ForeColorSelector = new ToolbarButton.ForeColorSelector();
            ForeColorSelector.FixedColorButtonId = FixedForeColor.ID = "FixedForeColor";
            TopToolbar.Buttons.Add(ForeColorSelector);
            TopToolbar.Buttons.Add(new ToolbarButton.ForeColorClear());

            TopToolbar.Buttons.Add(new ToolbarButton.HorizontalSeparator());

            ToolbarButton.FixedBackColor FixedBackColor = new ToolbarButton.FixedBackColor();
            TopToolbar.Buttons.Add(FixedBackColor);
            ToolbarButton.BackColorSelector BackColorSelector = new ToolbarButton.BackColorSelector();
            BackColorSelector.FixedColorButtonId = FixedBackColor.ID = "FixedBackColor";
            TopToolbar.Buttons.Add(BackColorSelector);
            TopToolbar.Buttons.Add(new ToolbarButton.BackColorClear());

            TopToolbar.Buttons.Add(new ToolbarButton.HorizontalSeparator());
            TopToolbar.Buttons.Add(new ToolbarButton.RemoveStyles());
            TopToolbar.Buttons.Add(new ToolbarButton.HorizontalSeparator());

            ToolbarButton.FontName fontName = new ToolbarButton.FontName();
            TopToolbar.Buttons.Add(fontName);

            options      = fontName.Options;
            option       = new ToolbarButton.SelectOption();
            option.Value = "arial,helvetica,sans-serif";
            option.Text  = "Arial";
            options.Add(option);
            option       = new ToolbarButton.SelectOption();
            option.Value = "courier new,courier,monospace";
            option.Text  = "Courier New";
            options.Add(option);
            option       = new ToolbarButton.SelectOption();
            option.Value = "georgia,times new roman,times,serif";
            option.Text  = "Georgia";
            options.Add(option);
            option       = new ToolbarButton.SelectOption();
            option.Value = "tahoma,arial,helvetica,sans-serif";
            option.Text  = "Tahoma";
            options.Add(option);
            option       = new ToolbarButton.SelectOption();
            option.Value = "times new roman,times,serif";
            option.Text  = "Times New Roman";
            options.Add(option);
            option       = new ToolbarButton.SelectOption();
            option.Value = "verdana,arial,helvetica,sans-serif";
            option.Text  = "Verdana";
            options.Add(option);
            option       = new ToolbarButton.SelectOption();
            option.Value = "impact";
            option.Text  = "Impact";
            options.Add(option);
            option       = new ToolbarButton.SelectOption();
            option.Value = "wingdings";
            option.Text  = "WingDings";
            options.Add(option);

            TopToolbar.Buttons.Add(new ToolbarButton.HorizontalSeparator());
            ToolbarButton.FontSize fontSize = new ToolbarButton.FontSize();
            TopToolbar.Buttons.Add(fontSize);

            options      = fontSize.Options;
            option       = new ToolbarButton.SelectOption();
            option.Value = "8pt";
            option.Text  = "1 ( 8 pt)";
            options.Add(option);
            option       = new ToolbarButton.SelectOption();
            option.Value = "10pt";
            option.Text  = "2 (10 pt)";
            options.Add(option);
            option       = new ToolbarButton.SelectOption();
            option.Value = "12pt";
            option.Text  = "3 (12 pt)";
            options.Add(option);
            option       = new ToolbarButton.SelectOption();
            option.Value = "14pt";
            option.Text  = "4 (14 pt)";
            options.Add(option);
            option       = new ToolbarButton.SelectOption();
            option.Value = "18pt";
            option.Text  = "5 (18 pt)";
            options.Add(option);
            option       = new ToolbarButton.SelectOption();
            option.Value = "24pt";
            option.Text  = "6 (24 pt)";
            options.Add(option);
            option       = new ToolbarButton.SelectOption();
            option.Value = "36pt";
            option.Text  = "7 (36 pt)";
            options.Add(option);

            TopToolbar.Buttons.Add(new ToolbarButton.HorizontalSeparator());
            TopToolbar.Buttons.Add(new ToolbarButton.Cut());
            TopToolbar.Buttons.Add(new ToolbarButton.Copy());
            TopToolbar.Buttons.Add(new ToolbarButton.Paste());
            TopToolbar.Buttons.Add(new ToolbarButton.PasteText());
            TopToolbar.Buttons.Add(new ToolbarButton.PasteWord());
            TopToolbar.Buttons.Add(new ToolbarButton.HorizontalSeparator());
            TopToolbar.Buttons.Add(new ToolbarButton.DecreaseIndent());
            TopToolbar.Buttons.Add(new ToolbarButton.IncreaseIndent());
            TopToolbar.Buttons.Add(new ToolbarButton.HorizontalSeparator());
            TopToolbar.Buttons.Add(new ToolbarButton.Paragraph());
            TopToolbar.Buttons.Add(new ToolbarButton.JustifyLeft());
            TopToolbar.Buttons.Add(new ToolbarButton.JustifyCenter());
            TopToolbar.Buttons.Add(new ToolbarButton.JustifyRight());
            TopToolbar.Buttons.Add(new ToolbarButton.JustifyFull());
            TopToolbar.Buttons.Add(new ToolbarButton.RemoveAlignment());
            TopToolbar.Buttons.Add(new ToolbarButton.HorizontalSeparator());
            TopToolbar.Buttons.Add(new ToolbarButton.OrderedList());
            TopToolbar.Buttons.Add(new ToolbarButton.BulletedList());

            TopToolbar.Buttons.Add(new ToolbarButton.HorizontalSeparator());
            TopToolbar.Buttons.Add(new ToolbarButton.InsertHR());
            TopToolbar.Buttons.Add(new ToolbarButton.InsertLink());
            TopToolbar.Buttons.Add(new ToolbarButton.RemoveLink());
        }
Esempio n. 2
0
        protected virtual void FillTopToolbar()
        {
            Collection<ToolbarButton.SelectOption> options;
            ToolbarButton.SelectOption option;

            TopToolbar.Buttons.Add(new ToolbarButton.Undo());
            TopToolbar.Buttons.Add(new ToolbarButton.Redo());
            TopToolbar.Buttons.Add(new ToolbarButton.HorizontalSeparator());
            TopToolbar.Buttons.Add(new ToolbarButton.Bold());
            TopToolbar.Buttons.Add(new ToolbarButton.Italic());
            TopToolbar.Buttons.Add(new ToolbarButton.Underline());
            TopToolbar.Buttons.Add(new ToolbarButton.StrikeThrough());
            TopToolbar.Buttons.Add(new ToolbarButton.SubScript());
            TopToolbar.Buttons.Add(new ToolbarButton.SuperScript());
            TopToolbar.Buttons.Add(new ToolbarButton.HorizontalSeparator());
            TopToolbar.Buttons.Add(new ToolbarButton.Ltr());
            TopToolbar.Buttons.Add(new ToolbarButton.Rtl());
            TopToolbar.Buttons.Add(new ToolbarButton.HorizontalSeparator());

            ToolbarButton.FixedForeColor FixedForeColor = new ToolbarButton.FixedForeColor();
            TopToolbar.Buttons.Add(FixedForeColor);
            ToolbarButton.ForeColorSelector ForeColorSelector = new ToolbarButton.ForeColorSelector();
            ForeColorSelector.FixedColorButtonId = FixedForeColor.ID = "FixedForeColor";
            TopToolbar.Buttons.Add(ForeColorSelector);
            TopToolbar.Buttons.Add(new ToolbarButton.ForeColorClear());

            TopToolbar.Buttons.Add(new ToolbarButton.HorizontalSeparator());

            ToolbarButton.FixedBackColor FixedBackColor = new ToolbarButton.FixedBackColor();
            TopToolbar.Buttons.Add(FixedBackColor);
            ToolbarButton.BackColorSelector BackColorSelector = new ToolbarButton.BackColorSelector();
            BackColorSelector.FixedColorButtonId = FixedBackColor.ID = "FixedBackColor";
            TopToolbar.Buttons.Add(BackColorSelector);
            TopToolbar.Buttons.Add(new ToolbarButton.BackColorClear());

            TopToolbar.Buttons.Add(new ToolbarButton.HorizontalSeparator());
            TopToolbar.Buttons.Add(new ToolbarButton.RemoveStyles());
            TopToolbar.Buttons.Add(new ToolbarButton.HorizontalSeparator());

            ToolbarButton.FontName fontName = new ToolbarButton.FontName();
            TopToolbar.Buttons.Add(fontName);

            options = fontName.Options;
            option = new ToolbarButton.SelectOption();
            option.Value = "arial,helvetica,sans-serif";
            option.Text = "Arial";
            options.Add(option);
            option = new ToolbarButton.SelectOption();
            option.Value = "courier new,courier,monospace";
            option.Text = "Courier New";
            options.Add(option);
            option = new ToolbarButton.SelectOption();
            option.Value = "georgia,times new roman,times,serif";
            option.Text = "Georgia";
            options.Add(option);
            option = new ToolbarButton.SelectOption();
            option.Value = "tahoma,arial,helvetica,sans-serif";
            option.Text = "Tahoma";
            options.Add(option);
            option = new ToolbarButton.SelectOption();
            option.Value = "times new roman,times,serif";
            option.Text = "Times New Roman";
            options.Add(option);
            option = new ToolbarButton.SelectOption();
            option.Value = "verdana,arial,helvetica,sans-serif";
            option.Text = "Verdana";
            options.Add(option);
            option = new ToolbarButton.SelectOption();
            option.Value = "impact";
            option.Text = "Impact";
            options.Add(option);
            option = new ToolbarButton.SelectOption();
            option.Value = "wingdings";
            option.Text = "WingDings";
            options.Add(option);

            TopToolbar.Buttons.Add(new ToolbarButton.HorizontalSeparator());
            ToolbarButton.FontSize fontSize = new ToolbarButton.FontSize();
            TopToolbar.Buttons.Add(fontSize);

            options = fontSize.Options;
            option = new ToolbarButton.SelectOption();
            option.Value = "8pt";
            option.Text = "1 ( 8 pt)";
            options.Add(option);
            option = new ToolbarButton.SelectOption();
            option.Value = "10pt";
            option.Text = "2 (10 pt)";
            options.Add(option);
            option = new ToolbarButton.SelectOption();
            option.Value = "12pt";
            option.Text = "3 (12 pt)";
            options.Add(option);
            option = new ToolbarButton.SelectOption();
            option.Value = "14pt";
            option.Text = "4 (14 pt)";
            options.Add(option);
            option = new ToolbarButton.SelectOption();
            option.Value = "18pt";
            option.Text = "5 (18 pt)";
            options.Add(option);
            option = new ToolbarButton.SelectOption();
            option.Value = "24pt";
            option.Text = "6 (24 pt)";
            options.Add(option);
            option = new ToolbarButton.SelectOption();
            option.Value = "36pt";
            option.Text = "7 (36 pt)";
            options.Add(option);

            TopToolbar.Buttons.Add(new ToolbarButton.HorizontalSeparator());
            TopToolbar.Buttons.Add(new ToolbarButton.Cut());
            TopToolbar.Buttons.Add(new ToolbarButton.Copy());
            TopToolbar.Buttons.Add(new ToolbarButton.Paste());
            TopToolbar.Buttons.Add(new ToolbarButton.PasteText());
            TopToolbar.Buttons.Add(new ToolbarButton.PasteWord());
            TopToolbar.Buttons.Add(new ToolbarButton.HorizontalSeparator());
            TopToolbar.Buttons.Add(new ToolbarButton.DecreaseIndent());
            TopToolbar.Buttons.Add(new ToolbarButton.IncreaseIndent());
            TopToolbar.Buttons.Add(new ToolbarButton.HorizontalSeparator());
            TopToolbar.Buttons.Add(new ToolbarButton.Paragraph());
            TopToolbar.Buttons.Add(new ToolbarButton.JustifyLeft());
            TopToolbar.Buttons.Add(new ToolbarButton.JustifyCenter());
            TopToolbar.Buttons.Add(new ToolbarButton.JustifyRight());
            TopToolbar.Buttons.Add(new ToolbarButton.JustifyFull());
            TopToolbar.Buttons.Add(new ToolbarButton.RemoveAlignment());
            TopToolbar.Buttons.Add(new ToolbarButton.HorizontalSeparator());
            TopToolbar.Buttons.Add(new ToolbarButton.OrderedList());
            TopToolbar.Buttons.Add(new ToolbarButton.BulletedList());

            TopToolbar.Buttons.Add(new ToolbarButton.HorizontalSeparator());
            TopToolbar.Buttons.Add(new ToolbarButton.InsertHR());
            TopToolbar.Buttons.Add(new ToolbarButton.InsertLink());
            TopToolbar.Buttons.Add(new ToolbarButton.RemoveLink());
        }