Example #1
0
//        private TextBox Directory;
//        private TextBox PriorityTextBox;

        public AddProgramSource(PluginInitContext context, Settings settings)
        {
            InitializeComponent();
            _context  = context;
            _settings = settings;
            DirectoryTextBox.Focus();
        }
Example #2
0
        public Edit(Output output)
        {
            InitializeComponent();

            foreach (string fileNameReplacement in AttributeHelper.GetAttributeReplacements())
            {
                MenuItem item = new MenuItem();
                item.Header = new TextBlock()
                {
                    Text = fileNameReplacement
                };
                item.Tag    = fileNameReplacement;
                item.Click += FileNameReplacementItem_Click;
                FileNameReplacementList.Items.Add(item);
            }


            NameTextBox.Text      = output.Name;
            DirectoryTextBox.Text = output.Directory;
            FileNameTextBox.Text  = output.FileName;

            FileFormatComboBox.ItemsSource   = FileHelper.GetFileFormats();
            FileFormatComboBox.SelectedValue = output.FileFormatID;

            SaveAutomaticallyCheckBox.IsChecked = output.SaveAutomatically;

            NameTextBox.TextChanged             += ValidateData;
            FileFormatComboBox.SelectionChanged += ValidateData;
            ValidateData(null, null);

            DirectoryTextBox.Focus();
        }
Example #3
0
 private void ShowDirectoryTextBox()
 {
     ButtonGrid.Visibility           = Visibility.Collapsed;
     DirectoryTextBoxMenu.Visibility = Visibility.Visible;
     DirectoryTextBox.SelectAll();
     DirectoryTextBox.Focus();
     DirectoryTextBoxMenuItem.IsSubmenuOpen = false;
 }
Example #4
0
        // When the window is opened for the first time.
        private void MainWindow_Load(object sender, EventArgs e)
        {
            // Set water mark on text fields
            DirectoryTextBox.SetWatermark("Directory");
            SearchTextBox.SetWatermark("Search");

            // Initialize form controls
            EmoteBox.Image           = new Bitmap(1, 1);
            EmoteSizeLabel.Text      = string.Empty;
            ResultReporterLabel.Text = string.Empty;
            _uiService.LoadConfig(DirectoryTextBox);
        }
Example #5
0
 private void _viewModel_FocusAddressTextBoxRequested(object sender, EventArgs e)
 {
     if (DirectoryTextBoxMenu.Visibility == Visibility.Hidden)
     {
         ShowDirectoryTextBox();
     }
     else
     {
         DirectoryTextBox.Focus();
         string text = DirectoryTextBox.Text;
         if (!string.IsNullOrEmpty(text))
         {
             DirectoryTextBox.SelectionStart = text.Length;
         }
     }
 }