public Form1() { InitializeComponent(); // Listen for specific events on the tab control tabControl1.Selecting += new TabControlCancelEventHandler(tabControl1_Selecting); tabControl1.SelectedIndexChanged += new EventHandler(tabControl1_SelectedIndexChanged); // When the size of our form changes, invalidate the thumbnails so we can capture them again // when user requests a peek or thumbnail preview. this.SizeChanged += new EventHandler(Form1_SizeChanged); // Set our minimum size so the form will not have 0 height/width when user tries to resize it all the way this.MinimumSize = new Size(500, 100); // Show the Favorites window favsWindow = new FavoritesWindow(this); favsWindow.Show(); // Create our Thumbnail toolbar buttons for the Browser doc thumbButtonBack = new ThumbnailToolBarButton(Properties.Resources.prevArrow, "Back"); thumbButtonBack.Click += new EventHandler<ThumbnailButtonClickedEventArgs>(thumbButtonBack_Click); thumbButtonForward = new ThumbnailToolBarButton(Properties.Resources.nextArrow, "Forward"); thumbButtonForward.Click += new EventHandler<ThumbnailButtonClickedEventArgs>(thumbButtonForward_Click); thumbButtonRefresh = new ThumbnailToolBarButton(Properties.Resources.refresh, "Refresh"); thumbButtonRefresh.Click += new EventHandler<ThumbnailButtonClickedEventArgs>(thumbButtonRefresh_Click); // Create our thumbnail toolbar buttons for the RichTextBox doc thumbButtonCut = new ThumbnailToolBarButton(Properties.Resources.cut, "Cut"); thumbButtonCut.Click += new EventHandler<ThumbnailButtonClickedEventArgs>(thumbButtonCut_Click); thumbButtonCopy = new ThumbnailToolBarButton(Properties.Resources.copy, "Copy"); thumbButtonCopy.Click += new EventHandler<ThumbnailButtonClickedEventArgs>(thumbButtonCopy_Click); thumbButtonPaste = new ThumbnailToolBarButton(Properties.Resources.paste, "Paste"); thumbButtonPaste.Click += new EventHandler<ThumbnailButtonClickedEventArgs>(thumbButtonPaste_Click); thumbButtonSelectAll = new ThumbnailToolBarButton(Properties.Resources.selectAll, "SelectAll"); thumbButtonSelectAll.Click += new EventHandler<ThumbnailButtonClickedEventArgs>(thumbButtonSelectAll_Click); this.FormClosing += new FormClosingEventHandler(Form1_FormClosing); }
public Form1() { InitializeComponent(); // Listen for specific events on the tab control tabControl1.Selecting += new TabControlCancelEventHandler(tabControl1_Selecting); tabControl1.SelectedIndexChanged += new EventHandler(tabControl1_SelectedIndexChanged); // When the size of our form changes, invalidate the thumbnails so we can capture them again // when user requests a peek or thumbnail preview. this.SizeChanged += new EventHandler(Form1_SizeChanged); // Set our minimum size so the form will not have 0 height/width when user tries to resize it all the way this.MinimumSize = new Size(500, 100); // Show the Favorites window favsWindow = new FavoritesWindow(this); favsWindow.Show(); // Create our Thumbnail toolbar buttons for the Browser doc thumbButtonBack = new ThumbnailToolBarButton(Properties.Resources.prevArrow, "Back"); thumbButtonBack.Click += new EventHandler <ThumbnailButtonClickedEventArgs>(thumbButtonBack_Click); thumbButtonForward = new ThumbnailToolBarButton(Properties.Resources.nextArrow, "Forward"); thumbButtonForward.Click += new EventHandler <ThumbnailButtonClickedEventArgs>(thumbButtonForward_Click); thumbButtonRefresh = new ThumbnailToolBarButton(Properties.Resources.refresh, "Refresh"); thumbButtonRefresh.Click += new EventHandler <ThumbnailButtonClickedEventArgs>(thumbButtonRefresh_Click); // Create our thumbnail toolbar buttons for the RichTextBox doc thumbButtonCut = new ThumbnailToolBarButton(Properties.Resources.cut, "Cut"); thumbButtonCut.Click += new EventHandler <ThumbnailButtonClickedEventArgs>(thumbButtonCut_Click); thumbButtonCopy = new ThumbnailToolBarButton(Properties.Resources.copy, "Copy"); thumbButtonCopy.Click += new EventHandler <ThumbnailButtonClickedEventArgs>(thumbButtonCopy_Click); thumbButtonPaste = new ThumbnailToolBarButton(Properties.Resources.paste, "Paste"); thumbButtonPaste.Click += new EventHandler <ThumbnailButtonClickedEventArgs>(thumbButtonPaste_Click); thumbButtonSelectAll = new ThumbnailToolBarButton(Properties.Resources.selectAll, "SelectAll"); thumbButtonSelectAll.Click += new EventHandler <ThumbnailButtonClickedEventArgs>(thumbButtonSelectAll_Click); this.FormClosing += new FormClosingEventHandler(Form1_FormClosing); }