public OpenWithDialog(IList <DisplayBindingDescriptor> displayBindings, int defaultBindingIndex, string fileExtension) { if (displayBindings == null) { throw new ArgumentNullException("list"); } // The InitializeComponent() call is required for Windows Forms designer support. InitializeComponent(); foreach (Control ctl in this.Controls) { ctl.Text = StringParser.Parse(ctl.Text); } this.Text = StringParser.Parse(this.Text); this.fileExtension = fileExtension; this.defaultBindingIndex = defaultBindingIndex; if (string.IsNullOrEmpty(fileExtension)) { addButton.Enabled = false; } for (int i = 0; i < displayBindings.Count; i++) { programListBox.Items.Add(new ListEntry(displayBindings[i], i == defaultBindingIndex)); } if (defaultBindingIndex < programListBox.Items.Count) { programListBox.SelectedIndex = defaultBindingIndex; } RightToLeftConverter.ConvertRecursive(this); }
public void RedrawAllComponents() { RightToLeftConverter.ConvertRecursive(this); foreach (ToolStripItem item in TopMenu.Items) { if (item is IStatusUpdate) { ((IStatusUpdate)item).UpdateText(); } } foreach (IViewContent content in workbenchContentCollection) { content.RedrawContent(); if (content.WorkbenchWindow != null) { content.WorkbenchWindow.RedrawContent(); } } foreach (PadDescriptor content in viewContentCollection) { content.RedrawContent(); } if (layout != null) { layout.RedrawAllComponents(); } StatusBarService.RedrawStatusbar(); }
public ManagerForm() { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); #if !STANDALONE ICSharpCode.SharpDevelop.Gui.FormLocationHelper.Apply(this, "AddInManager.WindowBounds", true); #endif #if STANDALONE actionFlowLayoutPanel.BackgroundImage = new Bitmap(typeof(ManagerForm).Assembly.GetManifestResourceStream("ICSharpCode.AddInManager.WizardBackground.png")); #else actionFlowLayoutPanel.BackgroundImage = WinFormsResourceService.GetBitmap("GeneralWizardBackground"); #endif installButton.Text = ResourceService.GetString("AddInManager.InstallButton"); uninstallButton.Text = ResourceService.GetString("AddInManager.ActionUninstall"); closeButton.Text = ResourceService.GetString("Global.CloseButtonText"); showPreinstalledAddInsCheckBox.Text = ResourceService.GetString("AddInManager.ShowPreinstalledAddIns"); this.Text = ResourceService.GetString("AddInManager.Title"); RightToLeftConverter.ConvertRecursive(this); CreateAddInList(); }
public void ApplyRightToLeftConverter(Control control, bool recurse) { if (recurse) { RightToLeftConverter.ConvertRecursive(control); } else { RightToLeftConverter.Convert(control); } }
public SelectReferenceDialog(IProject configureProject) { this.configureProject = configureProject; InitializeComponent(); Translate(this); gacTabPage.Controls.Add(new GacReferencePanel(this)); projectTabPage.Controls.Add(new ProjectReferencePanel(this)); browserTabPage.Controls.Add(new AssemblyReferencePanel(this)); comTabPage.Controls.Add(new COMReferencePanel(this)); RightToLeftConverter.ConvertRecursive(this); }
/// <summary> /// Creates the dialog and adds the specified names to the /// list box. /// </summary> public AddXmlNodeDialog(string[] names) { InitializeComponent(); InitStrings(); if (names.Length > 0) { AddNames(names); } else { RemoveNamesListBox(); } RightToLeftConverter.ConvertRecursive(this); }
protected void SetupFromXmlStream(Stream stream) { if (stream == null) { throw new System.ArgumentNullException("stream"); } SuspendLayout(); xmlLoader = new XmlLoader(); SetupXmlLoader(); if (stream != null) { xmlLoader.LoadObjectFromStream(this, stream); } RightToLeftConverter.ConvertRecursive(this); ResumeLayout(false); }
public ManagerForm() { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); installButton.Text = ResourceService.GetString("AddInManager.InstallButton"); //NOXLATE uninstallButton.Text = ResourceService.GetString("AddInManager.ActionUninstall"); //NOXLATE closeButton.Text = ResourceService.GetString("TextClose"); //NOXLATE showPreinstalledAddInsCheckBox.Text = ResourceService.GetString("AddInManager.ShowPreinstalledAddIns"); //NOXLATE this.Text = ResourceService.GetString("AddInManager.Title"); //NOXLATE RightToLeftConverter.ConvertRecursive(this); CreateAddInList(); }
public SearchAndReplaceDialog(SearchAndReplaceMode searchAndReplaceMode) { SuspendLayout(); this.FormBorderStyle = FormBorderStyle.FixedToolWindow; this.ShowInTaskbar = false; this.TopMost = false; this.Text = StringParser.Parse("${res:Dialog.NewProject.SearchReplace.Title}"); this.KeyPreview = true; searchAndReplacePanel = new SearchAndReplacePanel(); searchAndReplacePanel.Dock = DockStyle.Fill; Controls.Add(searchAndReplacePanel); ToolStrip toolStrip = new ToolStrip(); toolStrip.Dock = DockStyle.Top; toolStrip.Stretch = true; toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; searchButton.Text = StringParser.Parse("${res:Dialog.NewProject.SearchReplace.FindDialogName}"); searchButton.Image = IconService.GetBitmap("Icons.16x16.FindIcon"); searchButton.Checked = searchAndReplaceMode == SearchAndReplaceMode.Search; searchButton.Click += new EventHandler(SearchButtonClick); toolStrip.Items.Add(searchButton); replaceButton.Text = StringParser.Parse("${res:Dialog.NewProject.SearchReplace.ReplaceDialogName}"); replaceButton.Image = IconService.GetBitmap("Icons.16x16.ReplaceIcon"); replaceButton.Checked = searchAndReplaceMode == SearchAndReplaceMode.Replace; replaceButton.Click += new EventHandler(ReplaceButtonClick); toolStrip.Items.Add(replaceButton); Controls.Add(toolStrip); RightToLeftConverter.ConvertRecursive(this); this.AutoScaleMode = AutoScaleMode.Dpi; this.AutoScaleDimensions = new SizeF(96, 96); ResumeLayout(); SetSearchAndReplaceMode(); FormLocationHelper.Apply(this, "ICSharpCode.SharpDevelop.Gui.SearchAndReplaceDialog.Location", false); searchKeyboardShortcut = GetKeyboardShortcut(SearchMenuAddInPath, "Find"); replaceKeyboardShortcut = GetKeyboardShortcut(SearchMenuAddInPath, "Replace"); }
protected void SetOptionPanelTo(TreeNode node) { IDialogPanelDescriptor descriptor = node.Tag as IDialogPanelDescriptor; if (descriptor != null && descriptor.DialogPanel != null && descriptor.DialogPanel.Control != null) { if (!OptionPanels.Contains(descriptor.DialogPanel)) { descriptor.DialogPanel.Control.Dock = DockStyle.Fill; OptionPanels.Add(descriptor.DialogPanel); } descriptor.DialogPanel.ReceiveDialogMessage(DialogMessage.Activated); ControlDictionary["optionControlPanel"].Controls.Clear(); RightToLeftConverter.ConvertRecursive(descriptor.DialogPanel.Control); ControlDictionary["optionControlPanel"].Controls.Add(descriptor.DialogPanel.Control); optionsPanelLabel.Text = descriptor.Label; } }