예제 #1
0
 protected override bool ProcessKeyPreview(ref Message m)
 {
     if (m.Msg == WM_SYSKEYUP && CurrentItem is CCustomizableListItemANiveau)
     {
         Keys key = (Keys)m.WParam;
         if (key == Keys.Left)
         {
             CEditeurOperations ctrl = AssociatedListControl as CEditeurOperations;
             if (ctrl != null)
             {
                 ctrl.DecrementeNiveau(CurrentItem as CItemOperation);
                 UpdateMarge();
                 ctrl.Refresh();
                 RefreshTypesOperationsEnCours();
                 return(true);
             }
         }
         if (key == Keys.Right)
         {
             CEditeurOperations ctrl = AssociatedListControl as CEditeurOperations;
             if (ctrl != null)
             {
                 ctrl.IncrementeNiveau(CurrentItem as CItemOperation);
                 UpdateMarge();
                 ctrl.Refresh();
                 RefreshTypesOperationsEnCours();
                 return(true);
             }
         }
     }
     return(base.ProcessKeyPreview(ref m));
 }
예제 #2
0
        private void m_picBoxAddLine_Click(object sender, EventArgs e)
        {
            Control parent = Parent;

            while (parent != null && !(parent is CEditeurOperations))
            {
                parent = parent.Parent;
            }
            CEditeurOperations editeur = parent as CEditeurOperations;

            if (editeur != null)
            {
                editeur.AddOperationALaFin();
            }
        }
예제 #3
0
 //---------------------------------------------------------------------------
 private void m_btnPoubelle_Click(object sender, EventArgs e)
 {
     if (m_extModeEdition.ModeEdition)
     {
         CEditeurOperations ctrlListe = AssociatedListControl as CEditeurOperations;
         if (ctrlListe != null && CurrentItem != null)
         {
             CItemOperation item = CurrentItem as CItemOperation;
             if (item != null && item.Operation != null)
             {
                 if (CFormAlerte.Afficher(I.T("Delete operation @1|20679", Operation.Libelle),
                                          EFormAlerteBoutons.OuiNon, EFormAlerteType.Question) == DialogResult.Yes)
                 {
                     ctrlListe.RemoveItem(CurrentItem, true);
                 }
             }
         }
     }
 }
예제 #4
0
 /// <summary>
 /// Méthode requise pour la prise en charge du concepteur - ne modifiez pas
 /// le contenu de cette méthode avec l'éditeur de code.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CControleSaisiesOperations));
     this.m_wndListeOperations      = new timos.interventions.crintervention.CEditeurOperations();
     this.m_gestionnaireModeEdition = new sc2i.win32.common.CExtModeEdition();
     this.m_btnCopierAnalyse        = new System.Windows.Forms.PictureBox();
     this.label1        = new System.Windows.Forms.Label();
     this.m_dtDebut     = new sc2i.win32.common.C2iDateTimeExPicker();
     this.m_dtFin       = new sc2i.win32.common.C2iDateTimeExPicker();
     this.label2        = new System.Windows.Forms.Label();
     this.pictureBox1   = new System.Windows.Forms.PictureBox();
     this.m_panelEntete = new System.Windows.Forms.Panel();
     this.m_wndDuree    = new sc2i.win32.common.CWndSaisieHeure();
     this.label3        = new System.Windows.Forms.Label();
     this.m_tooltip     = new System.Windows.Forms.ToolTip(this.components);
     ((System.ComponentModel.ISupportInitialize)(this.m_btnCopierAnalyse)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
     this.m_panelEntete.SuspendLayout();
     this.SuspendLayout();
     //
     // m_wndListeOperations
     //
     this.m_wndListeOperations.CurrentItemIndex = null;
     this.m_wndListeOperations.Dock             = System.Windows.Forms.DockStyle.Fill;
     this.m_wndListeOperations.Items            = new sc2i.win32.common.customizableList.CCustomizableListItem[0];
     this.m_wndListeOperations.Location         = new System.Drawing.Point(0, 42);
     this.m_wndListeOperations.LockEdition      = false;
     this.m_gestionnaireModeEdition.SetModeEdition(this.m_wndListeOperations, sc2i.win32.common.TypeModeEdition.EnableSurEdition);
     this.m_wndListeOperations.Name               = "m_wndListeOperations";
     this.m_wndListeOperations.Size               = new System.Drawing.Size(850, 153);
     this.m_wndListeOperations.TabIndex           = 0;
     this.m_wndListeOperations.Load              += new System.EventHandler(this.m_wndListeOperations_Load);
     this.m_wndListeOperations.ScrollSizeChanged += new System.EventHandler(this.m_wndListeOperations_ScrollSizeChanged);
     this.m_wndListeOperations.AfterAddOperation += new System.EventHandler(this.m_wndListeOperations_AfterAddOperation);
     this.m_wndListeOperations.SizeChanged       += new System.EventHandler(this.m_wndListeOperations_SizeChanged);
     //
     // m_btnCopierAnalyse
     //
     this.m_btnCopierAnalyse.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     this.m_btnCopierAnalyse.Cursor   = System.Windows.Forms.Cursors.Hand;
     this.m_btnCopierAnalyse.Image    = ((System.Drawing.Image)(resources.GetObject("m_btnCopierAnalyse.Image")));
     this.m_btnCopierAnalyse.Location = new System.Drawing.Point(830, 22);
     this.m_gestionnaireModeEdition.SetModeEdition(this.m_btnCopierAnalyse, sc2i.win32.common.TypeModeEdition.Autonome);
     this.m_btnCopierAnalyse.Name     = "m_btnCopierAnalyse";
     this.m_btnCopierAnalyse.Size     = new System.Drawing.Size(15, 13);
     this.m_btnCopierAnalyse.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
     this.m_btnCopierAnalyse.TabIndex = 2;
     this.m_btnCopierAnalyse.TabStop  = false;
     this.m_tooltip.SetToolTip(this.m_btnCopierAnalyse, "Copier l\'analyse sous forme de test");
     this.m_btnCopierAnalyse.Click += new System.EventHandler(this.m_btnCopierAnalyse_Click);
     //
     // label1
     //
     this.label1.Location = new System.Drawing.Point(3, 4);
     this.m_gestionnaireModeEdition.SetModeEdition(this.label1, sc2i.win32.common.TypeModeEdition.Autonome);
     this.label1.Name     = "label1";
     this.label1.Size     = new System.Drawing.Size(126, 16);
     this.label1.TabIndex = 3;
     this.label1.Text     = "Start date|78";
     //
     // m_dtDebut
     //
     this.m_dtDebut.Checked      = true;
     this.m_dtDebut.CustomFormat = "dd/MM/yyyy HH:mm";
     this.m_dtDebut.Format       = System.Windows.Forms.DateTimePickerFormat.Custom;
     this.m_dtDebut.Location     = new System.Drawing.Point(135, 0);
     this.m_dtDebut.LockEdition  = false;
     this.m_gestionnaireModeEdition.SetModeEdition(this.m_dtDebut, sc2i.win32.common.TypeModeEdition.EnableSurEdition);
     this.m_dtDebut.Name                = "m_dtDebut";
     this.m_dtDebut.Size                = new System.Drawing.Size(132, 20);
     this.m_dtDebut.TabIndex            = 4;
     this.m_dtDebut.TextNull            = "None";
     this.m_dtDebut.Value.DateTimeValue = new System.DateTime(2013, 9, 5, 15, 12, 53, 265);
     //
     // m_dtFin
     //
     this.m_dtFin.Checked      = true;
     this.m_dtFin.CustomFormat = "dd/MM/yyyy HH:mm";
     this.m_dtFin.Format       = System.Windows.Forms.DateTimePickerFormat.Custom;
     this.m_dtFin.Location     = new System.Drawing.Point(135, 19);
     this.m_dtFin.LockEdition  = false;
     this.m_gestionnaireModeEdition.SetModeEdition(this.m_dtFin, sc2i.win32.common.TypeModeEdition.EnableSurEdition);
     this.m_dtFin.Name                = "m_dtFin";
     this.m_dtFin.Size                = new System.Drawing.Size(132, 20);
     this.m_dtFin.TabIndex            = 6;
     this.m_dtFin.TextNull            = "None";
     this.m_dtFin.Value.DateTimeValue = new System.DateTime(2013, 9, 5, 15, 12, 53, 265);
     //
     // label2
     //
     this.label2.Location = new System.Drawing.Point(3, 23);
     this.m_gestionnaireModeEdition.SetModeEdition(this.label2, sc2i.win32.common.TypeModeEdition.Autonome);
     this.label2.Name     = "label2";
     this.label2.Size     = new System.Drawing.Size(126, 16);
     this.label2.TabIndex = 5;
     this.label2.Text     = "End date|79";
     //
     // pictureBox1
     //
     this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                                                                     | System.Windows.Forms.AnchorStyles.Right)));
     this.pictureBox1.BackColor = System.Drawing.Color.Black;
     this.pictureBox1.Location  = new System.Drawing.Point(3, 193);
     this.m_gestionnaireModeEdition.SetModeEdition(this.pictureBox1, sc2i.win32.common.TypeModeEdition.Autonome);
     this.pictureBox1.Name     = "pictureBox1";
     this.pictureBox1.Size     = new System.Drawing.Size(844, 1);
     this.pictureBox1.TabIndex = 7;
     this.pictureBox1.TabStop  = false;
     //
     // m_panelEntete
     //
     this.m_panelEntete.Controls.Add(this.m_wndDuree);
     this.m_panelEntete.Controls.Add(this.label3);
     this.m_panelEntete.Controls.Add(this.label1);
     this.m_panelEntete.Controls.Add(this.m_dtFin);
     this.m_panelEntete.Controls.Add(this.m_btnCopierAnalyse);
     this.m_panelEntete.Controls.Add(this.label2);
     this.m_panelEntete.Controls.Add(this.m_dtDebut);
     this.m_panelEntete.Dock     = System.Windows.Forms.DockStyle.Top;
     this.m_panelEntete.Location = new System.Drawing.Point(0, 0);
     this.m_gestionnaireModeEdition.SetModeEdition(this.m_panelEntete, sc2i.win32.common.TypeModeEdition.EnableSurEdition);
     this.m_panelEntete.Name     = "m_panelEntete";
     this.m_panelEntete.Size     = new System.Drawing.Size(850, 42);
     this.m_panelEntete.TabIndex = 8;
     //
     // m_wndDuree
     //
     this.m_wndDuree.Location    = new System.Drawing.Point(376, 3);
     this.m_wndDuree.LockEdition = false;
     this.m_gestionnaireModeEdition.SetModeEdition(this.m_wndDuree, sc2i.win32.common.TypeModeEdition.EnableSurEdition);
     this.m_wndDuree.Name         = "m_wndDuree";
     this.m_wndDuree.NullAutorise = true;
     this.m_wndDuree.SaisieDuree  = true;
     this.m_wndDuree.Size         = new System.Drawing.Size(54, 21);
     this.m_wndDuree.TabIndex     = 8;
     this.m_wndDuree.ValeurHeure  = null;
     //
     // label3
     //
     this.label3.Location = new System.Drawing.Point(274, 5);
     this.m_gestionnaireModeEdition.SetModeEdition(this.label3, sc2i.win32.common.TypeModeEdition.Autonome);
     this.label3.Name     = "label3";
     this.label3.Size     = new System.Drawing.Size(117, 23);
     this.label3.TabIndex = 7;
     this.label3.Text     = "Appointed duration|557";
     //
     // CControleSaisiesOperations
     //
     this.Controls.Add(this.m_wndListeOperations);
     this.Controls.Add(this.m_panelEntete);
     this.Controls.Add(this.pictureBox1);
     this.m_gestionnaireModeEdition.SetModeEdition(this, sc2i.win32.common.TypeModeEdition.Autonome);
     this.Name  = "CControleSaisiesOperations";
     this.Size  = new System.Drawing.Size(850, 195);
     this.Load += new System.EventHandler(this.CControleSaisiesOperations_Load);
     ((System.ComponentModel.ISupportInitialize)(this.m_btnCopierAnalyse)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
     this.m_panelEntete.ResumeLayout(false);
     this.m_panelEntete.PerformLayout();
     this.ResumeLayout(false);
 }