Esempio n. 1
1
        public LoadFBForm(pBaseEntities ge, fBaseEntities fe)
        {
            InitializeComponent();
            _ge = ge;
            _fe = fe;
            dp_maxdate.ValueChanged += new EventHandler(dp_maxdate_ValueChanged);
            dp_mindate.ValueChanged += new EventHandler(dp_maxdate_ValueChanged);

            HelpProvider help = new HelpProvider();
            help.HelpNamespace = "Recog_help.chm";
            help.SetHelpNavigator(this, HelpNavigator.Topic);
            help.SetHelpKeyword(this, "menu_excel.htm");
        }
Esempio n. 2
0
 private void ControlBased_Load(object sender, System.EventArgs e)
 {
     HelpProvider1.HelpNamespace = "sample.chm";
     HelpProvider1.SetHelpKeyword(TextBox1, "1007.html");
     HelpProvider1.SetHelpNavigator(TextBox1, HelpNavigator.Topic);
     HelpProvider1.SetHelpKeyword(ListBox1, "1006.html");
     HelpProvider1.SetHelpNavigator(ListBox1, HelpNavigator.Topic);
 }
Esempio n. 3
0
 private void FrameBased_Load(object sender, System.EventArgs e)
 {
     HelpProvider1.HelpNamespace = "sample.chm";
     HelpProvider1.SetHelpKeyword(GroupBox1, "1003.html");
     HelpProvider1.SetHelpNavigator(GroupBox1, HelpNavigator.Topic);
     HelpProvider1.SetHelpKeyword(GroupBox2, "1004.html");
     HelpProvider1.SetHelpNavigator(GroupBox2, HelpNavigator.Topic);
 }
Esempio n. 4
0
 private void BaseWinForm_Load(object sender, EventArgs e)
 {
     helpProvider1.HelpNamespace = Ap.FileHelpChm;
     helpProvider1.SetHelpKeyword(this, HelpTopicId);
     helpProvider1.SetHelpNavigator(this, HelpNavigator.TopicId);
     helpProvider1.SetShowHelp(this, true);
 }
Esempio n. 5
0
 private void helpSetup()
 {
     helpProvider = new System.Windows.Forms.HelpProvider();
     helpProvider.HelpNamespace = FwApp.App.HelpFile;
     helpProvider.SetHelpKeyword(this, FwApp.App.GetHelpString(s_helpTopic, 0));
     helpProvider.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic);
 }
Esempio n. 6
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="T:SimpleMatchDlg"/> class.
		/// </summary>
		/// <param name="wsf">The WSF.</param>
		/// <param name="ws">The ws.</param>
		/// <param name="ss">The ss.</param>
		/// ------------------------------------------------------------------------------------
		public SimpleMatchDlg(ILgWritingSystemFactory wsf, int ws, IVwStylesheet ss)
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			// We do this outside the designer-controlled code because it does funny things
			// to FwTextBoxes, owing to the need for a writing system factory, and some
			// properties it should not persist but I can't persuade it not to.
			this.m_textBox = new FwTextBox();
			this.m_textBox.WritingSystemFactory = wsf; // set ASAP.
			this.m_textBox.WritingSystemCode = ws;
			this.m_textBox.StyleSheet = ss; // before setting text, otherwise it gets confused about height needed.
			this.m_textBox.Location = new System.Drawing.Point(8, 24);
			this.m_textBox.Name = "m_textBox";
			this.m_textBox.Size = new System.Drawing.Size(450, 32);
			this.m_textBox.TabIndex = 0;
			this.m_textBox.Text = "";
			this.Controls.Add(this.m_textBox);

			regexContextMenu = new RegexHelperMenu(m_textBox, FwApp.App);

			m_ivwpattern = VwPatternClass.Create();

			helpProvider = new System.Windows.Forms.HelpProvider();
			helpProvider.HelpNamespace = FwApp.App.HelpFile;
			helpProvider.SetHelpKeyword(this, FwApp.App.GetHelpString(s_helpTopic, 0));
			helpProvider.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic);
		}
		public MergeWritingSystemDlg(FdoCache cache, IWritingSystem ws, IEnumerable<IWritingSystem> wss, IHelpTopicProvider helpTopicProvider)
		{
			m_cache = cache;
			m_ws = ws;

			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			Icon infoIcon = SystemIcons.Information;
			m_infoPictureBox.Image = infoIcon.ToBitmap();
			m_infoPictureBox.Size = infoIcon.Size;

			foreach (IWritingSystem curWs in wss.Except(new[] { ws }))
				m_wsListBox.Items.Add(curWs);
			m_wsListBox.SelectedIndex = 0;

			m_helpTopicProvider = helpTopicProvider;

			if (m_helpTopicProvider != null) // m_helpTopicProvider could be null for testing
			{
				m_helpProvider = new HelpProvider();
				m_helpProvider.HelpNamespace = m_helpTopicProvider.HelpFile;
				m_helpProvider.SetHelpKeyword(this, m_helpTopicProvider.GetHelpString(HelpTopic));
				m_helpProvider.SetHelpNavigator(this, HelpNavigator.Topic);
			}
		}
Esempio n. 8
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="featSys"></param>
        /// <param name="mediator"></param>
        /// <param name="launchedFromInsertMenu"></param>
        /// <param name="sWindowKey">used to store location and size of dialog window</param>
        /// <param name="sXmlFile">file containing the XML form of the gloss list</param>
        public void SetDlginfo(IFsFeatureSystem featSys, Mediator mediator, bool launchedFromInsertMenu, string sWindowKey, string sXmlFile)
        {
            CheckDisposed();

            m_featureSystem          = featSys;
            m_featureList            = featSys.FeaturesOC;
            m_launchedFromInsertMenu = launchedFromInsertMenu;
            m_mediator = mediator;
            if (mediator != null)
            {
                m_sWindowKeyLocation = sWindowKey + "Location";
                m_sWindowKeySize     = sWindowKey + "Size";

                ResetWindowLocationAndSize();

                m_helpTopicProvider        = m_mediator.HelpTopicProvider;
                helpProvider               = new HelpProvider();
                helpProvider.HelpNamespace = m_helpTopicProvider.HelpFile;
                helpProvider.SetHelpKeyword(this, m_helpTopicProvider.GetHelpString(s_helpTopic));
                helpProvider.SetHelpNavigator(this, HelpNavigator.Topic);
            }
            m_cache = featSys.Cache;
            LoadMasterFeatures(sXmlFile);
            m_tvMasterList.Cache = m_cache;
        }
Esempio n. 9
0
        /// <summary>
        /// From IFwExtension
        /// </summary>
        /// <param name="cache"></param>
        /// <param name="mediator"></param>
        public void Init(FdoCache cache, XCore.Mediator mediator)
        {
            CheckDisposed();

            m_cache    = cache;
            m_mediator = mediator;
            m_sRootDir = DirectoryFinder.FWCodeDirectory;
            if (!m_sRootDir.EndsWith("\\"))
            {
                m_sRootDir += "\\";
            }
            m_sRootDir += "Language Explorer\\Import\\";

            m_sTempDir = Path.Combine(Path.GetTempPath(), "LanguageExplorer\\");
            if (!Directory.Exists(m_sTempDir))
            {
                Directory.CreateDirectory(m_sTempDir);
            }
            m_sLastXmlFileName = "";

            if (m_mediator.HelpTopicProvider != null)            // FwApp.App could be null during tests
            {
                helpProvider = new HelpProvider();
                helpProvider.HelpNamespace = m_mediator.HelpTopicProvider.HelpFile;
                helpProvider.SetHelpKeyword(this, m_mediator.HelpTopicProvider.GetHelpString(s_helpTopic));
                helpProvider.SetHelpNavigator(this, HelpNavigator.Topic);
            }
        }
Esempio n. 10
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Initializes a new instance of the <see cref="T:SimpleMatchDlg"/> class.
        /// </summary>
        /// <param name="wsf">The WSF.</param>
        /// <param name="ws">The ws.</param>
        /// <param name="ss">The ss.</param>
        /// ------------------------------------------------------------------------------------
        public SimpleMatchDlg(ILgWritingSystemFactory wsf, int ws, IVwStylesheet ss)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            // We do this outside the designer-controlled code because it does funny things
            // to FwTextBoxes, owing to the need for a writing system factory, and some
            // properties it should not persist but I can't persuade it not to.
            this.m_textBox = new FwTextBox();
            this.m_textBox.WritingSystemFactory = wsf;  // set ASAP.
            this.m_textBox.WritingSystemCode    = ws;
            this.m_textBox.StyleSheet           = ss;   // before setting text, otherwise it gets confused about height needed.
            this.m_textBox.Location             = new System.Drawing.Point(8, 24);
            this.m_textBox.Name     = "m_textBox";
            this.m_textBox.Size     = new System.Drawing.Size(450, 32);
            this.m_textBox.TabIndex = 0;
            this.m_textBox.Text     = "";
            this.Controls.Add(this.m_textBox);

            regexContextMenu = new RegexHelperMenu(m_textBox, FwApp.App);

            m_ivwpattern = VwPatternClass.Create();

            helpProvider = new System.Windows.Forms.HelpProvider();
            helpProvider.HelpNamespace = FwApp.App.HelpFile;
            helpProvider.SetHelpKeyword(this, FwApp.App.GetHelpString(s_helpTopic, 0));
            helpProvider.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic);
        }
		public ConfigureInterlinDialog(FdoCache cache, IHelpTopicProvider helpTopicProvider,
			InterlinLineChoices choices)
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();
			AccessibleName = GetType().Name;

			m_helpTopicProvider = helpTopicProvider;
			helpProvider = new HelpProvider();
			helpProvider.HelpNamespace = m_helpTopicProvider.HelpFile;
			helpProvider.SetHelpKeyword(this, m_helpTopicProvider.GetHelpString(s_helpTopic));
			helpProvider.SetHelpNavigator(this, HelpNavigator.Topic);

			m_cachedComboBoxes = new Dictionary<ColumnConfigureDialog.WsComboContent, ComboBox.ObjectCollection>();

			m_cache = cache;
			m_choices = choices;

			InitPossibilitiesList();

			// Owner draw requires drawing the column header as well as the list items.  See LT-7007.
			currentList.DrawColumnHeader += currentList_DrawColumnHeader;
			InitCurrentList(0); // also inits WsCombo.

			currentList.SelectedIndexChanged += currentList_SelectedIndexChanged;
			optionsList.SelectedIndexChanged += optionsList_SelectedIndexChanged;
			EnableControls();
		}
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="LexReferenceDetailsDlg"/> class.
		/// </summary>
		/// <param name="helpTopicProvider">The help topic provider.</param>
		/// ------------------------------------------------------------------------------------
		public LexReferenceDetailsDlg(IHelpTopicProvider helpTopicProvider) : this()
		{
			m_helpTopicProvider = helpTopicProvider;
			helpProvider = new HelpProvider();
			helpProvider.HelpNamespace = helpTopicProvider.HelpFile;
			helpProvider.SetHelpKeyword(this, helpTopicProvider.GetHelpString(s_helpTopic));
			helpProvider.SetHelpNavigator(this, HelpNavigator.Topic);
		}
Esempio n. 13
0
 public MainMenu()
 {
     InitializeComponent();
     HelpProvider help = new HelpProvider();
     help.HelpNamespace = "Recog_help.chm";
     help.SetHelpNavigator(this, HelpNavigator.Topic);
     help.SetHelpKeyword(this, "main_menu.htm");
 }
Esempio n. 14
0
        public ChooseTextWritingSystemDlg()
        {
            InitializeComponent();

            helpProvider = new System.Windows.Forms.HelpProvider();
            helpProvider.HelpNamespace = FwApp.App.HelpFile;
            helpProvider.SetHelpKeyword(this, FwApp.App.GetHelpString(s_helpTopic, 0));
            helpProvider.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic);
        }
Esempio n. 15
0
        public FormSelect()
        {
            InitializeComponent();

            HelpProvider help = new HelpProvider();
            help.HelpNamespace = "Recog_help.chm";
            help.SetHelpNavigator(this, HelpNavigator.Topic);
            help.SetHelpKeyword(this, "menu_settings.htm#scan_settings");
        }
		public ChooseTextWritingSystemDlg()
		{
			InitializeComponent();

			helpProvider = new System.Windows.Forms.HelpProvider();
			helpProvider.HelpNamespace = FwApp.App.HelpFile;
			helpProvider.SetHelpKeyword(this, FwApp.App.GetHelpString(s_helpTopic, 0));
			helpProvider.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic);
		}
        /// <summary>
        /// Set up the dlg in preparation to showing it.
        /// </summary>
        /// <param name="cache">FDO cache.</param>
        public void SetDlgInfo(FdoCache cache, Mediator mediator, ILexEntry entry)
        {
            CheckDisposed();

            Debug.Assert(cache != null);

            m_mediator = mediator;
            m_cache    = cache;
            m_entry    = entry;
            m_tsf      = TsStrFactoryClass.Create();
            IVwStylesheet stylesheet = SIL.FieldWorks.Common.Widgets.FontHeightAdjuster.StyleSheetFromMediator(mediator);

            // We want to do this BEFORE the text gets set, to avoid overriding its height properties.
            // However, because of putting multiple lines in the box, we also need to do it AFTER we set the text
            // (in SetBottomMessage) so it adjusts to the resulting even greater height.
            m_fwTextBoxBottomMsg.AdjustForStyleSheet(this, null, stylesheet);
            Font f = SIL.FieldWorks.Common.Widgets.FontHeightAdjuster.GetFontForNormalStyle(
                m_cache.LangProject.DefaultVernacularWritingSystem, stylesheet, m_cache.LanguageWritingSystemFactoryAccessor);

            foreach (IMoForm allo in entry.AlternateFormsOS)
            {
                ListViewItem lvi = m_lvAlloOptions.Items.Add(allo.Form.VernacularDefaultWritingSystem);
                lvi.Tag = allo;
                lvi.UseItemStyleForSubItems = true;
                lvi.Font = f;
            }
            m_lvAlloOptions.Font = f;
            // Get location to the stored values, if any.
            object locWnd = m_mediator.PropertyTable.GetValue("swapDlgLocation");
            // And when I do this, it works the first time, but later times the window is
            // too small and doesn't show all the controls. Give up on smart location for now.
            //object szWnd = this.Size;
            object szWnd = null;             // suppresses the smart location stuff.

            if (locWnd != null && szWnd != null)
            {
                Rectangle rect = new Rectangle((Point)locWnd, (Size)szWnd);
                ScreenUtils.EnsureVisibleRect(ref rect);
                DesktopBounds = rect;
                StartPosition = FormStartPosition.Manual;
            }
            m_lvAlloOptions.Items[0].Selected = true;
            Text        = LexEdStrings.ksSwapLexWithAllo;
            label2.Text = LexEdStrings.ksAlternateForms;

            // Determine the help file to use, if any
            m_helpTopic = "khtpSwapLexemeWithAllomorph";

            if (m_helpTopic != null && FwApp.App != null)            // FwApp.App could be null for testing
            {
                helpProvider = new System.Windows.Forms.HelpProvider();
                helpProvider.HelpNamespace = FwApp.App.HelpFile;
                helpProvider.SetHelpKeyword(this, FwApp.App.GetHelpString(m_helpTopic, 0));
                helpProvider.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic);
            }
        }
Esempio n. 18
0
        public ConnectionForm(bool defaultsettings)
        {
            InitializeComponent();
            _defaultsettings = defaultsettings;

            HelpProvider help = new HelpProvider();
            help.HelpNamespace = "Recog_help.chm";
            help.SetHelpNavigator(this, HelpNavigator.Topic);
            help.SetHelpKeyword(this, "menu_settings.htm#conn_settings");
        }
Esempio n. 19
0
        public AddNewSenseDlg(IHelpTopicProvider helpTopicProvider)
        {
            BasicInit();

            m_helpTopicProvider        = helpTopicProvider;
            helpProvider               = new HelpProvider();
            helpProvider.HelpNamespace = m_helpTopicProvider.HelpFile;
            helpProvider.SetHelpKeyword(this, m_helpTopicProvider.GetHelpString(s_helpTopic));
            helpProvider.SetHelpNavigator(this, HelpNavigator.Topic);
        }
Esempio n. 20
0
        public FormDep(fBaseEntities fe)
        {
            InitializeComponent();
            _fe = fe;

            HelpProvider help = new HelpProvider();
            help.HelpNamespace = "Recog_help.chm";
            help.SetHelpNavigator(this, HelpNavigator.Topic);
            help.SetHelpKeyword(this, "menu_settings.htm#edit_deps");
        }
Esempio n. 21
0
        private int _currenthumanid; //текущий индекс сущности

        #endregion Fields

        #region Constructors

        public HumansForm(fBaseEntities fe)
        {
            InitializeComponent();
            _fe=fe;

            HelpProvider help = new HelpProvider();
            help.HelpNamespace = "Recog_help.chm";
            help.SetHelpNavigator(this, HelpNavigator.Topic);
            help.SetHelpKeyword(this, "respondent_common.htm#human");
        }
Esempio n. 22
0
        public TimeLineForm(testresult TestResult)
        {
            InitializeComponent();
            _testresult = TestResult;

            HelpProvider help = new HelpProvider();
            help.HelpNamespace = "Recog_help.chm";
            help.SetHelpNavigator(this, HelpNavigator.Topic);
            help.SetHelpKeyword(this, "result_character.htm#speed_view");
        }
Esempio n. 23
0
		public ImportWordSetDlg(Mediator mediator) : this()
		{
			//InitializeComponent();
			m_mediator = mediator;
			m_cache = (FdoCache)m_mediator.PropertyTable.GetValue("cache");

			helpProvider = new HelpProvider();
			helpProvider.HelpNamespace = m_mediator.HelpTopicProvider.HelpFile;
			helpProvider.SetHelpKeyword(this, m_mediator.HelpTopicProvider.GetHelpString(s_helpTopic));
			helpProvider.SetHelpNavigator(this, HelpNavigator.Topic);
		}
Esempio n. 24
0
        public PoollForm(pBaseEntities ge, fBaseEntities fe)
        {
            InitializeComponent();
            _ge = ge;
            _fe = fe;

            HelpProvider help = new HelpProvider();
            help.HelpNamespace = "Recog_help.chm";
            help.SetHelpNavigator(this, HelpNavigator.Topic);
            help.SetHelpKeyword(this, "test_common.htm");
        }
Esempio n. 25
0
 public AutomatorForm(pBaseEntities ge, fBaseEntities fe)
 {
     InitializeComponent();
     _ge = ge;
     _fe = fe;
     this.FillListRefs();
     HelpProvider help = new HelpProvider();
     help.HelpNamespace = "Recog_help.chm";
     help.SetHelpNavigator(this, HelpNavigator.Topic);
     help.SetHelpKeyword(this, "scan_wizard.htm");
 }
Esempio n. 26
0
        public ImportWordSetDlg(Mediator mediator) : this()
        {
            //InitializeComponent();
            m_mediator = mediator;
            m_cache    = (FdoCache)m_mediator.PropertyTable.GetValue("cache");

            helpProvider = new HelpProvider();
            helpProvider.HelpNamespace = m_mediator.HelpTopicProvider.HelpFile;
            helpProvider.SetHelpKeyword(this, m_mediator.HelpTopicProvider.GetHelpString(s_helpTopic));
            helpProvider.SetHelpNavigator(this, HelpNavigator.Topic);
        }
Esempio n. 27
0
        public ReadHumanForm(fBaseEntities fe, int HumanId)
        {
            InitializeComponent();
            _fe = fe;
            _humanid = HumanId;

            HelpProvider help = new HelpProvider();
            help.HelpNamespace = "Recog_help.chm";
            help.SetHelpNavigator(this, HelpNavigator.Topic);
            help.SetHelpKeyword(this, "result_common.htm#human_read");
        }
Esempio n. 28
0
        public MGADialog(FdoCache cache, Mediator mediator, string sMorphemeForm)
        {
            m_mediator = mediator;
            m_cache    = cache;
            InitForm();
            labelAllomorph.Text = sMorphemeForm;

            helpProvider = new System.Windows.Forms.HelpProvider();
            helpProvider.HelpNamespace = FwApp.App.HelpFile;
            helpProvider.SetHelpKeyword(this, FwApp.App.GetHelpString(s_helpTopic, 0));
            helpProvider.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic);
        }
Esempio n. 29
0
        public LexReferenceDetailsDlg()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            helpProvider = new System.Windows.Forms.HelpProvider();
            helpProvider.HelpNamespace = FwApp.App.HelpFile;
            helpProvider.SetHelpKeyword(this, FwApp.App.GetHelpString(s_helpTopic, 0));
            helpProvider.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic);
        }
Esempio n. 30
0
		public LexReferenceDetailsDlg()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			helpProvider = new System.Windows.Forms.HelpProvider();
			helpProvider.HelpNamespace = FwApp.App.HelpFile;
			helpProvider.SetHelpKeyword(this, FwApp.App.GetHelpString(s_helpTopic, 0));
			helpProvider.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic);
		}
Esempio n. 31
0
        /// <summary>
        /// Set up the dlg in preparation to showing it.
        /// </summary>
        /// <param name="cache">FDO cache.</param>
        /// <param name="wp">Strings used for various items in this dialog.</param>
        public void SetDlgInfo(FdoCache cache, Mediator mediator, WindowParams wp, DummyCmObject mainObj, List <DummyCmObject> mergeCandidates,
                               string guiControl, string helpTopic)
        {
            CheckDisposed();

            Debug.Assert(cache != null);

            m_mediator = mediator;
            m_cache    = cache;
            m_mainObj  = mainObj;
            m_tsf      = TsStrFactoryClass.Create();

            m_fwTextBoxBottomMsg.WritingSystemFactory = m_cache.LanguageWritingSystemFactoryAccessor;
            m_fwTextBoxBottomMsg.WritingSystemCode    = m_cache.LangProject.DefaultUserWritingSystem;

            InitBrowseView(guiControl, mergeCandidates);

            // Get location to the stored values, if any.
            object locWnd = m_mediator.PropertyTable.GetValue("mergeDlgLocation");
            // JohnT: this dialog can't be resized. So it doesn't make sense to
            // remember a size. If we do, we need to override OnLoad (as in SimpleListChooser)
            // to prevent the dialog growing every time at 120 dpi. But such an override
            // makes it too small to show all the controls at the default size.
            // It's better just to use the default size until it's resizeable for some reason.
            //m_mediator.PropertyTable.GetValue("msaCreatorDlgSize");
            // And when I do this, it works the first time, but later times the window is
            // too small and doesn't show all the controls. Give up on smart location for now.
            //object szWnd = this.Size;
            object szWnd = null;             // suppresses the smart location stuff.

            if (locWnd != null && szWnd != null)
            {
                Rectangle rect = new Rectangle((Point)locWnd, (Size)szWnd);
                ScreenUtils.EnsureVisibleRect(ref rect);
                DesktopBounds = rect;
                StartPosition = FormStartPosition.Manual;
            }

            Text        = wp.m_title;
            label2.Text = wp.m_label;

            m_helpTopic = helpTopic;

            if (m_helpTopic != null && FwApp.App != null)            // FwApp.App could be null for testing
            {
                helpProvider = new System.Windows.Forms.HelpProvider();
                helpProvider.HelpNamespace = FwApp.App.HelpFile;
                helpProvider.SetHelpKeyword(this, FwApp.App.GetHelpString(m_helpTopic, 0));
                helpProvider.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic);
            }
        }
Esempio n. 32
0
        private string m_helpTopicId = "khtpDictConfigManager"; // use as default?

        #endregion Fields

        #region Constructors

        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Initializes a new instance of the <see cref="T:DictionaryConfigMgrDlg"/> class.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        public DictionaryConfigMgrDlg(Mediator mediator, string objType, List<XmlNode> configViews, XmlNode current)
        {
            InitializeComponent();

            m_mediator = mediator;
            m_presenter = new DictionaryConfigManager(this, configViews, current);
            m_objType = objType;

            // Make a help topic ID
            m_helpTopicId = generateChooserHelpTopicID(m_objType);

            m_helpProvider = new HelpProvider { HelpNamespace = m_mediator.HelpTopicProvider.HelpFile };
            m_helpProvider.SetHelpKeyword(this, m_mediator.HelpTopicProvider.GetHelpString(m_helpTopicId));
            m_helpProvider.SetHelpNavigator(this, HelpNavigator.Topic);
            m_helpProvider.SetShowHelp(this, true);
        }
Esempio n. 33
0
        public EditMorphBreaksDlg()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            if (!Application.RenderWithVisualStyles)
            {
                m_txtMorphs.BorderStyle = BorderStyle.FixedSingle;
            }

            helpProvider = new System.Windows.Forms.HelpProvider();
            helpProvider.HelpNamespace = FwApp.App.HelpFile;
            helpProvider.SetHelpKeyword(this, FwApp.App.GetHelpString(s_helpTopic, 0));
            helpProvider.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic);
        }
Esempio n. 34
0
		public EditMorphBreaksDlg(IHelpTopicProvider helpTopicProvider)
		{
			m_helpTopicProvider = helpTopicProvider;
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();
			AccessibleNameCreator.AddNames(this);
			AccessibleName = GetType().Name;

			if (!Application.RenderWithVisualStyles)
				m_txtMorphs.BorderStyle = BorderStyle.FixedSingle;

			m_helpProvider = new HelpProvider {HelpNamespace = helpTopicProvider.HelpFile};
			m_helpProvider.SetHelpKeyword(this, helpTopicProvider.GetHelpString(ksHelpTopic));
			m_helpProvider.SetHelpNavigator(this, HelpNavigator.Topic);
		}
Esempio n. 35
0
        public TestResultForm(testresult tstresult, int humanid, pBaseEntities ge, fBaseEntities fe)
        {
            InitializeComponent();
            _ge = ge;
            _fe = fe;
            _testresult = tstresult;
            _humanid = humanid;

            RemarkToolTip = new ToolTip();
            RemarkToolTip.ToolTipIcon = ToolTipIcon.Info;
            RemarkToolTip.ToolTipTitle = "Вопрос:";
            RemarkToolTip.IsBalloon = true;

            HelpProvider help = new HelpProvider();
            help.HelpNamespace = "Recog_help.chm";
            help.SetHelpNavigator(this, HelpNavigator.Topic);
            help.SetHelpKeyword(this, "result_character.htm#test_view");
        }
Esempio n. 36
0
        /// <summary/>
        public void SetDlginfo(ICmPossibilityList posList, Mediator mediator, XCore.PropertyTable propertyTable, bool launchedFromInsertMenu, IPartOfSpeech subItemOwner)
        {
            CheckDisposed();

            m_subItemOwner           = subItemOwner;   // May be null, which is fine.
            m_posList                = posList;
            m_launchedFromInsertMenu = launchedFromInsertMenu;
            m_mediator               = mediator;
            m_propertyTable          = propertyTable;
            if (m_propertyTable != null)
            {
                // Reset window location.
                // Get location to the stored values, if any.
                if (m_propertyTable.PropertyExists("masterCatListDlgLocation") &&
                    m_propertyTable.PropertyExists("masterCatListDlgSize"))
                {
                    var       locWnd = m_propertyTable.GetValue <Point>("masterCatListDlgLocation");
                    var       szWnd  = m_propertyTable.GetValue <Size>("masterCatListDlgSize");
                    Rectangle rect   = new Rectangle(locWnd, szWnd);
                    ScreenHelper.EnsureVisibleRect(ref rect);
                    DesktopBounds = rect;
                    StartPosition = FormStartPosition.Manual;
                }
                m_helpTopicProvider = m_propertyTable.GetValue <IHelpTopicProvider>("HelpTopicProvider");
                if (m_helpTopicProvider != null)
                {
                    helpProvider = new HelpProvider();
                    helpProvider.HelpNamespace = m_helpTopicProvider.HelpFile;
                    helpProvider.SetHelpKeyword(this, m_helpTopicProvider.GetHelpString(s_helpTopic));
                    helpProvider.SetHelpNavigator(this, HelpNavigator.Topic);
                }
            }
            m_bnHelp.Enabled = (m_helpTopicProvider != null);

            Debug.Assert(posList != null);
            m_cache = posList.Cache;
            var posSet = new HashSet <IPartOfSpeech>();

            foreach (IPartOfSpeech pos in posList.ReallyReallyAllPossibilities)
            {
                posSet.Add(pos);
            }
            LoadMasterCategories(posSet);
        }
Esempio n. 37
0
        public RForm(int TestID, int HumanID, pBaseEntities ge,fBaseEntities fe)
        {
            InitializeComponent();

            _ge = ge;
            _fe = fe;
            _testid = TestID;
            _humanid = HumanID;
            _sm = new ScanerManager(_ge, new WinFormsWindowMessageHook(this));
            RemarkToolTip = new ToolTip();
            RemarkToolTip.ToolTipIcon = ToolTipIcon.Info;
            RemarkToolTip.ToolTipTitle = "Вопрос:";
            RemarkToolTip.IsBalloon = true;

            HelpProvider help = new HelpProvider();
            help.HelpNamespace = "Recog_help.chm";
            help.SetHelpNavigator(this, HelpNavigator.Topic);
            help.SetHelpKeyword(this, "test_blank.htm");
        }
Esempio n. 38
0
        private void InitDlg(string className, GlossListTreeView treeView)
        {
            m_sClassName   = className;
            m_tvMasterList = treeView;
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            m_tvMasterList.TerminalsUseCheckBoxes = true;
            iCheckedCount             = 0;
            pictureBox1.Image         = m_imageListPictures.Images[0];
            m_btnOK.Enabled           = false;   // Disable until we are able to support interaction with the DB list of POSes.
            m_rtbDescription.ReadOnly = true;    // Don't allow any editing
            DoExtraInit();

            helpProvider = new System.Windows.Forms.HelpProvider();
            helpProvider.HelpNamespace = FwApp.App.HelpFile;
            helpProvider.SetHelpKeyword(this, FwApp.App.GetHelpString(s_helpTopic, 0));
            helpProvider.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic);
        }
		public FeatureConstraintChooserDlg()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			m_valuesCombo = new FwComboBox();
			m_valuesCombo.DropDownStyle = ComboBoxStyle.DropDownList;
			m_valuesCombo.AdjustStringHeight = false;
			m_valuesCombo.Padding = new Padding(0, 1, 0, 0);
			m_valuesCombo.BackColor = SystemColors.Window;
			m_valuesCombo.SelectedIndexChanged += new EventHandler(m_valuesCombo_SelectedIndexChanged);

			if (FwApp.App != null) // Will be null when running tests
			{
				m_helpProvider = new System.Windows.Forms.HelpProvider();
				m_helpProvider.HelpNamespace = FwApp.App.HelpFile;
				m_helpProvider.SetHelpKeyword(this, FwApp.App.GetHelpString(s_helpTopic, 0));
				m_helpProvider.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic);
			}
		}
		/// <summary>
		/// Initializes a new instance of the <see cref="ConfigureWritingSystemsDlg"/> class.
		/// </summary>
		/// <param name="allWss">All writing systems to display.</param>
		/// <param name="selectedWss">The selected writing systems.</param>
		/// <param name="helpTopicProvider">The help topic provider.</param>
		public ConfigureWritingSystemsDlg(IEnumerable<IWritingSystem> allWss, IEnumerable<IWritingSystem> selectedWss,
			IHelpTopicProvider helpTopicProvider)
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			foreach (IWritingSystem curWs in allWss)
				m_wsListBox.Items.Add(curWs, selectedWss.Contains(curWs));
			m_wsListBox.SelectedIndex = 0;

			m_helpTopicProvider = helpTopicProvider;

			if (m_helpTopicProvider != null) // m_helpTopicProvider could be null for testing
			{
				m_helpProvider = new HelpProvider();
				m_helpProvider.HelpNamespace = m_helpTopicProvider.HelpFile;
				m_helpProvider.SetHelpKeyword(this, m_helpTopicProvider.GetHelpString(HelpTopic));
				m_helpProvider.SetHelpNavigator(this, HelpNavigator.Topic);
			}
		}
Esempio n. 41
0
		/// <summary>
		/// Constructor.
		/// </summary>
		public UtilityDlg(IHelpTopicProvider helpTopicProvider)
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			m_btnRunUtils.Enabled = false;

			m_helpTopicProvider = helpTopicProvider;

			helpProvider = new System.Windows.Forms.HelpProvider();
			helpProvider.HelpNamespace = DirectoryFinder.FWCodeDirectory + m_helpTopicProvider.GetHelpString("UserHelpFile", 0);
			helpProvider.SetHelpKeyword(this, m_helpTopicProvider.GetHelpString(s_helpTopic, 0));
			helpProvider.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic);

			// The standard localization doesn't seem to be working, so do it explicitly here.
			label1.Text = SIL.FieldWorks.FwCoreDlgs.FwCoreDlgs.ksUtilities;
			label2.Text = SIL.FieldWorks.FwCoreDlgs.FwCoreDlgs.ksDescription;
			m_btnHelp.Text = SIL.FieldWorks.FwCoreDlgs.FwCoreDlgs.ksHelp;
			m_btnClose.Text = SIL.FieldWorks.FwCoreDlgs.FwCoreDlgs.ks_Close;
			m_btnRunUtils.Text = SIL.FieldWorks.FwCoreDlgs.FwCoreDlgs.ksRunUtilities;
		}
Esempio n. 42
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public UtilityDlg(IHelpTopicProvider helpTopicProvider)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            m_btnRunUtils.Enabled = false;

            m_helpTopicProvider = helpTopicProvider;

            helpProvider = new System.Windows.Forms.HelpProvider();
            helpProvider.HelpNamespace = DirectoryFinder.FWCodeDirectory + m_helpTopicProvider.GetHelpString("UserHelpFile", 0);
            helpProvider.SetHelpKeyword(this, m_helpTopicProvider.GetHelpString(s_helpTopic, 0));
            helpProvider.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic);

            // The standard localization doesn't seem to be working, so do it explicitly here.
            label1.Text        = SIL.FieldWorks.FwCoreDlgs.FwCoreDlgs.ksUtilities;
            label2.Text        = SIL.FieldWorks.FwCoreDlgs.FwCoreDlgs.ksDescription;
            m_btnHelp.Text     = SIL.FieldWorks.FwCoreDlgs.FwCoreDlgs.ksHelp;
            m_btnClose.Text    = SIL.FieldWorks.FwCoreDlgs.FwCoreDlgs.ks_Close;
            m_btnRunUtils.Text = SIL.FieldWorks.FwCoreDlgs.FwCoreDlgs.ksRunUtilities;
        }
Esempio n. 43
0
        public ExportForm(fBaseEntities fe, pBaseEntities ge)
        {
            InitializeComponent();
            _fe = fe;
            _ge = ge;
            _backuptool = new BackupTool(_fe);
            _backuptool.HumanDone += new EventHandler(_backuptool_HumanDone);
            chb_fam.Click += new EventHandler(chb_fam_Click);

            chb_tests.Click += new EventHandler(chb_fam_Click);

            cb_fam.SelectedValueChanged += new EventHandler(cb_fam_SelectedValueChanged);
            cb_tests.SelectedValueChanged += new EventHandler(cb_fam_SelectedValueChanged);

            dp_begdate.ValueChanged += new EventHandler(cb_fam_SelectedValueChanged);
            dp_enddate.ValueChanged += new EventHandler(cb_fam_SelectedValueChanged);

            SetGridStyle();

            HelpProvider help = new HelpProvider();
            help.HelpNamespace = "Recog_help.chm";
            help.SetHelpNavigator(this, HelpNavigator.Topic);
            help.SetHelpKeyword(this, "menu_settings.htm#export_resp");
        }
Esempio n. 44
0
		private void helpSetup()
		{
			helpProvider = new System.Windows.Forms.HelpProvider();
			helpProvider.HelpNamespace = FwApp.App.HelpFile;
			helpProvider.SetHelpKeyword(this, FwApp.App.GetHelpString(s_helpTopic, 0));
			helpProvider.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic);
		}
Esempio n. 45
0
		/// <summary>
		///
		/// </summary>
		/// <param name="featSys"></param>
		/// <param name="mediator"></param>
		/// <param name="launchedFromInsertMenu"></param>
		/// <param name="sWindowKey">used to store location and size of dialog window</param>
		/// <param name="sXmlFile">file containing the XML form of the gloss list</param>
		public void SetDlginfo(IFsFeatureSystem featSys, Mediator mediator, bool launchedFromInsertMenu, string sWindowKey, string sXmlFile)
		{
			CheckDisposed();

			m_featureSystem = featSys;
			m_featureList = featSys.FeaturesOC;
			m_launchedFromInsertMenu = launchedFromInsertMenu;
			m_mediator = mediator;
			if (mediator != null)
			{
				m_sWindowKeyLocation = sWindowKey + "Location";
				m_sWindowKeySize = sWindowKey + "Size";

				ResetWindowLocationAndSize();

				m_helpTopicProvider = m_mediator.HelpTopicProvider;
				helpProvider = new HelpProvider();
				helpProvider.HelpNamespace = m_helpTopicProvider.HelpFile;
				helpProvider.SetHelpKeyword(this, m_helpTopicProvider.GetHelpString(s_helpTopic));
				helpProvider.SetHelpNavigator(this, HelpNavigator.Topic);
			}
			m_cache = featSys.Cache;
			LoadMasterFeatures(sXmlFile);
			m_tvMasterList.Cache = m_cache;
		}
		/// <summary>
		/// Set up the dlg in preparation to showing it.
		/// </summary>
		/// <param name="cache">FDO cache.</param>
		/// <param name="mediator"></param>
		/// <param name="entry">LexEntry</param>
		public void SetDlgInfo(FdoCache cache, Mediator mediator, ILexEntry entry)
		{
			CheckDisposed();

			Debug.Assert(cache != null);

			m_mediator = mediator;
			m_cache = cache;
			m_entry = entry;
			m_tsf = m_cache.TsStrFactory;
			m_fwTextBoxBottomMsg.WritingSystemFactory = m_cache.WritingSystemFactory;
			//m_fwTextBoxBottomMsg.WritingSystemCode = 1; // What!? Why? No longer makes ANY sense!
			IVwStylesheet stylesheet = FontHeightAdjuster.StyleSheetFromMediator(mediator);
			// We want to do this BEFORE the text gets set, to avoid overriding its height properties.
			// However, because of putting multiple lines in the box, we also need to do it AFTER we set the text
			// (in SetBottomMessage) so it adjusts to the resulting even greater height.
			m_fwTextBoxBottomMsg.AdjustForStyleSheet(this, null, stylesheet);
			Font f = FontHeightAdjuster.GetFontForNormalStyle(
				m_cache.ServiceLocator.WritingSystems.DefaultVernacularWritingSystem.Handle, stylesheet, m_cache.LanguageWritingSystemFactoryAccessor);
			foreach (IMoForm allo in entry.AlternateFormsOS)
			{
				ListViewItem lvi = m_lvAlloOptions.Items.Add(allo.Form.VernacularDefaultWritingSystem.Text);
				lvi.Tag = allo;
				lvi.UseItemStyleForSubItems = true;
				lvi.Font = f;
			}
			m_lvAlloOptions.Font = f;
			// Get location to the stored values, if any.
			object locWnd = m_mediator.PropertyTable.GetValue("swapDlgLocation");
			// And when I do this, it works the first time, but later times the window is
			// too small and doesn't show all the controls. Give up on smart location for now.
			//object szWnd = this.Size;
			object szWnd = null; // suppresses the smart location stuff.
			//if (locWnd != null && szWnd != null)
			//{
			//    Rectangle rect = new Rectangle((Point)locWnd, (Size)szWnd);
			//    ScreenUtils.EnsureVisibleRect(ref rect);
			//    DesktopBounds = rect;
			//    StartPosition = FormStartPosition.Manual;
			//}
			m_lvAlloOptions.Items[0].Selected = true;
			Text = LexEdStrings.ksSwapLexWithAllo;
			label2.Text = LexEdStrings.ksAlternateForms;

			// Determine the help file to use, if any
			m_helpTopic = "khtpSwapLexemeWithAllomorph";

			if(m_mediator.HelpTopicProvider != null)
			{
				helpProvider = new HelpProvider();
				helpProvider.HelpNamespace = m_mediator.HelpTopicProvider.HelpFile;
				helpProvider.SetHelpKeyword(this, m_mediator.HelpTopicProvider.GetHelpString(m_helpTopic));
				helpProvider.SetHelpNavigator(this, HelpNavigator.Topic);
			}
		}
Esempio n. 47
0
        /// <summary>
        /// Initialize the dialog before showing it.
        /// </summary>
        /// <param name="cache"></param>
        /// <param name="entry"></param>
        /// <param name="titleForEdit">Edit title appropriate to the button's context.</param>
        public void SetDlgInfo(FdoCache cache, IPersistenceProvider persistProvider,
                               Mediator mediator, ILexEntry entry, SandboxGenericMSA sandboxMsa, int hvoOriginalMsa,
                               bool useForEdit, string titleForEdit)
        {
            CheckDisposed();

            Debug.Assert(m_cache == null);
            MsaType msaType = sandboxMsa.MsaType;

            m_cache    = cache;
            m_mediator = mediator;

            if (useForEdit)
            {
                // Change the window title and the OK button text.
                Text        = titleForEdit;
                s_helpTopic = "khtpEditGrammaticalFunction";
                btnOk.Text  = LexText.Controls.LexTextControls.ks_OK;
            }
            helpProvider.HelpNamespace = mediator.HelpTopicProvider.HelpFile;
            helpProvider.SetHelpKeyword(this, mediator.HelpTopicProvider.GetHelpString(s_helpTopic));
            helpProvider.SetHelpNavigator(this, HelpNavigator.Topic);

            // Set font, writing system factory, and code for the edit box.
            float          fntSize   = label1.Font.Size * 2.0F;
            IWritingSystem defVernWs = m_cache.ServiceLocator.WritingSystems.DefaultVernacularWritingSystem;

            m_fwtbCitationForm.Font = new Font(defVernWs.DefaultFontName, fntSize);
            m_fwtbCitationForm.WritingSystemFactory = m_cache.WritingSystemFactory;
            m_fwtbCitationForm.WritingSystemCode    = defVernWs.Handle;
            m_fwtbCitationForm.AdjustForStyleSheet(this, null, mediator);
            m_fwtbCitationForm.AdjustStringHeight = false;
            m_fwtbCitationForm.Tss       = entry.HeadWord;
            m_fwtbCitationForm.HasBorder = false;

            m_fwtbSenses.Font = new Font(defVernWs.DefaultFontName, fntSize);
            m_fwtbSenses.WritingSystemFactory = m_cache.WritingSystemFactory;
            m_fwtbSenses.WritingSystemCode    = defVernWs.Handle;
            m_fwtbSenses.AdjustForStyleSheet(this, null, mediator);
            m_fwtbSenses.AdjustStringHeight = false;

            ITsIncStrBldr tisb = TsIncStrBldrClass.Create();

            tisb.SetIntPropValues((int)FwTextPropType.ktptWs, 0, m_cache.DefaultAnalWs);
            var msaRepository = m_cache.ServiceLocator.GetInstance <IMoMorphSynAnalysisRepository>();

            if (hvoOriginalMsa != 0)
            {
                foreach (var sense in entry.AllSenses)
                {
                    if (sense.MorphoSyntaxAnalysisRA != null)
                    {
                        if (sense.MorphoSyntaxAnalysisRA == msaRepository.GetObject(hvoOriginalMsa))
                        {
                            if (tisb.Text != null)
                            {
                                tisb.Append(", ");                                      // REVIEW: IS LOCALIZATION NEEDED FOR BUILDING THIS LIST?
                            }
                            tisb.AppendTsString(sense.ShortNameTSS);
                        }
                    }
                }
            }
            m_fwtbSenses.Tss       = tisb.GetString();
            m_fwtbSenses.HasBorder = false;

            m_msaGroupBox.Initialize(m_cache, m_mediator, this, sandboxMsa);
            int oldHeight = m_msaGroupBox.Height;
            int newHeight = Math.Max(oldHeight, m_msaGroupBox.PreferredHeight);
            int delta     = newHeight - oldHeight;

            if (delta > 0)
            {
                m_msaGroupBox.AdjustInternalControlsAndGrow();
                Debug.Assert(m_msaGroupBox.Height == m_msaGroupBox.PreferredHeight);
                FontHeightAdjuster.GrowDialogAndAdjustControls(this, delta, m_msaGroupBox);
            }

            if (mediator != null)
            {
                // Reset window location.
                // Get location to the stored values, if any.
                object locWnd = m_mediator.PropertyTable.GetValue("msaCreatorDlgLocation");
                // JohnT: this dialog can't be resized. So it doesn't make sense to
                // remember a size. If we do, we need to override OnLoad (as in SimpleListChooser)
                // to prevent the dialog growing every time at 120 dpi. But such an override
                // makes it too small to show all the controls at the default size.
                // It's better just to use the default size until it's resizeable for some reason.
                //m_mediator.PropertyTable.GetValue("msaCreatorDlgSize");
                object szWnd = this.Size;
                if (locWnd != null && szWnd != null)
                {
                    Rectangle rect = new Rectangle((Point)locWnd, (Size)szWnd);
                    ScreenUtils.EnsureVisibleRect(ref rect);
                    DesktopBounds = rect;
                    StartPosition = FormStartPosition.Manual;
                }
            }
        }
Esempio n. 48
0
 private void FormBased_Load(object sender, System.EventArgs e)
 {
     HelpProvider1.HelpNamespace = "sample.chm";
     HelpProvider1.SetHelpKeyword(this, "1001.html");
     HelpProvider1.SetHelpNavigator(this, HelpNavigator.Topic);
 }
Esempio n. 49
-1
        public StenForm(int testid, int humanid, pBaseEntities ge, fBaseEntities fe)
        {
            InitializeComponent();
            _ge = ge;
            _fe = fe;
            _humanid = humanid;
            _testid = testid;

            HelpProvider help = new HelpProvider();
            help.HelpNamespace = "Recog_help.chm";
            help.SetHelpNavigator(this, HelpNavigator.Topic);
            help.SetHelpKeyword(this, "test_sten.htm");
        }
Esempio n. 50
-1
		public EditMorphBreaksDlg()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			if (!Application.RenderWithVisualStyles)
				m_txtMorphs.BorderStyle = BorderStyle.FixedSingle;

			helpProvider = new System.Windows.Forms.HelpProvider();
			helpProvider.HelpNamespace = FwApp.App.HelpFile;
			helpProvider.SetHelpKeyword(this, FwApp.App.GetHelpString(s_helpTopic, 0));
			helpProvider.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic);
		}