private void EditText()
 {
     TextEditor te = new TextEditor();
     te.TextObject = ((TextOverlay)Focus).TextObject;
     if (te.ShowDialog() == DialogResult.OK)
     {
         //todo localize
         Undo.Push(new UndoTourStopChange(Language.GetLocalizedText(545, "Text Edit"), tour));
         ((TextOverlay)Focus).TextObject = te.TextObject;
         ((TextOverlay)Focus).Width = 0;
         ((TextOverlay)Focus).Height = 0;
         Focus.Color = te.TextObject.ForegroundColor;
         Focus.CleanUp();
     }
 }
示例#2
0
        private void AddText_Click(object sender, EventArgs e)
        {
            if (tour != null && Tour.CurrentTourStop != null)
            {

                var textEdit = new TextEditor();
                if (textEdit.ShowDialog() == DialogResult.OK)
                {
                    TourEditorUI.AddText(textEdit.Text, textEdit.TextObject);
                }
            }
        }