Exemplo n.º 1
0
 //***********************************************************************
 // Class Constructors
 //
 public AutoSaveProc(Guid id, string appDataPath, string name, SaveFileDelegate del)
 {
     this._id          = id;
     this._appDataPath = appDataPath;
     this._name        = name;
     this._del         = del;
     this._dirty       = false;
 }
Exemplo n.º 2
0
 public WDDocumentApp(NewFileDelegate onNewFile, OpenFileDelegate onOpenFile, SaveFileDelegate onSaveFile, DocumentUpdateDelegate onUpdate)
 {
     System.Diagnostics.Debug.Assert(onNewFile != null);
     this.onNewFile  = onNewFile;
     this.onOpenFile = onOpenFile;
     this.onSaveFile = onSaveFile;
     this.onUpdate   = onUpdate;
     Undo            = new UndoHandler <DOCTYPE>(delegate(DOCTYPE newDoc) { this._document = newDoc; });
 }
Exemplo n.º 3
0
        private void SaveButton_Click(object sender, EventArgs e)
        {
            if ((DocumentPathTextBox.Text != string.Empty) && (SaveFileNameTextBox.Text != string.Empty))
            {
                SaveButton.Enabled = false;

                _SaveFileDelegate = new SaveFileDelegate(_SaveController.SaveDocument);
                _SaveFileDelegate.BeginInvoke(this.FileSaved, null);
            }
        }
Exemplo n.º 4
0
 //***************************************************************************
 // Public Methods
 //
 public static void RegisterProcess(Guid procID, string appDataPath, string name, SaveFileDelegate del)
 {
     _activeProc.Add(new AutoSaveProc(procID, appDataPath, name, del));
     if (!_threadRunning && _activeProc.Count > 0)
     {
         StartThread();
     }
 }