Пример #1
0
        public void AddControl(ListBoxWithAddRemove control)
        {
            foreach (Control existing in MyStackPanel.Children)
            {
                if (existing.Name == control.Name)
                {
                    return;
                }
            }

            ListBoxWithAddRemove newControl = new ListBoxWithAddRemove(control);
            MyStackPanel.Children.Add(newControl);
        }
Пример #2
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 5 "..\..\..\MainWindow.xaml"
     ((TaskDash.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.OnWindowClosing);
     
     #line default
     #line hidden
     
     #line 5 "..\..\..\MainWindow.xaml"
     ((TaskDash.MainWindow)(target)).Closed += new System.EventHandler(this.OnWindowClosed);
     
     #line default
     #line hidden
     
     #line 6 "..\..\..\MainWindow.xaml"
     ((TaskDash.MainWindow)(target)).KeyDown += new System.Windows.Input.KeyEventHandler(this.OnWindowKeyDown);
     
     #line default
     #line hidden
     
     #line 7 "..\..\..\MainWindow.xaml"
     ((TaskDash.MainWindow)(target)).StateChanged += new System.EventHandler(this.OnStateChanged);
     
     #line default
     #line hidden
     
     #line 7 "..\..\..\MainWindow.xaml"
     ((TaskDash.MainWindow)(target)).IsVisibleChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.OnIsVisibleChanged);
     
     #line default
     #line hidden
     return;
     case 2:
     this.SaveButton = ((System.Windows.Controls.Button)(target));
     
     #line 21 "..\..\..\MainWindow.xaml"
     this.SaveButton.Click += new System.Windows.RoutedEventHandler(this.OnSaveButtonClick);
     
     #line default
     #line hidden
     return;
     case 3:
     this.AccordianButton = ((System.Windows.Controls.Button)(target));
     
     #line 22 "..\..\..\MainWindow.xaml"
     this.AccordianButton.Click += new System.Windows.RoutedEventHandler(this.OnAccordianButtonClick);
     
     #line default
     #line hidden
     return;
     case 4:
     this.comboBoxTagsFilter = ((System.Windows.Controls.ComboBox)(target));
     
     #line 32 "..\..\..\MainWindow.xaml"
     this.comboBoxTagsFilter.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.OnComboBoxTagsFilterSelectionChanged);
     
     #line default
     #line hidden
     return;
     case 5:
     this.textBoxSearch = ((System.Windows.Controls.TextBox)(target));
     
     #line 34 "..\..\..\MainWindow.xaml"
     this.textBoxSearch.KeyUp += new System.Windows.Input.KeyEventHandler(this.OnTextBoxSearchKeyUp);
     
     #line default
     #line hidden
     
     #line 34 "..\..\..\MainWindow.xaml"
     this.textBoxSearch.KeyDown += new System.Windows.Input.KeyEventHandler(this.OnTextBoxSearchKeyDown);
     
     #line default
     #line hidden
     return;
     case 6:
     this.comboBoxSortBy = ((System.Windows.Controls.ComboBox)(target));
     
     #line 37 "..\..\..\MainWindow.xaml"
     this.comboBoxSortBy.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.OnComboBoxSortBySelectionChanged);
     
     #line default
     #line hidden
     return;
     case 7:
     this.checkBoxCurrentFilter = ((System.Windows.Controls.CheckBox)(target));
     
     #line 39 "..\..\..\MainWindow.xaml"
     this.checkBoxCurrentFilter.Checked += new System.Windows.RoutedEventHandler(this.OnCheckBoxCurrentFilterChecked);
     
     #line default
     #line hidden
     
     #line 39 "..\..\..\MainWindow.xaml"
     this.checkBoxCurrentFilter.Unchecked += new System.Windows.RoutedEventHandler(this.OnCheckBoxCurrentFilterChecked);
     
     #line default
     #line hidden
     return;
     case 8:
     this.checkBoxSomedayFilter = ((System.Windows.Controls.CheckBox)(target));
     
     #line 40 "..\..\..\MainWindow.xaml"
     this.checkBoxSomedayFilter.Checked += new System.Windows.RoutedEventHandler(this.OnCheckBoxSomedayFilterChecked);
     
     #line default
     #line hidden
     
     #line 40 "..\..\..\MainWindow.xaml"
     this.checkBoxSomedayFilter.Unchecked += new System.Windows.RoutedEventHandler(this.OnCheckBoxSomedayFilterChecked);
     
     #line default
     #line hidden
     return;
     case 9:
     this.checkBoxCompletedFilter = ((System.Windows.Controls.CheckBox)(target));
     
     #line 41 "..\..\..\MainWindow.xaml"
     this.checkBoxCompletedFilter.Checked += new System.Windows.RoutedEventHandler(this.OnCheckBoxCompletedFilterChecked);
     
     #line default
     #line hidden
     
     #line 41 "..\..\..\MainWindow.xaml"
     this.checkBoxCompletedFilter.Unchecked += new System.Windows.RoutedEventHandler(this.OnCheckBoxCompletedFilterChecked);
     
     #line default
     #line hidden
     return;
     case 10:
     this.listBoxTasks = ((TaskDash.Controls.ListBoxTasks)(target));
     
     #line 44 "..\..\..\MainWindow.xaml"
     this.listBoxTasks.ControlFocused += new System.Windows.RoutedEventHandler(this.ListBoxWithAddRemoveControlFocused);
     
     #line default
     #line hidden
     
     #line 45 "..\..\..\MainWindow.xaml"
     this.listBoxTasks.KeyDown += new System.Windows.Input.KeyEventHandler(this.OnListBoxTasksKeyDown);
     
     #line default
     #line hidden
     
     #line 45 "..\..\..\MainWindow.xaml"
     this.listBoxTasks.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.OnListBoxTasksSelectionChanged);
     
     #line default
     #line hidden
     
     #line 45 "..\..\..\MainWindow.xaml"
     this.listBoxTasks.Loaded += new System.Windows.RoutedEventHandler(this.OnListBoxTasksLoaded);
     
     #line default
     #line hidden
     return;
     case 11:
     this.grid1 = ((System.Windows.Controls.Grid)(target));
     return;
     case 12:
     this.textBoxKey = ((System.Windows.Controls.TextBox)(target));
     return;
     case 13:
     this.buttonIssueTracker = ((System.Windows.Controls.Button)(target));
     
     #line 80 "..\..\..\MainWindow.xaml"
     this.buttonIssueTracker.Click += new System.Windows.RoutedEventHandler(this.buttonIssueTracker_Click);
     
     #line default
     #line hidden
     return;
     case 14:
     this.textBoxDescription = ((System.Windows.Controls.TextBox)(target));
     return;
     case 15:
     this.buttonIssueTrackerSearch = ((System.Windows.Controls.Button)(target));
     
     #line 84 "..\..\..\MainWindow.xaml"
     this.buttonIssueTrackerSearch.Click += new System.Windows.RoutedEventHandler(this.buttonIssueTrackerSearch_Click);
     
     #line default
     #line hidden
     return;
     case 16:
     this.textBoxTags = ((System.Windows.Controls.TextBox)(target));
     return;
     case 17:
     this.datePickerDueDate = ((System.Windows.Controls.DatePicker)(target));
     return;
     case 18:
     this.textBoxTotalTime = ((System.Windows.Controls.TextBox)(target));
     return;
     case 19:
     this.textBoxRecentTime = ((System.Windows.Controls.TextBox)(target));
     return;
     case 20:
     this.buttonStartStop = ((System.Windows.Controls.Button)(target));
     
     #line 97 "..\..\..\MainWindow.xaml"
     this.buttonStartStop.Click += new System.Windows.RoutedEventHandler(this.OnButtonStartStopClick);
     
     #line default
     #line hidden
     return;
     case 21:
     this.buttonReset = ((System.Windows.Controls.Button)(target));
     
     #line 98 "..\..\..\MainWindow.xaml"
     this.buttonReset.Click += new System.Windows.RoutedEventHandler(this.OnButtonResetClick);
     
     #line default
     #line hidden
     return;
     case 22:
     this.checkBoxCurrent = ((System.Windows.Controls.CheckBox)(target));
     return;
     case 23:
     this.checkBoxSomeday = ((System.Windows.Controls.CheckBox)(target));
     return;
     case 24:
     this.checkBoxCompleted = ((System.Windows.Controls.CheckBox)(target));
     return;
     case 25:
     this.textBoxDetails = ((TaskDash.Controls.TextBoxWithDescription)(target));
     
     #line 109 "..\..\..\MainWindow.xaml"
     this.textBoxDetails.ControlFocused += new System.Windows.RoutedEventHandler(this.TextBoxWithDescriptionControlFocused);
     
     #line default
     #line hidden
     return;
     case 26:
     this.comboBoxLogTagsFilter = ((System.Windows.Controls.ComboBox)(target));
     
     #line 118 "..\..\..\MainWindow.xaml"
     this.comboBoxLogTagsFilter.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.OnComboBoxTagsFilterSelectionChanged);
     
     #line default
     #line hidden
     return;
     case 27:
     this.listBoxLogs = ((TaskDash.Controls.ListBoxWithAddRemove)(target));
     
     #line 121 "..\..\..\MainWindow.xaml"
     this.listBoxLogs.ControlFocused += new System.Windows.RoutedEventHandler(this.ListBoxWithAddRemoveControlFocused);
     
     #line default
     #line hidden
     
     #line 121 "..\..\..\MainWindow.xaml"
     this.listBoxLogs.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.OnListBoxLogsSelectionChanged);
     
     #line default
     #line hidden
     
     #line 122 "..\..\..\MainWindow.xaml"
     this.listBoxLogs.KeyDown += new System.Windows.Input.KeyEventHandler(this.OnListBoxLogsKeyDown);
     
     #line default
     #line hidden
     return;
     case 28:
     this.textBoxLogTags = ((System.Windows.Controls.TextBox)(target));
     return;
     case 29:
     this.textBoxLogEntry = ((TaskDash.Controls.TextBoxWithDescription)(target));
     
     #line 128 "..\..\..\MainWindow.xaml"
     this.textBoxLogEntry.ControlFocused += new System.Windows.RoutedEventHandler(this.TextBoxWithDescriptionControlFocused);
     
     #line default
     #line hidden
     return;
     case 30:
     this.textBoxNextSteps = ((TaskDash.Controls.TextBoxWithDescription)(target));
     
     #line 135 "..\..\..\MainWindow.xaml"
     this.textBoxNextSteps.ControlFocused += new System.Windows.RoutedEventHandler(this.TextBoxWithDescriptionControlFocused);
     
     #line default
     #line hidden
     return;
     case 31:
     this.checkBoxItemsCompletedFilter = ((System.Windows.Controls.CheckBox)(target));
     
     #line 137 "..\..\..\MainWindow.xaml"
     this.checkBoxItemsCompletedFilter.Checked += new System.Windows.RoutedEventHandler(this.OnCheckBoxItemsCompletedFilterChecked);
     
     #line default
     #line hidden
     
     #line 137 "..\..\..\MainWindow.xaml"
     this.checkBoxItemsCompletedFilter.Unchecked += new System.Windows.RoutedEventHandler(this.OnCheckBoxItemsCompletedFilterChecked);
     
     #line default
     #line hidden
     return;
     case 32:
     this.listBoxItems = ((TaskDash.Controls.ListBoxWithAddRemove)(target));
     
     #line 138 "..\..\..\MainWindow.xaml"
     this.listBoxItems.ControlFocused += new System.Windows.RoutedEventHandler(this.ListBoxWithAddRemoveControlFocused);
     
     #line default
     #line hidden
     
     #line 141 "..\..\..\MainWindow.xaml"
     this.listBoxItems.KeyDown += new System.Windows.Input.KeyEventHandler(this.OnListBoxItemsKeyDown);
     
     #line default
     #line hidden
     
     #line 142 "..\..\..\MainWindow.xaml"
     this.listBoxItems.MouseDoubleClick += new System.Windows.RoutedEventHandler(this.EditTaskItemClick);
     
     #line default
     #line hidden
     return;
     case 33:
     this.listBoxLinks = ((TaskDash.Controls.ListBoxLinks)(target));
     
     #line 146 "..\..\..\MainWindow.xaml"
     this.listBoxLinks.ControlFocused += new System.Windows.RoutedEventHandler(this.ListBoxWithAddRemoveControlFocused);
     
     #line default
     #line hidden
     return;
     case 34:
     this.listBoxPhrases = ((TaskDash.Controls.ListBoxPhrases)(target));
     
     #line 147 "..\..\..\MainWindow.xaml"
     this.listBoxPhrases.ControlFocused += new System.Windows.RoutedEventHandler(this.ListBoxWithAddRemoveControlFocused);
     
     #line default
     #line hidden
     return;
     case 35:
     this.listBoxWords = ((TaskDash.Controls.ListBoxWords)(target));
     
     #line 148 "..\..\..\MainWindow.xaml"
     this.listBoxWords.ControlFocused += new System.Windows.RoutedEventHandler(this.ListBoxWithAddRemoveControlFocused);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
Пример #3
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 1 "..\..\..\AccordianWindow.xaml"
     ((TaskDash.AccordianWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.OnWindowClosing);
     
     #line default
     #line hidden
     
     #line 1 "..\..\..\AccordianWindow.xaml"
     ((TaskDash.AccordianWindow)(target)).KeyDown += new System.Windows.Input.KeyEventHandler(this.OnWindowKeyDown);
     
     #line default
     #line hidden
     
     #line 1 "..\..\..\AccordianWindow.xaml"
     ((TaskDash.AccordianWindow)(target)).StateChanged += new System.EventHandler(this.OnStateChanged);
     
     #line default
     #line hidden
     
     #line 1 "..\..\..\AccordianWindow.xaml"
     ((TaskDash.AccordianWindow)(target)).IsVisibleChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.OnIsVisibleChanged);
     
     #line default
     #line hidden
     return;
     case 2:
     this.SaveButton = ((System.Windows.Controls.Button)(target));
     
     #line 5 "..\..\..\AccordianWindow.xaml"
     this.SaveButton.Click += new System.Windows.RoutedEventHandler(this.OnSaveButtonClick);
     
     #line default
     #line hidden
     return;
     case 3:
     this.UndockButton = ((System.Windows.Controls.Button)(target));
     
     #line 6 "..\..\..\AccordianWindow.xaml"
     this.UndockButton.Click += new System.Windows.RoutedEventHandler(this.OnUndockButtonClick);
     
     #line default
     #line hidden
     return;
     case 4:
     this.textBoxKey = ((System.Windows.Controls.TextBox)(target));
     return;
     case 5:
     this.textBoxDescription = ((System.Windows.Controls.TextBox)(target));
     return;
     case 6:
     this.textBoxTags = ((System.Windows.Controls.TextBox)(target));
     return;
     case 7:
     this.datePickerDueDate = ((System.Windows.Controls.DatePicker)(target));
     return;
     case 8:
     this.textBoxTotalTime = ((System.Windows.Controls.TextBox)(target));
     return;
     case 9:
     this.textBoxRecentTime = ((System.Windows.Controls.TextBox)(target));
     return;
     case 10:
     this.buttonStartStop = ((System.Windows.Controls.Button)(target));
     
     #line 43 "..\..\..\AccordianWindow.xaml"
     this.buttonStartStop.Click += new System.Windows.RoutedEventHandler(this.OnButtonStartStopClick);
     
     #line default
     #line hidden
     return;
     case 11:
     this.buttonReset = ((System.Windows.Controls.Button)(target));
     
     #line 44 "..\..\..\AccordianWindow.xaml"
     this.buttonReset.Click += new System.Windows.RoutedEventHandler(this.OnButtonResetClick);
     
     #line default
     #line hidden
     return;
     case 12:
     this.checkBoxCurrent = ((System.Windows.Controls.CheckBox)(target));
     return;
     case 13:
     this.checkBoxCompleted = ((System.Windows.Controls.CheckBox)(target));
     return;
     case 14:
     this.textBoxSummary = ((TaskDash.Controls.TextBoxWithDescription)(target));
     return;
     case 15:
     this.textBoxDetails = ((TaskDash.Controls.TextBoxWithDescription)(target));
     return;
     case 16:
     this.comboBoxTagsFilter = ((System.Windows.Controls.ComboBox)(target));
     
     #line 65 "..\..\..\AccordianWindow.xaml"
     this.comboBoxTagsFilter.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.OnComboBoxTagsFilterSelectionChanged);
     
     #line default
     #line hidden
     return;
     case 17:
     this.textBoxSearch = ((System.Windows.Controls.TextBox)(target));
     
     #line 67 "..\..\..\AccordianWindow.xaml"
     this.textBoxSearch.KeyUp += new System.Windows.Input.KeyEventHandler(this.OnTextBoxSearchKeyUp);
     
     #line default
     #line hidden
     
     #line 67 "..\..\..\AccordianWindow.xaml"
     this.textBoxSearch.KeyDown += new System.Windows.Input.KeyEventHandler(this.OnTextBoxSearchKeyDown);
     
     #line default
     #line hidden
     return;
     case 18:
     this.comboBoxSortBy = ((System.Windows.Controls.ComboBox)(target));
     
     #line 70 "..\..\..\AccordianWindow.xaml"
     this.comboBoxSortBy.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.OnComboBoxSortBySelectionChanged);
     
     #line default
     #line hidden
     return;
     case 19:
     this.checkBoxCurrentFilter = ((System.Windows.Controls.CheckBox)(target));
     
     #line 72 "..\..\..\AccordianWindow.xaml"
     this.checkBoxCurrentFilter.Checked += new System.Windows.RoutedEventHandler(this.checkBoxCurrentFilter_Checked);
     
     #line default
     #line hidden
     
     #line 72 "..\..\..\AccordianWindow.xaml"
     this.checkBoxCurrentFilter.Unchecked += new System.Windows.RoutedEventHandler(this.checkBoxCurrentFilter_Checked);
     
     #line default
     #line hidden
     return;
     case 20:
     this.checkBoxCompletedFilter = ((System.Windows.Controls.CheckBox)(target));
     
     #line 73 "..\..\..\AccordianWindow.xaml"
     this.checkBoxCompletedFilter.Checked += new System.Windows.RoutedEventHandler(this.OnCheckBoxCompletedFilterChecked);
     
     #line default
     #line hidden
     
     #line 73 "..\..\..\AccordianWindow.xaml"
     this.checkBoxCompletedFilter.Unchecked += new System.Windows.RoutedEventHandler(this.OnCheckBoxCompletedFilterChecked);
     
     #line default
     #line hidden
     return;
     case 21:
     this.listBoxTasks = ((TaskDash.Controls.ListBoxWithAddRemove)(target));
     
     #line 76 "..\..\..\AccordianWindow.xaml"
     this.listBoxTasks.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.OnListBoxTasksSelectionChanged);
     
     #line default
     #line hidden
     
     #line 76 "..\..\..\AccordianWindow.xaml"
     this.listBoxTasks.Loaded += new System.Windows.RoutedEventHandler(this.OnListBoxTasksLoaded);
     
     #line default
     #line hidden
     return;
     case 22:
     this.listBoxLogs = ((TaskDash.Controls.ListBoxWithAddRemove)(target));
     
     #line 81 "..\..\..\AccordianWindow.xaml"
     this.listBoxLogs.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.OnListBoxLogsSelectionChanged);
     
     #line default
     #line hidden
     return;
     case 23:
     this.textBoxLogEntry = ((TaskDash.Controls.TextBoxWithDescription)(target));
     return;
     case 24:
     this.listBoxItems = ((TaskDash.Controls.ListBoxWithAddRemove)(target));
     
     #line 86 "..\..\..\AccordianWindow.xaml"
     this.listBoxItems.MouseDoubleClick += new System.Windows.RoutedEventHandler(this.EditTaskItemClick);
     
     #line default
     #line hidden
     return;
     case 25:
     this.listBoxLinks = ((TaskDash.Controls.ListBoxWithAddRemove)(target));
     return;
     }
     this._contentLoaded = true;
 }
Пример #4
0
 private void AddItemOrFocus(ListBoxWithAddRemove listBox)
 {
     if (!this.IsEditing)
     {
         if (Keyboard.IsKeyDown(Key.LeftShift)
             || Keyboard.IsKeyDown(Key.RightShift))
         {
             listBox.Focus();
         }
         else
         {
             listBox.SimulateClick(listBox.AddButton);
         }
     }
 }