Exemple #1
0
        public Automator(string ConfigFileName, Translation GlobalTranslation)
        {
            tsl = GlobalTranslation;
            // Read the Config File
            CurrentConfig = ReadConfigFile(CurrentConfig,ConfigFileName);
            PrintMessagesToConsole(CurrentConfig,tsl);

               // Get login / password from console
               GetCredentials(ref CurrentConfig.OutputUserLogin, ref CurrentConfig.OutputUserPassword, "[LOGININPUT]", "[PASSWORDINPUT]");

            // Create MezzoObject
            myMezzoObject = new MezzoObject(CurrentConfig.OutputUserLogin, CurrentConfig.OutputUserPassword, CurrentConfig.OutputServerUrl);
            // Change workspace
            myMezzoObject.ChangeWorkspace(CurrentConfig.OutputWorkspaceId);
            Utils.MaMessage(String.Format(tsl.T("[CONNECTED]"), DateTime.Now.ToString(TimeFormat), myMezzoObject.UserCurrentFullName), Utils.maMessageLineType.WriteLine, Utils.maMessageOutput.ConsoleAndLog, CurrentConfig.LogFile);
            Utils.MaMessage("");
        }
Exemple #2
0
        private MezzoObject.moDocumentProperties AttributesListProcess(MezzoObject.moDocumentProperties currentProperties, FileInfo localFile)
        {
            MezzoObject.moAttribute tmpAttr;

            for (int i = 0; i < currentProperties.moAttributeList.Count; i++)
            {
                tmpAttr = currentProperties.moAttributeList[i];
                tmpAttr.Value = AttributeProcess(tmpAttr.Value, localFile);
                currentProperties.moAttributeList[i] = tmpAttr;
            }
            return currentProperties;
        }