/// <summary>
        /// Removes the counters, then calls the base uninstall.
        /// </summary>
        /// <param name="savedState">The saved state for the installation.</param>
        public override void Uninstall(System.Collections.IDictionary savedState)
        {
            ConsoleHarness.WriteToConsole(ConsoleColor.White, "Un-Installing service {0}.", Configuration.Name);

            // load the assembly file name and the config
            ConfigureInstallers();
            base.Uninstall(savedState);

            // wire up the event log source, if provided
            if (!string.IsNullOrWhiteSpace(Configuration.EventLogSource))
            {
                // create the source if it doesn't exist
                if (EventLog.SourceExists(Configuration.EventLogSource))
                {
                    EventLog.DeleteEventSource(Configuration.EventLogSource);
                }
            }
        }
Exemplo n.º 2
0
        public override void Install(System.Collections.IDictionary stateSaver)
        {
            base.Install(stateSaver);
            stateSaver.Add("TargetDir", Context.Parameters["assemblypath"].ToString().Replace("InstallerClassDLL.dll", ""));

            SerialNumber _SerialNumber = new SerialNumber("Install", Context, stateSaver);
            DialogResult dr            = _SerialNumber.ShowDialog();

            if (dr == DialogResult.Cancel)
            {
                _SerialNumber.Dispose();
                throw new InstallException("Installation is cancelled!");
            }
            else
            {
                _SerialNumber.Dispose();
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Installer class, to use run InstallUtil against this .exe
        /// </summary>
        /// <param name="savedState">The saved state for the installation.</param>
        public override void Install(System.Collections.IDictionary savedState)
        {
            ConsoleHarness.WriteToConsole(ConsoleColor.White, "Installing service {0}.", Configuration.Name);

            // install the service
            ConfigureInstallers();
            base.Install(savedState);

            // wire up the event log source, if provided
            if (!string.IsNullOrWhiteSpace(Configuration.EventLogSource))
            {
                // create the source if it doesn't exist
                if (!EventLog.SourceExists(Configuration.EventLogSource))
                {
                    EventLog.CreateEventSource(Configuration.EventLogSource, "Application");
                }
            }
        }
    static bool Hashtable_Hashtable4(JSVCall vc, int argc)
    {
        int _this = JSApi.getObject((int)JSApi.GetType.Arg);

        JSApi.attachFinalizerObject(_this);
        --argc;

        int len = argc;

        if (len == 2)
        {
            System.Collections.IDictionary arg0 = (System.Collections.IDictionary)JSMgr.datax.getObject((int)JSApi.GetType.Arg);
            System.Single arg1 = (System.Single)JSApi.getSingle((int)JSApi.GetType.Arg);
            JSMgr.addJSCSRel(_this, new System.Collections.Hashtable(arg0, arg1));
        }

        return(true);
    }
Exemplo n.º 5
0
        public static bool Save(JSONObject h, string path)
        {
            var s = Encode(h);

            if (File.Exists(path))
            {
                var oldS = File.ReadAllText(path, Encoding.GetEncoding(0));
                if (s.Equals(oldS))
                {
                    return(false);
                }
            }

            var bytes = Encoding.UTF8.GetBytes(s);

            File.WriteAllBytes(path, bytes);
            return(true);
        }
        public override void Install(System.Collections.IDictionary stateSaver)
        {
            //2 August 2019: The next 4 lines were added in Take 10 in order prevent double loading of packages.
            Microsoft.Win32.RegistryKey rkbase = null;
            rkbase = Microsoft.Win32.RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, Microsoft.Win32.RegistryView.Registry64);
            rkbase.CreateSubKey("SOFTWARE\\Wow6432Node\\Default Company Name\\CSharp PLAYPEN II Google 'Josh API Revit'", Microsoft.Win32.RegistryKeyPermissionCheck.ReadWriteSubTree).SetValue("XceedVersion", typeof(Xceed.Wpf.Toolkit.PropertyGrid.PropertyGrid).Assembly.FullName);
            rkbase.CreateSubKey("SOFTWARE\\Wow6432Node\\Default Company Name\\CSharp PLAYPEN II Google 'Josh API Revit'", Microsoft.Win32.RegistryKeyPermissionCheck.ReadWriteSubTree).SetValue("OokiiVersion", typeof(Ookii.Dialogs.Wpf.CredentialDialog).Assembly.FullName);
            //2 August 2019: End.

            string sDir   = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\Autodesk\\Revit\\Addins";
            bool   exists = System.IO.Directory.Exists(sDir);

            if (!exists)
            {
                System.IO.Directory.CreateDirectory(sDir);
            }

            XElement XElementAddIn = new XElement("AddIn", new XAttribute("Type", "Application"));

            XElementAddIn.Add(new XElement("Name", myAddinDLL));
            XElementAddIn.Add(new XElement("Assembly", this.Context.Parameters["targetdir"].Trim() + myAddinDLL + ".dll")); // /TargetDir=value1 /
            XElementAddIn.Add(new XElement("AddInId", Guid.NewGuid().ToString()));                                          //DatabaseMethods.writeDebug(Guid.NewGuid().ToString());
            XElementAddIn.Add(new XElement("FullClassName", myAddinDLL + ".ThisApplication"));
            XElementAddIn.Add(new XElement("VendorId", "01"));
            XElementAddIn.Add(new XElement("VendorDescription", "Joshua Lumley Secrets, twitter @joshnewzealand"));

            XElement XElementRevitAddIns = new XElement("RevitAddIns");

            XElementRevitAddIns.Add(XElementAddIn);

            try
            {
                foreach (string d in Directory.GetDirectories(sDir))
                {
                    //DirSearch.Add(d);
                    new XDocument(XElementRevitAddIns).Save(d + "\\" + myAddinDLL + ".addin");
                    //files.AddRange(DirSearch.Add(d));
                }
            }
            catch (System.Exception excpt)
            {
                System.Windows.Forms.MessageBox.Show(excpt.Message);
            }
        }
Exemplo n.º 7
0
 private IDictionary <TKey, TValue> ResolveLeafDictionary(Func <int, TKey> keyAccessor, bool createIfNeeded)
 {
     System.Collections.IDictionary result = _root;
     for (int i = 0; i < Depth - 1; i++)
     {
         var parent = result;
         var key    = keyAccessor(i);
         result = (System.Collections.IDictionary)parent[key];
         if (result == null)
         {
             if (!createIfNeeded)
             {
                 return(null);
             }
             parent[key] = result = CreateInternalDictionary(i + 1);
         }
     }
     return((IDictionary <TKey, TValue>)result);
 }
Exemplo n.º 8
0
 protected override void OnBeforeUninstall(System.Collections.IDictionary savedState)
 {
     base.OnBeforeUninstall(savedState);
     if (savedState.Contains(ArrayKey))
     {
         string[] files = savedState[ArrayKey] as string[];
         if (files != null)
         {
             foreach (string file in files)
             {
                 try
                 {
                     File.Delete(file);
                 }
                 catch { }
             }
         }
     }
 }
Exemplo n.º 9
0
        //=========================================================================================
        //
        //=========================================================================================
        public override void Install(System.Collections.IDictionary stateSaver)
        {
            base.Install(stateSaver);

            try
            {
                string assembly = this.GetType().Assembly.Location;

                string applicationId = null;
                string typeLib       = null;

                RegistrationHelper registrationHelper = new RegistrationHelper();
                registrationHelper.InstallAssembly(assembly, ref applicationId, ref typeLib, InstallationFlags.FindOrCreateTargetApplication);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
        public override void Install(System.Collections.IDictionary stateSaver)
        {
            base.Install(stateSaver);
            string commonAppDataFolder  = Context.Parameters["codecomappdatafolder"];
            string targetAssemblyFolder = Context.Parameters["codetargetdir"];

            if (commonAppDataFolder != null && targetAssemblyFolder != null)
            {
                commonAppDataFolder  = commonAppDataFolder.Trim();
                targetAssemblyFolder = targetAssemblyFolder.Trim();
                targetAssemblyFolder = targetAssemblyFolder.Replace(@"\\", @"\");
                //find the AddIn file(s) just created, and customize them to point to the correct folder for the assembly
                FixAddInFileIfExists(targetAssemblyFolder, commonAppDataFolder + @"\Microsoft\SQL Server Management Studio\11.0\Addins\PoorMansTSqlFormatterSSMSAddIn.AddIn", "Microsoft SQL Server Management Studio");
                FixAddInFileIfExists(targetAssemblyFolder, commonAppDataFolder + @"\Microsoft\VisualStudio\8.0\Addins\PoorMansTSqlFormatterSSMSAddIn.AddIn", "Microsoft Visual Studio");
                FixAddInFileIfExists(targetAssemblyFolder, commonAppDataFolder + @"\Microsoft\VisualStudio\9.0\Addins\PoorMansTSqlFormatterSSMSAddIn.AddIn", "Microsoft Visual Studio");
                FixAddInFileIfExists(targetAssemblyFolder, commonAppDataFolder + @"\Microsoft\VisualStudio\10.0\Addins\PoorMansTSqlFormatterSSMSAddIn.AddIn", "Microsoft Visual Studio");
                FixAddInFileIfExists(targetAssemblyFolder, commonAppDataFolder + @"\Microsoft\VisualStudio\11.0\Addins\PoorMansTSqlFormatterSSMSAddIn.AddIn", "Microsoft Visual Studio");
            }
        }
Exemplo n.º 11
0
    private void GetPlayerVC_Success(string json, object cb)
    {
        /*
         * "data"   : {
         *  "updatedAt" : 1392919197588,
         *  "currencyMap" : {
         *      "gold" : {
         *          "purchased" : 0,
         *          "balance"   : 10,
         *          "consumed"  : 0,
         *          "awarded"   : 10
         *      }
         *  }
         */

        m_mainScene.AddLog("SUCCESS");
        m_mainScene.AddLogJson(json);
        m_mainScene.AddLog("");

        JsonData jObj    = JsonMapper.ToObject(json);
        JsonData jCurMap = jObj ["data"] ["currencyMap"];

        System.Collections.IDictionary dCurMap = jCurMap as System.Collections.IDictionary;

        foreach (string key in dCurMap.Keys)
        {
            Currency c = null;
            if (m_currencies.ContainsKey(key))
            {
                c = m_currencies[key];
            }
            else
            {
                c = new Currency();
                m_currencies[key] = c;
            }
            c.currencyType = key;
            c.purchased    = (int)jCurMap[key]["purchased"];
            c.balance      = (int)jCurMap[key]["balance"];
            c.consumed     = (int)jCurMap[key]["consumed"];
            c.awarded      = (int)jCurMap[key]["awarded"];
        }
    }
Exemplo n.º 12
0
 public int Insert_SystemSet(Type type, System.Collections.IDictionary param, string database = null)
 {
     try
     {
         if (param == null)
         {
             param = new Hashtable();
         }
         param["database"] = database;
         return(dataMapper.Update(String.Format("{0}.Insert_SystemSet", GetMapName(type)), param));
     }
     catch (DataMapperException ex)
     {
         throw ex;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 13
0
 public IList <ShopSelectModel> QueryShopSelectModels(Type type, System.Collections.IDictionary param, string database = null)
 {
     try
     {
         if (param == null)
         {
             param = new Hashtable();
         }
         param["database"] = database;
         return(dataMapper.QueryForList <ShopSelectModel>(String.Format("{0}.QueryShopSelectModels", GetMapName(type)), param));
     }
     catch (DataMapperException ex)
     {
         throw ex;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 14
0
 public Query_Pay_Total GysHomeTotal(Type type, System.Collections.IDictionary param, string database = null)
 {
     try
     {
         if (param == null)
         {
             param = new Hashtable();
         }
         param["database"] = database;
         return(dataMapper.QueryForObject <Query_Pay_Total>(String.Format("{0}.GysHomeTotal", GetMapName(type)), param));
     }
     catch (DataMapperException ex)
     {
         throw ex;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 15
0
 public Ts_Log QueryItem(Type type, System.Collections.IDictionary param, string database = null)
 {
     try
     {
         if (param == null)
         {
             param = new Hashtable();
         }
         param["database"] = database;
         return(dataMapper.QueryForObject <Ts_Log>(String.Format("{0}.QueryItem", GetMapName(type)), param));
     }
     catch (DataMapperException ex)
     {
         throw ex;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 16
0
 public IList <Td_Sale_Order_Head_Query> QueryPageOfService(Type type, System.Collections.IDictionary param, string database = null)
 {
     try
     {
         if (param == null)
         {
             param = new Hashtable();
         }
         param["database"] = database;
         return(dataMapper.QueryForList <Td_Sale_Order_Head_Query>(String.Format("{0}.QueryPageOfService", GetMapName(type)), param));
     }
     catch (DataMapperException ex)
     {
         throw ex;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 17
0
 public Td_Report QueryOrderStatisticsInfo(Type type, System.Collections.IDictionary param, string database = null)
 {
     try
     {
         if (param == null)
         {
             param = new Hashtable();
         }
         param["database"] = database;
         return(dataMapper.QueryForObject <Td_Report>(String.Format("{0}.QueryOrderStatisticsInfo", GetMapName(type)), param));
     }
     catch (DataMapperException ex)
     {
         throw ex;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 18
0
        public override void Uninstall(System.Collections.IDictionary savedState)
        {
            int uninstallStep = 0;

            try
            {
                base.Uninstall(savedState);
                uninstallStep++;
                if (EventLog.SourceExists(sSource))
                {
                    uninstallStep++;
                    EventLog.DeleteEventSource(sSource);
                }
                uninstallStep++;
            }
            catch (Exception ex)
            {
                System.Windows.MessageBox.Show("Error performing uninstaller task: " + ex.Message + ", at step " + uninstallStep);
            }
        }
Exemplo n.º 19
0
        public override void Install(System.Collections.IDictionary stateSaver)
        {
            base.Install(stateSaver);
            ServiceController controller = new ServiceController("CompPlan CL Service");

            try {
                controller.Start();
            }
            catch (Exception ex) {
                String source = "CompPlan CL Service";
                String log    = "Application";
                if (!EventLog.SourceExists(source))
                {
                    EventLog.CreateEventSource(source, log);
                }
                EventLog eLog = new EventLog();
                eLog.Source = source;
                eLog.WriteEntry(@"The service could not be started. Please start the service manually. Error: " + ex.Message, EventLogEntryType.Error);
            }
        }
Exemplo n.º 20
0
Arquivo: BaseDAL.cs Projeto: 17/YunPos
 public IList <T> QueryListByStatementName <T>(Type type, System.Collections.IDictionary param, string statementName = "QueryList", string database = null)
 {
     try
     {
         if (param == null)
         {
             param = new Hashtable();
         }
         param["database"] = database;
         return(dataMapper.QueryForList <T>(String.Format("{0}.{1}", GetMapName(type), statementName), param));
     }
     catch (DataMapperException ex)
     {
         throw ex;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 21
0
        public override object CreateInstance(ITypeDescriptorContext context, System.Collections.IDictionary propertyValues)
        {
            if (propertyValues == null)
            {
                throw new ArgumentNullException("propertyValues");
            }

            T      ret   = default(T);
            object boxed = ret;

            foreach (DictionaryEntry entry in propertyValues)
            {
                PropertyInfo pi = ret.GetType().GetProperty(entry.Key.ToString());
                if (pi != null && pi.CanWrite)
                {
                    pi.SetValue(boxed, Convert.ChangeType(entry.Value, pi.PropertyType), null);
                }
            }
            return((T)boxed);
        }
Exemplo n.º 22
0
 public IList <Td_Report> QueryReportbyMonthPage(Type type, System.Collections.IDictionary param, string database = null)
 {
     try
     {
         if (param == null)
         {
             param = new Hashtable();
         }
         param["database"] = database;
         return(dataMapper.QueryForList <Td_Report>(String.Format("{0}.QueryReportbyMonthPage", GetMapName(type)), param));
     }
     catch (DataMapperException ex)
     {
         throw ex;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 23
0
        public override void Install(System.Collections.IDictionary stateSaver)
        {
            try
            {
                string path = this.Context.Parameters["targetdir"];//安装目录
                if (!path.EndsWith("\\"))
                {
                    path = path + "\\";
                }

                string aimFilePath = string.Format("{0}FMMonitorService\\FileManager.MonitoringTool.exe", path);
                if (File.Exists(aimFilePath))
                {
                    if (!ProcessStart(aimFilePath))
                    {
                        //MessageBox.Show("程序启动异常!");
                        MessageBox.Show("程序自动启动失败,请重启计算!");
                    }
                }
                else
                {
                    //MessageBox.Show(aimFilePath);
                    //MessageBox.Show("目录不存在!");
                }

                //MessageBox.Show("开始删除快捷房事 !");

                // 设置文件夹的权限
                SetFolderAuth(path);

                // 删除快捷方式
                DelChem32Link();

                base.Install(stateSaver);
            }
            catch (Exception ex)
            {
                //MessageBox.Show("程序异常!" + ex.Message + ex.StackTrace);
                MessageBox.Show("程序自动启动失败,请重启计算!");
            }
        }
Exemplo n.º 24
0
        //public override void Uninstall(System.Collections.IDictionary savedState)
        protected override void OnBeforeUninstall(System.Collections.IDictionary savedState)
        {
            base.OnBeforeUninstall(savedState);
            string regasmPath = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory() + @"regasm.exe";

            if (System.Environment.Is64BitOperatingSystem) //to prevent wow6432 issue
            {
                regasmPath = regasmPath.Replace("Framework", "Framework64");
            }
            string componentPath = typeof(Installer1).Assembly.Location;

            //MessageBox.Show(regasmPath + "\"" + componentPath + "\"" + " /codebase");

            System.Diagnostics.ProcessStartInfo processInfo = new System.Diagnostics.ProcessStartInfo("cmd.exe");
            processInfo.Verb      = "runas";
            processInfo.Arguments = "/K " + regasmPath + " /unregister \"" + componentPath + "\"" + " /codebase";
            //System.Diagnostics.Process.Start(processInfo);
            System.Diagnostics.Process.Start(regasmPath, "\"" + componentPath + "\"" + " /codebase /unregister");

            System.Threading.Thread.Sleep(1000);
        }
Exemplo n.º 25
0
        protected static T GetOption <T>(SC.IDictionary options, string name, T defVal)
        {
            if (options == null || !options.Contains(name))
            {
                return(defVal);
            }
            object v = options[name];

            if (typeof(T).IsAssignableFrom(v.GetType()))
            {
                return((T)v);
            }
            if (typeof(T).IsEnum)
            {
                return((T)Enum.Parse(typeof(T), Convert.ToString(v), true));
            }
            else
            {
                return((T)Convert.ChangeType(v, typeof(T)));
            }
        }
Exemplo n.º 26
0
        public override void Install(System.Collections.IDictionary stateSaver)
        {
            base.Install(stateSaver);

            string targetDirectory = Context.Parameters["targetdir"];

            string strConfigFilename = "ADOpt-V4.exe.config";

            try
            {
                XmlDocument xmlDoc = new XmlDocument();

                xmlDoc.Load(targetDirectory + strConfigFilename);

                foreach (XmlElement element in xmlDoc.DocumentElement)
                {
                    if (element.Name.Equals("oracle.dataaccess.client"))
                    {
                        //For Each xElement As XmlElement In XmlDoc.DocumentElement



                        foreach (XmlNode node in element.ChildNodes)
                        {
                            if (node.ChildNodes[0].Attributes[0].Value.Equals("DllPath"))
                            {
                                node.ChildNodes[0].Attributes[1].Value = targetDirectory + "Data_Display_Oracle_Connection\\bin";
                            }
                        }
                    }
                }

                xmlDoc.Save(targetDirectory + strConfigFilename);
                //System.Configuration.ConfigurationManager.RefreshSection("oracle.dataaccess.client");
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 27
0
        public override void Commit(System.Collections.IDictionary savedState)
        {
            base.Commit(savedState);

#if NO
            // 创建事件日志目录
            if (!EventLog.SourceExists("dp2Capo"))
            {
                EventLog.CreateEventSource("dp2Capo", "DigitalPlatform");
            }

            EventLog Log = new EventLog();
            Log.Source = "dp2Capo";

            Log.WriteEntry("dp2Capo 安装成功。", EventLogEntryType.Information);
#endif
            // 2016/11/12
            ServiceUtil.SetRecoveryOptions(this.serviceInstaller1.ServiceName);

            EventLog.WriteEntry(this.serviceInstaller1.ServiceName,
                                "dp2Capo 安装成功。", EventLogEntryType.Information);
        }
Exemplo n.º 28
0
            protected override void PostFilterProperties(System.Collections.IDictionary properties)
            {
                // Hide the Anchor property so it cannot be changed by the developer at design time.
                PropertyDescriptor dockDescriptor = (PropertyDescriptor)properties["Dock"];

                dockDescriptor = TypeDescriptor.CreateProperty(dockDescriptor.ComponentType, dockDescriptor, new Attribute[] { new BrowsableAttribute(false), new EditorBrowsableAttribute(EditorBrowsableState.Never) });
                properties[dockDescriptor.Name] = dockDescriptor;
                // Hide the AutoScroll property so it cannot be changed by the developer at design time
                // because it is set from the nearest panel of type scrollable control.
                PropertyDescriptor autoScrollDescriptor = (PropertyDescriptor)properties["AutoScroll"];

                autoScrollDescriptor = TypeDescriptor.CreateProperty(autoScrollDescriptor.ComponentType, autoScrollDescriptor, new Attribute[] { new ReadOnlyAttribute(true) });
                properties[autoScrollDescriptor.Name] = autoScrollDescriptor;
                // Make the Name property read only so it cannot be changed by the developer at design time
                // because it is set from the nearest panel of type scrollable control.
                PropertyDescriptor nameDescriptor = (PropertyDescriptor)properties["Name"];

                nameDescriptor = TypeDescriptor.CreateProperty(nameDescriptor.ComponentType, nameDescriptor, new Attribute[] { new ReadOnlyAttribute(true) });
                properties[nameDescriptor.Name] = nameDescriptor;
                // Always call the base method last.
                base.PostFilterProperties(properties);
            }
Exemplo n.º 29
0
 protected void options(SC.IDictionary options)
 {
     if (_curFlow != null)
     {
         _curFlow.IsCancelling   = GetOption(options, "cancelling", _curFlow.IsCancelling);
         _curFlow.Label          = GetOption(options, "label", _curFlow.Label);
         _curFlow.SourcePortType = GetOption(options, "sourcePort", _curFlow.SourcePortType);
         _curFlow.TargetPortType = GetOption(options, "targetPort", _curFlow.TargetPortType);
         _curFlow.EvalOrder      = GetOption(options, "evalOrder", _curFlow.EvalOrder);
     }
     else if (_curVar != null)
     {
         _curVar.IsRequired       = GetOption(options, required, _curVar.IsRequired);
         _curVar.IsArray          = GetOption(options, isArray, _curVar.IsArray);
         _curVar.VariableDir      = GetOption(options, dir, _curVar.VariableDir);
         _curVar.DefaultValueExpr = GetOption(options, "defaultValue", _curVar.DefaultValueExpr);
     }
     else
     {
         throw new Exception();
     }
 }
        public override void Install(System.Collections.IDictionary stateSaver)
        {
            base.Install(stateSaver);
            string commonAppDataFolder  = Context.Parameters["codecomappdatafolder"];
            string targetAssemblyFolder = Context.Parameters["codetargetdir"];

            if (commonAppDataFolder != null && targetAssemblyFolder != null)
            {
                //find the AddIn file just created, and customize it to point to the correct folder for the assembly
                string addInFilePath = commonAppDataFolder + @"\Microsoft\SQL Server Management Studio\11.0\Addins\PoorMansTSqlFormatterSSMSAddIn.AddIn";

                XmlNameTable        nt = new NameTable();
                XmlNamespaceManager ns = new XmlNamespaceManager(nt);
                ns.AddNamespace("autoext", "http://schemas.microsoft.com/AutomationExtensibility");

                XmlDocument addInDefinitionFile = new XmlDocument();
                addInDefinitionFile.Load(addInFilePath);
                XmlNode customizableNode = addInDefinitionFile.SelectSingleNode("/autoext:Extensibility/autoext:Addin/autoext:Assembly", ns);
                customizableNode.InnerText = customizableNode.InnerText.Replace("%TARGETDIR%", targetAssemblyFolder);
                addInDefinitionFile.Save(addInFilePath);
            }
        }
Exemplo n.º 31
0
        private void Load()
        {
            m_buffers = new System.Collections.Generic.Dictionary<object, object>();

            using (IRepository rep = ServiceProvider.GetService<IRepositoryFactory>().GenerateRepository(m_persistentClass))
            {
                rep.BeginTransaction();
                IList list = rep.List(m_persistentClass);
                rep.CommitTransaction();

                foreach (object i in list)
                {
                    object id = EntityScript.GetPropertyValue(i, ServiceProvider.GetService<IEntityMetadataGenerator>().GenerateEntityMetadata(m_persistentClass).IdName);
                    m_buffers[id] = i;
                }
            }
        }
Exemplo n.º 32
0
 /// <summary>
 /// 清空
 /// </summary>
 public void Clear()
 {
     if (m_buffers != null)
     {
         m_buffers.Clear();
         m_buffers = null;
     }
 }
Exemplo n.º 33
0
		public ProofStep(Rule rule, System.Collections.IDictionary substitutions) {
			Rule = rule;
			Substitutions = substitutions;
		}
Exemplo n.º 34
0
 protected internal virtual void Init()
     {
     programs = new Hashtable();
     programs[DEFAULT_PROGRAM_NAME] = new ArrayList(PROGRAM_INIT_SIZE);
     lastRewriteTokenIndexes = new Hashtable();
     }
Exemplo n.º 35
0
 public void InitParam(IDictionary ht)
 {
     htKeyValue = ht;
 }
Exemplo n.º 36
0
 public PayPaymentOrdersForm()
 {
     this.InitializeComponent();
     this.reestersPaymentOrderDict = new System.Collections.Hashtable();
     this.searchForm = new PayPaymentOrderSearchForm();
 }
Exemplo n.º 37
0
 internal DictionaryTraceRecord(System.Collections.IDictionary dictionary)
 {
     this.dictionary = dictionary;
 }