Exemplo n.º 1
0
        public void Init(Mediator mediator, PropertyTable propertyTable, XmlNode configurationParameters)
        {
            CheckDisposed();
            _mediator      = mediator;        //allows the Cache property to function
            _propertyTable = propertyTable;
            _cache         = _propertyTable.GetValue <LcmCache>("cache");

            string name  = XmlUtils.GetAttributeValue(configurationParameters, "clerk");
            var    clerk = RecordClerk.FindClerk(_propertyTable, name);

            m_clerk = (clerk == null || clerk is TemporaryRecordClerk) ?
                      (InterlinearTextsRecordClerk)RecordClerkFactory.CreateClerk(mediator, _propertyTable, configurationParameters, true) :
                      (InterlinearTextsRecordClerk)clerk;
            // There's no record bar for it to control, but it should control the staus bar (e.g., it should update if we change
            // the set of selected texts).
            m_clerk.ActivateUI(true);
            _areaName = XmlUtils.GetOptionalAttributeValue(configurationParameters, "area", "unknown");
            RebuildStatisticsTable();
            //add ourselves so that we can receive messages (related to the text selection currently misnamed AddTexts)
            mediator.AddColleague(this);
            //add our current state to the history system
            string toolName = _propertyTable.GetStringProperty("currentContentControl", "");

            mediator.SendMessage("AddContextToHistory", new FwLinkArgs(toolName, Guid.Empty), false);
        }
Exemplo n.º 2
0
		public void Init(Mediator mediator, XmlNode configurationParameters)
		{
			CheckDisposed();
			this.mediator = mediator; //allows the Cache property to function

			string name = XmlUtils.GetAttributeValue(configurationParameters, "clerk");
			var clerk = RecordClerk.FindClerk(mediator, name);
			m_clerk = (clerk == null || clerk is TemporaryRecordClerk) ?
				(InterlinearTextsRecordClerk)RecordClerkFactory.CreateClerk(mediator, configurationParameters, true) :
				(InterlinearTextsRecordClerk)clerk;
			// There's no record bar for it to control, but it should control the staus bar (e.g., it should update if we change
			// the set of selected texts).
			m_clerk.ActivateUI(true);
			_areaName = XmlUtils.GetOptionalAttributeValue(configurationParameters, "area", "unknown");
			RebuildStatisticsTable();
			//add ourselves so that we can receive messages (related to the text selection currently misnamed AddTexts)
			mediator.AddColleague(this);
			//add our current state to the history system
			string toolName = mediator.PropertyTable.GetStringProperty("currentContentControl", "");
			mediator.SendMessage("AddContextToHistory", new FwLinkArgs(toolName, Guid.Empty), false);
		}
 internal NonUndoableCreateAndInsertStText(FdoCache cache, InterlinearTextsRecordClerk clerk)
     : base(cache, clerk)
 {
 }
 internal UndoableCreateAndInsertStText(FdoCache cache, Command command, InterlinearTextsRecordClerk clerk)
     : base(cache, clerk)
 {
     CommandArgs = command;
 }
 internal CreateAndInsertStText(FdoCache cache, InterlinearTextsRecordClerk clerk)
 {
     Cache = cache;
     Clerk = clerk;
 }