示例#1
0
        public void SetupDlg(IHelpTopicProvider helpTopicProvider, IApp app, FdoCache cache, Sfm2FlexTextMappingBase mappingToModify, IEnumerable <InterlinDestination> destinationsToDisplay)
        {
            m_helpTopicProvider = helpTopicProvider;
            m_app     = app;
            m_cache   = cache;
            m_mapping = mappingToModify;
            m_destinationsToDisplay = destinationsToDisplay;
            SuspendLayout();
            // Update the label to show what marker we are modifying
            m_destinationLabel.Text = String.Format(m_orginalLabel, mappingToModify.Marker);
            // Replace the Add button with a specialized add writing system button
            var loc      = m_addWritingSystemButton.Location;
            var tabIndex = m_addWritingSystemButton.TabIndex;
            var text     = m_addWritingSystemButton.Text;

            Controls.Remove(m_addWritingSystemButton);
            m_addWritingSystemButton          = new AddWritingSystemButton();
            m_addWritingSystemButton.Location = loc;
            m_addWritingSystemButton.Anchor   = AnchorStyles.Left | AnchorStyles.Bottom;
            Controls.Add(m_addWritingSystemButton);
            m_addWritingSystemButton.TabIndex = tabIndex;
            m_addWritingSystemButton.Text     = text;
            var addWritingSystemButton = ((AddWritingSystemButton)m_addWritingSystemButton);

            addWritingSystemButton.Initialize(m_cache, helpTopicProvider, app, null, cache.ServiceLocator.WritingSystems.AllWritingSystems);
            addWritingSystemButton.WritingSystemAdded  += SfmInterlinearMappingDlg_WritingSystemAdded;
            m_destinationsListBox.SelectedIndexChanged += new EventHandler(m_destinationsListBox_SelectedIndexChanged);
            LoadConverters(mappingToModify.Converter);
            LoadDestinations();
            ResumeLayout();
        }
		public void SetupDlg(IHelpTopicProvider helpTopicProvider, IApp app, FdoCache cache,  Sfm2FlexTextMappingBase mappingToModify, IEnumerable<InterlinDestination> destinationsToDisplay)
		{
			m_helpTopicProvider = helpTopicProvider;
			m_app = app;
			m_cache = cache;
			m_mapping = mappingToModify;
			m_destinationsToDisplay = destinationsToDisplay;
			SuspendLayout();
			// Update the label to show what marker we are modifying
			m_destinationLabel.Text = String.Format(m_orginalLabel, mappingToModify.Marker);
			// Replace the Add button with a specialized add writing system button
			var loc = m_addWritingSystemButton.Location;
			var tabIndex = m_addWritingSystemButton.TabIndex;
			var text = m_addWritingSystemButton.Text;
			Controls.Remove(m_addWritingSystemButton);
			m_addWritingSystemButton = new AddWritingSystemButton();
			m_addWritingSystemButton.Location = loc;
			m_addWritingSystemButton.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
			Controls.Add(m_addWritingSystemButton);
			m_addWritingSystemButton.TabIndex = tabIndex;
			m_addWritingSystemButton.Text = text;
			var addWritingSystemButton = ((AddWritingSystemButton)m_addWritingSystemButton);
			addWritingSystemButton.Initialize(m_cache, helpTopicProvider, app, null, cache.ServiceLocator.WritingSystems.AllWritingSystems);
			addWritingSystemButton.WritingSystemAdded += SfmInterlinearMappingDlg_WritingSystemAdded;
			m_destinationsListBox.SelectedIndexChanged += new EventHandler(m_destinationsListBox_SelectedIndexChanged);
			LoadConverters(mappingToModify.Converter);
			LoadDestinations();
			ResumeLayout();
		}
 /// <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(LexImportWizardLanguage));
     this.lblComment  = new System.Windows.Forms.Label();
     this.lblLangDesc = new System.Windows.Forms.Label();
     this.tbLangDesc  = new System.Windows.Forms.TextBox();
     this.cbEC        = new SIL.FieldWorks.Common.Controls.FwOverrideComboBox();
     this.lblEC       = new System.Windows.Forms.Label();
     this.cbWS        = new SIL.FieldWorks.Common.Controls.FwOverrideComboBox();
     this.lblWS       = new System.Windows.Forms.Label();
     this.btnAddEC    = new System.Windows.Forms.Button();
     this.btnOK       = new System.Windows.Forms.Button();
     this.btnCancel   = new System.Windows.Forms.Button();
     this.groupBox1   = new System.Windows.Forms.GroupBox();
     this.buttonHelp  = new System.Windows.Forms.Button();
     this.btnAddWS    = new SIL.FieldWorks.LexText.Controls.AddWritingSystemButton(this.components);
     this.SuspendLayout();
     //
     // lblComment
     //
     resources.ApplyResources(this.lblComment, "lblComment");
     this.lblComment.Name = "lblComment";
     //
     // lblLangDesc
     //
     resources.ApplyResources(this.lblLangDesc, "lblLangDesc");
     this.lblLangDesc.Name = "lblLangDesc";
     //
     // tbLangDesc
     //
     resources.ApplyResources(this.tbLangDesc, "tbLangDesc");
     this.tbLangDesc.Name         = "tbLangDesc";
     this.tbLangDesc.TextChanged += new System.EventHandler(this.tbLangDesc_TextChanged);
     //
     // cbEC
     //
     this.cbEC.AllowSpaceInEditBox = false;
     this.cbEC.DropDownStyle       = System.Windows.Forms.ComboBoxStyle.DropDownList;
     resources.ApplyResources(this.cbEC, "cbEC");
     this.cbEC.Name   = "cbEC";
     this.cbEC.Sorted = true;
     //
     // lblEC
     //
     resources.ApplyResources(this.lblEC, "lblEC");
     this.lblEC.Name = "lblEC";
     //
     // cbWS
     //
     this.cbWS.AllowSpaceInEditBox = false;
     this.cbWS.DropDownStyle       = System.Windows.Forms.ComboBoxStyle.DropDownList;
     resources.ApplyResources(this.cbWS, "cbWS");
     this.cbWS.Name   = "cbWS";
     this.cbWS.Sorted = true;
     this.cbWS.SelectedValueChanged += new System.EventHandler(this.cbWS_SelectedValueChanged);
     //
     // lblWS
     //
     resources.ApplyResources(this.lblWS, "lblWS");
     this.lblWS.Name = "lblWS";
     //
     // btnAddEC
     //
     resources.ApplyResources(this.btnAddEC, "btnAddEC");
     this.btnAddEC.Name   = "btnAddEC";
     this.btnAddEC.Click += new System.EventHandler(this.btnAddEC_Click);
     //
     // btnOK
     //
     this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
     resources.ApplyResources(this.btnOK, "btnOK");
     this.btnOK.Name = "btnOK";
     //
     // btnCancel
     //
     this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
     resources.ApplyResources(this.btnCancel, "btnCancel");
     this.btnCancel.Name = "btnCancel";
     //
     // groupBox1
     //
     resources.ApplyResources(this.groupBox1, "groupBox1");
     this.groupBox1.Name    = "groupBox1";
     this.groupBox1.TabStop = false;
     //
     // buttonHelp
     //
     resources.ApplyResources(this.buttonHelp, "buttonHelp");
     this.buttonHelp.Name   = "buttonHelp";
     this.buttonHelp.Click += new System.EventHandler(this.buttonHelp_Click);
     //
     // btnAddWS
     //
     resources.ApplyResources(this.btnAddWS, "btnAddWS");
     this.btnAddWS.Name = "btnAddWS";
     this.btnAddWS.UseVisualStyleBackColor = true;
     this.btnAddWS.WritingSystemAdded     += new System.EventHandler(this.btnAddWS_WritingSystemAdded);
     //
     // LexImportWizardLanguage
     //
     this.AcceptButton = this.btnOK;
     resources.ApplyResources(this, "$this");
     this.CancelButton = this.btnCancel;
     this.Controls.Add(this.btnAddWS);
     this.Controls.Add(this.buttonHelp);
     this.Controls.Add(this.btnCancel);
     this.Controls.Add(this.btnOK);
     this.Controls.Add(this.btnAddEC);
     this.Controls.Add(this.cbEC);
     this.Controls.Add(this.lblEC);
     this.Controls.Add(this.cbWS);
     this.Controls.Add(this.lblWS);
     this.Controls.Add(this.tbLangDesc);
     this.Controls.Add(this.lblLangDesc);
     this.Controls.Add(this.lblComment);
     this.Controls.Add(this.groupBox1);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
     this.MaximizeBox     = false;
     this.MinimizeBox     = false;
     this.Name            = "LexImportWizardLanguage";
     this.Load           += new System.EventHandler(this.LexImportWizardLanguage_Load);
     this.ResumeLayout(false);
     this.PerformLayout();
 }
		/// <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(LexImportWizardLanguage));
			this.lblComment = new System.Windows.Forms.Label();
			this.lblLangDesc = new System.Windows.Forms.Label();
			this.tbLangDesc = new System.Windows.Forms.TextBox();
			this.cbEC = new SIL.FieldWorks.Common.Controls.FwOverrideComboBox();
			this.lblEC = new System.Windows.Forms.Label();
			this.cbWS = new SIL.FieldWorks.Common.Controls.FwOverrideComboBox();
			this.lblWS = new System.Windows.Forms.Label();
			this.btnAddEC = new System.Windows.Forms.Button();
			this.btnOK = new System.Windows.Forms.Button();
			this.btnCancel = new System.Windows.Forms.Button();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.buttonHelp = new System.Windows.Forms.Button();
			this.btnAddWS = new SIL.FieldWorks.LexText.Controls.AddWritingSystemButton(this.components);
			this.SuspendLayout();
			//
			// lblComment
			//
			resources.ApplyResources(this.lblComment, "lblComment");
			this.lblComment.Name = "lblComment";
			//
			// lblLangDesc
			//
			resources.ApplyResources(this.lblLangDesc, "lblLangDesc");
			this.lblLangDesc.Name = "lblLangDesc";
			//
			// tbLangDesc
			//
			resources.ApplyResources(this.tbLangDesc, "tbLangDesc");
			this.tbLangDesc.Name = "tbLangDesc";
			this.tbLangDesc.TextChanged += new System.EventHandler(this.tbLangDesc_TextChanged);
			//
			// cbEC
			//
			this.cbEC.AllowSpaceInEditBox = false;
			this.cbEC.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			resources.ApplyResources(this.cbEC, "cbEC");
			this.cbEC.Name = "cbEC";
			this.cbEC.Sorted = true;
			//
			// lblEC
			//
			resources.ApplyResources(this.lblEC, "lblEC");
			this.lblEC.Name = "lblEC";
			//
			// cbWS
			//
			this.cbWS.AllowSpaceInEditBox = false;
			this.cbWS.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			resources.ApplyResources(this.cbWS, "cbWS");
			this.cbWS.Name = "cbWS";
			this.cbWS.Sorted = true;
			this.cbWS.SelectedValueChanged += new System.EventHandler(this.cbWS_SelectedValueChanged);
			//
			// lblWS
			//
			resources.ApplyResources(this.lblWS, "lblWS");
			this.lblWS.Name = "lblWS";
			//
			// btnAddEC
			//
			resources.ApplyResources(this.btnAddEC, "btnAddEC");
			this.btnAddEC.Name = "btnAddEC";
			this.btnAddEC.Click += new System.EventHandler(this.btnAddEC_Click);
			//
			// btnOK
			//
			this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
			resources.ApplyResources(this.btnOK, "btnOK");
			this.btnOK.Name = "btnOK";
			//
			// btnCancel
			//
			this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			resources.ApplyResources(this.btnCancel, "btnCancel");
			this.btnCancel.Name = "btnCancel";
			//
			// groupBox1
			//
			resources.ApplyResources(this.groupBox1, "groupBox1");
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.TabStop = false;
			//
			// buttonHelp
			//
			resources.ApplyResources(this.buttonHelp, "buttonHelp");
			this.buttonHelp.Name = "buttonHelp";
			this.buttonHelp.Click += new System.EventHandler(this.buttonHelp_Click);
			//
			// btnAddWS
			//
			resources.ApplyResources(this.btnAddWS, "btnAddWS");
			this.btnAddWS.Name = "btnAddWS";
			this.btnAddWS.UseVisualStyleBackColor = true;
			this.btnAddWS.WritingSystemAdded += new System.EventHandler(this.btnAddWS_WritingSystemAdded);
			//
			// LexImportWizardLanguage
			//
			this.AcceptButton = this.btnOK;
			resources.ApplyResources(this, "$this");
			this.CancelButton = this.btnCancel;
			this.Controls.Add(this.btnAddWS);
			this.Controls.Add(this.buttonHelp);
			this.Controls.Add(this.btnCancel);
			this.Controls.Add(this.btnOK);
			this.Controls.Add(this.btnAddEC);
			this.Controls.Add(this.cbEC);
			this.Controls.Add(this.lblEC);
			this.Controls.Add(this.cbWS);
			this.Controls.Add(this.lblWS);
			this.Controls.Add(this.tbLangDesc);
			this.Controls.Add(this.lblLangDesc);
			this.Controls.Add(this.lblComment);
			this.Controls.Add(this.groupBox1);
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.Name = "LexImportWizardLanguage";
			this.Load += new System.EventHandler(this.LexImportWizardLanguage_Load);
			this.ResumeLayout(false);
			this.PerformLayout();

		}