Exemplo n.º 1
0
 private void btnEditTask_Click(object sender, RoutedEventArgs e)
 {
     if (dgTasks.SelectedItem != null)
     {
         int selectedIndex = -2;
         try
         {
             int tmpSelectedIndexFromDG = dgTasks.SelectedIndex;
             selectedIndex = SearchIDFormDG(dgTasks.Columns[0].GetCellContent(dgTasks.Items[dgTasks.SelectedIndex]) as TextBlock);
             NewTaskForm newTaskFormWindow = new NewTaskForm(tasks[selectedIndex]);
             newTaskFormWindow.ShowDialog();
             if (newTaskFormWindow.ApplyChanges)
             {
                 tasks[selectedIndex] = newTaskFormWindow.simpleTask;
             }
             IOScripts.SerializeTaskTemplate(tasks, tasksDataFile);
             RefreshDataGrid();
             dgTasks.SelectedIndex = tmpSelectedIndexFromDG;
             //dgTasks_MouseDown(null, null);
             tbxComment.Text     = tasks[selectedIndex].comment;
             tbxLinkToJira.Text  = tasks[selectedIndex].linkToJira;
             tbxcatalogPath.Text = tasks[selectedIndex].catalogPath;
             RefreshWorkTime();
         }
         catch (Exception exc) {
             CustomMessageBox.Show(CustomMesageBoxTypes.Error, $"{exc.Message}\n\n{selectedIndex.ToString()}");
         }
     }
 }
Exemplo n.º 2
0
        private void btnAddNewTask_Click(object sender, RoutedEventArgs e)
        {
            NewTaskForm newTaskFormWindow = null;

            if (tasks.Count.Equals(0))
            {
                newTaskFormWindow = new NewTaskForm(0);
            }
            else
            {
                newTaskFormWindow = new NewTaskForm(dgTasks.Items.Count);
            }
            newTaskFormWindow.ShowDialog();
            if (newTaskFormWindow.ApplyChanges)
            {
                tasks.Add(newTaskFormWindow.simpleTask);
            }
            IOScripts.SerializeTaskTemplate(tasks, tasksDataFile);
            RefreshDataGrid();
        }
Exemplo n.º 3
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.window = ((WorkTaskOrganizer.NewTaskForm)(target));

            #line 16 "..\..\NewTaskForm.xaml"
                this.window.AddHandler(System.Windows.Input.Mouse.MouseDownEvent, new System.Windows.Input.MouseButtonEventHandler(this.window_MouseDown));

            #line default
            #line hidden
                return;

            case 2:
                this.rbTaskStatusReloadOnProd = ((System.Windows.Controls.RadioButton)(target));
                return;

            case 3:
                this.rbTaskStatusQuestionToPM = ((System.Windows.Controls.RadioButton)(target));
                return;

            case 4:
                this.rbTaskStatusOpen = ((System.Windows.Controls.RadioButton)(target));
                return;

            case 5:
                this.rbTaskStatusClosed = ((System.Windows.Controls.RadioButton)(target));
                return;

            case 6:
                this.rbTaskStatusOnTests = ((System.Windows.Controls.RadioButton)(target));
                return;

            case 7:
                this.rbTaskStatusNotStarted = ((System.Windows.Controls.RadioButton)(target));
                return;

            case 8:
                this.rbTaskPriority1 = ((System.Windows.Controls.RadioButton)(target));
                return;

            case 9:
                this.rbTaskPriority2 = ((System.Windows.Controls.RadioButton)(target));
                return;

            case 10:
                this.rbTaskPriority3 = ((System.Windows.Controls.RadioButton)(target));
                return;

            case 11:
                this.rbTaskPriority4 = ((System.Windows.Controls.RadioButton)(target));
                return;

            case 12:
                this.rbTaskPriority5 = ((System.Windows.Controls.RadioButton)(target));
                return;

            case 13:
                this.rbTaskFormatE1 = ((System.Windows.Controls.RadioButton)(target));

            #line 33 "..\..\NewTaskForm.xaml"
                this.rbTaskFormatE1.Checked += new System.Windows.RoutedEventHandler(this.rbTaskFormat_Checked);

            #line default
            #line hidden
                return;

            case 14:
                this.rbTaskFormatE2 = ((System.Windows.Controls.RadioButton)(target));

            #line 34 "..\..\NewTaskForm.xaml"
                this.rbTaskFormatE2.Checked += new System.Windows.RoutedEventHandler(this.rbTaskFormat_Checked);

            #line default
            #line hidden
                return;

            case 15:
                this.rbTaskFormatAnother = ((System.Windows.Controls.RadioButton)(target));

            #line 35 "..\..\NewTaskForm.xaml"
                this.rbTaskFormatAnother.Checked += new System.Windows.RoutedEventHandler(this.rbTaskFormat_Checked);

            #line default
            #line hidden
                return;

            case 16:
                this.tbxFormatAnother = ((System.Windows.Controls.TextBox)(target));
                return;

            case 17:
                this.tbxTaskName = ((System.Windows.Controls.TextBox)(target));
                return;

            case 18:
                this.tbxLinkToJira = ((System.Windows.Controls.TextBox)(target));
                return;

            case 19:
                this.tbxComent = ((System.Windows.Controls.TextBox)(target));

            #line 42 "..\..\NewTaskForm.xaml"
                this.tbxComent.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.tbxComent_MouseDoubleClick);

            #line default
            #line hidden
                return;

            case 20:
                this.tbxCatalogName = ((System.Windows.Controls.TextBox)(target));
                return;

            case 21:
                this.calCreationDate = ((System.Windows.Controls.DatePicker)(target));
                return;

            case 22:
                this.calDeadline = ((System.Windows.Controls.DatePicker)(target));
                return;

            case 23:
                this.btnApply = ((System.Windows.Controls.Button)(target));

            #line 49 "..\..\NewTaskForm.xaml"
                this.btnApply.Click += new System.Windows.RoutedEventHandler(this.btnApply_Click);

            #line default
            #line hidden
                return;

            case 24:
                this.btnCancel = ((System.Windows.Controls.Button)(target));

            #line 50 "..\..\NewTaskForm.xaml"
                this.btnCancel.Click += new System.Windows.RoutedEventHandler(this.btnCancel_Click);

            #line default
            #line hidden
                return;

            case 25:
                this.btnCatalogNameAuto = ((System.Windows.Controls.Button)(target));

            #line 51 "..\..\NewTaskForm.xaml"
                this.btnCatalogNameAuto.Click += new System.Windows.RoutedEventHandler(this.btnCatalogNameAuto_Click);

            #line default
            #line hidden
                return;

            case 26:
                this.lblID = ((System.Windows.Controls.Label)(target));
                return;

            case 27:
                this.tbxCatalogPath = ((System.Windows.Controls.TextBox)(target));
                return;

            case 28:
                this.btnCatalogPathAuto = ((System.Windows.Controls.Button)(target));

            #line 55 "..\..\NewTaskForm.xaml"
                this.btnCatalogPathAuto.Click += new System.Windows.RoutedEventHandler(this.btnCatalogPathAuto_Click);

            #line default
            #line hidden
                return;

            case 29:
                this.chkbxCreateCatalogInPath = ((System.Windows.Controls.CheckBox)(target));
                return;
            }
            this._contentLoaded = true;
        }