Beispiel #1
0
 /// <summary>
 /// Добавить элемент в документацию
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void AddElement_Click(object sender, RoutedEventArgs e)
 {
     MainText.AppendText(String.Format("Тип Элемента : {0} \r\n", TypeElementComboBox.SelectedValue));
     MainText.AppendText(String.Format("Элемент : {0} \r\n", ShablonComboBox.SelectedValue));
     MainText.AppendText(String.Format("Имя : {0} \r\n", NameElement.Text));
     MainText.AppendText(String.Format("Описание : {0} \r\n", Note.Text));
     MainText.AppendText(String.Format("Событие : {0} \r\n", EventText.Text));
     MainText.AppendText(String.Format("Сцена : {0} \r\n", SceneNameText.Text));
     etypes.Add(new ElementTypes(NameElement.Text, TypeElementComboBox.SelectedValue.ToString(), ShablonComboBox.SelectedValue.ToString(), Note.Text, EventText.Text, SceneNameText.Text));
 }
Beispiel #2
0
 private void AppendMainText(string UpdText)
 {
     //Dispatcher for MainWindow for updating UI
     Dispatcher.BeginInvoke(DispatcherPriority.Normal, (ThreadStart) delegate()
     {
         MainText.AppendText(UpdText);
         MainText.ScrollToEnd();
     }
                            );
 }
Beispiel #3
0
        public AlertForm(string mainText, int size = 10)
        {
            InitializeComponent();

            buttonOk.BringToFront();

            MainText.SelectionFont = new Font("Tahoma", size, FontStyle.Regular);
            MainText.AppendText(mainText + "\r\n");
            MainText.ScrollToCaret();
            MainText.SelectAll();
            MainText.SelectionAlignment = HorizontalAlignment.Center;
        }
Beispiel #4
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            // show login window;
            LoginWindow subWindow = new LoginWindow();

            subWindow.Owner = this;
            subWindow.ShowDialog();

            //Ok button clicked on login window
            if (subWindow.Confirmed && !String.IsNullOrEmpty(subWindow.Password) &&
                !String.IsNullOrEmpty(subWindow.Login))
            {
                password = subWindow.Password;
                userName = subWindow.Login;
                ConnectButton.Content   = "Connecting...";
                ConnectButton.IsEnabled = false;
                MainText.AppendText("Connecting to remote PowerShell, wait...\n");

                //create background thread and start PSconnection
                Thread t1 = new Thread(new ThreadStart(PSconnection));
                t1.Start();
            }
        }
        public EventDisplayForm(ObjectEvent objectEvent)
        {
            InitializeComponent();

            _actionSelectionFlag = false;

            TopMost       = true;
            ShowInTaskbar = false;

            _objectEvent = objectEvent;

            MainText.SelectionFont = new Font("Tahoma", _objectEvent._sizeFont, FontStyle.Regular);
            MainText.AppendText(_objectEvent._eventText + "\r\n");
            MainText.ScrollToCaret();
            MainText.SelectAll();
            MainText.SelectionAlignment = HorizontalAlignment.Center;

            //MainText.Text = _objectEvent._eventText;

            for (int index = 0; index < _objectEvent._outcomeOptions.Count; index++)
            {
                AddEvents(_objectEvent._outcomeOptions[index], index);
            }
        }
Beispiel #6
0
 /// <summary>
 /// Открывает xml и выводит информацию
 /// </summary>
 void InicDataFromDocumentation()
 {
     FileDocumentation = ofd.FileName;
     _doc = new OpenDocumentationFromXml(FileDocumentation);
     MainText.AppendText(_doc.GetAllNodes());
 }