~grubng-dev/grubng/tools-urlsdb

« back to all changes in this revision

Viewing changes to Utils.cs

  • Committer: thindil
  • Date: 2011-05-16 21:10:51 UTC
  • Revision ID: thindil2@gmail.com-20110516211051-u7wqf1twfbq2ypdn
small code optimization

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
                public Utils(bool q)
70
70
                {
71
71
                        this.quiet = q;
72
 
                        this.oldmessage = String.Empty;
73
72
                        if (!q)
74
73
                        {
75
74
                                Console.Clear();
103
102
                        {
104
103
                                Console.Write(message);
105
104
                        }
106
 
                        this.oldmessage = message;
107
105
                }
108
106
                
109
107
                /// <summary>
125
123
                        this.curamount = 0;
126
124
                        this.length = 0;
127
125
                        this.message = msg;
 
126
                        this.oldmessage = String.Empty;
128
127
                        this.progress = new System.Timers.Timer();
129
128
                        this.progress.Interval = 1000;
130
129
                        this.progress.Elapsed += new System.Timers.ElapsedEventHandler(OnProgress);
177
176
                        }
178
177
                        if (msg != this.oldmessage)
179
178
                        {
 
179
                                this.oldmessage = msg;
180
180
                                this.length = msg.Length;
181
181
                                Console.SetCursorPosition(newpos, Console.CursorTop);
182
182
                                this.Message(msg, false);