/// ------------------------------------------------------------------------------------ private void InitializeGrid() { _grid = new TextAnnotationEditorGrid(_project.TranscriptionFont, _project.FreeTranslationFont); _grid.TranscriptionFontChanged += font => { _project.TranscriptionFont = font; _project.Save(); }; // SP-873: Translation font not saving _grid.TranslationFontChanged += font => { _project.FreeTranslationFont = font; _project.Save(); }; L10NSharpExtender gridLocExtender = new L10NSharpExtender(); gridLocExtender.LocalizationManagerId = "SayMore"; gridLocExtender.SetLocalizingId(_grid, "TextAnnotationEditorGrid"); gridLocExtender.EndInit(); _grid.Dock = DockStyle.Fill; _splitter.Panel2.Controls.Add(_grid); }
/// <summary> /// Allows the BetterToolTip to give L10NSharp the information it needs to put strings /// into the localization UI to be localized. /// </summary> /// <returns>A list of LocalizingInfo objects</returns> public IEnumerable <LocalizingInfo> GetAllLocalizingInfoObjects(L10NSharpExtender extender) { var result = new List <LocalizingInfo>(); foreach (var ctrl in m_allControlsHavingToolTips) { var idPrefix = extender.GetLocalizingId(ctrl); var normalTip = GetToolTip(ctrl); if (!string.IsNullOrEmpty(normalTip)) { var liNormal = new LocalizingInfo(ctrl, idPrefix + NORMAL_TIP) { Text = normalTip, Category = LocalizationCategory.LocalizableComponent }; result.Add(liNormal); } var disabledTip = GetToolTipWhenDisabled(ctrl); if (!string.IsNullOrEmpty(disabledTip)) { var liDisabled = new LocalizingInfo(ctrl, idPrefix + DISABLED_TIP) { Text = disabledTip, Category = LocalizationCategory.LocalizableComponent }; result.Add(liDisabled); } } return(result); }
/// ------------------------------------------------------------------------------------ public ElementGrid() { CellBorderStyle = DataGridViewCellBorderStyle.None; VirtualMode = true; RowHeadersVisible = false; BorderStyle = BorderStyle.None; StandardTab = true; Font = Program.DialogFont; // Underlying code still allows for deleting multiple elements, but JohnH said not // to allow it. MultiSelect = false; PaintFullRowFocusRectangle = true; ExtendFullRowSelectRectangleToEdge = true; ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing; AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCellsExceptHeaders; var clr = ColorHelper.CalculateColor(Color.White, DefaultCellStyle.SelectionBackColor, 140); FullRowFocusRectangleColor = DefaultCellStyle.SelectionBackColor; DefaultCellStyle.SelectionBackColor = clr; DefaultCellStyle.SelectionForeColor = DefaultCellStyle.ForeColor; _locExtender = new L10NSharpExtender(); _locExtender.LocalizationManagerId = "SayMore"; _locExtender.SetLocalizingId(this, "ElementGrid"); }
public void TestTeardown() { m_extender = null; m_manager = null; var localAppDataDir = Directory.GetParent(Path.GetDirectoryName(m_translationPath)); Directory.Delete(localAppDataDir.FullName, true); }
private void InitializeControls() { _grid = new BetterGrid { Dock = DockStyle.Top, RowHeadersVisible = false, AllowUserToOrderColumns = false, AllowUserToResizeRows = true, AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.None, Name = "PersonContributionGrid", BorderStyle = BorderStyle.None, ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.None, ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing }; // look for saved settings var widths = Array.ConvertAll(Settings.Default.PersonContributionColumns.Split(new[] { ',' }), int.Parse).ToList(); while (widths.Count < 4) { widths.Add(200); } // set the localizable column header text string[] headerText = { @"_L10N_:PeopleView.ContributionEditor.NameColumnTitle!Name", @"_L10N_:PeopleView.ContributionEditor.RoleColumnTitle!Role", @"_L10N_:PeopleView.ContributionEditor.DateColumnTitle!Date", @"_L10N_:PeopleView.ContributionEditor.CommentColumnTitle!Comments" }; for (var i = 0; i < headerText.Length; i++) { _grid.Columns.Add(new DataGridViewTextBoxColumn { Width = widths[i], SortMode = DataGridViewColumnSortMode.Automatic, ReadOnly = true, HeaderText = headerText[i] }); } // set column header height to match the other grids _grid.AutoResizeColumnHeadersHeight(); _grid.ColumnHeadersHeight += 8; // make it localizable L10NSharpExtender locExtender = new L10NSharpExtender(); locExtender.LocalizationManagerId = "SayMore"; locExtender.SetLocalizingId(_grid, "ContributionsEditorGrid"); locExtender.EndInit(); Controls.Add(_grid); _grid.ColumnWidthChanged += _grid_ColumnWidthChanged; Program.PersonDataChanged += Program_PersonDataChanged; Disposed += PersonContributionEditor_Disposed; }
public void TestSetup() { var installedTmxDir = "../../src/L10NSharpTests/TestTmx"; m_manager = LocalizationManager.Create("en", "Test", "Test", "1.0", installedTmxDir, "", null, ""); m_tmxPath = m_manager.GetTmxPathForLanguage("en", true); m_extender = new L10NSharpExtender(); m_extender.LocalizationManagerId = "Test"; }
/// ------------------------------------------------------------------------------------ /// <summary> /// Setup for each test. /// </summary> /// ------------------------------------------------------------------------------------ protected void TestSetup(TranslationMemory kind, string installedTranslationDir) { var dir = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath); m_manager = LocalizationManager.Create(kind, "en", "Test", "Test", "1.0", Path.Combine(dir, installedTranslationDir), "", null, "") as ILocalizationManagerInternal <T>; m_translationPath = m_manager.GetPathForLanguage("en", true); m_extender = new L10NSharpExtender { LocalizationManagerId = "Test" }; }
/// <summary> /// Allows the MockLocalizableComponent to give L10NSharp the information it needs to put strings /// into the localization UI to be localized. /// </summary> /// <returns>A list of LocalizingInfo objects</returns> public IEnumerable <LocalizingInfo> GetAllLocalizingInfoObjects(L10NSharpExtender extender) { var result = new List <LocalizingInfo>(); foreach (var kvp in StringContainer) { var control = kvp.Key.Item1; var id = extender.GetLocalizingId(control) + kvp.Key.Item2; result.Add(new LocalizingInfo(control, id) { Text = kvp.Value, Category = LocalizationCategory.LocalizableComponent }); } return(result); }
/// ------------------------------------------------------------------------------------ public FieldsValuesGrid(FieldsValuesGridViewModel model, string name) { Name = name; // ReSharper disable once UseObjectOrCollectionInitializer _locExtender = new L10NSharpExtender(); _locExtender.LocalizationManagerId = "SayMore"; _locExtender.SetLocalizingId(this, "FieldsAndValuesGrid"); VirtualMode = true; Font = Program.DialogFont; _factoryFieldFont = new Font(Font, FontStyle.Bold); AllowUserToDeleteRows = true; MultiSelect = false; Margin = new Padding(0, Margin.Top, 0, Margin.Bottom); RowHeadersVisible = false; DefaultCellStyle.SelectionForeColor = DefaultCellStyle.ForeColor; _focusedSelectionBackColor = ColorHelper.CalculateColor(Color.White, DefaultCellStyle.SelectionBackColor, 140); SetSelectionColors(false); _model = model; AddColumns(); RowCount = _model.RowData.Count; // setting AllowUserToAddRows=True will add a blank line AllowUserToAddRows = _model.AllowUserToAddRows; AutoResizeRows(); _model.ComponentFileChanged = HandleComponentFileChanged; if (!string.IsNullOrEmpty(_model.GridSettingsName) && Settings.Default[_model.GridSettingsName] != null) { ((GridSettings)Settings.Default[_model.GridSettingsName]).InitializeGrid(this); } }
/// <remarks>SP-874: Not able to open L10NSharp with Alt-Shift-click</remarks> private void InitializeGrid() { // misc. column header settings _contributorsControl.Grid.BorderStyle = BorderStyle.None; _contributorsControl.Grid.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.None; _contributorsControl.Grid.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing; // set the localizable column header text string[] headerText = { @"_L10N_:SessionsView.ContributorsEditor.NameColumnTitle!Name", @"_L10N_:SessionsView.ContributorsEditor.RoleColumnTitle!Role", @"_L10N_:SessionsView.ContributorsEditor.DateColumnTitle!Date", @"_L10N_:SessionsView.ContributorsEditor.CommentColumnTitle!Comments" }; for (var i = 0; i < headerText.Length; i++) { _contributorsControl.SetColumnHeaderText(i, headerText[i]); // this is needed to match the visual behavior of the other grids _contributorsControl.Grid.Columns[i].SortMode = DataGridViewColumnSortMode.Automatic; } // set column header height to match the other grids _contributorsControl.Grid.AutoResizeColumnHeadersHeight(); _contributorsControl.Grid.ColumnHeadersHeight += 8; // make it localizable L10NSharpExtender locExtender = new L10NSharpExtender(); locExtender.LocalizationManagerId = "SayMore"; _contributorsControl.SetLocalizationExtender(locExtender); locExtender.EndInit(); }
/// <summary> /// Allows the BetterToolTip to give L10NSharp the information it needs to put strings /// into the localization UI to be localized. /// </summary> /// <returns>A list of LocalizingInfo objects</returns> public IEnumerable<LocalizingInfo> GetAllLocalizingInfoObjects(L10NSharpExtender extender) { var result = new List<LocalizingInfo>(); foreach (var ctrl in _allControlsHavingToolTips) { var idPrefix = extender.GetLocalizingId(ctrl); var normalTip = GetToolTip(ctrl); if (!string.IsNullOrEmpty(normalTip)) { var liNormal = new LocalizingInfo(ctrl, idPrefix + NORMAL_TIP) { Text = normalTip, Category = LocalizationCategory.LocalizableComponent }; result.Add(liNormal); } var disabledTip = GetToolTipWhenDisabled(ctrl); if (!string.IsNullOrEmpty(disabledTip)) { var liDisabled = new LocalizingInfo(ctrl, idPrefix + DISABLED_TIP) { Text = disabledTip, Category = LocalizationCategory.LocalizableComponent }; result.Add(liDisabled); } } return result; }
/// <remarks>SP-874: Localize column headers</remarks> public void SetLocalizationExtender(L10NSharpExtender extender) { extender.SetLocalizingId(_grid, "ContributorsEditorGrid"); }
/// <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.Windows.Forms.Button buttonOk; this._labelAvailableMemory = new System.Windows.Forms.Label(); this._labelAvailableDiskSpace = new System.Windows.Forms.Label(); this.fieldWorksIcon = new System.Windows.Forms.PictureBox(); this._linkWebsite = new System.Windows.Forms.LinkLabel(); this._linkFeedback = new System.Windows.Forms.LinkLabel(); this._labelBuild = new System.Windows.Forms.Label(); this._labelAppVersion = new System.Windows.Forms.Label(); this._labelAvailableMemoryValue = new System.Windows.Forms.Label(); this._labelAvailableDiskSpaceValue = new System.Windows.Forms.Label(); this._labelCopyright = new System.Windows.Forms.Label(); this._labelAppName = new System.Windows.Forms.Label(); this._tableLayout = new System.Windows.Forms.TableLayoutPanel(); this._tableLayoutButtons = new System.Windows.Forms.TableLayoutPanel(); this.panel1 = new System.Windows.Forms.Panel(); this.locExtender = new L10NSharp.UI.L10NSharpExtender(this.components); buttonOk = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.fieldWorksIcon)).BeginInit(); this._tableLayout.SuspendLayout(); this._tableLayoutButtons.SuspendLayout(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.locExtender)).BeginInit(); this.SuspendLayout(); // // buttonOk // buttonOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); buttonOk.AutoSize = true; buttonOk.DialogResult = System.Windows.Forms.DialogResult.OK; buttonOk.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.locExtender.SetLocalizableToolTip(buttonOk, "Click to close window"); this.locExtender.SetLocalizationComment(buttonOk, null); this.locExtender.SetLocalizingId(buttonOk, "DialogBoxes.AboutDlg.OKButtonText"); buttonOk.Location = new System.Drawing.Point(460, 3); buttonOk.Margin = new System.Windows.Forms.Padding(3, 3, 13, 13); buttonOk.Name = "buttonOk"; buttonOk.Size = new System.Drawing.Size(75, 27); buttonOk.TabIndex = 21; buttonOk.Text = "OK"; buttonOk.UseVisualStyleBackColor = true; // // _labelAvailableMemory // this._labelAvailableMemory.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this._labelAvailableMemory.AutoSize = true; this._labelAvailableMemory.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.locExtender.SetLocalizableToolTip(this._labelAvailableMemory, null); this.locExtender.SetLocalizationComment(this._labelAvailableMemory, null); this.locExtender.SetLocalizingId(this._labelAvailableMemory, "DialogBoxes.AboutDlg.AvailableMemoryLabel"); this._labelAvailableMemory.Location = new System.Drawing.Point(156, 175); this._labelAvailableMemory.Margin = new System.Windows.Forms.Padding(15, 0, 0, 0); this._labelAvailableMemory.Name = "_labelAvailableMemory"; this._labelAvailableMemory.Size = new System.Drawing.Size(110, 13); this._labelAvailableMemory.TabIndex = 17; this._labelAvailableMemory.Text = "Available memory:"; // // _labelAvailableDiskSpace // this._labelAvailableDiskSpace.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this._labelAvailableDiskSpace.AutoSize = true; this._labelAvailableDiskSpace.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.locExtender.SetLocalizableToolTip(this._labelAvailableDiskSpace, null); this.locExtender.SetLocalizationComment(this._labelAvailableDiskSpace, null); this.locExtender.SetLocalizingId(this._labelAvailableDiskSpace, "DialogBoxes.AboutDlg.AvailableDiskSpaceLabel"); this._labelAvailableDiskSpace.Location = new System.Drawing.Point(156, 194); this._labelAvailableDiskSpace.Margin = new System.Windows.Forms.Padding(15, 4, 3, 15); this._labelAvailableDiskSpace.Name = "_labelAvailableDiskSpace"; this._labelAvailableDiskSpace.Size = new System.Drawing.Size(107, 13); this._labelAvailableDiskSpace.TabIndex = 19; this._labelAvailableDiskSpace.Text = "Available disk space:"; // // fieldWorksIcon // this.fieldWorksIcon.ErrorImage = null; this.fieldWorksIcon.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.fieldWorksIcon.InitialImage = null; this.locExtender.SetLocalizableToolTip(this.fieldWorksIcon, null); this.locExtender.SetLocalizationComment(this.fieldWorksIcon, null); this.locExtender.SetLocalizationPriority(this.fieldWorksIcon, L10NSharp.LocalizationPriority.NotLocalizable); this.locExtender.SetLocalizingId(this.fieldWorksIcon, "AboutDlg.fieldWorksIcon"); this.fieldWorksIcon.Location = new System.Drawing.Point(13, 13); this.fieldWorksIcon.Margin = new System.Windows.Forms.Padding(13, 13, 3, 3); this.fieldWorksIcon.Name = "fieldWorksIcon"; this._tableLayout.SetRowSpan(this.fieldWorksIcon, 3); this.fieldWorksIcon.Size = new System.Drawing.Size(125, 142); this.fieldWorksIcon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.fieldWorksIcon.TabIndex = 15; this.fieldWorksIcon.TabStop = false; // // _linkWebsite // this._linkWebsite.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this._linkWebsite.AutoEllipsis = true; this._linkWebsite.AutoSize = true; this._linkWebsite.BackColor = System.Drawing.Color.Transparent; this._tableLayout.SetColumnSpan(this._linkWebsite, 3); this._linkWebsite.ImeMode = System.Windows.Forms.ImeMode.NoControl; this._linkWebsite.LinkArea = new System.Windows.Forms.LinkArea(28, 55); this.locExtender.SetLocalizableToolTip(this._linkWebsite, null); this.locExtender.SetLocalizationComment(this._linkWebsite, null); this.locExtender.SetLocalizingId(this._linkWebsite, "DialogBoxes.AboutDlg.WebsiteLabel"); this._linkWebsite.Location = new System.Drawing.Point(13, 248); this._linkWebsite.Margin = new System.Windows.Forms.Padding(13, 12, 0, 0); this._linkWebsite.Name = "_linkWebsite"; this._linkWebsite.Size = new System.Drawing.Size(535, 17); this._linkWebsite.TabIndex = 24; this._linkWebsite.TabStop = true; this._linkWebsite.Text = "For more information, visit {0}"; this._linkWebsite.UseCompatibleTextRendering = true; this._linkWebsite.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.HandleWebsiteLinkClicked); // // _linkFeedback // this._linkFeedback.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this._linkFeedback.AutoEllipsis = true; this._linkFeedback.AutoSize = true; this._linkFeedback.BackColor = System.Drawing.Color.Transparent; this._tableLayout.SetColumnSpan(this._linkFeedback, 3); this._linkFeedback.LinkArea = new System.Windows.Forms.LinkArea(37, 55); this.locExtender.SetLocalizableToolTip(this._linkFeedback, null); this.locExtender.SetLocalizationComment(this._linkFeedback, null); this.locExtender.SetLocalizingId(this._linkFeedback, "DialogBoxes.AboutDlg.FeedbackLabel"); this._linkFeedback.Location = new System.Drawing.Point(13, 265); this._linkFeedback.Margin = new System.Windows.Forms.Padding(13, 0, 0, 0); this._linkFeedback.Name = "_linkFeedback"; this._linkFeedback.Size = new System.Drawing.Size(535, 17); this._linkFeedback.TabIndex = 23; this._linkFeedback.TabStop = true; this._linkFeedback.Text = "Please report errors and comments to {0}"; this._linkFeedback.UseCompatibleTextRendering = true; this._linkFeedback.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.HandleFeedbackLinkClicked); // // _labelBuild // this._labelBuild.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this._labelBuild.AutoEllipsis = true; this._labelBuild.AutoSize = true; this._labelBuild.BackColor = System.Drawing.Color.Transparent; this._tableLayout.SetColumnSpan(this._labelBuild, 3); this._labelBuild.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.locExtender.SetLocalizableToolTip(this._labelBuild, null); this.locExtender.SetLocalizationComment(this._labelBuild, null); this.locExtender.SetLocalizingId(this._labelBuild, "DialogBoxes.AboutDlg.BuildDateLabel"); this._labelBuild.Location = new System.Drawing.Point(13, 223); this._labelBuild.Margin = new System.Windows.Forms.Padding(13, 0, 0, 0); this._labelBuild.Name = "_labelBuild"; this._labelBuild.Size = new System.Drawing.Size(535, 13); this._labelBuild.TabIndex = 22; this._labelBuild.Text = "Build: {0}"; // // _labelAppVersion // this._labelAppVersion.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this._labelAppVersion.AutoSize = true; this._labelAppVersion.BackColor = System.Drawing.Color.Transparent; this._tableLayout.SetColumnSpan(this._labelAppVersion, 2); this._labelAppVersion.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.locExtender.SetLocalizableToolTip(this._labelAppVersion, null); this.locExtender.SetLocalizationComment(this._labelAppVersion, null); this.locExtender.SetLocalizingId(this._labelAppVersion, "DialogBoxes.AboutDlg.AppVersionLabel"); this._labelAppVersion.Location = new System.Drawing.Point(156, 106); this._labelAppVersion.Margin = new System.Windows.Forms.Padding(15, 5, 0, 0); this._labelAppVersion.Name = "_labelAppVersion"; this._labelAppVersion.Size = new System.Drawing.Size(392, 13); this._labelAppVersion.TabIndex = 14; this._labelAppVersion.Text = "Version: {0} {1} {2}"; // // _labelAvailableMemoryValue // this._labelAvailableMemoryValue.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this._labelAvailableMemoryValue.AutoEllipsis = true; this._labelAvailableMemoryValue.AutoSize = true; this._labelAvailableMemoryValue.BackColor = System.Drawing.Color.Transparent; this._labelAvailableMemoryValue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this._labelAvailableMemoryValue.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.locExtender.SetLocalizableToolTip(this._labelAvailableMemoryValue, null); this.locExtender.SetLocalizationComment(this._labelAvailableMemoryValue, null); this.locExtender.SetLocalizingId(this._labelAvailableMemoryValue, "DialogBoxes.AboutDlg.AvailableMemoryValueLabel"); this._labelAvailableMemoryValue.Location = new System.Drawing.Point(266, 174); this._labelAvailableMemoryValue.Margin = new System.Windows.Forms.Padding(0, 0, 13, 0); this._labelAvailableMemoryValue.Name = "_labelAvailableMemoryValue"; this._labelAvailableMemoryValue.Size = new System.Drawing.Size(269, 15); this._labelAvailableMemoryValue.TabIndex = 18; this._labelAvailableMemoryValue.Text = "{0} MB out of {1} MB"; this._labelAvailableMemoryValue.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // _labelAvailableDiskSpaceValue // this._labelAvailableDiskSpaceValue.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this._labelAvailableDiskSpaceValue.AutoEllipsis = true; this._labelAvailableDiskSpaceValue.AutoSize = true; this._labelAvailableDiskSpaceValue.BackColor = System.Drawing.Color.Transparent; this._labelAvailableDiskSpaceValue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this._labelAvailableDiskSpaceValue.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.locExtender.SetLocalizableToolTip(this._labelAvailableDiskSpaceValue, null); this.locExtender.SetLocalizationComment(this._labelAvailableDiskSpaceValue, null); this.locExtender.SetLocalizingId(this._labelAvailableDiskSpaceValue, "DialogBoxes.AboutDlg.AvailableDiskSpaceValueLabel"); this._labelAvailableDiskSpaceValue.Location = new System.Drawing.Point(266, 193); this._labelAvailableDiskSpaceValue.Margin = new System.Windows.Forms.Padding(0, 4, 13, 15); this._labelAvailableDiskSpaceValue.Name = "_labelAvailableDiskSpaceValue"; this._labelAvailableDiskSpaceValue.Size = new System.Drawing.Size(269, 15); this._labelAvailableDiskSpaceValue.TabIndex = 20; this._labelAvailableDiskSpaceValue.Text = "{0} KB ({1} GB) Free on {2}"; this._labelAvailableDiskSpaceValue.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // _labelCopyright // this._labelCopyright.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this._labelCopyright.AutoSize = true; this._labelCopyright.BackColor = System.Drawing.Color.Transparent; this._tableLayout.SetColumnSpan(this._labelCopyright, 2); this._labelCopyright.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.locExtender.SetLocalizableToolTip(this._labelCopyright, null); this.locExtender.SetLocalizationComment(this._labelCopyright, null); this.locExtender.SetLocalizingId(this._labelCopyright, "DialogBoxes.AboutDlg.CopyrightLabel"); this._labelCopyright.Location = new System.Drawing.Point(156, 149); this._labelCopyright.Margin = new System.Windows.Forms.Padding(15, 30, 0, 12); this._labelCopyright.Name = "_labelCopyright"; this._labelCopyright.Size = new System.Drawing.Size(392, 13); this._labelCopyright.TabIndex = 16; this._labelCopyright.Text = "{0}."; // // _labelAppName // this._labelAppName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this._labelAppName.AutoSize = true; this._labelAppName.BackColor = System.Drawing.Color.Transparent; this._tableLayout.SetColumnSpan(this._labelAppName, 2); this._labelAppName.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.locExtender.SetLocalizableToolTip(this._labelAppName, null); this.locExtender.SetLocalizationComment(this._labelAppName, null); this.locExtender.SetLocalizingId(this._labelAppName, "DialogBoxes.AboutDlg.ApplicationNameLabel"); this._labelAppName.Location = new System.Drawing.Point(153, 88); this._labelAppName.Margin = new System.Windows.Forms.Padding(12, 40, 0, 0); this._labelAppName.Name = "_labelAppName"; this._labelAppName.Size = new System.Drawing.Size(395, 13); this._labelAppName.TabIndex = 13; this._labelAppName.Text = "Phonology Assistant"; // // _tableLayout // this._tableLayout.ColumnCount = 3; this._tableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this._tableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this._tableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this._tableLayout.Controls.Add(this.fieldWorksIcon, 0, 0); this._tableLayout.Controls.Add(this._labelAppName, 1, 0); this._tableLayout.Controls.Add(this._labelAppVersion, 1, 1); this._tableLayout.Controls.Add(this._labelBuild, 0, 5); this._tableLayout.Controls.Add(this._labelAvailableDiskSpaceValue, 2, 4); this._tableLayout.Controls.Add(this._labelAvailableMemoryValue, 2, 3); this._tableLayout.Controls.Add(this._labelAvailableDiskSpace, 1, 4); this._tableLayout.Controls.Add(this._labelCopyright, 1, 2); this._tableLayout.Controls.Add(this._labelAvailableMemory, 1, 3); this._tableLayout.Controls.Add(this._linkWebsite, 0, 6); this._tableLayout.Controls.Add(this._linkFeedback, 0, 7); this._tableLayout.Dock = System.Windows.Forms.DockStyle.Top; this._tableLayout.Location = new System.Drawing.Point(0, 0); this._tableLayout.Name = "_tableLayout"; this._tableLayout.RowCount = 8; this._tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this._tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle()); this._tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle()); this._tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle()); this._tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle()); this._tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle()); this._tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle()); this._tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle()); this._tableLayout.Size = new System.Drawing.Size(548, 282); this._tableLayout.TabIndex = 1; // // _tableLayoutButtons // this._tableLayoutButtons.AutoSize = true; this._tableLayoutButtons.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this._tableLayoutButtons.ColumnCount = 1; this._tableLayoutButtons.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this._tableLayoutButtons.Controls.Add(buttonOk, 0, 0); this._tableLayoutButtons.Dock = System.Windows.Forms.DockStyle.Bottom; this._tableLayoutButtons.Location = new System.Drawing.Point(1, 283); this._tableLayoutButtons.Name = "_tableLayoutButtons"; this._tableLayoutButtons.RowCount = 1; this._tableLayoutButtons.RowStyles.Add(new System.Windows.Forms.RowStyle()); this._tableLayoutButtons.Size = new System.Drawing.Size(548, 43); this._tableLayoutButtons.TabIndex = 2; // // panel1 // this.panel1.Controls.Add(this._tableLayout); this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Location = new System.Drawing.Point(1, 1); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(548, 282); this.panel1.TabIndex = 3; // // locExtender // this.locExtender.LocalizationManagerId = "Pa"; this.locExtender.PrefixForNewItems = null; // // AboutDlg // this.AcceptButton = buttonOk; this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(550, 327); this.ControlBox = false; this.Controls.Add(this.panel1); this.Controls.Add(this._tableLayoutButtons); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.locExtender.SetLocalizableToolTip(this, null); this.locExtender.SetLocalizationComment(this, null); this.locExtender.SetLocalizationPriority(this, L10NSharp.LocalizationPriority.NotLocalizable); this.locExtender.SetLocalizingId(this, "AboutDlg.WindowTitle"); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "AboutDlg"; this.Padding = new System.Windows.Forms.Padding(1); this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; ((System.ComponentModel.ISupportInitialize)(this.fieldWorksIcon)).EndInit(); this._tableLayout.ResumeLayout(false); this._tableLayout.PerformLayout(); this._tableLayoutButtons.ResumeLayout(false); this._tableLayoutButtons.PerformLayout(); this.panel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.locExtender)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); }
/// <remarks>SP-874: Localize column headers</remarks> public void SetLocalizationExtender(L10NSharpExtender extender) { extender.SetLocalizingId(_grid, "ContributorsEditorGrid"); }
public void TestSetup() { m_extender = new L10NSharpExtender(); m_extCtrls = ReflectionHelper.GetField(m_extender, "m_extendedCtrls") as Dictionary <object, LocalizingInfo>; }