StonehearthEditor.Module.OnChanged C# (CSharp) Method

OnChanged() private method

private OnChanged ( object sender, FileSystemEventArgs e ) : void
sender object
e System.IO.FileSystemEventArgs
return void
        private void OnChanged(object sender, FileSystemEventArgs e)
        {
            if (mShowingManifestModifiedDialog)
            {
                return;
            }
            // if the manifest has changed
            // Applications fire multiple events during the file writing process, so only show message once if there is a new write
            DateTime lastWriteTime = File.GetLastWriteTime(Path + "/manifest.json");
            if (lastWriteTime != mLastReadTime)
            {
                mShowingManifestModifiedDialog = true;
                MessageBox.Show("The manifest for module " + Name + " has changed! You should reload SHED! (Press F5)");
                mLastReadTime = lastWriteTime;
                mShowingManifestModifiedDialog = false;
            }
        }