Exemplo n.º 1
0
 public Scale Duplicate()
 {
     return(new Scale(false)
     {
         Notes = (byte[])Notes.Clone()
     });
 }
Exemplo n.º 2
0
 public override TextboxInfo Step(Board board, int step)
 {
     if (step > 8)
     {
         return(null);
     }
     foreach (int cell in group)
     {
         board.board[cell].overrideColor = Color.Blue;
     }
     board.board[cell1].overrideColor = Color.Orange;
     board.board[cell2].overrideColor = Color.Orange;
     if (step == 3)
     {
         board.board[cell1].info = new Number(number1);
     }
     else if (step == 4)
     {
         board.board[cell2].info = new Number(number2);
     }
     else if (step == 5 || step == 8)
     {
         board.board[cell1].info = info1.Clone();
         board.board[cell2].info = info2.Clone();
     }
     else if (step == 6)
     {
         board.board[cell2].info = new Number(number1);
     }
     else if (step == 7)
     {
         board.board[cell1].info = new Number(number2);
     }
     SetNoteColor(board.board[cell1].info, number1, Color.Cyan);
     SetNoteColor(board.board[cell1].info, number2, Color.Cyan);
     SetNoteColor(board.board[cell2].info, number1, Color.Cyan);
     SetNoteColor(board.board[cell2].info, number2, Color.Cyan);
     if (step == 3)
     {
         SetNoteColor(board.board[cell2].info, number1, Color.Red);
     }
     else if (step == 6)
     {
         SetNoteColor(board.board[cell1].info, number2, Color.Red);
     }
     else if (step == 8)
     {
         for (int k = 0; k < CellInfo.numbers; k++)
         {
             if (k != number1 && k != number2)
             {
                 SetNoteColor(board.board[cell1].info, k, Color.Red);
                 SetNoteColor(board.board[cell2].info, k, Color.Red);
             }
         }
     }
     return(new TextboxInfo(Main.textResource.isolatedDouble[step - 1],
                            (number1 + 1).ToString(), (number2 + 1).ToString(), groupType.ToText()));
 }
Exemplo n.º 3
0
        public IKeePassGroup Clone()
        {
            KdbxGroup clone = new KdbxGroup()
            {
                Parent = Parent
            };

            if (Title != null)
            {
                clone.Title = Title.Clone();
            }
            else
            {
                clone.Title = null;
            }
            clone.Uuid = Uuid.Clone();
            if (Notes != null)
            {
                clone.Notes = Notes.Clone();
            }
            else
            {
                clone.Notes = null;
            }
            clone.IconID = IconID;
            if (CustomIconUuid != null)
            {
                clone.CustomIconUuid = CustomIconUuid.Clone();
            }
            else
            {
                clone.CustomIconUuid = null;
            }
            clone.Times      = Times.Clone();
            clone.IsExpanded = IsExpanded;
            clone.DefaultAutoTypeSequence = DefaultAutoTypeSequence;
            clone.EnableAutoType          = EnableAutoType;
            clone.EnableSearching         = EnableSearching;
            if (LastTopVisibleEntry != null)
            {
                clone.LastTopVisibleEntry = LastTopVisibleEntry.Clone();
            }
            else
            {
                clone.LastTopVisibleEntry = null;
            }
            clone._children = Children;
            if (CustomData != null)
            {
                clone.CustomData = CustomData.Clone();
            }
            else
            {
                clone.CustomData = null;
            }
            return(clone);
        }
Exemplo n.º 4
0
        public void CopyTo(LicensedItem item)
        {
            if (item == null)
            {
                return;
            }
            item.Assembly        = Assembly;
            item.Product         = Product;
            item.TermsConditions = TermsConditions.Clone();
            item.Notes           = Notes.Clone();

            CopyToComponent(item);
        } // CopyTo
Exemplo n.º 5
0
        } // ToString

        public LicensedItem Clone()
        {
            var clone = CreateNewForCloning();

            clone.Assembly = Assembly;
            clone.Product  = Product;
            clone.Notes    = Notes?.Clone();
            if (TermsConditionsSpecified)
            {
                clone.TermsConditions = TermsConditions.Select(term => term.Clone()).ToList();
            } // if

            return(clone);
        } // Clone
Exemplo n.º 6
0
 public override TextboxInfo Step(Board board, int step)
 {
     if (step > 7)
     {
         return(null);
     }
     foreach (int cell in group)
     {
         board.board[cell].overrideColor = Color.Orange;
     }
     board.board[cell1].overrideColor = Color.Blue;
     board.board[cell2].overrideColor = Color.Blue;
     if (step == 2)
     {
         board.board[cell1].info = new Number(number1);
     }
     else if (step == 3)
     {
         board.board[cell2].info = new Number(number2);
     }
     else if (step == 4 || step == 7)
     {
         Notes notes = new Notes();
         for (int k = 0; k < CellInfo.numbers; k++)
         {
             notes.Values[k] = false;
         }
         notes.Values[number1]   = true;
         notes.Values[number2]   = true;
         board.board[cell1].info = notes.Clone();
         board.board[cell2].info = notes.Clone();
     }
     else if (step == 5)
     {
         board.board[cell1].info = new Number(number2);
     }
     else if (step == 6)
     {
         board.board[cell2].info = new Number(number1);
     }
     if (step == 1 || step == 4 || step == 7)
     {
         SetNoteColor(board.board[cell1].info, number1, Color.Cyan);
         SetNoteColor(board.board[cell1].info, number2, Color.Cyan);
         SetNoteColor(board.board[cell2].info, number1, Color.Cyan);
         SetNoteColor(board.board[cell2].info, number2, Color.Cyan);
     }
     if (step == 2 || step == 3 || step == 6)
     {
         foreach (int cell in group)
         {
             SetNoteColor(board.board[cell].info, number1, Color.Red);
         }
     }
     if (step == 3 || step == 5 || step == 6)
     {
         foreach (int cell in group)
         {
             SetNoteColor(board.board[cell].info, number2, Color.Red);
         }
     }
     if (step == 7)
     {
         foreach (int cell in group)
         {
             if (cell != cell1 && cell != cell2)
             {
                 SetNoteColor(board.board[cell].info, number1, Color.Red);
                 SetNoteColor(board.board[cell].info, number2, Color.Red);
             }
         }
     }
     return(new TextboxInfo(Main.textResource.remainingDouble[step - 1],
                            (number1 + 1).ToString(), (number2 + 1).ToString(), groupType.ToText()));
 }
Exemplo n.º 7
0
        public IKeePassEntry Clone(bool preserveHistory = true)
        {
            KdbxEntry clone = new KdbxEntry(!preserveHistory)
            {
                Parent = Parent,
                Uuid   = Uuid.Clone(),
                IconID = IconID
            };

            if (CustomIconUuid != null)
            {
                clone.CustomIconUuid = CustomIconUuid.Clone();
            }
            else
            {
                clone.CustomIconUuid = null;
            }
            clone.ForegroundColor = ForegroundColor;
            clone.BackgroundColor = BackgroundColor;
            clone.OverrideUrl     = OverrideUrl;
            clone.Tags            = Tags;
            clone.Times           = Times.Clone();
            if (Title != null)
            {
                clone.Title = Title.Clone();
            }
            else
            {
                clone.Title = null;
            }
            clone.Fields = new ObservableCollection <IProtectedString>(Fields.Select(f => f.Clone()));
            if (UserName != null)
            {
                clone.UserName = UserName.Clone();
            }
            else
            {
                clone.UserName = null;
            }
            if (Password != null)
            {
                clone.Password = Password.Clone();
            }
            else
            {
                clone.Password = null;
            }
            if (Url != null)
            {
                clone.Url = Url.Clone();
            }
            else
            {
                clone.Url = null;
            }
            if (Notes != null)
            {
                clone.Notes = Notes.Clone();
            }
            else
            {
                clone.Notes = null;
            }
            clone.Binaries = Binaries;
            clone.AutoType = AutoType;
            if (preserveHistory && History != null)
            {
                clone.History = History.Clone();
            }
            else
            {
                clone.History = null;
            }
            if (CustomData != null)
            {
                clone.CustomData = CustomData.Clone();
            }
            else
            {
                clone.CustomData = null;
            }
            clone._metadata = this._metadata;
            return(clone);
        }