private void Form1_Load(object sender, EventArgs e) { this.trackBarItem1.TrackBarExControl.ButtonSignColor = Color.White; this.HelpButton = false; this.superAccelerator1.BackColor = Color.Black; this.superAccelerator1.ForeColor = Color.White; this.superAccelerator1.SetMenuButtonAccelerator(this.ribbonControlAdv1, "F"); this.superAccelerator1.SetAccelerator(this.backStageTab2, "N"); this.superAccelerator1.SetAccelerator(this.backStageButton1, "E"); this.superAccelerator1.SetAccelerator(this.backStageButton2, "O"); this.superAccelerator1.SetAccelerator(this.backStageButton3, "S"); this.superAccelerator1.Appearance = Syncfusion.Windows.Forms.Tools.Appearance.Advanced; this.ribbonControlAdv1.ShowQuickItemsDropDownButton = true; //To add items in the QAT ToolStripButton saveItem = new ToolStripButton(imageList1.Images[1]); QuickButtonReflectable quick = new QuickButtonReflectable(saveItem); this.ribbonControlAdv1.Header.AddQuickItem(quick); this.superAccelerator1.SetAccelerator(saveItem, "SA"); this.gridControl1.Dock = DockStyle.Fill; gridControl1.RowStyles[0].Font.Bold = false; this.toolStripFontfaceComboBox.SelectedIndex = 0; this.toolStripFontSizeComboBox.SelectedIndex = 0; this.tabBarSplitterControl2.ShowAddNewTabBarPageOption = false; this.backStageButton2.Click += new EventHandler(backStageButton2_Click); this.backStageButton3.Click += new EventHandler(backStageButton3_Click); }
public Form1() { InitializeComponent(); this.backStage1.VisibleFullText = true; this.sizeComboBox.Validated += SizeComboBox_Validated; this.fontComboBox.Validated += FontComboBox_Validated; this.wordribbon.MenuButtonClick += Wordribbon_MenuButtonClick; this.treeNavigator3.Visible = false; this.treeNavigator2.SelectionChanged += treeNavigator1_SelectionChanged; this.richTextBox1.LoadFile("..//..//temp.rtf"); InfoTabLabelUpdate("..//..//temp.rtf"); this.rtbpanel.AutoScroll = true; this.rtbpanel.Dock = DockStyle.Fill; this.richTextBox1.Height = 1600; this.wordribbon.SelectedTab = this.insertTab; this.trackBarItem1.TrackBarExControl.Style = TrackBarEx.Theme.Office2016Colorful; this.printDocument.PrintPage += PrintDocument_PrintPage; StoreToGroupView(); this.treeNavigator1.SelectedItem = this.recenttreeMenuItem; this.treeNavigator1.SelectedItem = this.SaveAsPCtreeMenuItem; this.groupView1.BackColor = Color.FromArgb(241, 241, 241); this.groupView1.HighlightItemColor = Color.FromArgb(197, 197, 197); this.groupView2.BackColor = Color.FromArgb(241, 241, 241); this.groupView2.HighlightItemColor = Color.FromArgb(197, 197, 197); drives = Directory.GetLogicalDrives(); this.WindowState = FormWindowState.Maximized; foreach (string printer in System.Drawing.Printing.PrinterSettings.InstalledPrinters) { this.printerComboBox.Items.Add(printer); } foreach (object page in print.PrinterSettings.PaperSizes) { this.pageSizecomboBox.Items.Add(page); } this.collatedcomboBox.Items.Add("UnCollated"); this.collatedcomboBox.Items.Add("Collated"); this.orientationComboBox.Items.Add("Portrait Orientation"); this.orientationComboBox.Items.Add("Landscape Orientation"); this.collatedcomboBox.SelectedIndex = 0; this.orientationComboBox.SelectedIndex = 0; this.pageSizecomboBox.SelectedIndex = 0; this.printerComboBox.SelectedIndex = 1; foreach (FontFamily oneFontFamily in FontFamily.Families) { fontComboBox.Items.Add(oneFontFamily.Name); } sizeComboBox.Text = this.richTextBox1.Font.Size.ToString(); fontComboBox.Text = this.richTextBox1.Font.FontFamily.Name; fontComboBox.ComboBox.TextBox.SelectionStart = 0; splitContainerAdv1.IsSplitterFixed = true; this.colorpicker1.Picked += Colorpicker1_Picked; this.colorpicker2.Picked += Colorpicker2_Picked; ToolStripButton saveItem = new ToolStripButton(Resources.Save16flat); QuickButtonReflectable quick = new QuickButtonReflectable(saveItem); this.wordribbon.Header.AddQuickItem(quick); this.wordribbon.TouchMode = true; indentText = this.richTextBox1.SelectionIndent; this.wordribbon.MenuColor = ColorTranslator.FromHtml("#2a579a"); richTextBox1.SelectionStart = 0; richTextBox1.SelectedText = "\n\n"; richTextBox1.SelectAll(); richTextBox1.SelectionIndent = 50; richTextBox1.SelectionRightIndent = 50; richTextBox1.SelectionLength = 0; richTextBox1.DeselectAll(); this.wordribbon.QuickPanelVisible = true; this.Load += Form1_Load; }
private void Form1_Load(object sender, EventArgs e) { this.trackBarItem1.TrackBarExControl.ButtonSignColor = Color.White; this.trackBarItem1.ValueChanged += new EventHandler(trackBarItem1_ValueChanged); this.trackBarItem1.Maximum = 200; this.trackBarItem1.Value = 100; this.toolStripStatusLabel1.AutoSize = false; this.toolStripStatusLabel1.ForeColor = Color.White; this.HelpButton = false; this.ribbonControlAdv1.QuickPanelVisible = true; this.ribbonControlAdv1.ShowQuickItemsDropDownButton = true; this.ribbonControlAdv1.Header.MainItems.BeforeRemoveItem += new RibbonItemsEventHandler(MainItems_BeforeRemoveItem); //To add items in the QAT ToolStripButton saveItem = new ToolStripButton(imageList1.Images[1]); QuickButtonReflectable quick = new QuickButtonReflectable(saveItem); this.ribbonControlAdv1.Header.AddQuickItem(quick); this.superAccelerator1.SetAccelerator(saveItem, "SA"); this.ribbonControlAdv1.TouchMode = true; this.toolStripFontfaceComboBox.SelectedIndex = 0; this.toolStripFontSizeComboBox.SelectedIndex = 0; this.superAccelerator1.ForeColor = Color.White; this.superAccelerator1.BackColor = Color.Black; this.superAccelerator1.Appearance = Syncfusion.Windows.Forms.Tools.Appearance.Advanced; this.superAccelerator1.SetAccelerator(this.toolStripTabItem1, "H"); this.superAccelerator1.SetMenuButtonAccelerator(this.ribbonControlAdv1, "F"); this.superAccelerator1.SetAccelerator(this.backStageTab2, "N"); this.superAccelerator1.SetAccelerator(this.backStageButton1, "E"); this.superAccelerator1.SetAccelerator(this.backStageButton1, "E"); this.superAccelerator1.SetAccelerator(this.toolStripBtnPaste, "P"); this.superAccelerator1.SetAccelerator(this.toolStripBtnCut, "X"); this.superAccelerator1.SetAccelerator(this.toolStripBtnCopy, "C"); this.superAccelerator1.SetAccelerator(this.toolStripBtnCut, "X"); this.superAccelerator1.SetAccelerator(this.boldToolstripBtn, "1"); this.superAccelerator1.SetAccelerator(this.italicToolStripBtn, "2"); this.superAccelerator1.SetAccelerator(this.underlineToolStripSplitBtn, "3"); this.superAccelerator1.SetAccelerator(this.BottomBorderBtn, "D"); this.superAccelerator1.SetAccelerator(this.growfontToolStripBtn, "FG"); this.superAccelerator1.SetAccelerator(this.shrinkfontToolStripBtn, "FK"); this.superAccelerator1.SetAccelerator(this.toolStripFontfaceComboBox, "FF"); this.superAccelerator1.SetAccelerator(this.toolStripFontSizeComboBox, "FS"); this.superAccelerator1.SetAccelerator(this.TopAlignBtn, "AT"); this.superAccelerator1.SetAccelerator(this.MiddleAlignBtn, "AM"); this.superAccelerator1.SetAccelerator(this.BottomAlignBtn, "AB"); this.superAccelerator1.SetAccelerator(this.AlignLeftBtn, "AL"); this.superAccelerator1.SetAccelerator(this.CenterBtn, "AC"); this.superAccelerator1.SetAccelerator(this.AlignRightBtn, "AM"); this.superAccelerator1.SetAccelerator(this.WrapTextBtn, "W"); this.superAccelerator1.SetAccelerator(this.MergeCenterBtn, "M"); this.superAccelerator1.SetAccelerator(this.InsertCellBtn, "I"); this.superAccelerator1.SetAccelerator(this.DeleteCellBtn, "D"); this.superAccelerator1.SetAccelerator(this.FormatBtn, "O"); this.superAccelerator1.SetAccelerator(this.FillColorsBtn, "H"); this.superAccelerator1.SetAccelerator(this.FontColorBtn, "FC"); this.superAccelerator1.SetAccelerator(this.backStageButton2, "O"); this.superAccelerator1.SetAccelerator(this.backStageButton3, "S"); this.backStageButton2.Click += new EventHandler(backStageButton2_Click); this.backStageButton3.Click += new EventHandler(backStageButton3_Click); this.clipboardToolStripExt.ShowItemToolTips = true; this.AlignmentToolStripEx.ShowItemToolTips = true; this.CellsToolStripEx.ShowItemToolTips = true; this.fontToolStripExt.ShowItemToolTips = true; }
public Form1() { InitializeComponent(); this.backStage1.VisibleFullText = true; this.sizeComboBox.Validated += SizeComboBox_Validated; this.fontComboBox.Validated += FontComboBox_Validated; this.wordribbon.MenuButtonClick += Wordribbon_MenuButtonClick; this.treeNavigator3.Visible = false; this.treeNavigator2.SelectionChanged += treeNavigator1_SelectionChanged; #if NETCORE this.richTextBox1.LoadFile("..//..//..//temp.rtf"); InfoTabLabelUpdate("..//..//..//temp.rtf"); #else this.richTextBox1.LoadFile("..//..//temp.rtf"); InfoTabLabelUpdate("..//..//temp.rtf"); #endif this.rtbpanel.AutoScroll = true; this.rtbpanel.Dock = DockStyle.Fill; this.richTextBox1.Height = 1600; this.wordribbon.SelectedTab = this.insertTab; this.trackBarItem1.TrackBarExControl.Style = TrackBarEx.Theme.Office2016Colorful; this.printDocument.PrintPage += PrintDocument_PrintPage; StoreToGroupView(); this.treeNavigator1.SelectedItem = this.recenttreeMenuItem; this.treeNavigator1.SelectedItem = this.SaveAsPCtreeMenuItem; this.groupView1.BackColor = Color.FromArgb(241, 241, 241); this.groupView1.HighlightItemColor = Color.FromArgb(197, 197, 197); this.groupView2.BackColor = Color.FromArgb(241, 241, 241); this.groupView2.HighlightItemColor = Color.FromArgb(197, 197, 197); drives = Directory.GetLogicalDrives(); this.WindowState = FormWindowState.Maximized; foreach (string printer in System.Drawing.Printing.PrinterSettings.InstalledPrinters) { this.printerComboBox.Items.Add(printer); } foreach (object page in print.PrinterSettings.PaperSizes) { this.pageSizecomboBox.Items.Add(page); } this.collatedcomboBox.Items.Add("UnCollated"); this.collatedcomboBox.Items.Add("Collated"); this.orientationComboBox.Items.Add("Portrait Orientation"); this.orientationComboBox.Items.Add("Landscape Orientation"); this.collatedcomboBox.SelectedIndex = 0; this.orientationComboBox.SelectedIndex = 0; this.pageSizecomboBox.SelectedIndex = 0; this.printerComboBox.SelectedIndex = 1; foreach (FontFamily oneFontFamily in FontFamily.Families) { fontComboBox.Items.Add(oneFontFamily.Name); } sizeComboBox.Text = this.richTextBox1.Font.Size.ToString(); fontComboBox.Text = this.richTextBox1.Font.FontFamily.Name; fontComboBox.ComboBox.TextBox.SelectionStart = 0; splitContainerAdv1.IsSplitterFixed = true; this.colorpicker1.Picked += Colorpicker1_Picked; this.colorpicker2.Picked += Colorpicker2_Picked; ToolStripButton saveItem = new ToolStripButton(Resources.Save16flat); QuickButtonReflectable quick = new QuickButtonReflectable(saveItem); this.wordribbon.Header.AddQuickItem(quick); this.wordribbon.TouchMode = true; indentText = this.richTextBox1.SelectionIndent; this.wordribbon.MenuColor = ColorTranslator.FromHtml("#2a579a"); richTextBox1.SelectionStart = 0; richTextBox1.SelectedText = "\n\n"; richTextBox1.SelectAll(); richTextBox1.SelectionIndent = 50; richTextBox1.SelectionRightIndent = 50; richTextBox1.SelectionLength = 0; richTextBox1.DeselectAll(); this.wordribbon.QuickPanelVisible = true; this.wordribbon.ThemeName = "Office2019Colorful"; this.Load += Form1_Load; this.toolStripMenuItem1 = new ToolStripMenuItem(); this.toolStripMenuItem1.Text = "*****@*****.**"; #if NETCORE this.toolStripMenuItem1.Image = Image.FromFile("..//..//..//Resources/customImage.png"); #else this.toolStripMenuItem1.Image = Image.FromFile("..//..//Resources/customImage.png"); #endif this.toolStripMenuItem2 = new ToolStripMenuItem(); this.toolStripMenuItem2.Text = "View Account"; this.separator = new ToolStripSeparator(); this.toolStripMenuItem3 = new ToolStripMenuItem(); this.toolStripMenuItem3.Height = 50; this.toolStripMenuItem3.Text = "Sign-in with different account"; #if NETCORE this.toolStripMenuItem3.Image = Image.FromFile("..//..//..//Resources/AddUser.png"); #else this.toolStripMenuItem3.Image = Image.FromFile("..//..//Resources/AddUser.png"); #endif this.toolStripMenuItem4 = new ToolStripMenuItem(); this.toolStripMenuItem4.Text = "Sign out"; this.menuStrip = new ContextMenuStrip(); this.menuStrip.Items.AddRange(new ToolStripItem[] { this.toolStripMenuItem1, this.toolStripMenuItem2, this.separator, this.toolStripMenuItem3, this.toolStripMenuItem4 }); this.button = new SfButton(); this.button.ForeColor = Color.White; this.button.Font = Font = new System.Drawing.Font("Segoe UI Semibold", 9F); this.button.Size = new System.Drawing.Size(75, 50); this.button.Text = "Sign-In"; this.button.Style.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(120)))), ((int)(((byte)(212))))); this.button.Style.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(141)))), ((int)(((byte)(212))))); this.button.Style.FocusedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(87)))), ((int)(((byte)(154))))); this.button.Style.PressedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(87)))), ((int)(((byte)(154))))); this.button.Style.PressedForeColor = Color.White; this.button.Style.HoverForeColor = Color.White; this.button.Style.FocusedForeColor = Color.White; #if NETCORE this.button.Image = Image.FromFile("..//..//..//Resources/customImage.png"); #else this.button.Image = Image.FromFile("..//..//Resources/customImage.png"); #endif this.button.Click += Button_Click; ToolTip toolTip = new ToolTip(); toolTip.SetToolTip(button, "Click here to view details"); this.HeaderItem = button; }