/// <summary>
 /// Sets all records to a given System.Windows.Forms.CheckState value.
 /// </summary>
 /// <param name="value">One of the System.Windows.Forms.CheckState values.</param>
 public void SetAllRecordsCheckState(System.Windows.Forms.CheckState value)
 {
     for (int index = 0; index < this.Items.Count; index++)
     {
         this.SetItemCheckState(index, value);
     }
 }
예제 #2
0
        /// <summary>
        /// Sets the supplied collection records to a System.Windows.Forms.CheckState value.
        /// </summary>
        /// <param name="ArrayOf_PK_Sup_GuidID">Primary keys of the records to set the check state for.</param>
        /// <param name="value">One of the System.Windows.Forms.CheckState values.</param>
        public void SetRecordsCheckState(WS_Supplier.WSGuid[] ArrayOf_PK_Sup_GuidID, System.Windows.Forms.CheckState value)
        {
            if (ArrayOf_PK_Sup_GuidID != null && ArrayOf_PK_Sup_GuidID.Length > 0)
            {
                int primaryKeysWereFound    = 0;
                int totalPrimaryKeysNumber  = ArrayOf_PK_Sup_GuidID.Length;
                int totalDataRowViewsNumber = this.Items.Count;

                this.internalItemCheckStateUpdateInProgress = true;

                for (int index = 0; index < totalDataRowViewsNumber; index++)
                {
                    System.Data.DataRowView dataRowView       = (System.Data.DataRowView) this.Items[index];
                    System.Guid             currentPrimaryKey = (System.Guid)dataRowView.Row[0];

                    foreach (WS_Supplier.WSGuid record in ArrayOf_PK_Sup_GuidID)
                    {
                        if (record.Value == currentPrimaryKey)
                        {
                            this.SetItemChecked(index, true);
                            primaryKeysWereFound++;

                            break;
                        }
                    }

                    if (totalPrimaryKeysNumber == primaryKeysWereFound)
                    {
                        break;
                    }
                }

                this.internalItemCheckStateUpdateInProgress = false;
            }
        }
 protected override void SetItemCheckStateCore(int index, System.Windows.Forms.CheckState value)
 {
     if (value == System.Windows.Forms.CheckState.Checked)
     {
         UnCheckAll();
     }
     base.SetItemCheckStateCore(index, value);
 }
예제 #4
0
        public void UncheckedBooleanIsUncheckedState()
        {
            //Arrange
            node.Checked = false;

            //Act
            System.Windows.Forms.CheckState state = node.CheckState;

            //Assert
            Assert.AreEqual(System.Windows.Forms.CheckState.Unchecked, state);
        }
예제 #5
0
 public void StartStopReminder(System.Windows.Forms.CheckState newValue)
 {
     if (newValue == System.Windows.Forms.CheckState.Checked)
     {
         this.ReminderTimer();
     }
     else
     {
         if (this.timer != null)
         {
             this.timer.Dispose();
         }
     }
 }
예제 #6
0
 public InternalNodeSettings(System.Windows.Forms.CheckState enabled,
     PriorityLevel priority,
     Int32 repeat,
     Int32 offsetX,
     Int32 offsetY,
     MouseSpeed mouseSpeed)
 {
     _enabled = enabled;
     _priority = priority;
     _runs = repeat;
     _offsetX = offsetX;
     _offsetY = offsetY;
     _mouseSpeed = mouseSpeed;
 }
예제 #7
0
        ///<summary>Updates a pref of type YN.  Returns true if a change was required, or false if no change needed.</summary>
        public static bool UpdateYN(PrefName prefName, System.Windows.Forms.CheckState checkState)
        {
            YN yn = YN.Unknown;

            if (checkState == System.Windows.Forms.CheckState.Checked)
            {
                yn = YN.Yes;
            }
            if (checkState == System.Windows.Forms.CheckState.Unchecked)
            {
                yn = YN.No;
            }
            return(UpdateYN(prefName, yn));
        }
예제 #8
0
 public InternalNodeSettings(System.Windows.Forms.CheckState enabled,
                             PriorityLevel priority,
                             Int32 repeat,
                             Int32 offsetX,
                             Int32 offsetY,
                             MouseSpeed mouseSpeed)
 {
     _enabled    = enabled;
     _priority   = priority;
     _runs       = repeat;
     _offsetX    = offsetX;
     _offsetY    = offsetY;
     _mouseSpeed = mouseSpeed;
 }
        /// <summary>
        /// Sets the supplied collection records to a System.Windows.Forms.CheckState value.
        /// </summary>
        /// <param name="ArrayOf_PrimaryKeys">Primary keys of the records to set the check state for.</param>
        /// <param name="value">One of the System.Windows.Forms.CheckState values.</param>
        public void SetRecordsCheckState(object[] ArrayOf_PrimaryKeys, System.Windows.Forms.CheckState value)
        {
            if (ArrayOf_PrimaryKeys != null && ArrayOf_PrimaryKeys.Length > 0)
            {
                this.internalItemCheckStateUpdateInProgress = true;

                foreach (object PrimaryKey in ArrayOf_PrimaryKeys)
                {
                    for (int index = 0; index < this.Items.Count; index++)
                    {
                        object currentPrimaryKey = ((System.Data.DataRowView) this.Items[index]).Row[this.valueMember];
                        if (currentPrimaryKey.Equals(PrimaryKey))
                        {
                            this.SetItemCheckState(index, value);
                            break;
                        }
                    }
                }

                this.internalItemCheckStateUpdateInProgress = false;
            }
        }
 /// <summary>
 /// Sets the supplied collection records to a System.Windows.Forms.CheckState value.
 /// </summary>
 /// <param name="ArrayOf_PrimaryKeys">Primary keys of the records to set the check state for.</param>
 /// <param name="value">One of the System.Windows.Forms.CheckState values.</param>
 public void SetRecordsCheckState(System.Collections.ArrayList ArrayOf_PrimaryKeys, System.Windows.Forms.CheckState value)
 {
     if (ArrayOf_PrimaryKeys != null && ArrayOf_PrimaryKeys.Count > 0)
     {
         object[] typedArray = new object[ArrayOf_PrimaryKeys.Count];
         int      index      = 0;
         foreach (object item in ArrayOf_PrimaryKeys)
         {
             typedArray[index] = item;
             index++;
         }
         this.SetRecordsCheckState(typedArray, value);
     }
 }
예제 #11
0
        /// <summary>
        /// Sets the supplied collection records to a System.Windows.Forms.CheckState value.
        /// </summary>
        /// <param name="ArrayOf_PK_Sup_GuidID">Primary keys of the records to set the check state for.</param>
        /// <param name="value">One of the System.Windows.Forms.CheckState values.</param>
        public void SetRecordsCheckState(System.Collections.ArrayList ArrayOf_PK_Sup_GuidID, System.Windows.Forms.CheckState value)
        {
            if (ArrayOf_PK_Sup_GuidID != null && ArrayOf_PK_Sup_GuidID.Count > 0)
            {
                WS_Supplier.WSGuid[] typedArray = new WS_Supplier.WSGuid[ArrayOf_PK_Sup_GuidID.Count];
                int index = 0;
                foreach (object item in ArrayOf_PK_Sup_GuidID)
                {
                    if (item is WS_Supplier.WSGuid)
                    {
                        typedArray[index] = (WS_Supplier.WSGuid)item;
                        index++;
                    }
                    else if (item is System.Data.SqlTypes.SqlGuid)
                    {
                        WS_Supplier.WSGuid record = new WS_Supplier.WSGuid();
                        record.UseNull = false;
                        record.Value   = ((System.Data.SqlTypes.SqlGuid)item).Value;

                        typedArray[index] = record;
                        index++;
                    }
                    else if (item is System.Guid)
                    {
                        WS_Supplier.WSGuid record = new WS_Supplier.WSGuid();
                        record.UseNull = false;
                        record.Value   = (System.Guid)item;

                        typedArray[index] = record;
                        index++;
                    }
                    else
                    {
                        throw new InvalidOperationException("ArrayOf_PK_Sup_GuidID does not contain ONLY System.Data.SqlTypes.SqlGuid, WS_Supplier.WSGuid or System.Guid elements.");
                    }
                }
                this.SetRecordsCheckState(typedArray, value);
            }
        }
        /// <summary>
        /// Sets the supplied collection records to a System.Windows.Forms.CheckState value.
        /// </summary>
        /// <param name="ArrayOf_PK_Cus_LngID">Primary keys of the records to set the check state for.</param>
        /// <param name="value">One of the System.Windows.Forms.CheckState values.</param>
        public void SetRecordsCheckState(System.Collections.ArrayList ArrayOf_PK_Cus_LngID, System.Windows.Forms.CheckState value)
        {
            if (ArrayOf_PK_Cus_LngID != null && ArrayOf_PK_Cus_LngID.Count > 0)
            {
                WS_tblCustomer_Record.WSInt32[] typedArray = new WS_tblCustomer_Record.WSInt32[ArrayOf_PK_Cus_LngID.Count];
                int index = 0;
                foreach (object item in ArrayOf_PK_Cus_LngID)
                {
                    if (item is WS_tblCustomer_Record.WSInt32)
                    {
                        typedArray[index] = (WS_tblCustomer_Record.WSInt32)item;
                        index++;
                    }
                    else if (item is System.Data.SqlTypes.SqlInt32)
                    {
                        WS_tblCustomer_Record.WSInt32 record = new WS_tblCustomer_Record.WSInt32();
                        record.UseNull = false;
                        record.Value   = ((System.Data.SqlTypes.SqlInt32)item).Value;

                        typedArray[index] = record;
                        index++;
                    }
                    else if (item is System.Int32)
                    {
                        WS_tblCustomer_Record.WSInt32 record = new WS_tblCustomer_Record.WSInt32();
                        record.UseNull = false;
                        record.Value   = (System.Int32)item;

                        typedArray[index] = record;
                        index++;
                    }
                    else
                    {
                        throw new InvalidOperationException("ArrayOf_PK_Cus_LngID does not contain ONLY System.Data.SqlTypes.SqlInt32, WS_tblCustomer_Record.WSInt32 or System.Int32 elements.");
                    }
                }
                this.SetRecordsCheckState(typedArray, value);
            }
        }
        /// <summary>
        /// Sets the supplied collection records to a System.Windows.Forms.CheckState value.
        /// </summary>
        /// <param name="ArrayOf_PK_JobPartId">Primary keys of the records to set the check state for.</param>
        /// <param name="value">One of the System.Windows.Forms.CheckState values.</param>
        public void SetRecordsCheckState(System.Data.SqlTypes.SqlInt32[] ArrayOf_PK_JobPartId, System.Windows.Forms.CheckState value)
        {
            if (ArrayOf_PK_JobPartId != null && ArrayOf_PK_JobPartId.Length > 0)
            {
                int PrimaryKeysWereFound    = 0;
                int TotalPrimaryKeysNumber  = ArrayOf_PK_JobPartId.Length;
                int TotalDataRowViewsNumber = this.Items.Count;

                this.internalItemCheckStateUpdateInProgress = true;

                for (int Index = 0; Index < TotalDataRowViewsNumber; Index++)
                {
                    System.Data.DataRowView       dataRowView       = (System.Data.DataRowView) this.Items[Index];
                    System.Data.SqlTypes.SqlInt32 CurrentPrimaryKey = new System.Data.SqlTypes.SqlInt32((Int32)dataRowView.Row[SPs.spS_JobPart_Display.Resultset1.Fields.Column_ID1.ColumnName]);

                    if (System.Array.IndexOf(ArrayOf_PK_JobPartId, CurrentPrimaryKey) != -1)
                    {
                        this.SetItemChecked(Index, true);
                        PrimaryKeysWereFound++;

                        if (TotalPrimaryKeysNumber == PrimaryKeysWereFound)
                        {
                            break;
                        }
                    }
                }

                this.internalItemCheckStateUpdateInProgress = false;
            }
        }
 /// <summary>
 /// Sets the supplied collection records to a System.Windows.Forms.CheckState value.
 /// </summary>
 /// <param name="ArrayOf_PK_JobPartId">Primary keys of the records to set the check state for.</param>
 /// <param name="value">One of the System.Windows.Forms.CheckState values.</param>
 public void SetRecordsCheckState(System.Collections.ArrayList ArrayOf_PK_JobPartId, System.Windows.Forms.CheckState value)
 {
     if (ArrayOf_PK_JobPartId != null && ArrayOf_PK_JobPartId.Count > 0)
     {
         System.Data.SqlTypes.SqlInt32[] typedArray = new System.Data.SqlTypes.SqlInt32[ArrayOf_PK_JobPartId.Count];
         int index = 0;
         foreach (object item in ArrayOf_PK_JobPartId)
         {
             if (item is System.Data.SqlTypes.SqlInt32)
             {
                 typedArray[index] = (System.Data.SqlTypes.SqlInt32)item;
                 index++;
             }
             else if (item is System.Int32)
             {
                 typedArray[index] = (System.Int32)item;
                 index++;
             }
             else
             {
                 throw new InvalidOperationException("ArrayOf_PK_JobPartId does not contain ONLY System.Data.SqlTypes.SqlInt32 or System.Int32 elements.");
             }
         }
         this.SetRecordsCheckState(typedArray, value);
     }
 }
예제 #15
0
 public IvsCheckedListBoxItem(object value, string description, System.Windows.Forms.CheckState checkState, bool enabled, string name)
     : base(value, description, checkState, enabled)
 {
     _name = name;
 }
 /// <summary>Initalize a new instance of SelectedDirectoriesChangedEventArgs</summary>
 public SelectedDirectoriesChangedEventArgs(string path, System.Windows.Forms.CheckState checkState)
 {
     _path = path;
     _checkState = checkState;
 }
예제 #17
0
 /// <summary>Initalize a new instance of SelectedDirectoriesChangedEventArgs</summary>
 public SelectedDirectoriesChangedEventArgs(string path, System.Windows.Forms.CheckState checkState)
 {
     _path       = path;
     _checkState = checkState;
 }