Esempio n. 1
0
 public override void _runLoad(string nUrl)
 {
     UrlParser urlParser_ = new UrlParser(nUrl);
     string assemblyPath_ = urlParser_._returnResult();
     AssemblyName assemblyName_ = AssemblyName.GetAssemblyName(assemblyPath_);
     AppDomain appDomain_ = AppDomain.CurrentDomain;
     Assembly[] assemblies_ = appDomain_.GetAssemblies();
     foreach (Assembly i in assemblies_)
     {
         if (string.Compare(i.FullName, assemblyName_.FullName) == 0)
         {
             mAssembly = i;
         }
     }
     if (null == mAssembly)
     {
         this._instanceAssembly(assemblyPath_);
         string namespace_ = assemblyName_.Name;
         string pluginClass_ = namespace_ + ".Plugin";
         IPlugin plugin_ = mAssembly.CreateInstance(pluginClass_) as IPlugin;
         if (null != plugin_)
         {
             plugin_._startupPlugin();
         }
     }
     base._runLoad(nUrl);
 }
Esempio n. 2
0
 public override void _runLoad(string nUrl)
 {
     UrlParser urlParser_ = new UrlParser(nUrl);
     string pngPath_ = urlParser_._returnResult();
     mImage = Image.FromFile(pngPath_);
     base._runLoad(nUrl);
 }
Esempio n. 3
0
 public override void _runLoad(string nUrl)
 {
     UrlParser urlParser_ = new UrlParser(nUrl);
     string iconPath_ = urlParser_._returnResult();
     mImage = new Icon(iconPath_);
     base._runLoad(nUrl);
 }
Esempio n. 4
0
 public static string[] _dirUrls(string nUrl)
 {
     List<string> result_ = new List<string>();
     UrlParser urlParser_ = new UrlParser(nUrl);
     string urlDir_ = urlParser_._urlDir();
     string[] dirUrls_ = Directory.GetDirectories(urlDir_);
     foreach (string i in dirUrls_)
     {
         int index_ = i.LastIndexOf(@"\");
         string dirName_ = i.Substring(index_ + 1);
         if (dirName_.StartsWith(@"^arc^"))
         {
             continue;
         }
         if (dirName_.StartsWith(@"^file^"))
         {
             continue;
         }
         index_ = dirName_.LastIndexOf(@"^");
         string fileName_ = dirName_.Substring(index_ + 1);
         string urlName_ = nUrl + @"/" + fileName_;
         result_.Add(urlName_);
     }
     return result_.ToArray();
 }
Esempio n. 5
0
 public void _createUrl(string nUrl)
 {
     this._initControl();
     UrlParser urlParser_ = new UrlParser(nUrl);
     string path_ = urlParser_._returnResult();
     mTextEditorControl.SaveFile(path_);
     mUrl = nUrl;
 }
Esempio n. 6
0
 public override void _runLoad(string nUrl)
 {
     base._runLoad(nUrl);
     string assemblyInfoUrl_ = nUrl + @"*$assembly.xml";
     mAssemblyInfo._runLoad(assemblyInfoUrl_);
     UdlHeadstream udlHeadstream_ = this._getUdlHeadstream();
     string fileName_ = udlHeadstream_._getFileName();
     UrlParser urlParser_ = new UrlParser(nUrl);
     string assemblyPath_ = urlParser_._urlFile(fileName_);
     AssemblyName assemblyName_ = AssemblyName.GetAssemblyName(assemblyPath_);
     AppDomain appDomain_ = AppDomain.CurrentDomain;
     Assembly[] assemblies_ = appDomain_.GetAssemblies();
     foreach (Assembly i in assemblies_)
     {
         if (string.Compare(i.FullName, assemblyName_.FullName) == 0)
         {
             mAssembly = i;
             return;
         }
     }
     UidSingleton uidSingleton_ = __singleton<UidSingleton>._instance();
     IEnumerable<Uid> uids_ = mAssemblyDescriptor._getUids();
     foreach (Uid i in uids_)
     {
         uidSingleton_._addUid(i);
         Uid uid_ = i._getUid();
         string uidUrl_ = uid_._getOptimal();
         this._loadAssembly(uidUrl_);
     }
     IEnumerable<Rid> rids_ = mAssemblyDescriptor._getRids();
     foreach (Rid i in rids_)
     {
         uidSingleton_._addRid(i);
     }
     IEnumerable<string> dependences_ = mAssemblyDescriptor._getDependences();
     foreach (string i in dependences_)
     {
         this._loadAssembly(i);
     }
     mAssembly = Assembly.LoadFrom(assemblyPath_);
     string namespace_ = assemblyName_.Name;
     string pluginClass_ = namespace_ + ".Plugin";
     IPlugin plugin_ = mAssembly.CreateInstance(pluginClass_) as IPlugin;
     if (null != plugin_)
     {
         plugin_._startupPlugin();
     }
 }
Esempio n. 7
0
 void _loadAssembly(string nUrl)
 {
     UrlParser urlParser_ = new UrlParser(nUrl);
     if (urlParser_._isFile())
     {
         AssemblyUfl assemblyUfl_ = new AssemblyUfl();
         assemblyUfl_._runLoad(nUrl);
     }
     else
     {
         AssemblyUdl assemblyUdl_ = new AssemblyUdl();
         assemblyUdl_._runLoad(nUrl);
     }
 }
Esempio n. 8
0
 public override void _runSave()
 {
     UrlParser urlParser_ = new UrlParser(mUrl);
     string path_ = urlParser_._returnResult();
     mTextEditorControl.SaveFile(path_);
     base._runSave();
 }
Esempio n. 9
0
 public void _openUrl(string nUrl)
 {
     mUrl = nUrl;
     if (null == mTextEditorControl || mTextEditorControl.IsDisposed)
     {
         return;
     }
     UrlParser urlParser_ = new UrlParser(nUrl);
     string path_ = urlParser_._returnResult();
     mTextEditorControl.LoadFile(path_);
 }
Esempio n. 10
0
 public static string[] _files(string nUrl)
 {
     List<string> result_ = new List<string>();
     UrlParser urlParser_ = new UrlParser(nUrl);
     string urlDir_ = urlParser_._urlDir();
     string[] fileUrls_ = Directory.GetFiles(urlDir_);
     foreach (string i in fileUrls_)
     {
         int index_ = i.LastIndexOf(@"\");
         string fileName_ = i.Substring(index_ + 1);
         string urlName_ = nUrl + @"*" + fileName_;
         result_.Add(urlName_);
     }
     return result_.ToArray();
 }