public EditChartMenus(Chart2D chart2d, ComplexChart complexChart, Chart3DControl chart3DControl #if !__MonoCS__ , System.Windows.Forms.Integration.ElementHost chart3DElementHost #endif ) { InitializeComponent(); charts = new Dictionary <CalculationsMode, IChart> { { CalculationsMode.Real, chart2d }, { CalculationsMode.Complex, complexChart }, { CalculationsMode.Fxy, chart3DControl } }; #if !__MonoCS__ elementHostChart3d = chart3DElementHost; #endif chart2d?.setupComboBoxes(typeOfChartComboBox, seriesOfChartComboBox, colorsOfChartComboBox, positionLegendComboBox, aligmentLegendComboBox); complexChart?.setupComboBoxes(countourLinesToolStripComboBox, colorAssignmentToolStripComboBox); if (charts.All(c => c.Value != null)) { EventAggregator.Instance.Subscribe <CalculationsModeChangedEvent>(mode => SetMode(mode.CalculationsMode)); } }
DockContainerItem CreateAddInContainer(object addIn) { DockContainerItem document = new DockContainerItem(); document.Text = GetModuleName(addIn); if (addIn is Control) { (addIn as Control).Dock = DockStyle.Fill; document.Control = addIn as Control; } else if (addIn is System.Windows.Controls.Control) { System.Windows.Forms.Integration.ElementHost wpfHost = new System.Windows.Forms.Integration.ElementHost(); wpfHost.Dock = System.Windows.Forms.DockStyle.Fill; wpfHost.Location = new System.Drawing.Point(0, 0); wpfHost.TabIndex = 0; wpfHost.Child = (addIn as System.Windows.Controls.Control); this.Controls.Add(wpfHost); document.Control = wpfHost; } Bar bar = GetFirstDocumentBar(); bar.Items.Add(document); bar.SelectedDockTab = bar.Items.IndexOf(document); bar.RecalcLayout(); ModuleManager.StartModule(addIn, this); return(document); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.elementHost1 = new System.Windows.Forms.Integration.ElementHost(); this.ComponentslistView1 = new UserControl1(); ComponentslistViewModel = new ComponentsListViewModel(); ComponentslistViewModel.ReportDragEvent += ComponentslistViewModel_ReportDragEvent; ComponentslistView1.DataContext = ComponentslistViewModel; this.SuspendLayout(); // // elementHost1 // this.elementHost1.Location = new System.Drawing.Point(0, 0); this.elementHost1.Name = "elementHost1"; this.elementHost1.TabIndex = 0; this.elementHost1.Text = "elementHost1"; this.elementHost1.Child = this.ComponentslistView1; //this.elementHost1.mi // // TaskPane // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowOnly; this.AutoSize = true; //this.MinimumSize = minSize; this.Controls.Add(this.elementHost1); this.Resize += TaskPane_Resize; this.SizeChanged += TaskPane_SizeChanged; this.Name = "TaskPane"; this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.elementHost1 = new System.Windows.Forms.Integration.ElementHost(); this.ComponentslistView1 = new UserControl1(); ComponentslistViewModel = new ComponentsListViewModel(); ComponentslistViewModel.ReportDragEvent += ComponentslistViewModel_ReportDragEvent; ComponentslistView1.DataContext = ComponentslistViewModel; this.SuspendLayout(); // // elementHost1 // this.elementHost1.Location = new System.Drawing.Point(0, 0); this.elementHost1.Name = "elementHost1"; this.elementHost1.TabIndex = 0; this.elementHost1.Text = "elementHost1"; this.elementHost1.Child = this.ComponentslistView1; //this.elementHost1.mi // // TaskPane // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowOnly; this.AutoSize = true; //this.MinimumSize = minSize; this.Controls.Add(this.elementHost1); this.Resize += TaskPane_Resize; this.SizeChanged += TaskPane_SizeChanged; this.Name = "TaskPane"; this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { WPF = new System.Windows.Forms.Integration.ElementHost(); resizePaneWPF = new ResizeLabPaneWPF(); SuspendLayout(); // // WPF // WPF.Dock = System.Windows.Forms.DockStyle.Fill; WPF.ForeColor = System.Drawing.SystemColors.ButtonFace; WPF.Location = new System.Drawing.Point(0, 0); WPF.Name = "WPF"; WPF.Size = new System.Drawing.Size(304, 883); WPF.Text = "WPF"; WPF.Child = resizePaneWPF; // // ResizePane // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.WPF); this.Name = "ResizePane"; this.Size = new System.Drawing.Size(300, 883); this.ResumeLayout(false); }
private void ViewRecordHistory() { XtraTabPage result = new XtraTabPage(); System.Windows.Forms.Integration.ElementHost elementHost1 = new System.Windows.Forms.Integration.ElementHost(); elementHost1.Dock = DockStyle.Fill; System.Windows.Controls.ContentControl contentCtrl = new System.Windows.Controls.ContentControl(); System.Windows.ResourceDictionary res = new System.Windows.ResourceDictionary(); res.BeginInit(); res.Source = new Uri("pack://application:,,,/Assistant;component/Template/RecordViewer.xaml"); res.EndInit(); contentCtrl.ContentTemplate = res["recordViewer"] as System.Windows.DataTemplate; try { contentCtrl.DataContext = HistoryHelper.GetHistoryList(); } catch (Exception ex) { MessageBox.Show(ex.Message); return; } contentCtrl.Content = contentCtrl.DataContext; contentCtrl.CommandBindings.Add(new System.Windows.Input.CommandBinding(Commands.View, this.OnViewHistoryDetail)); elementHost1.Child = contentCtrl; result.Controls.Add(elementHost1); result.ShowCloseButton = DevExpress.Utils.DefaultBoolean.True; result.Text = "历史记录"; this.tabPageControl.TabPages.Add(result); this.tabPageControl.SelectedTabPage = result; }
private void comparer_Finished(object sender, EventArgs e) { this.Invoke((Action)(() => { if (this.comparer == null) { return; } XtraTabPage result = new XtraTabPage(); System.Windows.Forms.Integration.ElementHost elementHost1 = new System.Windows.Forms.Integration.ElementHost(); elementHost1.Dock = DockStyle.Fill; System.Windows.Controls.ContentControl contentCtrl = new System.Windows.Controls.ContentControl(); System.Windows.ResourceDictionary res = new System.Windows.ResourceDictionary(); res.BeginInit(); res.Source = new Uri("pack://application:,,,/Assistant;component/Template/ResultViewer.xaml"); res.EndInit(); contentCtrl.ContentTemplate = res["resultViewer"] as System.Windows.DataTemplate; contentCtrl.DataContext = this.comparer.Result; contentCtrl.Content = this.comparer.Result; elementHost1.Child = contentCtrl; result.Controls.Add(elementHost1); result.ShowCloseButton = DevExpress.Utils.DefaultBoolean.True; result.Text = "网页元素对比结果"; this.tabPageControl.TabPages.Add(result); this.tabPageControl.SelectedTabPage = result; this.comparer.Finished -= comparer_Finished; this.comparer = null; if (_fillManager != null) { this._fillManager.EndFill(); this._fillManager = null; } })); }
public TSpecificHost CreateControl(Type ctrlType, out TControl specCtrl, out System.Windows.Forms.Control winCtrl) { string title; IXImage icon; GetControlAttribution(ctrlType, out title, out icon); if (typeof(System.Windows.Forms.Control).IsAssignableFrom(ctrlType)) { if (typeof(System.Windows.Forms.UserControl).IsAssignableFrom(ctrlType) && ctrlType.IsComVisible()) { winCtrl = null; return(HostComControl(ctrlType.GetProgId(), title, icon, out specCtrl)); } else { winCtrl = (System.Windows.Forms.Control)Activator.CreateInstance(ctrlType); specCtrl = (TControl)(object)winCtrl; return(HostNetControl(winCtrl, specCtrl, title, icon)); } } else if (typeof(System.Windows.UIElement).IsAssignableFrom(ctrlType)) { var wpfCtrl = (System.Windows.UIElement)Activator.CreateInstance(ctrlType); var host = new System.Windows.Forms.Integration.ElementHost(); host.Child = wpfCtrl; specCtrl = (TControl)(object)wpfCtrl; winCtrl = host; return(HostNetControl(host, specCtrl, title, icon)); } else { throw new NotSupportedException($"Only {typeof(System.Windows.Forms.Control).FullName} or {typeof(System.Windows.UIElement).FullName} are supported"); } }
/// <summary> /// Przesłonięta metoda umożliwiająca poruszanie się i tworzenie pomniejszych przeciwników /// </summary> /// <param name="pictureBox">Graficzna reprezentacja przeciwnika</param> /// <param name="area">Obszar, po którym można się poruszać</param> public override void Dance(ref System.Windows.Forms.PictureBox enemy, System.Windows.Forms.Integration.ElementHost area) { for (int i = 0; i < speed; ++i) { System.Drawing.Point newLocation = new System.Drawing.Point { X = random.Next(-1 * speed, speed) + enemy.Location.X, Y = random.Next(-1 * speed, speed) + enemy.Location.Y }; if (newLocation.X < 0 || newLocation.X > area.Size.Width - enemy.Size.Width) { newLocation.X = enemy.Location.X; } if (newLocation.Y < 0 || newLocation.Y > area.Size.Height - enemy.Size.Height) { newLocation.Y = enemy.Location.Y; } enemy.Location = newLocation; enemy.Update(); } int canCreate = random.Next(0, 50); if (canCreate == 0) { createEnemy("pictureBoxBossCompanion"); } }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.elementHost = new System.Windows.Forms.Integration.ElementHost(); this.SuspendLayout(); // // elementHost // this.elementHost.BackColor = System.Drawing.Color.White; this.elementHost.Dock = System.Windows.Forms.DockStyle.Fill; this.elementHost.Location = new System.Drawing.Point(0, 0); this.elementHost.Name = "elementHost"; this.elementHost.Size = new System.Drawing.Size(203, 476); this.elementHost.TabIndex = 0; this.elementHost.Text = "elementHost"; this.elementHost.Child = null; // // MicroblogUserControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.elementHost); this.Name = "MicroblogUserControl"; this.Size = new System.Drawing.Size(203, 476); this.ResumeLayout(false); }
protected override IntPtr OnCreateChild() { m_windowUI = new System.Windows.Forms.Integration.ElementHost(); m_windowUI.Child = new CurveByInferenceWindow(); return m_windowUI.Handle; }
public CollapsibleControl AddCollapsibleControlFor(System.Windows.Controls.UserControl wpfControl, int expandedHeight, string label) { if (expandedHeight == -1) { expandedHeight = (int)wpfControl.Height; } CollapsibleControl newControl = AddCollapsibleControl(expandedHeight); newControl.SuspendLayout(); newControl.Label = label; System.Windows.Forms.Integration.ElementHost wpfHost; wpfHost = new System.Windows.Forms.Integration.ElementHost(); wpfHost.Dock = DockStyle.Fill; wpfHost.Child = wpfControl; newControl.Controls.Add(wpfHost); wpfHost.Dock = DockStyle.Fill; wpfHost.BringToFront(); newControl.ResumeLayout(); return(newControl); }
internal void closeProfilesWindow() { try { var count = System.Windows.Forms.Application.OpenForms.Count; for (int i = System.Windows.Forms.Application.OpenForms.Count - 1; i >= 0; i--) { if (System.Windows.Forms.Application.OpenForms[i].Name == "ucProfilesWindow") { System.Windows.Forms.Application.OpenForms[i].Close(); } else { var ele = System.Windows.Forms.Application.OpenForms[i].Controls[0]; if (ele.Name == "elementHost1") { System.Windows.Forms.Integration.ElementHost eh = ele as System.Windows.Forms.Integration.ElementHost; var ch = eh.Child; testingActcad.beamproperties bp = ch as testingActcad.beamproperties; bp.txtProfile.Text = ProfileName; } } } } catch (Teigha.Runtime.Exception ex) { IntelliCAD.ApplicationServices.Application.ShowAlertDialog(ex.ToString()); } }
private void MediaPlayer_MediaOpened(object sender, EventArgs e) { changeTitle(i); playingUC2.duration = GetVideoDuration(FilePath[i]); //Chơi CircularButton btn = (CircularButton)playingUC2.Controls.Find("play", true)[0]; mediaPlayer.Play(); playing = true; btn.BackgroundImage = UI_Media.Properties.Resources.pause; //Hiện spectrum System.Windows.Forms.Integration.ElementHost spectrum = (System.Windows.Forms.Integration.ElementHost)playingUC2.Controls.Find("elementHost1", true)[0]; spectrum.Visible = true; //Hiện time tổng cộng Label lb2 = (Label)playingUC2.Controls.Find("label2", true)[0]; lb2.Text = playingUC2.duration.ToString(@"hh\:mm\:ss"); lb2.Visible = true; Label lb1 = (Label)playingUC2.Controls.Find("label1", true)[0]; lb1.Visible = true; //Label lb3 = (Label)playingUC2.Controls.Find("label3", true)[0]; //lb3.Visible = true; //Cho phép dùng Seek bar TrackBar track = (TrackBar)playingUC2.Controls.Find("seek", true)[0]; track.Enabled = true; }
private void Play_Click(object sender, EventArgs e) { CircularButton btn = (CircularButton)sender; if (FilePath == null || FilePath.Count == 0) { return; } if (playing == false) { mediaPlayer.Play(); playing = true; btn.BackgroundImage = UI_Media.Properties.Resources.pause; System.Windows.Forms.Integration.ElementHost spectrum = (System.Windows.Forms.Integration.ElementHost)playingUC2.Controls.Find("elementHost1", true)[0]; spectrum.Visible = true; } else if (playing == true) { mediaPlayer.Pause(); playing = false; btn.BackgroundImage = UI_Media.Properties.Resources.play_button; System.Windows.Forms.Integration.ElementHost spectrum = (System.Windows.Forms.Integration.ElementHost)playingUC2.Controls.Find("elementHost1", true)[0]; spectrum.Visible = false; } }
private void InitializeComponent() { this.elementHost1 = new System.Windows.Forms.Integration.ElementHost(); this.SuspendLayout(); // // elementHost1 // this.elementHost1.Dock = System.Windows.Forms.DockStyle.Fill; this.elementHost1.Location = new System.Drawing.Point(0, 0); this.elementHost1.Name = "elementHost1"; this.elementHost1.Size = new System.Drawing.Size(284, 261); this.elementHost1.TabIndex = 0; this.elementHost1.Text = "elementHost1"; this.elementHost1.Child = null; // // WPFDocument // this.ClientSize = new System.Drawing.Size(284, 261); this.Controls.Add(this.elementHost1); this.Font = new System.Drawing.Font("Segoe UI", 10.2F); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.Name = "WPFDocument"; this.RightToLeft = System.Windows.Forms.RightToLeft.No; this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this._wpfHost = new System.Windows.Forms.Integration.ElementHost(); this.performanceChartControl1 = new TheCodingMonkey.WmiDemo.SnapIn.Views.PerformanceChartControl(); this.SuspendLayout(); // // _wpfHost // this._wpfHost.Dock = System.Windows.Forms.DockStyle.Fill; this._wpfHost.Location = new System.Drawing.Point(0, 0); this._wpfHost.Name = "_wpfHost"; this._wpfHost.Size = new System.Drawing.Size(442, 287); this._wpfHost.TabIndex = 0; this._wpfHost.Text = "elementHost1"; this._wpfHost.Child = this.performanceChartControl1; // // PerformanceCounterViewControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this._wpfHost); this.Name = "PerformanceCounterViewControl"; this.Size = new System.Drawing.Size(442, 287); this.ResumeLayout(false); }
/// <summary> /// Adds the ink canvas to the form. /// </summary> private void InitializeCanvas() { // Initialize the canvas, canvas = new System.Windows.Controls.InkCanvas(); // Create a host to hold the canvas. var host = new System.Windows.Forms.Integration.ElementHost(); // Add the canvas to the host. host.Child = canvas; // Add the host to the drawing panel. drawingPanel.Controls.Add(host); // Set the host's size and anchor it. host.Size = drawingPanel.Size; host.Anchor = drawingPanel.Anchor; // Define event listeners for the Stylus's button presses. canvas.StylusButtonDown += Canvas_StylusButtonDown; canvas.StylusButtonUp += Canvas_StylusButtonUp; // Define event listeners for touch in order to prevent touch input from editing ink. canvas.PreviewTouchDown += Canvas_PreviewTouchDown; canvas.PreviewTouchUp += Canvas_PreviewTouchUp; }
private void ShowPalette() { if (PaletteSet == null) { PaletteSet = new PaletteSet("Notches") { DockEnabled = DockSides.None, Size = new Size(270, 400), MinimumSize = new Size(270, 300) }; var plugin = new NotchesPlugin(); var paramsView = new UI.ParamsView { DataContext = plugin.Params }; var host = new System.Windows.Forms.Integration.ElementHost(); host.AutoSize = true; host.Dock = System.Windows.Forms.DockStyle.Fill; host.Child = paramsView; PaletteSet.Add("ParamsView ElementHost", host); plugin.Init(); } PaletteSet.KeepFocus = true; PaletteSet.Visible = true; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { WPF = new System.Windows.Forms.Integration.ElementHost(); resizePaneWPF = new ResizeLabPaneWPF(); SuspendLayout(); // // WPF // WPF.Dock = System.Windows.Forms.DockStyle.Fill; WPF.ForeColor = System.Drawing.SystemColors.ButtonFace; WPF.Location = new System.Drawing.Point(0, 0); WPF.Name = "WPF"; WPF.Size = new System.Drawing.Size(304, 883); WPF.Text = "WPF"; WPF.Child = resizePaneWPF; // // ResizePane // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.WPF); this.Name = "ResizePane"; this.Size = new System.Drawing.Size(300, 883); this.ResumeLayout(false); }
internal static System.Windows.Controls.TextBox CreateWPFTextBox( System.Windows.Forms.Integration.ElementHost host, bool isReadOnly, string text, bool multiline, bool isSpellCheckEnabled, bool softwareOnlyRenderMode) { System.Windows.Controls.TextBox textbox = new System.Windows.Controls.TextBox { AcceptsReturn = multiline, IsReadOnly = isReadOnly, Text = text, TextWrapping = System.Windows.TextWrapping.Wrap, HorizontalScrollBarVisibility = System.Windows.Controls.ScrollBarVisibility.Auto, VerticalScrollBarVisibility = System.Windows.Controls.ScrollBarVisibility.Auto }; if (softwareOnlyRenderMode) { textbox.Loaded += (s, e) => { var source = System.Windows.PresentationSource.FromVisual(textbox); if (source.CompositionTarget is System.Windows.Interop.HwndTarget hwndTarget) { hwndTarget.RenderMode = System.Windows.Interop.RenderMode.SoftwareOnly; } }; } textbox.SpellCheck.IsEnabled = isSpellCheckEnabled; host.Child = textbox; return(textbox); }
public ChartingView(ChartAreaValuesView chartAreaValuesView, Chart2D chart2D, ComplexChart complexChart, Chart3DControl chart3D) : this() { chartAreaValuesView.Dock = DockStyle.Right; ChartAreaValuesView = chartAreaValuesView; Chart2D = chart2D; ComplexChart = complexChart; Chart3D = chart3D; Charts = new Dictionary <CalculationsMode, IChart>() { { CalculationsMode.Real, Chart2D }, { CalculationsMode.Complex, ComplexChart }, { CalculationsMode.Fxy, chart3D } }; #if !__MonoCS__ var el = new System.Windows.Forms.Integration.ElementHost { Child = chart3D, Dock = DockStyle.Fill }; chart3D.ParentControl = el; #endif panel2.Controls.AddRange(new[] { chart2D, complexChart, #if !__MonoCS__ el, #endif (Control)chartAreaValuesView, }); }
public ImageForm() { allScreens = Screen.AllScreens; StartPosition = FormStartPosition.Manual; AllowTransparency = true; BackgroundImageLayout = ImageLayout.Zoom; SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer | ControlStyles.SupportsTransparentBackColor, true); TransparencyKey = Color.Lime; FormBorderStyle = FormBorderStyle.None; window = new ImageWindow(this); System.Windows.Forms.Integration.ElementHost host = new System.Windows.Forms.Integration.ElementHost() { Dock = DockStyle.Fill, Location = new Point(0, 0), Size = Size, Child = window }; Controls.Add(host); Screen screen = allScreens[0]; Left = screen.Bounds.Width; Top = screen.Bounds.Height; Location = screen.Bounds.Location; Width = screen.WorkingArea.Width; Height = screen.WorkingArea.Height; BackColor = Color.Black; TopMost = true; }
public DisplaySearchResultsWindows(DisplaySearchResultViewModel vm) { InitializeComponent(); var elHost = (this.elementHost1.Child as SearchResults); ElHost = this.elementHost1; elHost.DataContext = vm; }
private void buziosToolStripMenuItem_Click(object sender, EventArgs e) { System.Windows.Forms.Integration.ElementHost eh = new System.Windows.Forms.Integration.ElementHost(); Buzios.ClusterControlWPF buzios = new Buzios.ClusterControlWPF(); eh.Child = buzios; setControlInPanel2(eh); labelBreadCrumb.Text = ".: Analyze :: Buzios"; eh.Dock = DockStyle.Fill; }
protected PluginTab AddToTab(System.Windows.Forms.TabControl tabContainer, System.Windows.Controls.UserControl control, string tabName) { System.Windows.Forms.Integration.ElementHost wpfHost; wpfHost = new System.Windows.Forms.Integration.ElementHost(); wpfHost.Dock = DockStyle.Fill; wpfHost.Child = control; return(AddToTab(tabContainer, wpfHost, tabName)); }
private void histogramToolToolStripMenuItem_Click(object sender, EventArgs e) { System.Windows.Forms.Integration.ElementHost eh = new System.Windows.Forms.Integration.ElementHost(); Histogram.HistogramControl hc = new Histogram.HistogramControl(); eh.Child = hc; setControlInPanel2(eh); labelBreadCrumb.Text = ".: Utils :: Histogram Tool"; eh.Dock = DockStyle.Fill; }
private System.Windows.Forms.Control CreateElementHost() { var elementHost = new System.Windows.Forms.Integration.ElementHost() { Dock = System.Windows.Forms.DockStyle.Fill, Child = (UIElement)this, }; return(elementHost); }
//private dynamic python_delegate; public TaskPane() { usrctrl = new TaskPaneControl(); _host = new System.Windows.Forms.Integration.ElementHost(); _host.Child = usrctrl; this.Controls.Add(_host); // Standard Fester-grau: Background=""#D7DCE3"" // helles TaskPane-grau: Background=""#E4E8EE"" }
private void Form1_Load(object sender, EventArgs e) { var elemHost = new System.Windows.Forms.Integration.ElementHost(); elemHost.Dock = DockStyle.Fill; elemHost.Location = new System.Drawing.Point(4, 5); elemHost.Margin = new Padding(4, 5, 4, 5); elemHost.Size = new System.Drawing.Size(490, 623); elemHost.Child = sqlControl1; tableLayoutPanel3.Controls.Add(elemHost, 0, 0); }
public PaneDecorator(CustomPane pane) { InitializeComponent(); _designPane = pane; var host = new Host(); host.Dock = F.DockStyle.Fill; host.Child = pane; this.Controls.Add(host); }
public void Start(System.Windows.Controls.Control addIn) { this.SetContainer(addIn); System.Windows.Forms.Integration.ElementHost wpfHost = new System.Windows.Forms.Integration.ElementHost(); wpfHost.Dock = System.Windows.Forms.DockStyle.Fill; wpfHost.Location = new System.Drawing.Point(0, 0); wpfHost.TabIndex = 0; wpfHost.Child = addIn; this.Controls.Add(wpfHost); }
public WinformHost() { var ctrlHost = new System.Windows.Forms.Integration.ElementHost(); ctrlHost.Dock = DockStyle.Fill; this.Controls.Add(ctrlHost); var wpfControl = new RF.WpfLibrary.WpfUserControl(); wpfControl.InitializeComponent(); ctrlHost.Child = wpfControl; }
public GtkWPFWidget(System.Windows.FrameworkElement wpfControl) { CanFocus = true; this.wpfControl = wpfControl; wpfWidgetHost = new System.Windows.Forms.Integration.ElementHost { BackColor = System.Drawing.Color.Transparent, Child = wpfControl, }; wpfControl.GotKeyboardFocus += OnGotFocus; wpfControl.KeyDown += OnKeyDown; WidgetFlags |= global::Gtk.WidgetFlags.NoWindow; }
internal static TWrapper HostControl <TWrapper>(Type ctrlType, Func <object, System.Windows.Forms.Control, string, Image, TWrapper> ctrlHost, Func <string, string, Image, TWrapper> comCtrlHost) { var title = ""; if (ctrlType.TryGetAttribute(out DisplayNameAttribute att)) { title = att.DisplayName; } if (string.IsNullOrEmpty(title)) { title = ctrlType.Name; } Image icon = null; if (ctrlType.TryGetAttribute(out IconAttribute iconAtt)) { icon = IconsConverter.FromXImage(iconAtt.Icon); } if (icon == null) { icon = IconsConverter.FromXImage(Defaults.Icon); } if (typeof(System.Windows.Forms.Control).IsAssignableFrom(ctrlType)) { if (typeof(System.Windows.Forms.UserControl).IsAssignableFrom(ctrlType) && ctrlType.IsComVisible()) { return(comCtrlHost.Invoke(ctrlType.GetProgId(), title, icon)); } else { var winCtrl = (System.Windows.Forms.Control)Activator.CreateInstance(ctrlType); return(ctrlHost.Invoke(winCtrl, winCtrl, title, icon)); } } else if (typeof(System.Windows.UIElement).IsAssignableFrom(ctrlType)) { var wpfCtrl = (System.Windows.UIElement)Activator.CreateInstance(ctrlType); var host = new System.Windows.Forms.Integration.ElementHost(); host.Child = wpfCtrl; return(ctrlHost.Invoke(wpfCtrl, host, title, icon)); } else { throw new NotSupportedException($"Only {typeof(System.Windows.Forms.Control).FullName} or {typeof(System.Windows.UIElement).FullName} are supported"); } }
private void HandleTabInitialize(System.Windows.Forms.TabControl tabControl) { mContainer = tabControl; mTab = new PluginTab(); mWpfHost = new System.Windows.Forms.Integration.ElementHost(); mWpfHost.Dock = System.Windows.Forms.DockStyle.Fill; mWpfHost.Name = "EventsWpfHost"; mEventItemList = new EventItemList(); mWpfHost.Child = mEventItemList; mTab.Controls.Add(mWpfHost); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.panel1 = new System.Windows.Forms.Panel(); this.elementHost_BaoCao = new System.Windows.Forms.Integration.ElementHost(); this.panel1.SuspendLayout(); this.SuspendLayout(); // // panel1 // this.panel1.BackColor = System.Drawing.SystemColors.ButtonHighlight; this.panel1.Controls.Add(this.elementHost_BaoCao); this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(775, 700); this.panel1.TabIndex = 32; // // elementHost_BaoCao // this.elementHost_BaoCao.BackColor = System.Drawing.SystemColors.GradientActiveCaption; this.elementHost_BaoCao.Dock = System.Windows.Forms.DockStyle.Fill; this.elementHost_BaoCao.Location = new System.Drawing.Point(0, 0); this.elementHost_BaoCao.Name = "elementHost_BaoCao"; this.elementHost_BaoCao.Size = new System.Drawing.Size(775, 700); this.elementHost_BaoCao.TabIndex = 0; this.elementHost_BaoCao.Text = "elementHost1"; this.elementHost_BaoCao.Child = null; // // frmBaoCao // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.SystemColors.GradientActiveCaption; this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.ClientSize = new System.Drawing.Size(775, 700); this.Controls.Add(this.panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "frmBaoCao"; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Báo cáo"; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.Activated += new System.EventHandler(this.frmBaoCao_Activated); this.Load += new System.EventHandler(this.frmBaoCao_Load); this.panel1.ResumeLayout(false); this.ResumeLayout(false); }
public Form1() { InitializeComponent(); var host = new System.Windows.Forms.Integration.ElementHost { Dock = DockStyle.Fill }; var wpg = new System.Windows.Controls.WpfPropertyGrid.PropertyGrid { Layout = new System.Windows.Controls.WpfPropertyGrid.Design.CategorizedLayout() }; host.Child = wpg; wpg.SelectedObject = new BusinessObject(); this.Controls.Add(host); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.panel2 = new System.Windows.Forms.Panel(); this.elementHost_KhoHang = new System.Windows.Forms.Integration.ElementHost(); this.panel2.SuspendLayout(); this.SuspendLayout(); // // panel2 // this.panel2.BackColor = System.Drawing.SystemColors.GradientActiveCaption; this.panel2.Controls.Add(this.elementHost_KhoHang); this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; this.panel2.Location = new System.Drawing.Point(0, 0); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(775, 754); this.panel2.TabIndex = 33; // // elementHost_KhoHang // this.elementHost_KhoHang.Dock = System.Windows.Forms.DockStyle.Fill; this.elementHost_KhoHang.Location = new System.Drawing.Point(0, 0); this.elementHost_KhoHang.Name = "elementHost_KhoHang"; this.elementHost_KhoHang.Size = new System.Drawing.Size(775, 754); this.elementHost_KhoHang.TabIndex = 0; this.elementHost_KhoHang.Text = "elementHost1"; this.elementHost_KhoHang.Child = null; // // frmKhoHang // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 14F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.SystemColors.GradientActiveCaption; this.ClientSize = new System.Drawing.Size(775, 754); this.ControlBox = false; this.Controls.Add(this.panel2); this.Font = new System.Drawing.Font("Times New Roman", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "frmKhoHang"; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Kho hàng"; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.Load += new System.EventHandler(this.frmKhoHang_Load); this.panel2.ResumeLayout(false); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.panel2 = new System.Windows.Forms.Panel(); this.elementHost_NghiepVu = new System.Windows.Forms.Integration.ElementHost(); this.panel2.SuspendLayout(); this.SuspendLayout(); // // panel2 // this.panel2.BackColor = System.Drawing.SystemColors.GradientActiveCaption; this.panel2.Controls.Add(this.elementHost_NghiepVu); this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; this.panel2.Location = new System.Drawing.Point(0, 0); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(775, 700); this.panel2.TabIndex = 32; // // elementHost_NghiepVu // this.elementHost_NghiepVu.Dock = System.Windows.Forms.DockStyle.Fill; this.elementHost_NghiepVu.Location = new System.Drawing.Point(0, 0); this.elementHost_NghiepVu.Name = "elementHost_NghiepVu"; this.elementHost_NghiepVu.Size = new System.Drawing.Size(775, 700); this.elementHost_NghiepVu.TabIndex = 0; this.elementHost_NghiepVu.Text = "elementHost1"; this.elementHost_NghiepVu.Child = null; // // frmNghiepVu // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.SystemColors.GradientActiveCaption; this.ClientSize = new System.Drawing.Size(775, 700); this.ControlBox = false; this.Controls.Add(this.panel2); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "frmNghiepVu"; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Nghiệp vụ"; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.Load += new System.EventHandler(this.frmNghiepVu_Load); this.panel2.ResumeLayout(false); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.elementHost1 = new System.Windows.Forms.Integration.ElementHost(); this.objectBuilderControl1 = new CogaenEditorControls.GUI_Elements.ObjectBuilderControl(); this.richTextBoxCtrl = new CogaenEditExtension.EditorTextBox(); this.SuspendLayout(); // // elementHost1 // this.elementHost1.AllowDrop = true; this.elementHost1.Dock = System.Windows.Forms.DockStyle.Fill; this.elementHost1.Location = new System.Drawing.Point(0, 0); this.elementHost1.Name = "elementHost1"; this.elementHost1.Size = new System.Drawing.Size(500, 500); this.elementHost1.TabIndex = 0; this.elementHost1.Text = "elementHost1"; this.elementHost1.Child = this.objectBuilderControl1; //// //// richTextBoxCtrl //// //this.richTextBoxCtrl.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.richTextBoxCtrl.FilterMouseClickMessages = false; //this.richTextBoxCtrl.Location = new System.Drawing.Point(0, 0); //this.richTextBoxCtrl.Name = "richTextBoxCtrl"; //this.richTextBoxCtrl.Size = new System.Drawing.Size(150, 150); //this.richTextBoxCtrl.TabIndex = 0; //this.richTextBoxCtrl.Text = ""; //this.richTextBoxCtrl.KeyDown += new System.Windows.Forms.KeyEventHandler(this.richTextBoxCtrl_KeyDown); //this.richTextBoxCtrl.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.richTextBoxCtrl_KeyPress); //this.richTextBoxCtrl.MouseEnter += new System.EventHandler(this.richTextBoxCtrl_MouseEnter); // // MyEditor // this.AllowDrop = true; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoValidate = System.Windows.Forms.AutoValidate.EnablePreventFocusChange; this.Controls.Add(this.elementHost1); this.Name = "MyEditor"; this.Size = new System.Drawing.Size(500, 500); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.panel3 = new System.Windows.Forms.Panel(); this.elementHost_Trangchinh = new System.Windows.Forms.Integration.ElementHost(); this.panel3.SuspendLayout(); this.SuspendLayout(); // // panel3 // this.panel3.BackColor = System.Drawing.SystemColors.GradientActiveCaption; this.panel3.Controls.Add(this.elementHost_Trangchinh); this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; this.panel3.Font = new System.Drawing.Font("Times New Roman", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.panel3.Location = new System.Drawing.Point(0, 0); this.panel3.Name = "panel3"; this.panel3.Size = new System.Drawing.Size(643, 640); this.panel3.TabIndex = 8; // // elementHost_Trangchinh // this.elementHost_Trangchinh.Dock = System.Windows.Forms.DockStyle.Fill; this.elementHost_Trangchinh.Location = new System.Drawing.Point(0, 0); this.elementHost_Trangchinh.Name = "elementHost_Trangchinh"; this.elementHost_Trangchinh.Size = new System.Drawing.Size(643, 640); this.elementHost_Trangchinh.TabIndex = 0; this.elementHost_Trangchinh.Child = null; // // frmTrangChinh // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.SystemColors.ControlLightLight; this.ClientSize = new System.Drawing.Size(643, 640); this.ControlBox = false; this.Controls.Add(this.panel3); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "frmTrangChinh"; this.ShowIcon = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.Load += new System.EventHandler(this.frmTrangChinh_Load); this.panel3.ResumeLayout(false); this.ResumeLayout(false); }
public void AddWpfControl(System.Windows.Controls.UserControl control, string tabTitle) { System.Windows.Forms.Integration.ElementHost wpfHost; wpfHost = new System.Windows.Forms.Integration.ElementHost(); wpfHost.Dock = DockStyle.Fill; wpfHost.Child = control; System.Windows.Forms.TabPage tabPage = new TabPage(); tabPage.Controls.Add(wpfHost); tabPage.Location = new System.Drawing.Point(4, 22); tabPage.Padding = new System.Windows.Forms.Padding(3); tabPage.Size = new System.Drawing.Size(230, 463); tabPage.TabIndex = 1; tabPage.Text = tabTitle; tabPage.UseVisualStyleBackColor = true; this.PropertyGridTab.Controls.Add(tabPage); }
public GtkWPFWidget (System.Windows.Controls.Control wpfControl) { wpfWidgetHost = new System.Windows.Forms.Integration.ElementHost { BackColor = System.Drawing.Color.Transparent, Child = wpfControl, }; wpfControl.PreviewKeyDown += (sender, e) => { // TODO: Some commands check for toplevels, and this window is not a toplevel. if (e.Key == System.Windows.Input.Key.Escape) { System.Windows.Input.Keyboard.ClearFocus(); MonoDevelop.Ide.IdeApp.Workbench.Present(); return; } var key = e.Key == System.Windows.Input.Key.System ? e.SystemKey : e.Key; e.Handled = Ide.IdeApp.CommandService.ProcessKeyEvent (GtkWin32Interop.ConvertKeyEvent (e.KeyboardDevice.Modifiers, key)); }; WidgetFlags |= WidgetFlags.NoWindow; }
/// <summary> /// Erforderliche Methode für die Designerunterstützung. /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. /// </summary> private void InitializeComponent() { this.elementHost1 = new System.Windows.Forms.Integration.ElementHost(); this.SuspendLayout(); // // elementHost1 // this.elementHost1.Dock = System.Windows.Forms.DockStyle.Fill; this.elementHost1.Location = new System.Drawing.Point(0, 0); this.elementHost1.Name = "elementHost1"; this.elementHost1.Size = new System.Drawing.Size(150, 150); this.elementHost1.TabIndex = 0; this.elementHost1.Text = "elementHost1"; this.elementHost1.Child = new FalsePositiveView(); // // FindingsPaneContainer // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.elementHost1); this.Name = "FalsePositiveViewContainer"; this.ResumeLayout(false); }
public GtkWPFWidget(System.Windows.FrameworkElement wpfControl) { CanFocus = true; this.wpfControl = wpfControl; wpfWidgetHost = new System.Windows.Forms.Integration.ElementHost { BackColor = System.Drawing.Color.Transparent, Child = wpfControl, }; wpfControl.GotKeyboardFocus += OnGotFocus; wpfControl.KeyDown += OnKeyDown; WidgetFlags |= global::Gtk.WidgetFlags.NoWindow; }
public void Start(System.Windows.Controls.Control addIn) { this.SetContainer(addIn); System.Windows.Forms.Integration.ElementHost wpfHost = new System.Windows.Forms.Integration.ElementHost(); wpfHost.Dock = System.Windows.Forms.DockStyle.Fill; wpfHost.Location = new System.Drawing.Point(0, 0); wpfHost.TabIndex = 0; wpfHost.Child = addIn; this.Controls.Add(wpfHost); }
public void AddTab(string tabName, System.Windows.Controls.UserControl wpfControl) { this.tabControl1.TabPages.Add(tabName); var newlyAdded = tabControl1.TabPages[tabControl1.TabPages.Count - 1]; // Instantiate the host: System.Windows.Forms.Integration.ElementHost wpfHost; wpfHost = new System.Windows.Forms.Integration.ElementHost(); wpfHost.Dock = DockStyle.Fill; // Set the host’s child to the WPF control wpfHost.Child = wpfControl; newlyAdded.Controls.Add(wpfHost); }
protected PluginTab AddToTab(System.Windows.Forms.TabControl tabContainer, System.Windows.Controls.UserControl control, string tabName) { System.Windows.Forms.Integration.ElementHost wpfHost; wpfHost = new System.Windows.Forms.Integration.ElementHost(); wpfHost.Dock = DockStyle.Fill; wpfHost.Child = control; return AddToTab(tabContainer, wpfHost, tabName); }
DockContainerItem CreateAddInContainer(object addIn) { DockContainerItem document = new DockContainerItem(); document.Text = GetModuleName(addIn); if (addIn is Control) { (addIn as Control).Dock = DockStyle.Fill; document.Control = addIn as Control; } else if (addIn is System.Windows.Controls.Control) { System.Windows.Forms.Integration.ElementHost wpfHost = new System.Windows.Forms.Integration.ElementHost(); wpfHost.Dock = System.Windows.Forms.DockStyle.Fill; wpfHost.Location = new System.Drawing.Point(0, 0); wpfHost.TabIndex = 0; wpfHost.Child = (addIn as System.Windows.Controls.Control); this.Controls.Add(wpfHost); document.Control = wpfHost; } Bar bar = GetFirstDocumentBar(); bar.Items.Add(document); bar.SelectedDockTab = bar.Items.IndexOf(document); bar.RecalcLayout(); ModuleManager.StartModule(addIn, this); return document; }
protected override IntPtr OnCreateChild() { m_windowUI = new System.Windows.Forms.Integration.ElementHost(); m_windowUI.Child = new DockableWindowCoordinateConversion(); return m_windowUI.Handle; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Order)); this.Btn_Classification = new System.Windows.Forms.Button(); this.Btn_Simplecode = new System.Windows.Forms.Button(); this.PanelParent = new System.Windows.Forms.FlowLayoutPanel(); this.PanelChildren = new System.Windows.Forms.FlowLayoutPanel(); this.PanelDishes = new System.Windows.Forms.FlowLayoutPanel(); this.PanelInfor = new System.Windows.Forms.Panel(); this.lblTitle2 = new System.Windows.Forms.Label(); this.eleTempHistory = new System.Windows.Forms.Integration.ElementHost(); this.dlvTempHistory = new WpfControls.DishesListView(); this.eleTemp = new System.Windows.Forms.Integration.ElementHost(); this.dlvTemp = new WpfControls.DishesListView(); this.lblTitle1 = new System.Windows.Forms.Label(); this.eleHistory = new System.Windows.Forms.Integration.ElementHost(); this.dlvHistory = new WpfControls.HistoryDishesListView(); this.styleManager1 = new DevComponents.DotNetBar.StyleManager(this.components); this.imageListDirection = new System.Windows.Forms.ImageList(this.components); this.m_PanelDishesByRetrievalCode = new System.Windows.Forms.FlowLayoutPanel(); this.panelBottom = new System.Windows.Forms.Panel(); this.btnOK = new System.Windows.Forms.Button(); this.btnCancel = new System.Windows.Forms.Button(); this.PanelInfor.SuspendLayout(); this.panelBottom.SuspendLayout(); this.SuspendLayout(); // // Btn_Classification // this.Btn_Classification.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(84)))), ((int)(((byte)(19))))); this.Btn_Classification.Cursor = System.Windows.Forms.Cursors.Hand; this.Btn_Classification.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Btn_Classification.Location = new System.Drawing.Point(144, 2); this.Btn_Classification.Name = "Btn_Classification"; this.Btn_Classification.Size = new System.Drawing.Size(88, 37); this.Btn_Classification.TabIndex = 0; this.Btn_Classification.Text = "分类检索"; this.Btn_Classification.UseVisualStyleBackColor = false; this.Btn_Classification.Click += new System.EventHandler(this.Btn_Classification_Click); // // Btn_Simplecode // this.Btn_Simplecode.Cursor = System.Windows.Forms.Cursors.Hand; this.Btn_Simplecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Btn_Simplecode.Location = new System.Drawing.Point(254, 2); this.Btn_Simplecode.Name = "Btn_Simplecode"; this.Btn_Simplecode.Size = new System.Drawing.Size(88, 37); this.Btn_Simplecode.TabIndex = 1; this.Btn_Simplecode.Text = "简码检索"; this.Btn_Simplecode.UseVisualStyleBackColor = true; this.Btn_Simplecode.Click += new System.EventHandler(this.Btn_Simplecode_Click); // // PanelParent // this.PanelParent.Cursor = System.Windows.Forms.Cursors.Default; this.PanelParent.Location = new System.Drawing.Point(0, 38); this.PanelParent.Name = "PanelParent"; this.PanelParent.Size = new System.Drawing.Size(548, 40); this.PanelParent.TabIndex = 2; // // PanelChildren // this.PanelChildren.Cursor = System.Windows.Forms.Cursors.Default; this.PanelChildren.Location = new System.Drawing.Point(0, 77); this.PanelChildren.Name = "PanelChildren"; this.PanelChildren.Size = new System.Drawing.Size(547, 26); this.PanelChildren.TabIndex = 3; // // PanelDishes // this.PanelDishes.AutoScroll = true; this.PanelDishes.Cursor = System.Windows.Forms.Cursors.Default; this.PanelDishes.Location = new System.Drawing.Point(0, 102); this.PanelDishes.Name = "PanelDishes"; this.PanelDishes.Size = new System.Drawing.Size(573, 327); this.PanelDishes.TabIndex = 5; // // PanelInfor // this.PanelInfor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.PanelInfor.Controls.Add(this.lblTitle2); this.PanelInfor.Controls.Add(this.eleTempHistory); this.PanelInfor.Controls.Add(this.eleTemp); this.PanelInfor.Controls.Add(this.lblTitle1); this.PanelInfor.Controls.Add(this.eleHistory); this.PanelInfor.Location = new System.Drawing.Point(576, 0); this.PanelInfor.Name = "PanelInfor"; this.PanelInfor.Size = new System.Drawing.Size(546, 473); this.PanelInfor.TabIndex = 6; this.PanelInfor.SizeChanged += new System.EventHandler(this.PanelInfor_SizeChanged); // // lblTitle2 // this.lblTitle2.AutoSize = true; this.lblTitle2.BackColor = System.Drawing.SystemColors.ActiveBorder; this.lblTitle2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblTitle2.Location = new System.Drawing.Point(6, 249); this.lblTitle2.Name = "lblTitle2"; this.lblTitle2.Size = new System.Drawing.Size(58, 22); this.lblTitle2.TabIndex = 1; this.lblTitle2.Text = "追加菜"; this.lblTitle2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // eleTempHistory // this.eleTempHistory.Location = new System.Drawing.Point(56, 37); this.eleTempHistory.Name = "eleTempHistory"; this.eleTempHistory.Size = new System.Drawing.Size(463, 189); this.eleTempHistory.TabIndex = 8; this.eleTempHistory.Text = "elementHost3"; this.eleTempHistory.Child = this.dlvTempHistory; // // eleTemp // this.eleTemp.Location = new System.Drawing.Point(19, 317); this.eleTemp.Name = "eleTemp"; this.eleTemp.Size = new System.Drawing.Size(413, 111); this.eleTemp.TabIndex = 9; this.eleTemp.Text = "elementHost1"; this.eleTemp.Child = this.dlvTemp; // // lblTitle1 // this.lblTitle1.AutoSize = true; this.lblTitle1.BackColor = System.Drawing.SystemColors.ActiveBorder; this.lblTitle1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblTitle1.Location = new System.Drawing.Point(6, 1); this.lblTitle1.Name = "lblTitle1"; this.lblTitle1.Size = new System.Drawing.Size(58, 22); this.lblTitle1.TabIndex = 1; this.lblTitle1.Text = "已点菜"; this.lblTitle1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // eleHistory // this.eleHistory.Location = new System.Drawing.Point(10, 37); this.eleHistory.Name = "eleHistory"; this.eleHistory.Size = new System.Drawing.Size(509, 209); this.eleHistory.TabIndex = 6; this.eleHistory.Text = "elementHost2"; this.eleHistory.Child = this.dlvHistory; // // styleManager1 // this.styleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.VisualStudio2010Blue; this.styleManager1.MetroColorParameters = new DevComponents.DotNetBar.Metro.ColorTables.MetroColorGeneratorParameters(System.Drawing.Color.White, System.Drawing.Color.FromArgb(((int)(((byte)(43)))), ((int)(((byte)(87)))), ((int)(((byte)(154)))))); // // imageListDirection // this.imageListDirection.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListDirection.ImageStream"))); this.imageListDirection.TransparentColor = System.Drawing.Color.Transparent; this.imageListDirection.Images.SetKeyName(0, "打开"); this.imageListDirection.Images.SetKeyName(1, "收起"); // // m_PanelDishesByRetrievalCode // this.m_PanelDishesByRetrievalCode.AutoScroll = true; this.m_PanelDishesByRetrievalCode.Cursor = System.Windows.Forms.Cursors.Default; this.m_PanelDishesByRetrievalCode.Location = new System.Drawing.Point(0, 77); this.m_PanelDishesByRetrievalCode.Name = "m_PanelDishesByRetrievalCode"; this.m_PanelDishesByRetrievalCode.Size = new System.Drawing.Size(235, 239); this.m_PanelDishesByRetrievalCode.TabIndex = 11; this.m_PanelDishesByRetrievalCode.Visible = false; // // panelBottom // this.panelBottom.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panelBottom.Controls.Add(this.btnOK); this.panelBottom.Controls.Add(this.btnCancel); this.panelBottom.Location = new System.Drawing.Point(576, 475); this.panelBottom.Name = "panelBottom"; this.panelBottom.Size = new System.Drawing.Size(546, 60); this.panelBottom.TabIndex = 12; // // btnOK // this.btnOK.Cursor = System.Windows.Forms.Cursors.Hand; this.btnOK.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnOK.Location = new System.Drawing.Point(335, 11); this.btnOK.Name = "btnOK"; this.btnOK.Size = new System.Drawing.Size(88, 37); this.btnOK.TabIndex = 5; this.btnOK.Text = "确定"; this.btnOK.UseVisualStyleBackColor = true; this.btnOK.Click += new System.EventHandler(this.btnOK_Click); // // btnCancel // this.btnCancel.Cursor = System.Windows.Forms.Cursors.Hand; this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnCancel.Location = new System.Drawing.Point(134, 10); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(88, 37); this.btnCancel.TabIndex = 4; this.btnCancel.Text = "取消"; this.btnCancel.UseVisualStyleBackColor = true; this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); // // Order // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1124, 535); this.Controls.Add(this.panelBottom); this.Controls.Add(this.m_PanelDishesByRetrievalCode); this.Controls.Add(this.PanelInfor); this.Controls.Add(this.PanelChildren); this.Controls.Add(this.PanelParent); this.Controls.Add(this.Btn_Simplecode); this.Controls.Add(this.Btn_Classification); this.Controls.Add(this.PanelDishes); this.Cursor = System.Windows.Forms.Cursors.Default; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "Order"; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; this.Text = "点菜"; this.Load += new System.EventHandler(this.Order_Load); this.SizeChanged += new System.EventHandler(this.Order_SizeChanged); this.PanelInfor.ResumeLayout(false); this.PanelInfor.PerformLayout(); this.panelBottom.ResumeLayout(false); this.ResumeLayout(false); }
protected override IntPtr OnCreateChild() { m_windowUI = new System.Windows.Forms.Integration.ElementHost(); m_windowUI.Child = new DockableWindowDistanceAndDirection(); return m_windowUI.Handle; }
private void xInfoViewerToolStripMenuItem_Click(object sender, EventArgs e) { if (iv != null) { iv.Close(); iv.Dispose(); } iv = new Form(); System.Windows.Forms.Integration.ElementHost H = new System.Windows.Forms.Integration.ElementHost(); H.Dock = DockStyle.Fill; H.Child = new xInfoElement(); iv.Controls.Add(H); iv.Show(this); }
private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain)); this.pnlSearch = new System.Windows.Forms.Panel(); this.pnlSearchOptions = new System.Windows.Forms.Panel(); this.PanelOptionsContainer = new System.Windows.Forms.Panel(); this.lblContextLines = new System.Windows.Forms.Label(); this.txtContextLines = new System.Windows.Forms.NumericUpDown(); this.chkWholeWordOnly = new System.Windows.Forms.CheckBox(); this.chkRegularExpressions = new System.Windows.Forms.CheckBox(); this.chkNegation = new System.Windows.Forms.CheckBox(); this.chkFileNamesOnly = new System.Windows.Forms.CheckBox(); this.chkRecurse = new System.Windows.Forms.CheckBox(); this.chkCaseSensitive = new System.Windows.Forms.CheckBox(); this.lblSearchOptions = new System.Windows.Forms.Label(); this.lnkExclusions = new System.Windows.Forms.LinkLabel(); this.pnlMainSearch = new System.Windows.Forms.Panel(); this.picBrowse = new AstroGrep.Windows.Controls.PictureButton(); this.btnSearch = new Windows.Controls.SplitButton(); this.btnCancel = new System.Windows.Forms.Button(); this.cboFilePath = new System.Windows.Forms.ComboBox(); this.cboFileName = new System.Windows.Forms.ComboBox(); this.cboSearchForText = new System.Windows.Forms.ComboBox(); this.lblSearchText = new System.Windows.Forms.Label(); this.lblFileTypes = new System.Windows.Forms.Label(); this.lblSearchPath = new System.Windows.Forms.Label(); this.lblSearchHeading = new System.Windows.Forms.Label(); this.pnlRightSide = new System.Windows.Forms.Panel(); this.txtHits = new AstroGrep.Windows.Controls.TextEditorEx(); this.textElementHost = new System.Windows.Forms.Integration.ElementHost(); this.splitUpDown = new System.Windows.Forms.Splitter(); this.lstFileNames = new System.Windows.Forms.ListView(); this.fileLstMnu = new System.Windows.Forms.ContextMenu(); this.CopyMenuItem = new System.Windows.Forms.MenuItem(); this.menuItem4 = new System.Windows.Forms.MenuItem(); this.OpenMenuItem = new System.Windows.Forms.MenuItem(); this.OpenFolderMenuItem = new System.Windows.Forms.MenuItem(); this.OpenWithAssociatedApp = new System.Windows.Forms.MenuItem(); this.CopyNameMenuItem = new System.Windows.Forms.MenuItem(); this.CopyLocatedInMenuItem = new System.Windows.Forms.MenuItem(); this.CopyLocatedInAndNameMenuItem = new System.Windows.Forms.MenuItem(); this.menuItem2 = new System.Windows.Forms.MenuItem(); this.DeleteMenuItem = new System.Windows.Forms.MenuItem(); this.splitLeftRight = new System.Windows.Forms.Splitter(); this.stbStatus = new System.Windows.Forms.StatusStrip(); this.sbStatusPanel = new System.Windows.Forms.ToolStripStatusLabel(); this.sbEncodingPanel = new System.Windows.Forms.ToolStripStatusLabel(); this.sbTotalCountPanel = new System.Windows.Forms.ToolStripStatusLabel(); this.sbFileCountPanel = new System.Windows.Forms.ToolStripStatusLabel(); this.sbFilterCountPanel = new System.Windows.Forms.ToolStripStatusLabel(); this.sbErrorCountPanel = new System.Windows.Forms.ToolStripStatusLabel(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.ListViewImageList = new System.Windows.Forms.ImageList(this.components); this.FileOperationsMenuItem = new System.Windows.Forms.MenuItem(); this.FileCopyMenuItem = new System.Windows.Forms.MenuItem(); this.FileDeleteMenuItem = new System.Windows.Forms.MenuItem(); this.menuItem6 = new System.Windows.Forms.MenuItem(); this.ctxMenuBtnSearch = new System.Windows.Forms.ContextMenu(); this.MenuBtnSearch = new MenuItem(); this.chkAllResultsAfterSearch = new CheckBox(); this.MainMenu = new MenuStrip(); this.FileMenu = new ToolStripMenuItem(); this.NewWindowMenuItem = new ToolStripMenuItem(); this.FileSep1Separator = new ToolStripSeparator(); this.SelectPathMenuItem = new ToolStripMenuItem(); this.FileSep2Separator = new ToolStripSeparator(); this.SaveResultsMenuItem = new ToolStripMenuItem(); this.PrintResultsMenuItem = new ToolStripMenuItem(); this.FileSep3Separator = new ToolStripSeparator(); this.ExitMenuItem = new ToolStripMenuItem(); this.EditMenu = new ToolStripMenuItem(); this.SelectAllMenuItem = new ToolStripMenuItem(); this.OpenSelectedMenuItem = new ToolStripMenuItem(); this.ViewMenu = new ToolStripMenuItem(); this.StatusMessageMenuItem = new ToolStripMenuItem(); this.ExclusionMessageMenuItem = new ToolStripMenuItem(); this.ErrorMessageMenuItem = new ToolStripMenuItem(); this.AllMessageMenuItem = new ToolStripMenuItem(); this.ViewSep1Separator = new ToolStripSeparator(); this.ZoomMenuItem = new ToolStripMenuItem(); this.ZoomInMenuItem = new ToolStripMenuItem(); this.ZoomOutMenuItem = new ToolStripMenuItem(); this.ZoomRestoreMenuItem = new ToolStripMenuItem(); this.LineNumbersMenuItem = new ToolStripMenuItem(); this.WordWrapMenuItem = new ToolStripMenuItem(); this.RemoveWhiteSpaceMenuItem = new ToolStripMenuItem(); this.EntireFileMenuItem = new ToolStripMenuItem(); this.ViewSep2Separator = new ToolStripSeparator(); this.AllResultsMenuItem = new ToolStripMenuItem(); this.ToolsMenu = new ToolStripMenuItem(); this.ClearMRUMenuItem = new ToolStripMenuItem(); this.ClearMRUPathsMenuItem = new ToolStripMenuItem(); this.ClearMRUTypesMenuItem = new ToolStripMenuItem(); this.ClearMRUTextsMenuItem = new ToolStripMenuItem(); this.ClearMRUSep1Separator = new ToolStripSeparator(); this.ClearMRUAllMenuItem = new ToolStripMenuItem(); this.ToolsSep1Separator = new ToolStripSeparator(); this.SaveSearchOptionsMenuItem = new ToolStripMenuItem(); this.OptionsMenuItem = new ToolStripMenuItem(); this.HelpMenu = new ToolStripMenuItem(); this.ViewHelpMenuItem = new ToolStripMenuItem(); this.ViewRegExHelpMenuItem = new ToolStripMenuItem(); this.LogFileMenuItem = new ToolStripMenuItem(); this.HelpSep1Separator = new ToolStripSeparator(); this.CheckForUpdateMenuItem = new ToolStripMenuItem(); this.HelpSep2Separator = new ToolStripSeparator(); this.AboutMenuItem = new ToolStripMenuItem(); this.MainMenu.SuspendLayout(); this.pnlSearch.SuspendLayout(); this.pnlSearchOptions.SuspendLayout(); this.txtHits.BeginInit(); this.PanelOptionsContainer.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.txtContextLines)).BeginInit(); this.pnlMainSearch.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.picBrowse)).BeginInit(); this.pnlRightSide.SuspendLayout(); this.SuspendLayout(); this.MenuBtnSearch.Text = "Search in results"; this.MenuBtnSearch.Click += mnuSearchInResults_Click; this.ctxMenuBtnSearch.MenuItems.Add(this.MenuBtnSearch); this.MainMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.FileMenu, this.EditMenu, this.ViewMenu, this.ToolsMenu, this.HelpMenu}); this.MainMenu.Location = new System.Drawing.Point(0, 0); this.MainMenu.Name = "MainMenu"; this.MainMenu.Size = new System.Drawing.Size(1036, 24); this.MainMenu.TabIndex = 0; this.MainMenu.Text = "MainMenu"; this.FileMenu.Name = "FileMenu"; this.FileMenu.Text = "File"; this.FileMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { NewWindowMenuItem, FileSep1Separator, SelectPathMenuItem, FileSep2Separator, SaveResultsMenuItem, PrintResultsMenuItem, FileSep3Separator, ExitMenuItem}); this.FileMenu.DropDownOpening += FileMenu_DropDownOpening; this.NewWindowMenuItem.Click += NewWindowMenuItem_Click; this.NewWindowMenuItem.ShortcutKeys = Keys.Control | Keys.N; this.NewWindowMenuItem.Text = "&New Window"; this.SelectPathMenuItem.ShortcutKeys = Keys.Control | Keys.O; this.SelectPathMenuItem.Text = "Select Sea&rch Path..."; this.SelectPathMenuItem.Click += SelectPathMenuItem_Click; this.SaveResultsMenuItem.ShortcutKeys = Keys.Control | Keys.S; this.SaveResultsMenuItem.Text = "&Save Results"; this.SaveResultsMenuItem.Click += SaveResultsMenuItem_Click; this.PrintResultsMenuItem.ShortcutKeys = Keys.Control | Keys.P; this.PrintResultsMenuItem.Text = "&Print Results"; this.PrintResultsMenuItem.Click += PrintResultsMenuItem_Click; this.ExitMenuItem.Click += ExitMenuItem_Click; this.ExitMenuItem.ShortcutKeys = Keys.Control | Keys.Q; this.ExitMenuItem.Text = "E&xit"; this.EditMenu.Text = "Edit"; this.EditMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { SelectAllMenuItem, OpenSelectedMenuItem}); this.EditMenu.DropDownOpening += EditMenu_DropDownOpening; this.SelectAllMenuItem.Text = "&Select All Files"; this.SelectAllMenuItem.Click += SelectAllMenuItem_Click; this.OpenSelectedMenuItem.Text = "&Open Selected Files"; this.OpenSelectedMenuItem.Click += OpenSelectedMenuItem_Click; this.ViewMenu.Name = "ViewMenu"; this.ViewMenu.Text = "View"; this.ViewMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { StatusMessageMenuItem, ExclusionMessageMenuItem, ErrorMessageMenuItem, AllMessageMenuItem, ViewSep1Separator, ZoomMenuItem, LineNumbersMenuItem, WordWrapMenuItem, RemoveWhiteSpaceMenuItem, EntireFileMenuItem, ViewSep2Separator, AllResultsMenuItem}); this.ViewMenu.DropDownOpening += ViewMenu_DropDownOpening; this.ZoomMenuItem.Name = "ZoomMenuItem"; this.ZoomMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { ZoomInMenuItem, ZoomOutMenuItem, ZoomRestoreMenuItem}); this.ZoomMenuItem.Text = "Zoom"; this.StatusMessageMenuItem.Text = "&Status Messages"; this.StatusMessageMenuItem.Click += StatusMessageMenuItem_Click; this.ExclusionMessageMenuItem.Text = "&Exclusion Messages"; this.ExclusionMessageMenuItem.Click += ExclusionMessageMenuItem_Click; this.ErrorMessageMenuItem.Text = "E&rror Messages"; this.ErrorMessageMenuItem.Click += ErrorMessageMenuItem_Click; this.AllMessageMenuItem.Text = "&All Messages"; this.AllMessageMenuItem.Click += AllMessageMenuItem_Click; this.LineNumbersMenuItem.Text = "Line Numbers"; this.LineNumbersMenuItem.Click += LineNumbersMenuItem_Click; this.WordWrapMenuItem.Text = "Word Wrap"; this.WordWrapMenuItem.Click += WordWrapMenuItem_Click; this.RemoveWhiteSpaceMenuItem.Text = "Remove Leading White Space"; this.RemoveWhiteSpaceMenuItem.Click += RemoveWhiteSpaceMenuItem_Click; this.EntireFileMenuItem.Text = "Entire File"; this.EntireFileMenuItem.Click += EntireFileMenuItem_Click; this.AllResultsMenuItem.Text = "All Results"; this.AllResultsMenuItem.Click += AllResultsMenuItem_Click; this.ZoomInMenuItem.Text = "Zoom In (Ctrl+Mouse Wheel Up)"; this.ZoomInMenuItem.Click += ZoomInMenuItem_Click; this.ZoomInMenuItem.ShortcutKeys = Keys.Control | Keys.Add; this.ZoomInMenuItem.ShortcutKeyDisplayString = "Ctrl+Num +"; this.ZoomOutMenuItem.Text = "Zoom Out (Ctrl+Mouse Wheel Down)"; this.ZoomOutMenuItem.Click += ZoomOutMenuItem_Click; this.ZoomOutMenuItem.ShortcutKeys = Keys.Control | Keys.Subtract; this.ZoomOutMenuItem.ShortcutKeyDisplayString = "Ctrl+Num -"; this.ZoomRestoreMenuItem.Text = "Restore Default Zoom"; this.ZoomRestoreMenuItem.Click += ZoomRestoreMenuItem_Click; this.ZoomRestoreMenuItem.ShortcutKeys = Keys.Control | Keys.Divide; this.ZoomRestoreMenuItem.ShortcutKeyDisplayString = "Ctrl+Num /"; this.ToolsMenu.Name = "ToolsMenu"; this.ToolsMenu.Text = "Tools"; this.ToolsMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { ClearMRUMenuItem, ToolsSep1Separator, SaveSearchOptionsMenuItem, OptionsMenuItem}); this.ClearMRUMenuItem.Text = "&Clear Most Recently Used Lists"; this.ClearMRUMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { ClearMRUPathsMenuItem, ClearMRUTypesMenuItem, ClearMRUTextsMenuItem, ClearMRUSep1Separator, ClearMRUAllMenuItem}); this.ClearMRUPathsMenuItem.Text = "&Search Paths"; this.ClearMRUPathsMenuItem.Click += ClearMRUPathsMenuItem_Click; this.ClearMRUTypesMenuItem.Text = "&File Types"; this.ClearMRUTypesMenuItem.Click += ClearMRUTypesMenuItem_Click; this.ClearMRUTextsMenuItem.Text = "Search &Text"; this.ClearMRUTextsMenuItem.Click += ClearMRUTextsMenuItem_Click; this.ClearMRUAllMenuItem.Text = "&All"; this.ClearMRUAllMenuItem.Click += ClearMRUAllMenuItem_Click; this.SaveSearchOptionsMenuItem.Text = "&Save Search Options"; this.SaveSearchOptionsMenuItem.Click += SaveSearchOptionsMenuItem_Click; this.OptionsMenuItem.ShortcutKeys = Keys.F9; this.OptionsMenuItem.Text = "&Options..."; this.OptionsMenuItem.Click += OptionsMenuItem_Click; this.HelpMenu.Name = "HelpMenu"; this.HelpMenu.Text = "&Help"; this.HelpMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { ViewHelpMenuItem, ViewRegExHelpMenuItem, LogFileMenuItem, HelpSep1Separator, CheckForUpdateMenuItem, HelpSep2Separator, AboutMenuItem}); this.ViewHelpMenuItem.Text = "&View Help"; this.ViewHelpMenuItem.ShortcutKeys = Keys.F1; this.ViewHelpMenuItem.Click += ViewHelpMenuItem_Click; this.ViewRegExHelpMenuItem.Text = "&Regular Expressions"; this.ViewRegExHelpMenuItem.Click += ViewRegExHelpMenuItem_Click; this.LogFileMenuItem.Text = "&Log File"; this.LogFileMenuItem.Click += LogFileMenuItem_Click; this.CheckForUpdateMenuItem.Text = "&Check for Updates..."; this.CheckForUpdateMenuItem.Click += CheckForUpdateMenuItem_Click; this.AboutMenuItem.Text = "&About AstroGrep"; this.AboutMenuItem.Click += AboutMenuItem_Click; // // pnlSearch // this.pnlSearch.AutoScroll = true; this.pnlSearch.BackColor = System.Drawing.SystemColors.Window; this.pnlSearch.Controls.Add(this.pnlSearchOptions); this.pnlSearch.Controls.Add(this.pnlMainSearch); this.pnlSearch.Dock = System.Windows.Forms.DockStyle.Left; this.pnlSearch.Location = new System.Drawing.Point(0, 0); this.pnlSearch.Name = "pnlSearch"; this.pnlSearch.Size = new System.Drawing.Size(240, 430); this.pnlSearch.TabIndex = 0; this.pnlSearch.SizeChanged += pnlSearch_SizeChanged; // // pnlSearchOptions // this.pnlSearchOptions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.pnlSearchOptions.Controls.Add(this.PanelOptionsContainer); this.pnlSearchOptions.Controls.Add(this.lblSearchOptions); this.pnlSearchOptions.Location = new System.Drawing.Point(16, 209); this.pnlSearchOptions.Name = "pnlSearchOptions"; this.pnlSearchOptions.Size = new System.Drawing.Size(200, 270); this.pnlSearchOptions.Padding = new Padding(0, 15, 0, 0); this.pnlSearchOptions.TabIndex = 1; // // PanelOptionsContainer // this.PanelOptionsContainer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.PanelOptionsContainer.Controls.Add(this.lnkExclusions); this.PanelOptionsContainer.Controls.Add(this.lblContextLines); this.PanelOptionsContainer.Controls.Add(this.chkAllResultsAfterSearch); this.PanelOptionsContainer.Controls.Add(this.txtContextLines); this.PanelOptionsContainer.Controls.Add(this.chkWholeWordOnly); this.PanelOptionsContainer.Controls.Add(this.chkRegularExpressions); this.PanelOptionsContainer.Controls.Add(this.chkNegation); this.PanelOptionsContainer.Controls.Add(this.chkFileNamesOnly); this.PanelOptionsContainer.Controls.Add(this.chkRecurse); this.PanelOptionsContainer.Controls.Add(this.chkCaseSensitive); this.PanelOptionsContainer.Location = new System.Drawing.Point(0, 40); this.PanelOptionsContainer.Name = "PanelOptionsContainer"; this.PanelOptionsContainer.Size = new System.Drawing.Size(200, 240); this.PanelOptionsContainer.TabIndex = 1; // // lblContextLines // this.lblContextLines.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.lblContextLines.FlatStyle = System.Windows.Forms.FlatStyle.System; this.lblContextLines.Location = new System.Drawing.Point(56, 177); this.lblContextLines.Name = "lblContextLines"; this.lblContextLines.Size = new System.Drawing.Size(127, 20); this.lblContextLines.TabIndex = 8; this.lblContextLines.Text = "Context Lines"; this.lblContextLines.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.toolTip1.SetToolTip(this.lblContextLines, "Show lines above and below the word matched"); // // chkAllResultsAfterSearch // this.chkAllResultsAfterSearch.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.chkAllResultsAfterSearch.FlatStyle = System.Windows.Forms.FlatStyle.System; this.chkAllResultsAfterSearch.Location = new System.Drawing.Point(7, 152); this.chkAllResultsAfterSearch.Name = "chkAllResultsAfterSearch"; this.chkAllResultsAfterSearch.Size = new System.Drawing.Size(178, 16); this.chkAllResultsAfterSearch.AutoSize = true; this.chkAllResultsAfterSearch.TabIndex = 8; this.chkAllResultsAfterSearch.Text = "&Show all results after search"; this.toolTip1.SetToolTip(this.chkAllResultsAfterSearch, "Shows all the results together in the preview after a search."); // // txtContextLines // this.txtContextLines.Location = new System.Drawing.Point(7, 177); this.txtContextLines.Name = "txtContextLines"; this.txtContextLines.Size = new System.Drawing.Size(41, 20); this.txtContextLines.TabIndex = 13; this.toolTip1.SetToolTip(this.txtContextLines, "Show lines above and below the word matched"); // // chkWholeWordOnly // this.chkWholeWordOnly.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.chkWholeWordOnly.FlatStyle = System.Windows.Forms.FlatStyle.System; this.chkWholeWordOnly.Location = new System.Drawing.Point(7, 56); this.chkWholeWordOnly.Name = "chkWholeWordOnly"; this.chkWholeWordOnly.Size = new System.Drawing.Size(178, 16); this.chkWholeWordOnly.AutoSize = true; this.chkWholeWordOnly.TabIndex = 8; this.chkWholeWordOnly.Text = "&Whole Word"; this.toolTip1.SetToolTip(this.chkWholeWordOnly, "Only match entire words (not parts of words)"); // // chkRegularExpressions // this.chkRegularExpressions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.chkRegularExpressions.FlatStyle = System.Windows.Forms.FlatStyle.System; this.chkRegularExpressions.Location = new System.Drawing.Point(7, 8); this.chkRegularExpressions.Name = "chkRegularExpressions"; this.chkRegularExpressions.Size = new System.Drawing.Size(178, 16); this.chkRegularExpressions.AutoSize = true; this.chkRegularExpressions.TabIndex = 6; this.chkRegularExpressions.Text = "Regular &Expressions"; this.toolTip1.SetToolTip(this.chkRegularExpressions, "Use \"regular expression\" matching"); // // chkNegation // this.chkNegation.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.chkNegation.FlatStyle = System.Windows.Forms.FlatStyle.System; this.chkNegation.Location = new System.Drawing.Point(7, 128); this.chkNegation.Name = "chkNegation"; this.chkNegation.Size = new System.Drawing.Size(178, 16); this.chkNegation.AutoSize = true; this.chkNegation.TabIndex = 11; this.chkNegation.Text = "&Negation"; this.chkNegation.CheckedChanged += chkNegation_CheckedChanged; this.toolTip1.SetToolTip(this.chkNegation, "Find the files without the Search Text in them"); // // chkFileNamesOnly // this.chkFileNamesOnly.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.chkFileNamesOnly.FlatStyle = System.Windows.Forms.FlatStyle.System; this.chkFileNamesOnly.Location = new System.Drawing.Point(7, 104); this.chkFileNamesOnly.Name = "chkFileNamesOnly"; this.chkFileNamesOnly.Size = new System.Drawing.Size(178, 16); this.chkFileNamesOnly.AutoSize = true; this.chkFileNamesOnly.TabIndex = 10; this.chkFileNamesOnly.Text = "Show File Names &Only"; this.chkFileNamesOnly.CheckedChanged += chkFileNamesOnly_CheckedChanged; this.toolTip1.SetToolTip(this.chkFileNamesOnly, "Show names but not contents of files that have matches (may be faster on large fi" + "les)"); // // chkRecurse // this.chkRecurse.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.chkRecurse.FlatStyle = System.Windows.Forms.FlatStyle.System; this.chkRecurse.Location = new System.Drawing.Point(7, 80); this.chkRecurse.Name = "chkRecurse"; this.chkRecurse.Size = new System.Drawing.Size(178, 16); this.chkRecurse.AutoSize = true; this.chkRecurse.TabIndex = 9; this.chkRecurse.Text = "&Recurse"; this.toolTip1.SetToolTip(this.chkRecurse, "Search in subdirectories"); // // chkCaseSensitive // this.chkCaseSensitive.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.chkCaseSensitive.FlatStyle = System.Windows.Forms.FlatStyle.System; this.chkCaseSensitive.Location = new System.Drawing.Point(7, 32); this.chkCaseSensitive.Name = "chkCaseSensitive"; this.chkCaseSensitive.Size = new System.Drawing.Size(178, 16); this.chkCaseSensitive.AutoSize = true; this.chkCaseSensitive.TabIndex = 7; this.chkCaseSensitive.Text = "&Case Sensitive"; this.toolTip1.SetToolTip(this.chkCaseSensitive, "Match upper and lower case letters exactly"); // // lblSearchOptions // this.lblSearchOptions.Dock = System.Windows.Forms.DockStyle.Top; this.lblSearchOptions.Location = new System.Drawing.Point(0, 0); this.lblSearchOptions.Name = "lblSearchOptions"; this.lblSearchOptions.Size = new System.Drawing.Size(200, 23); this.lblSearchOptions.TabIndex = 5; this.lblSearchOptions.Text = "Search Options"; this.lblSearchOptions.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.lblSearchOptions.BackColor = SystemColors.Window; this.lblSearchOptions.ForeColor = AstroGrep.Common.ProductInformation.ApplicationColor; this.lblSearchOptions.Padding = new Padding(0, 0, 0, 2); this.lblSearchOptions.Paint += lblSearchOptions_Paint; // // lnkExclusions // this.lnkExclusions.ActiveLinkColor = System.Drawing.SystemColors.HotTrack; this.lnkExclusions.FlatStyle = System.Windows.Forms.FlatStyle.System; this.lnkExclusions.LinkColor = System.Drawing.SystemColors.HotTrack; this.lnkExclusions.Location = new System.Drawing.Point(5, 207); this.lnkExclusions.LinkBehavior = LinkBehavior.AlwaysUnderline; this.lnkExclusions.Name = "lnkExclusions"; this.lnkExclusions.Size = new System.Drawing.Size(150, 16); this.lnkExclusions.TabIndex = 24; this.lnkExclusions.TabStop = true; this.lnkExclusions.Text = "Exclusions..."; this.lnkExclusions.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.lnkExclusions.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkExclusions_LinkClicked); this.lnkExclusions.BackColor = SystemColors.Window; // // pnlMainSearch // this.pnlMainSearch.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.pnlMainSearch.Controls.Add(this.picBrowse); this.pnlMainSearch.Controls.Add(this.btnSearch); this.pnlMainSearch.Controls.Add(this.btnCancel); this.pnlMainSearch.Controls.Add(this.cboFilePath); this.pnlMainSearch.Controls.Add(this.cboFileName); this.pnlMainSearch.Controls.Add(this.cboSearchForText); this.pnlMainSearch.Controls.Add(this.lblSearchText); this.pnlMainSearch.Controls.Add(this.lblFileTypes); this.pnlMainSearch.Controls.Add(this.lblSearchPath); this.pnlMainSearch.Controls.Add(this.lblSearchHeading); this.pnlMainSearch.Location = new System.Drawing.Point(16, 9); this.pnlMainSearch.Name = "pnlMainSearch"; this.pnlMainSearch.Size = new System.Drawing.Size(200, 200); this.pnlMainSearch.TabIndex = 0; // // picBrowse // this.picBrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.picBrowse.Cursor = System.Windows.Forms.Cursors.Hand; this.picBrowse.Image = ((System.Drawing.Image)(resources.GetObject("picBrowse.Image"))); this.picBrowse.Location = new System.Drawing.Point(175, 48); this.picBrowse.Name = "picBrowse"; this.picBrowse.Size = new System.Drawing.Size(16, 16); this.picBrowse.TabIndex = 6; this.picBrowse.TabStop = false; this.picBrowse.Click += new System.EventHandler(this.picBrowse_Click); // // btnSearch // this.btnSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left))); this.btnSearch.BackColor = System.Drawing.SystemColors.Control; this.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.Standard; this.btnSearch.ShowSplit = true; this.btnSearch.Location = new System.Drawing.Point(7, 172); this.btnSearch.Name = "btnSearch"; this.btnSearch.Size = new System.Drawing.Size(80, 23); this.btnSearch.TabIndex = 0; this.btnSearch.Text = "&Search"; this.btnSearch.UseVisualStyleBackColor = false; this.btnSearch.Click += new EventHandler(btnSearch_Click); this.btnSearch.ContextMenu = ctxMenuBtnSearch; this.btnSearch.ContextMenu.MenuItems[0].Enabled = false; // // btnCancel // this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnCancel.BackColor = System.Drawing.SystemColors.Control; this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.btnCancel.Enabled = false; this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.System; this.btnCancel.Location = new System.Drawing.Point(111, 172); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(80, 23); this.btnCancel.TabIndex = 4; this.btnCancel.Text = "&Cancel"; this.btnCancel.UseVisualStyleBackColor = false; this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); // // cboFilePath // this.cboFilePath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.cboFilePath.Location = new System.Drawing.Point(8, 46); this.cboFilePath.Name = "cboFilePath"; this.cboFilePath.Size = new System.Drawing.Size(154, 21); this.cboFilePath.TabIndex = 1; this.cboFilePath.DropDown += cboFilePath_DropDown; this.cboFilePath.DragDrop += cboFilePath_DragDrop; this.cboFilePath.DragEnter += cboFilePath_DragEnter; this.cboFilePath.AllowDrop = true; // // cboFileName // this.cboFileName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.cboFileName.Location = new System.Drawing.Point(8, 94); this.cboFileName.Name = "cboFileName"; this.cboFileName.Size = new System.Drawing.Size(180, 21); this.cboFileName.TabIndex = 2; this.cboFileName.DropDown += cboFileName_DropDown; // // cboSearchForText // this.cboSearchForText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.cboSearchForText.Location = new System.Drawing.Point(8, 140); this.cboSearchForText.Name = "cboSearchForText"; this.cboSearchForText.Size = new System.Drawing.Size(180, 21); this.cboSearchForText.TabIndex = 3; this.cboSearchForText.DropDown += cboSearchForText_DropDown; // // lblSearchText // this.lblSearchText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.lblSearchText.FlatStyle = System.Windows.Forms.FlatStyle.System; this.lblSearchText.Location = new System.Drawing.Point(8, 124); this.lblSearchText.Name = "lblSearchText"; this.lblSearchText.Size = new System.Drawing.Size(163, 16); this.lblSearchText.AutoSize = true; this.lblSearchText.TabIndex = 3; this.lblSearchText.Text = "Search Text"; // // lblFileTypes // this.lblFileTypes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.lblFileTypes.FlatStyle = System.Windows.Forms.FlatStyle.System; this.lblFileTypes.Location = new System.Drawing.Point(8, 78); this.lblFileTypes.Name = "lblFileTypes"; this.lblFileTypes.Size = new System.Drawing.Size(163, 16); this.lblFileTypes.AutoSize = true; this.lblFileTypes.TabIndex = 2; this.lblFileTypes.Text = "File Types"; this.lblFileTypes.Padding = new Padding(8, 0, 0, 0); // // lblSearchPath // this.lblSearchPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.lblSearchPath.FlatStyle = System.Windows.Forms.FlatStyle.System; this.lblSearchPath.Location = new System.Drawing.Point(8, 30); this.lblSearchPath.Name = "lblSearchPath"; this.lblSearchPath.Size = new System.Drawing.Size(163, 16); this.lblSearchPath.AutoSize = true; this.lblSearchPath.TabIndex = 1; this.lblSearchPath.Text = "Search Path"; // // lblSearchHeading // this.lblSearchHeading.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.lblSearchHeading.BackColor = System.Drawing.SystemColors.ActiveCaption; this.lblSearchHeading.ForeColor = System.Drawing.SystemColors.ActiveCaptionText; this.lblSearchHeading.Location = new System.Drawing.Point(1, 0); this.lblSearchHeading.Name = "lblSearchHeading"; this.lblSearchHeading.Size = new System.Drawing.Size(199, 23); this.lblSearchHeading.TabIndex = 0; this.lblSearchHeading.Text = "AstroGrep Search"; this.lblSearchHeading.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.lblSearchHeading.BackColor = SystemColors.Window; this.lblSearchHeading.ForeColor = AstroGrep.Common.ProductInformation.ApplicationColor; this.lblSearchHeading.Paint += lblSearchHeading_Paint; this.lblSearchHeading.Padding = new Padding(0, 0, 0, 4); // // pnlRightSide // this.pnlRightSide.Controls.Add(this.textElementHost); this.pnlRightSide.Controls.Add(this.splitUpDown); this.pnlRightSide.Controls.Add(this.lstFileNames); this.pnlRightSide.Dock = System.Windows.Forms.DockStyle.Fill; this.pnlRightSide.Location = new System.Drawing.Point(240, 0); this.pnlRightSide.Name = "pnlRightSide"; this.pnlRightSide.Padding = new System.Windows.Forms.Padding(2, 0, 0, 0); this.pnlRightSide.Size = new System.Drawing.Size(544, 430); this.pnlRightSide.BackColor = SystemColors.Window; this.pnlRightSide.TabIndex = 1; // // textElementHost // this.textElementHost.Dock = System.Windows.Forms.DockStyle.Fill; this.textElementHost.Location = new System.Drawing.Point(8, 200); this.textElementHost.Size = new System.Drawing.Size(536, 230); this.textElementHost.TabIndex = 1; this.textElementHost.Child = this.txtHits; // // txtHits // this.txtHits.Name = "txtHits"; this.txtHits.HorizontalScrollBarVisibility = System.Windows.Controls.ScrollBarVisibility.Auto; this.txtHits.VerticalScrollBarVisibility = System.Windows.Controls.ScrollBarVisibility.Auto; this.txtHits.PreviewMouseDoubleClick += txtHits_PreviewMouseDoubleClick; // // splitUpDown // this.splitUpDown.Dock = System.Windows.Forms.DockStyle.Top; this.splitUpDown.Location = new System.Drawing.Point(8, 192); this.splitUpDown.Name = "splitUpDown"; this.splitUpDown.Size = new System.Drawing.Size(536, 2); this.splitUpDown.TabIndex = 2; this.splitUpDown.TabStop = false; this.splitUpDown.Cursor = Cursors.SizeNS; this.splitUpDown.BackColor = SystemColors.Control; // // lstFileNames // this.lstFileNames.ContextMenu = this.fileLstMnu; this.lstFileNames.Dock = System.Windows.Forms.DockStyle.Top; this.lstFileNames.FullRowSelect = true; this.lstFileNames.HideSelection = false; this.lstFileNames.Location = new System.Drawing.Point(8, 0); this.lstFileNames.Name = "lstFileNames"; this.lstFileNames.Size = new System.Drawing.Size(536, 192); this.lstFileNames.TabIndex = 0; this.lstFileNames.UseCompatibleStateImageBehavior = false; this.lstFileNames.View = System.Windows.Forms.View.Details; this.lstFileNames.SelectedIndexChanged += new System.EventHandler(this.lstFileNames_SelectedIndexChanged); this.lstFileNames.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lstFileNames_KeyDown); this.lstFileNames.SmallImageList = ListViewImageList; this.lstFileNames.BorderStyle = BorderStyle.None; this.lstFileNames.Enter += lstFileNames_Enter; this.lstFileNames.Leave += lstFileNames_Leave; this.lstFileNames.MouseDown += lstFileNames_MouseDown; this.lstFileNames.ColumnClick += lstFileNames_ColumnClick; this.lstFileNames.ItemDrag += lstFileNames_ItemDrag; // // fileLstMnu // this.fileLstMnu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.CopyMenuItem, this.CopyNameMenuItem, this.CopyLocatedInMenuItem, this.CopyLocatedInAndNameMenuItem, this.menuItem4, this.FileOperationsMenuItem, this.menuItem6, this.OpenMenuItem, this.OpenFolderMenuItem, this.OpenWithAssociatedApp, this.menuItem2, this.DeleteMenuItem}); // // CopyMenuItem // this.CopyMenuItem.Index = 0; this.CopyMenuItem.Text = "Copy All"; this.CopyMenuItem.Click += new System.EventHandler(this.CopyMenuItem_Click); // // CopyNameMenuItem // this.CopyNameMenuItem.Index = 1; this.CopyNameMenuItem.Text = "Copy Name"; this.CopyNameMenuItem.Click += new System.EventHandler(this.CopyNameMenuItem_Click); // // CopyLocatedInMenuItem // this.CopyLocatedInMenuItem.Index = 2; this.CopyLocatedInMenuItem.Text = "Copy Located In"; this.CopyLocatedInMenuItem.Click += new System.EventHandler(this.CopyLocatedInMenuItem_Click); // // CopyLocatedInAndNameMenuItem // this.CopyLocatedInAndNameMenuItem.Index = 3; this.CopyLocatedInAndNameMenuItem.Text = "Copy Located In + Name"; this.CopyLocatedInAndNameMenuItem.Click += new System.EventHandler(this.CopyLocatedInAndNameMenuItem_Click); // // menuItem4 // this.menuItem4.Index = 4; this.menuItem4.Text = "-"; // // OpenMenuItem // this.OpenMenuItem.Index = 7; this.OpenMenuItem.Text = "Open File"; this.OpenMenuItem.Click += new System.EventHandler(this.OpenMenuItem_Click); // // OpenFolderMenuItem // this.OpenFolderMenuItem.Index = 8; this.OpenFolderMenuItem.Text = "Open Directory"; this.OpenFolderMenuItem.Click += new System.EventHandler(this.OpenFolderMenuItem_Click); // // OpenWithAssociatedApp // this.OpenWithAssociatedApp.Index = 9; this.OpenWithAssociatedApp.Text = "Open With Associated App"; this.OpenWithAssociatedApp.Click += new System.EventHandler(this.OpenWithAssociatedApp_Click); // // menuItem2 // this.menuItem2.Index = 10; this.menuItem2.Text = "-"; // // DeleteMenuItem // this.DeleteMenuItem.Index = 11; this.DeleteMenuItem.Text = "Remove from list"; this.DeleteMenuItem.Click += new System.EventHandler(this.DeleteMenuItem_Click); // // splitLeftRight // this.splitLeftRight.Location = new System.Drawing.Point(240, 0); this.splitLeftRight.MinExtra = 100; this.splitLeftRight.MinSize = 290; this.splitLeftRight.Name = "splitLeftRight"; this.splitLeftRight.Size = new System.Drawing.Size(2, 430); this.splitLeftRight.TabIndex = 2; this.splitLeftRight.TabStop = false; this.splitLeftRight.Cursor = Cursors.SizeWE; // // stbStatus // this.stbStatus.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.sbStatusPanel, this.sbEncodingPanel, this.sbTotalCountPanel, this.sbFileCountPanel, this.sbFilterCountPanel, this.sbErrorCountPanel}); this.stbStatus.Location = new System.Drawing.Point(0, 609); this.stbStatus.Name = "stbStatus"; this.stbStatus.Size = new System.Drawing.Size(795, 22); this.stbStatus.TabIndex = 1; this.stbStatus.ShowItemToolTips = true; // // sbStatusPanel // this.sbStatusPanel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.sbStatusPanel.Name = "sbStatusPanel"; this.sbStatusPanel.Size = new System.Drawing.Size(648, 17); this.sbStatusPanel.Spring = true; this.sbStatusPanel.DoubleClickEnabled = true; this.sbStatusPanel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // sbEncodingPanel // this.sbEncodingPanel.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right; this.sbEncodingPanel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.sbEncodingPanel.Name = "sbEncodingPanel"; this.sbEncodingPanel.Size = new System.Drawing.Size(48, 17); this.sbEncodingPanel.Text = string.Empty; // // sbTotalCountPanel // this.sbTotalCountPanel.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right; this.sbTotalCountPanel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.sbTotalCountPanel.Name = "sbTotalCountPanel"; this.sbTotalCountPanel.Size = new System.Drawing.Size(48, 17); this.sbTotalCountPanel.Text = "Total: 0"; // // sbFileCountPanel // this.sbFileCountPanel.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right; this.sbFileCountPanel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.sbFileCountPanel.Name = "sbFileCountPanel"; this.sbFileCountPanel.Size = new System.Drawing.Size(40, 17); this.sbFileCountPanel.Text = "File: 0"; // // sbFilterCountPanel // this.sbFilterCountPanel.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right; this.sbFilterCountPanel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.sbFilterCountPanel.Name = "sbFilterCountPanel"; this.sbFilterCountPanel.Size = new System.Drawing.Size(47, 17); this.sbFilterCountPanel.Text = "Exclusions: 0"; this.sbFilterCountPanel.DoubleClickEnabled = true; this.sbFilterCountPanel.ToolTipText = "Double click to display exclusions."; this.sbFilterCountPanel.DoubleClick += new EventHandler(sbFilterCountPanel_DoubleClick); // // sbErrorCountPanel // this.sbErrorCountPanel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.sbErrorCountPanel.Name = "sbErrorCountPanel"; this.sbErrorCountPanel.Size = new System.Drawing.Size(44, 17); this.sbErrorCountPanel.Text = "Error: 0"; this.sbErrorCountPanel.DoubleClickEnabled = true; this.sbErrorCountPanel.ToolTipText = "Double click to display errors."; this.sbErrorCountPanel.DoubleClick += new EventHandler(sbErrorCountPanel_DoubleClick); // // FileOperationsMenuItem // this.FileOperationsMenuItem.Index = 5; this.FileOperationsMenuItem.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.FileCopyMenuItem, this.FileDeleteMenuItem}); this.FileOperationsMenuItem.Text = "File Operations"; // // FileCopyMenuItem // this.FileCopyMenuItem.Index = 0; this.FileCopyMenuItem.Text = "Copy"; this.FileCopyMenuItem.Click += new System.EventHandler(this.FileCopyMenuItem_Click); // // FileDeleteMenuItem // this.FileDeleteMenuItem.Index = 1; this.FileDeleteMenuItem.Text = "Delete"; this.FileDeleteMenuItem.Click += new System.EventHandler(this.FileDeleteMenuItem_Click); // // menuItem6 // this.menuItem6.Index = 6; this.menuItem6.Text = "-"; // // ListViewImageList // this.ListViewImageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("ListViewImageList.ImageStream"))); this.ListViewImageList.TransparentColor = System.Drawing.Color.Transparent; this.ListViewImageList.Images.SetKeyName(0, ""); this.ListViewImageList.Images.SetKeyName(1, ""); // // frmMain // this.AcceptButton = this.btnSearch; this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.CancelButton = this.btnCancel; this.ClientSize = new System.Drawing.Size(784, 456); this.MinimumSize = new Size(600, 400); this.Controls.Add(this.splitLeftRight); this.Controls.Add(this.pnlRightSide); this.Controls.Add(this.pnlSearch); this.Controls.Add(this.stbStatus); this.Controls.Add(this.MainMenu); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MainMenuStrip = this.MainMenu; this.Name = "frmMain"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "AstroGrep"; this.Load += new System.EventHandler(this.frmMain_Load); this.Closed += frmMain_Closed; this.txtHits.EndInit(); this.MainMenu.ResumeLayout(false); this.MainMenu.PerformLayout(); this.pnlSearch.ResumeLayout(false); this.pnlSearchOptions.ResumeLayout(false); this.PanelOptionsContainer.ResumeLayout(false); this.PanelOptionsContainer.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.txtContextLines)).EndInit(); this.pnlMainSearch.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.picBrowse)).EndInit(); this.pnlRightSide.ResumeLayout(false); this.ResumeLayout(false); }
private void OpenAttachment(DataTable dt, string versionid, string matterid, string templateid, string versionName, string versionNumber) { try { this.Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action( delegate { var res = from row in dt.AsEnumerable() where (row.Field<string>("Name").Contains(".doc") || row.Field<string>("ContentType").Contains("msword")) select row; if (res.Count() > 1) { AttachmentsView attTemp = new AttachmentsView(); attTemp.Create(dt, versionid, matterid, templateid, versionName, versionNumber); attTemp.Show(); attTemp.Focus(); } else { string attachmentid; foreach (DataRow rw in dt.Rows) { if (rw["Name"].ToString().Contains(".doc")) { byte[] toBytes = Convert.FromBase64String(rw["body"].ToString()); string filename = _d.GetTempFilePath(rw["Id"].ToString() + "_" + rw["Name"].ToString()); File.WriteAllBytes(filename, toBytes); Word.Document doc = Globals.ThisAddIn.Application.Documents.Add(filename); attachmentid = rw["Id"].ToString(); Globals.ThisAddIn.SaveAttachmentId(attachmentid); //Right Panel System.Windows.Forms.Integration.ElementHost elHost = new System.Windows.Forms.Integration.ElementHost(); SForceEdit.CompareSideBar csb = new SForceEdit.CompareSideBar(); csb.Create(filename, versionid, matterid, templateid, versionName, versionNumber, attachmentid); elHost.Child = csb; elHost.Dock = System.Windows.Forms.DockStyle.Fill; System.Windows.Forms.UserControl u = new System.Windows.Forms.UserControl(); u.Controls.Add(elHost); Microsoft.Office.Tools.CustomTaskPane taskPaneValue = Globals.ThisAddIn.CustomTaskPanes.Add(u, "Axiom IRIS Compare", doc.ActiveWindow); taskPaneValue.Visible = true; taskPaneValue.Width = 400; } } } })); } catch (Exception ex) { } }