00001 using System;
00002 using System.IO;
00003 using System.Net;
00004 using System.Text;
00005 using System.Windows.Forms;
00006 using CodePlex.MicrosoftProject.mpFx.Client.Plugins.Controls;
00007 using CodePlex.MicrosoftProject.mpFx.Client.Plugins.Properties;
00008 using CodePlex.MicrosoftProject.mpFx.Client.Shared;
00009
00010 namespace CodePlex.MicrosoftProject.mpFx.Client.Plugins
00011 {
00012 public class ResourceManagerPlugin : IMpFxClientPlugin
00013 {
00014 private bool _Disposed;
00015 private bool _IsLoaded;
00016 private string _CurrentSessionFile;
00017
00018 public ProjectServer ProjectServer { get; private set; }
00019
00020 public Guid Guid
00021 {
00022 get
00023 {
00024 return new Guid("{71E8A4C5-0507-4145-A2C7-7044B22F39DB}");
00025 }
00026 }
00027
00028 public Version Version
00029 {
00030 get
00031 {
00032 return new Version("1.0.0.0");
00033 }
00034 }
00035
00036 public string Implementation { get; set; }
00037
00038 public string Name
00039 {
00040 get
00041 {
00042 return Resources.PluginName;
00043 }
00044 }
00045
00046 public string Description
00047 {
00048 get
00049 {
00050 return Resources.PluginDescription;
00051 }
00052 }
00053
00054 public string Author
00055 {
00056 get
00057 {
00058 return Resources.PluginAuthor;
00059 }
00060 }
00061
00062 public string Tag
00063 {
00064 get
00065 {
00066 return Resources.PluginTag;
00067 }
00068 }
00069
00070 public Uri Preview
00071 {
00072 get
00073 {
00074 return new Uri(Resources.PluginPreview);
00075 }
00076 }
00077
00078 public bool IsLoaded
00079 {
00080 get
00081 {
00082 return _IsLoaded;
00083 }
00084 }
00085
00086 public bool IsMarkedForDeletion{ get; set; }
00087
00088 public Form MainForm
00089 {
00090 get
00091 {
00092 return null;
00093 }
00094 }
00095
00096 public UserControl OptionsControl
00097 {
00098 get
00099 {
00100 return new OptionsControl();
00101 }
00102 }
00103
00104 public event OnStatusChangedEventHandler OnStatusChanged;
00105
00106 public void OnLoad(ProjectServer projectServer, Form parent, ToolStrip toolStrip)
00107 {
00108 ProjectServer = projectServer;
00109 _IsLoaded = true;
00110 }
00111
00112 public void OnUnload()
00113 {
00114 ProjectServer = null;
00115
00116 _IsLoaded = false;
00117 }
00118
00119 internal void DoOnStatusChanged(OnStatusChangedArgs args)
00120 {
00121 if (OnStatusChanged != null)
00122 {
00123 OnStatusChanged(this, args);
00124 }
00125 }
00126
00127 #region IDisposable members
00128
00129 ~ResourceManagerPlugin()
00130 {
00131 Dispose(false);
00132 }
00133
00134 public void Dispose()
00135 {
00136 Dispose(true);
00137 GC.SuppressFinalize(this);
00138 }
00139
00140 private void Dispose(bool disposing)
00141 {
00142 if (_Disposed)
00143 {
00144 if (disposing)
00145 {
00146 try
00147 {
00148 }
00149 catch (Exception)
00150 {}
00151 }
00152
00153 _Disposed = true;
00154 }
00155 }
00156
00157
00158 #endregion
00159 }
00160 }