//*********************************************************************** // 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; }
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; }); }
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); } }
//*************************************************************************** // 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(); } }