Exemplo n.º 1
0
        public override StarTree.Host.Database.Snapshot queryMerges(StarTree.Host.Database.Revision rev)
        {
            Converter.Revision revCon          = rev;
            StarTree.Host.Database.Snapshot sn = new StarTree.Host.Database.Snapshot(this);
            byte[] bytes = _plugin.queryMerges(revCon);
            sn.load(bytes);

            return(sn);
        }
Exemplo n.º 2
0
        public void setRevision(StarTree.Host.Database.DisplayNames names, StarTree.Host.Database.Revision revision)
        {
            this.SuspendLayout();

            TextBox textBox1 = new System.Windows.Forms.TextBox();

            //
            // textBox1
            //
            textBox1.Dock      = DockStyle.Fill;
            textBox1.Font      = new Font("Lucida Console", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
            textBox1.Location  = new Point(0, 0);
            textBox1.Multiline = true;
            textBox1.Name      = "textBox1";
            textBox1.Size      = new Size(326, 307);
            textBox1.TabIndex  = 0;
            this.Controls.Add(textBox1);

            StringBuilder bldr = new StringBuilder();

            bldr.AppendFormat("branch {0}", revision.Branch);
            bldr.AppendLine();
            bldr.AppendLine(names.parent);
            foreach (string parent in revision.Parents)
            {
                bldr.AppendLine(parent);
            }
            bldr.AppendFormat("{0} {1}", names.id, revision.ID);
            bldr.AppendLine();
            bldr.AppendFormat("{0}: {1}", names.author, revision.Author);
            bldr.AppendLine();
            bldr.AppendFormat("{0} {1}", names.date, (Properties.Settings.Default.ToLocalTime ? revision.Date.ToLocalTime() : revision.Date));
            bldr.AppendLine();
            bldr.AppendLine(revision.Log);
            textBox1.Text = bldr.ToString();

            this.ResumeLayout();
        }