~grubng-dev/grubng/tools-urlsdb

« back to all changes in this revision

Viewing changes to Utils.cs

  • Committer: thindil
  • Date: 2011-05-16 08:08:17 UTC
  • Revision ID: thindil2@gmail.com-20110516080817-lec54p20xglbkcry
update information only if was changed

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
                /// If true, all disposable fields are disposed.
56
56
                /// </summary>
57
57
                bool disposed;
 
58
                /// <summary>
 
59
                /// Message sent last time.
 
60
                /// </summary>
 
61
                string oldmessage;
58
62
                
59
63
                /// <summary>
60
64
                /// Standard class constructor
65
69
                public Utils(bool q)
66
70
                {
67
71
                        this.quiet = q;
 
72
                        this.oldmessage = String.Empty;
68
73
                        if (!q)
69
74
                        {
70
75
                                Console.Clear();
90
95
                        {
91
96
                                throw new ObjectDisposedException(GetType().Name);
92
97
                        }
 
98
                        if (this.oldmessage == message)
 
99
                        {
 
100
                                return;
 
101
                        }
93
102
                        if (newline)
94
103
                        {
95
104
                                Console.WriteLine(message);
98
107
                        {
99
108
                                Console.Write(message);
100
109
                        }
 
110
                        this.oldmessage = message;
101
111
                }
102
112
                
103
113
                /// <summary>