/// <summary>
        /// Hosts the ExplorerBrowser WinForms wrapper in this control
        /// </summary>
        public ExplorerBrowser( )
        {
            InitializeComponent( );

            // the ExplorerBrowser WinForms control
            ExplorerBrowserControl = new Microsoft.WindowsAPICodePack.Controls.WindowsForms.ExplorerBrowser( );

            // back the dependency collection properties with instances
            SelectedItems = selectedItems = new ObservableCollection <ShellObject>();
            Items         = items = new ObservableCollection <ShellObject>();
            NavigationLog = navigationLog = new ObservableCollection <ShellObject>( );

            // hook up events for collection synchronization
            ExplorerBrowserControl.ItemsChanged                       += new ExplorerBrowserItemsChangedEventHandler(ItemsChanged);
            ExplorerBrowserControl.SelectionChanged                   += new ExplorerBrowserSelectionChangedEventHandler(SelectionChanged);
            ExplorerBrowserControl.ViewEnumerationComplete            += new ExplorerBrowserViewEnumerationCompleteHandler(ExplorerBrowserControl_ViewEnumerationComplete);
            ExplorerBrowserControl.ViewSelectedItemChanged            += new ExplorerBrowserViewSelectedItemChangedHandler(ExplorerBrowserControl_ViewSelectedItemChanged);
            ExplorerBrowserControl.NavigationLog.NavigationLogChanged += new NavigationLogChangedEventHandler(NavigationLogChanged);

            // host the control
            WindowsFormsHost host = new WindowsFormsHost( );

            host.Child = ExplorerBrowserControl;
            this.root.Children.Clear( );
            this.root.Children.Add(host);


            Loaded += new RoutedEventHandler(ExplorerBrowser_Loaded);
        }
        /// <summary>
        /// Hosts the ExplorerBrowser WinForms wrapper in this control
        /// </summary>
        public ExplorerBrowser()
        {
            InitializeComponent();

            // the ExplorerBrowser WinForms control
            ExplorerBrowserControl = new Microsoft.WindowsAPICodePack.Controls.WindowsForms.ExplorerBrowser();

            // back the dependency collection properties with instances
            //SelectedItems = selectedItems = new ObservableCollection<ShellObject>();
            //Items = items = new ObservableCollection<ShellObject>();
           // NavigationLog = navigationLog = new ObservableCollection<ShellObject>();

            // hook up events for collection synchronization
            //ExplorerBrowserControl.ItemsChanged += new EventHandler(ItemsChanged);
            //ExplorerBrowserControl.SelectionChanged += new EventHandler(SelectionChanged);
            //ExplorerBrowserControl.ViewEnumerationComplete += new EventHandler(ExplorerBrowserControl_ViewEnumerationComplete);
            //ExplorerBrowserControl.ViewSelectedItemChanged += new EventHandler(ExplorerBrowserControl_ViewSelectedItemChanged);
            //ExplorerBrowserControl.NavigationLog.NavigationLogChanged += new EventHandler<NavigationLogEventArgs>(NavigationLogChanged);

            // host the control           
            WindowsFormsHost host = new WindowsFormsHost();
            try
            {
                host.Child = ExplorerBrowserControl;
                this.root.Children.Clear();
                this.root.Children.Add(host);
            }
            catch
            {
                host.Dispose();
                throw;
            }

            Loaded += new RoutedEventHandler(ExplorerBrowser_Loaded);
        }
 public ContextShellMenu(Microsoft.WindowsAPICodePack.Controls.WindowsForms.ExplorerBrowser explorer, Boolean isOpenWith)
 {
     this.Explorer = explorer;
     if (isOpenWith)
     {
         Initialize(this.Explorer.SelectedItems[0], isOpenWith);
     }
     else
     {
         Initialize(this.Explorer.NavigationLog.CurrentLocation);
     }
 }
Example #4
0
        protected virtual TabItemUI CreateTabItem(ShellObject path)
        {
            TabItemUI ti = new TabItemUI();

            ti.MaxWidth = 100;
            ti.Header   = System.IO.Path.GetFileName(path.GetDisplayName(DisplayNameType.Default));

            ti.Go(path);

            ti.DispExpBrowser.ExplorerBrowserControl.NavigationComplete += (o, e) =>
            {
                Microsoft.WindowsAPICodePack.Controls.WindowsForms.ExplorerBrowser b = (Microsoft.WindowsAPICodePack.Controls.WindowsForms.ExplorerBrowser)o;
                b.Tag = e.NewLocation;

                TabItemUI tiui = this.tabControl.SelectedItem as TabItemUI;
                if (ti != null)
                {
                    this.pathUI.PropertyChanged -= PathPropertyChanged;
                    this.pathUI.Path             = tiui.Get();
                    this.pathUI.PropertyChanged += PathPropertyChanged;

                    tiui.Header = e.NewLocation.Name;
                    tiui.DispExpBrowser.ViewMode = Microsoft.WindowsAPICodePack.Controls.ExplorerBrowserViewMode.Details;
                }
            };

            ContextMenu cm = new ContextMenu();
            MenuItem    mi = new MenuItem();

            mi.Header = "Close";
            mi.Click += (o, e) =>
            {
                this.tabControl.Items.Remove(ti);
            };
            cm.Items.Add(mi);

            mi        = new MenuItem();
            mi.Header = "BookMark";
            mi.Click += (o, e) =>
            {
                ShellObject shobj = (ShellObject)((TabItemUI)this.tabControl.SelectedItem).DispExpBrowser.ExplorerBrowserControl.Tag;
                string      key   = shobj.ParsingName;
                string      val   = shobj.Name;
                this.BookMarks.Add(new KeyValuePair <string, string>(key, val));
            };
            cm.Items.Add(mi);

            ti.ContextMenu = cm;

            return(ti);
        }
Example #5
0
        public ExplorerHeader(Microsoft.WindowsAPICodePack.Controls.WindowsForms.ExplorerBrowser explorerBrowser)
        {
            // Initialize our logging delegates
            logInfo  += delegate(string message) { };
            logError += delegate(string message) { };

            this.explorerBrowser = explorerBrowser;

            this.Paint += ExplorerHeader_Paint;

            InitializeComponent();

            this.height = this.Size.Height;

            // Optimize Painting.
            SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.UserPaint, true);

            // initialize known folder combo box
            List <string> knownFolderList = new List <string>();

            foreach (IKnownFolder folder in Microsoft.WindowsAPICodePack.Shell.KnownFolders.All)
            {
                knownFolderList.Add(folder.CanonicalName);
            }
            knownFolderList.Sort();
            KnownFolders = knownFolderList.ToArray();

            this.pathEdit.Items.AddRange(KnownFolders);

            // setup explorerBrowser navigation events
            this.explorerBrowser.NavigationFailed   += new EventHandler <NavigationFailedEventArgs>(this.explorerBrowser_NavigationFailed);
            this.explorerBrowser.NavigationComplete += new EventHandler <NavigationCompleteEventArgs>(this.explorerBrowser_NavigationComplete);

            // set up Navigation log event and button state
            this.explorerBrowser.NavigationLog.NavigationLogChanged += new EventHandler <NavigationLogEventArgs>(this.NavigationLog_NavigationLogChanged);

            this.explorerNavigationButtons1.HasLeftHistroy    = false;
            this.explorerNavigationButtons1.HasRightHistroy   = false;
            this.explorerNavigationButtons1.LeftButtonClick  += LeftButtonClick;
            this.explorerNavigationButtons1.RightButtonClick += RightButtonClick;
            this.explorerNavigationButtons1.DropDownClick    += DropDownClick;

            this.pathEdit.Click += navigateButton_Click;

            picDeleteHistory.BackgroundImage = Resources.DeleteHistory;
        }
        /// <summary>
        /// Hosts the ExplorerBrowser WinForms wrapper in this control
        /// </summary>
        public ExplorerBrowser( )
        {
            InitializeComponent( );

            // the ExplorerBrowser WinForms control
            ExplorerBrowserControl = new Microsoft.WindowsAPICodePack.Controls.WindowsForms.ExplorerBrowser( );

            // back the dependency collection properties with instances
            SelectedItems = selectedItems = new ObservableCollection<ShellObject>();
            Items = items = new ObservableCollection<ShellObject>();
            NavigationLog = navigationLog = new ObservableCollection<ShellObject>( );

            // hook up events for collection synchronization
            ExplorerBrowserControl.ItemsChanged += new ExplorerBrowserItemsChangedEventHandler( ItemsChanged );
            ExplorerBrowserControl.SelectionChanged += new ExplorerBrowserSelectionChangedEventHandler( SelectionChanged );
            ExplorerBrowserControl.NavigationLog.NavigationLogChanged += new NavigationLogChangedEventHandler( NavigationLogChanged );

            // host the control
            WindowsFormsHost host = new WindowsFormsHost( );
            host.Child = ExplorerBrowserControl;
            this.root.Children.Clear( );
            this.root.Children.Add( host );

            Loaded += new RoutedEventHandler( ExplorerBrowser_Loaded );
        }
Example #7
0
 private void InitializeComponent()
 {
     this.kryptonPanel1    = new ComponentFactory.Krypton.Toolkit.KryptonPanel();
     this.ebFolder         = new Microsoft.WindowsAPICodePack.Controls.WindowsForms.ExplorerBrowser();
     this.kbcPath          = new ComponentFactory.Krypton.Toolkit.KryptonBreadCrumb();
     this.kryptonLabel1    = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
     this.kryptonComboBox1 = new ComponentFactory.Krypton.Toolkit.KryptonComboBox();
     this.kryptonButton1   = new ComponentFactory.Krypton.Toolkit.KryptonButton();
     this.kryptonButton2   = new ComponentFactory.Krypton.Toolkit.KryptonButton();
     ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).BeginInit();
     this.kryptonPanel1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.kbcPath)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.kryptonComboBox1)).BeginInit();
     this.SuspendLayout();
     //
     // kryptonPanel1
     //
     this.kryptonPanel1.Controls.Add(this.kryptonButton2);
     this.kryptonPanel1.Controls.Add(this.kryptonButton1);
     this.kryptonPanel1.Controls.Add(this.kryptonComboBox1);
     this.kryptonPanel1.Controls.Add(this.kryptonLabel1);
     this.kryptonPanel1.Controls.Add(this.ebFolder);
     this.kryptonPanel1.Controls.Add(this.kbcPath);
     this.kryptonPanel1.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.kryptonPanel1.Location = new System.Drawing.Point(0, 0);
     this.kryptonPanel1.Name     = "kryptonPanel1";
     this.kryptonPanel1.Size     = new System.Drawing.Size(907, 508);
     this.kryptonPanel1.TabIndex = 0;
     //
     // ebFolder
     //
     this.ebFolder.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                   | System.Windows.Forms.AnchorStyles.Left)
                                                                  | System.Windows.Forms.AnchorStyles.Right)));
     this.ebFolder.Location        = new System.Drawing.Point(12, 46);
     this.ebFolder.Name            = "ebFolder";
     this.ebFolder.PropertyBagName = "Microsoft.WindowsAPICodePack.Controls.WindowsForms.ExplorerBrowser";
     this.ebFolder.Size            = new System.Drawing.Size(883, 412);
     this.ebFolder.TabIndex        = 1;
     //
     // kbcPath
     //
     this.kbcPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                 | System.Windows.Forms.AnchorStyles.Right)));
     this.kbcPath.AutoSize = false;
     this.kbcPath.Location = new System.Drawing.Point(93, 12);
     this.kbcPath.Name     = "kbcPath";
     //
     //
     //
     this.kbcPath.RootItem.ShortText = "Root";
     this.kbcPath.SelectedItem       = this.kbcPath.RootItem;
     this.kbcPath.Size     = new System.Drawing.Size(802, 28);
     this.kbcPath.TabIndex = 0;
     //
     // kryptonLabel1
     //
     this.kryptonLabel1.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     this.kryptonLabel1.Location = new System.Drawing.Point(12, 470);
     this.kryptonLabel1.Name     = "kryptonLabel1";
     this.kryptonLabel1.Size     = new System.Drawing.Size(116, 26);
     this.kryptonLabel1.StateCommon.ShortText.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.kryptonLabel1.TabIndex    = 2;
     this.kryptonLabel1.Values.Text = "Folder Name:";
     //
     // kryptonComboBox1
     //
     this.kryptonComboBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                                                                          | System.Windows.Forms.AnchorStyles.Right)));
     this.kryptonComboBox1.DropDownWidth = 568;
     this.kryptonComboBox1.Location      = new System.Drawing.Point(134, 470);
     this.kryptonComboBox1.Name          = "kryptonComboBox1";
     this.kryptonComboBox1.Size          = new System.Drawing.Size(568, 27);
     this.kryptonComboBox1.StateCommon.ComboBox.Content.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.kryptonComboBox1.TabIndex = 3;
     //
     // kryptonButton1
     //
     this.kryptonButton1.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.kryptonButton1.Location = new System.Drawing.Point(804, 470);
     this.kryptonButton1.Name     = "kryptonButton1";
     this.kryptonButton1.Size     = new System.Drawing.Size(90, 26);
     this.kryptonButton1.StateCommon.Content.ShortText.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.kryptonButton1.TabIndex    = 4;
     this.kryptonButton1.Values.Text = "C&ancel";
     //
     // kryptonButton2
     //
     this.kryptonButton2.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.kryptonButton2.Location = new System.Drawing.Point(708, 470);
     this.kryptonButton2.Name     = "kryptonButton2";
     this.kryptonButton2.Size     = new System.Drawing.Size(90, 26);
     this.kryptonButton2.StateCommon.Content.ShortText.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.kryptonButton2.TabIndex    = 5;
     this.kryptonButton2.Values.Text = "&Open";
     //
     // KryptonFolderPickerDialog
     //
     this.ClientSize = new System.Drawing.Size(907, 508);
     this.Controls.Add(this.kryptonPanel1);
     this.MaximizeBox = false;
     this.MinimizeBox = false;
     this.Name        = "KryptonFolderPickerDialog";
     ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).EndInit();
     this.kryptonPanel1.ResumeLayout(false);
     this.kryptonPanel1.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.kbcPath)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.kryptonComboBox1)).EndInit();
     this.ResumeLayout(false);
 }
Example #8
0
 private void InitializeComponent()
 {
     this.kryptonPanel1    = new Krypton.Toolkit.KryptonPanel();
     this.panel4           = new System.Windows.Forms.Panel();
     this.kbcPath          = new Krypton.Toolkit.KryptonBreadCrumb();
     this.panel1           = new System.Windows.Forms.Panel();
     this.panel3           = new System.Windows.Forms.Panel();
     this.kbtnForward      = new Krypton.Toolkit.KryptonButton();
     this.panel2           = new System.Windows.Forms.Panel();
     this.kbtnBack         = new Krypton.Toolkit.KryptonButton();
     this.kryptonPanel2    = new Krypton.Toolkit.KryptonPanel();
     this.kbtnAction       = new Krypton.Toolkit.KryptonButton();
     this.kbtnCancel       = new Krypton.Toolkit.KryptonButton();
     this.kryptonPanel3    = new Krypton.Toolkit.KryptonPanel();
     this.ebcExplorer      = new Microsoft.WindowsAPICodePack.Controls.WindowsForms.ExplorerBrowser();
     this.kryptonComboBox1 = new Krypton.Toolkit.KryptonComboBox();
     this.kryptonTextBox1  = new Krypton.Toolkit.KryptonTextBox();
     ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).BeginInit();
     this.kryptonPanel1.SuspendLayout();
     this.panel4.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.kbcPath)).BeginInit();
     this.panel1.SuspendLayout();
     this.panel3.SuspendLayout();
     this.panel2.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel2)).BeginInit();
     this.kryptonPanel2.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel3)).BeginInit();
     this.kryptonPanel3.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.kryptonComboBox1)).BeginInit();
     this.SuspendLayout();
     //
     // kryptonPanel1
     //
     this.kryptonPanel1.Controls.Add(this.panel4);
     this.kryptonPanel1.Controls.Add(this.panel1);
     this.kryptonPanel1.Dock     = System.Windows.Forms.DockStyle.Top;
     this.kryptonPanel1.Location = new System.Drawing.Point(0, 0);
     this.kryptonPanel1.Name     = "kryptonPanel1";
     this.kryptonPanel1.Size     = new System.Drawing.Size(717, 28);
     this.kryptonPanel1.TabIndex = 0;
     //
     // panel4
     //
     this.panel4.BackColor = System.Drawing.Color.Transparent;
     this.panel4.Controls.Add(this.kbcPath);
     this.panel4.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.panel4.Location = new System.Drawing.Point(124, 0);
     this.panel4.Name     = "panel4";
     this.panel4.Size     = new System.Drawing.Size(593, 28);
     this.panel4.TabIndex = 1;
     //
     // kbcPath
     //
     this.kbcPath.AutoSize = false;
     this.kbcPath.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.kbcPath.Location = new System.Drawing.Point(0, 0);
     this.kbcPath.Name     = "kbcPath";
     //
     //
     //
     this.kbcPath.RootItem.ShortText = "Root";
     this.kbcPath.SelectedItem       = this.kbcPath.RootItem;
     this.kbcPath.Size     = new System.Drawing.Size(593, 28);
     this.kbcPath.TabIndex = 0;
     //
     // panel1
     //
     this.panel1.BackColor = System.Drawing.Color.Transparent;
     this.panel1.Controls.Add(this.panel3);
     this.panel1.Controls.Add(this.panel2);
     this.panel1.Dock     = System.Windows.Forms.DockStyle.Left;
     this.panel1.Location = new System.Drawing.Point(0, 0);
     this.panel1.Name     = "panel1";
     this.panel1.Size     = new System.Drawing.Size(124, 28);
     this.panel1.TabIndex = 0;
     //
     // panel3
     //
     this.panel3.Controls.Add(this.kbtnForward);
     this.panel3.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.panel3.Location = new System.Drawing.Point(60, 0);
     this.panel3.Name     = "panel3";
     this.panel3.Size     = new System.Drawing.Size(64, 28);
     this.panel3.TabIndex = 1;
     //
     // kbtnForward
     //
     this.kbtnForward.Dock        = System.Windows.Forms.DockStyle.Fill;
     this.kbtnForward.Location    = new System.Drawing.Point(0, 0);
     this.kbtnForward.Name        = "kbtnForward";
     this.kbtnForward.Size        = new System.Drawing.Size(64, 28);
     this.kbtnForward.TabIndex    = 0;
     this.kbtnForward.Values.Text = "-->";
     //
     // panel2
     //
     this.panel2.Controls.Add(this.kbtnBack);
     this.panel2.Dock     = System.Windows.Forms.DockStyle.Left;
     this.panel2.Location = new System.Drawing.Point(0, 0);
     this.panel2.Name     = "panel2";
     this.panel2.Size     = new System.Drawing.Size(60, 28);
     this.panel2.TabIndex = 0;
     //
     // kbtnBack
     //
     this.kbtnBack.Dock        = System.Windows.Forms.DockStyle.Fill;
     this.kbtnBack.Location    = new System.Drawing.Point(0, 0);
     this.kbtnBack.Name        = "kbtnBack";
     this.kbtnBack.Size        = new System.Drawing.Size(60, 28);
     this.kbtnBack.TabIndex    = 0;
     this.kbtnBack.Values.Text = "<--";
     //
     // kryptonPanel2
     //
     this.kryptonPanel2.Controls.Add(this.kryptonTextBox1);
     this.kryptonPanel2.Controls.Add(this.kryptonComboBox1);
     this.kryptonPanel2.Controls.Add(this.kbtnAction);
     this.kryptonPanel2.Controls.Add(this.kbtnCancel);
     this.kryptonPanel2.Dock     = System.Windows.Forms.DockStyle.Bottom;
     this.kryptonPanel2.Location = new System.Drawing.Point(0, 358);
     this.kryptonPanel2.Name     = "kryptonPanel2";
     this.kryptonPanel2.Size     = new System.Drawing.Size(717, 69);
     this.kryptonPanel2.TabIndex = 1;
     //
     // kbtnAction
     //
     this.kbtnAction.Location    = new System.Drawing.Point(519, 17);
     this.kbtnAction.Name        = "kbtnAction";
     this.kbtnAction.Size        = new System.Drawing.Size(90, 31);
     this.kbtnAction.TabIndex    = 1;
     this.kbtnAction.Values.Text = "{0}";
     //
     // kbtnCancel
     //
     this.kbtnCancel.Location    = new System.Drawing.Point(615, 17);
     this.kbtnCancel.Name        = "kbtnCancel";
     this.kbtnCancel.Size        = new System.Drawing.Size(90, 31);
     this.kbtnCancel.TabIndex    = 0;
     this.kbtnCancel.Values.Text = "C&ancel";
     //
     // kryptonPanel3
     //
     this.kryptonPanel3.Controls.Add(this.ebcExplorer);
     this.kryptonPanel3.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.kryptonPanel3.Location = new System.Drawing.Point(0, 28);
     this.kryptonPanel3.Name     = "kryptonPanel3";
     this.kryptonPanel3.Size     = new System.Drawing.Size(717, 330);
     this.kryptonPanel3.TabIndex = 2;
     //
     // ebcExplorer
     //
     this.ebcExplorer.Dock            = System.Windows.Forms.DockStyle.Fill;
     this.ebcExplorer.Location        = new System.Drawing.Point(0, 0);
     this.ebcExplorer.Name            = "ebcExplorer";
     this.ebcExplorer.PropertyBagName = "Microsoft.WindowsAPICodePack.Controls.WindowsForms.ExplorerBrowser";
     this.ebcExplorer.Size            = new System.Drawing.Size(717, 330);
     this.ebcExplorer.TabIndex        = 0;
     //
     // kryptonComboBox1
     //
     this.kryptonComboBox1.DrawMode       = System.Windows.Forms.DrawMode.OwnerDrawVariable;
     this.kryptonComboBox1.DropDownWidth  = 374;
     this.kryptonComboBox1.IntegralHeight = false;
     this.kryptonComboBox1.Location       = new System.Drawing.Point(139, 35);
     this.kryptonComboBox1.Name           = "kryptonComboBox1";
     this.kryptonComboBox1.Size           = new System.Drawing.Size(374, 21);
     this.kryptonComboBox1.StateCommon.ComboBox.Content.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near;
     this.kryptonComboBox1.TabIndex = 2;
     this.kryptonComboBox1.Text     = "kryptonComboBox1";
     //
     // kryptonTextBox1
     //
     this.kryptonTextBox1.Location = new System.Drawing.Point(139, 6);
     this.kryptonTextBox1.Name     = "kryptonTextBox1";
     this.kryptonTextBox1.Size     = new System.Drawing.Size(374, 23);
     this.kryptonTextBox1.TabIndex = 3;
     this.kryptonTextBox1.Text     = "kryptonTextBox1";
     //
     // KryptonFileBrowserDialog
     //
     this.ClientSize = new System.Drawing.Size(717, 427);
     this.Controls.Add(this.kryptonPanel3);
     this.Controls.Add(this.kryptonPanel2);
     this.Controls.Add(this.kryptonPanel1);
     this.Name = "KryptonFileBrowserDialog";
     ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).EndInit();
     this.kryptonPanel1.ResumeLayout(false);
     this.panel4.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.kbcPath)).EndInit();
     this.panel1.ResumeLayout(false);
     this.panel3.ResumeLayout(false);
     this.panel2.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel2)).EndInit();
     this.kryptonPanel2.ResumeLayout(false);
     this.kryptonPanel2.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel3)).EndInit();
     this.kryptonPanel3.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.kryptonComboBox1)).EndInit();
     this.ResumeLayout(false);
 }
 public ContextShellMenu(Microsoft.WindowsAPICodePack.Controls.WindowsForms.ExplorerBrowser explorer, ShellViewGetItemObject items)
 {
     this.Explorer = explorer;
     Initialize(this.Explorer.GetShellView(), items);
 }
Example #10
0
        public ExplorerHeader(Microsoft.WindowsAPICodePack.Controls.WindowsForms.ExplorerBrowser explorerBrowser)
        {
            // Initialize our logging delegates
            logInfo += delegate(string message) { };
            logError += delegate(string message) { };

            this.explorerBrowser = explorerBrowser;

            this.Paint += ExplorerHeader_Paint;

            InitializeComponent();

            this.height = this.Size.Height;
           
             // Optimize Painting.
            SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.UserPaint, true);

            // initialize known folder combo box
            List<string> knownFolderList = new List<string>();
            foreach (IKnownFolder folder in Microsoft.WindowsAPICodePack.Shell.KnownFolders.All)
            {
                knownFolderList.Add(folder.CanonicalName);
            }
            knownFolderList.Sort();
            KnownFolders = knownFolderList.ToArray();

            this.pathEdit.Items.AddRange(KnownFolders);

            // setup explorerBrowser navigation events
            this.explorerBrowser.NavigationFailed += new EventHandler<NavigationFailedEventArgs>(this.explorerBrowser_NavigationFailed);
            this.explorerBrowser.NavigationComplete += new EventHandler<NavigationCompleteEventArgs>(this.explorerBrowser_NavigationComplete);

            // set up Navigation log event and button state
            this.explorerBrowser.NavigationLog.NavigationLogChanged += new EventHandler<NavigationLogEventArgs>(this.NavigationLog_NavigationLogChanged);

            this.explorerNavigationButtons1.HasLeftHistroy = false;
            this.explorerNavigationButtons1.HasRightHistroy = false;
            this.explorerNavigationButtons1.LeftButtonClick += LeftButtonClick;
            this.explorerNavigationButtons1.RightButtonClick += RightButtonClick;
            this.explorerNavigationButtons1.DropDownClick += DropDownClick;

            this.pathEdit.Click += navigateButton_Click;

            picDeleteHistory.BackgroundImage = Resources.DeleteHistory;
        }
Example #11
0
 public ContextShellMenu(Microsoft.WindowsAPICodePack.Controls.WindowsForms.ExplorerBrowser explorer, Boolean isNew)
 {
     this.Explorer = explorer;
     Initialize(this.Explorer.NavigationLog.CurrentLocation);
 }