ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/RomCheater.ScratchPad/ScratchPadDocument.cs
(Generate patch)

Comparing trunk/RomCheater.ScratchPad/ScratchPadDocument.cs (file contents):
Revision 777 by william, Thu Jun 20 23:10:49 2013 UTC vs.
Revision 778 by william, Thu Jun 20 23:21:37 2013 UTC

# Line 32 | Line 32 | namespace RomCheater.ScratchPad
32              this.DocumentTab.Text = string.Format("{0}{1}", this.DocumentFilename, this.DocumentIndex);
33              //this.DocumentClosing += new BaseEventHandler<ControlClosingEventArgs<int>>(ScratchPadDocument_DocumentClosing);
34              this.IsDefaultDocument = true;
35 +            this.DocumentSaved = true;
36              this.DocumentTab.Controls.Add(this);
37          }
38  
# Line 89 | Line 90 | namespace RomCheater.ScratchPad
90          private void mnuItemOpen_Click(object sender, EventArgs e)
91          {
92              OpenDocument();
93 +            this.DocumentSaved = true; // the file was just opened
94          }
95  
96          private void mnuItemSave_Click(object sender, EventArgs e)
# Line 129 | Line 131 | namespace RomCheater.ScratchPad
131                                  txtEditor.Document.ReParse();
132                                  this.UpdateTabName(fi.Name);
133                                  this.IsDefaultDocument = false;
134 +                                this.DocumentSaved = true;
135                              }
136                              catch (Exception ex)
137                              {
# Line 144 | Line 147 | namespace RomCheater.ScratchPad
147              }
148              catch (Exception ex)
149              {
150 +                this.DocumentSaved = false;
151                  MessageBox.Show(string.Format("Failed to open: '{0}'", fi.Name), "", MessageBoxButtons.OK, MessageBoxIcon.Error);
152                  logger.Error.WriteLine("Failed to open: '{0}'", fi.FullName);
153                  logger.Error.WriteLine(ex.ToString());

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines