public void CopyToNullTest()
        {
            var actor  = new CopyTo <DataModel>();
            var copyTo = actor.Build(infoProvider);

            copyTo(new DataModel(), null);
        }
 protected bool Equals(IndexMappingProperty other)
 {
     return(System.String.Equals(Index, other.Index) && System.String.Equals(Analyzer, other.Analyzer) &&
            System.String.Equals(Type, other.Type) && System.String.Equals(Format, other.Format) &&
            FieldData == other.FieldData &&
            (CopyTo == null && other.CopyTo == null || CopyTo?.SequenceEqual(other.CopyTo) == true));
 }
Beispiel #3
0
 public void SelectCopyTo()
 {
     CopyTo.Click();
     DriverUtils.driver.FindElement(By.XPath("//*[@id='approver_listbox']//li[contains(text(),'Navaneetha Krishnan')]")).Click();
     CopyTo.Click();
     DriverUtils.driver.FindElement(By.XPath("//*[@id='approver_listbox']//li[contains(text(),'Pallavi RV')]")).Click();
 }
Beispiel #4
0
 public void SelectCopyTo(string membername)
 {
     CopyTo.Click();
     DDLApprover.FindElement(By.XPath("//li[contains(text(),'" + membername + "')]")).Click();
     //CopyTo.Click();
     //DDLApprover.FindElement(By.XPath("//li[contains(text(),'Farzaneh Barmaki')]")).Click();
     // CopyTo.Click();
     // DDLApprover.FindElement(By.XPath("//li[contains(text(),'Navaneetha Krishnan')]")).Click();
 }
Beispiel #5
0
 private void linkLabel4_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     if (Save())
     {
         using (var ct = new CopyTo {
             OM = VolumeLevel.Micobject
         })
         {
             ct.ShowDialog(this);
         }
     }
 }
Beispiel #6
0
        private void BuildMessage()
        {
            EmailMessage = new MailMessage(SmtpMailUser, To, Subject, Message);
            if (!string.IsNullOrEmpty(ReplyTo) && !string.IsNullOrEmpty(ReplyToName))
            {
                EmailMessage.ReplyToList.Add(new MailAddress(ReplyTo, ReplyToName));
            }



            CopyTo.ForEach(cc => EmailMessage.CC.Add(new MailAddress(cc)));
            EmailMessage.IsBodyHtml = isHtml;
        }
Beispiel #7
0
 public MutableCopyTo(CopyTo copyTo)
 {
     if (copyTo != null)
     {
         this.projectContact = copyTo.Contact;
         this.notes          = copyTo.Notes;
     }
     else
     {
         this.projectContact = null;
         this.notes          = string.Empty;
     }
 }
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = Index?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ (Analyzer?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Type?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Format?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ FieldData.GetHashCode();
         hashCode = (hashCode * 397) ^ (CopyTo?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }
    private void MakeCopy(CopyTo side)
    {
        Vector3 copyPosition = new Vector3(transform.position.x + spriteWidthX * (int)side, transform.position.y, transform.position.z);

        copiedTo = (Transform)Instantiate(transform, copyPosition, transform.rotation);
        copiedTo.GetComponent <BackGroundTile>().copiedFrom = this.transform;
        copiedTo.parent = this.transform.parent;

        if (side == CopyTo.right)
        {
            this.hasRightCopy = copiedTo.GetComponent <BackGroundTile>().hasLeftCopy = true;
        }
        else if (side == CopyTo.left)
        {
            this.hasLeftCopy = copiedTo.GetComponent <BackGroundTile>().hasRightCopy = true;
        }
    }
Beispiel #10
0
        private void InsertCopyTo(CopyTo copyTo, object key)
        {
            StringBuilder builder = new StringBuilder(100);

            builder.Append(string.Format("INSERT INTO {0}CopyList ({1},{2},{3}) ",
                                         this.EntityName,
                                         this.KeyFieldName,
                                         TransmittalFactory.FieldNames.ProjectContactId,
                                         TransmittalFactory.FieldNames.Notes));
            builder.Append(string.Format("VALUES ({0},{1},{2});",
                                         DataHelper.GetSqlValue(key),
                                         DataHelper.GetSqlValue(copyTo.Contact.Key),
                                         DataHelper.GetSqlValue(copyTo.Notes)));

            this.Database.ExecuteNonQuery(
                this.Database.GetSqlStringCommand(builder.ToString()));
        }
        public void CopyToTest()
        {
            var actor = new CopyTo <DataModel>();

            var source = new DataModel();
            var target = new DataModel();

            source.Id         = 3;
            source.Name       = "Hugo";
            source.UpdateTime = DateTime.Now;

            var copyTo = actor.Build(infoProvider);

            copyTo(source, target);

            Assert.AreEqual(source.Id, target.Id);
            Assert.AreEqual(source.Name, target.Name);
            Assert.AreEqual(source.UpdateTime, target.UpdateTime);
        }
Beispiel #12
0
    public void GeraMenu()
    {
        Console.WriteLine("WELCOME TO OMICRON");

        string comando, contexto = ">", hdSelecionado = string.Empty;

        comando = String.Empty;

        while (!comando.Equals("exit"))
        {
            Console.Write(contexto);
            comando = Console.ReadLine();

            string[] comand = comando.Split(' ');

            try
            {
                switch (comand[0])
                {
                case "createhd":
                    int buffer, linha, coluna;
                    int.TryParse(comand[2], out linha);
                    int.TryParse(comand[3], out coluna);
                    buffer = linha * coluna;

                    CreateHd.CriarHd(comand[1], buffer, true);
                    break;

                case "cls":
                    Console.Clear();
                    break;

                case "selecthd":
                    var existe = SelectHd.SelecionaHd(comand[1]);
                    if (existe)
                    {
                        hdSelecionado = comand[1];
                        contexto      = hdSelecionado + ">";
                    }
                    else
                    {
                        Console.WriteLine("HD não reconhecido");
                    }
                    break;

                case "dirhd":
                    DirHd.ListaHd();
                    break;

                case "help":
                    var com = "";

                    if (comand.Length > 1)
                    {
                        com = comand[1];
                    }

                    Help.Ajuda(com);
                    break;

                case "formathd":
                    FormatHd.FormatarHd(comand[1]);
                    break;

                case "statushd":
                    StatusHd.Status(comand[1]);
                    break;

                case "typehd":
                    TypeHd.ImprimeTudo(comand[1]);
                    break;

                case "create":
                    if (!String.IsNullOrEmpty(hdSelecionado))
                    {
                        Create.CriaArquivo(contexto.Replace(">", ""), comand[1], comand[2]);
                    }
                    else
                    {
                        Console.WriteLine("Por favor, selecione um hd");
                    }
                    break;

                case "del":
                    if (!String.IsNullOrEmpty(hdSelecionado))
                    {
                        Del.Deleta(contexto.Replace(">", ""), comand[1]);
                    }
                    else
                    {
                        Console.WriteLine("Por favor, selecione um hd");
                    }
                    break;

                case "rmdir":
                    if (!String.IsNullOrEmpty(hdSelecionado))
                    {
                        Rmdir.RemoveDiretorio(contexto.Replace(">", ""), comand[1]);
                    }
                    else
                    {
                        Console.WriteLine("Por favor, selecione um hd");
                    }
                    break;

                case "type":
                    if (!String.IsNullOrEmpty(hdSelecionado))
                    {
                        TypeArq.MostrarTudo(contexto.Replace(">", ""), comand[1]);
                    }
                    else
                    {
                        Console.WriteLine("Por favor, selecione um hd");
                    }
                    break;

                case "renamedir":
                    if (!String.IsNullOrEmpty(hdSelecionado))
                    {
                        RenameDir.RenomeiaDir(contexto.Replace(">", ""), comand[1], comand[2]);
                    }
                    else
                    {
                        Console.WriteLine("Por favor, selecione um hd");
                    }
                    break;

                case "rename":
                    if (!String.IsNullOrEmpty(hdSelecionado))
                    {
                        RenameArq.RenomeiaArquivo(contexto.Replace(">", ""), comand[1], comand[2]);
                    }
                    else
                    {
                        Console.WriteLine("Por favor, selecione um hd");
                    }
                    break;

                case "mkdir":
                    if (!String.IsNullOrEmpty(hdSelecionado))
                    {
                        Mkdir.CriaDiretorio(contexto.Replace(">", ""), comand[1]);
                    }
                    else
                    {
                        Console.WriteLine("Por favor, selecione um hd");
                    }
                    break;

                case "dir":
                    if (!String.IsNullOrEmpty(hdSelecionado))
                    {
                        Dir.MostraDiretorios(contexto.Replace(">", ""));
                    }
                    else
                    {
                        Console.WriteLine("Por favor, selecione um hd");
                    }
                    break;

                case "copyfrom":
                    if (!String.IsNullOrEmpty(hdSelecionado))
                    {
                        CopyFrom.PegaImagem(comand[1], comand[2], contexto.Replace(">", ""));
                    }
                    else
                    {
                        Console.WriteLine("Por favor, selecione um hd");
                    }
                    break;

                case "copyto":
                    if (!String.IsNullOrEmpty(hdSelecionado))
                    {
                        CopyTo.EnviaImagem(comand[1], comand[2], contexto.Replace(">", ""));
                    }
                    else
                    {
                        Console.WriteLine("Por favor, selecione um hd");
                    }
                    break;

                case "copy":
                    if (!String.IsNullOrEmpty(hdSelecionado))
                    {
                        Copy.Copia(contexto.Replace(">", ""), comand[1], comand[2]);
                    }
                    else
                    {
                        Console.WriteLine("Por favor, selecione um hd");
                    }
                    break;

                case "move":
                    if (!String.IsNullOrEmpty(hdSelecionado))
                    {
                        Move.Movimenta(contexto.Replace(">", ""), comand[1], comand[2]);
                    }
                    else
                    {
                        Console.WriteLine("Por favor, selecione um hd");
                    }
                    break;

                case "tree":
                    if (!String.IsNullOrEmpty(hdSelecionado))
                    {
                        Tree.Arvore(hdSelecionado, contexto.Replace(">", ""));
                    }
                    else
                    {
                        Console.WriteLine("Por favor, selecione um hd");
                    }
                    break;

                case "removehd":
                    RemoveHd.RemoverHd(comand[1]);
                    break;

                case "cd":
                    if (comand[1].Equals("..") && string.Concat(hdSelecionado + ">").Equals(contexto))
                    {
                        hdSelecionado = string.Empty;
                        contexto      = ">";
                    }
                    else if (!String.IsNullOrEmpty(hdSelecionado))
                    {
                        contexto = SeparaDir(contexto, comand);
                    }
                    else
                    {
                        Console.WriteLine("Por favor, selecione um hd");
                    }
                    break;

                default:
                    break;
                }
            }
            catch (Exception e)
            {
                Console.WriteLine("....");
            }
        }
    }
Beispiel #13
0
 public static void CopyToSync(this Stream inStream, Stream outStream, int bufferSize = 4096)
 {
     CopyTo(inStream, outStream, bufferSize)(null);
 }
Beispiel #14
0
        static TypeOf()
        {
            var actor = new CopyTo <T>();

            CopyTo = actor.Build(DelegatedTypeMappingInfoProvider.AllInstanceWritableProperties);
        }