Exemplo n.º 1
0
        public TraceOptions(DataPersistency.BL.UserOptions.LoggingSystemOptions logingOptionsModelReferince)
        {
            this.lastLogingOptionsModel = this.logingOptionsModel = logingOptionsModelReferince;
            InitializeComponent();
            ShowLastModel();
            bindingSourceOptionsTrace.ResetBindings(true);

            bindingSourceOptionsTrace.DataSource = logingOptionsModel;
            logingOptionsModelReferince.PropertyChanged += new PropertyChangedEventHandler(logingOptionsModelReferince_PropertyChanged);
        }
Exemplo n.º 2
0
 public FileInfo GetFileInfo(DataPersistency.DL.FileAccess.UserFile userFile)
 {
     switch (userFile)
     {
         case DataPersistency.DL.FileAccess.UserFile.LogingSystemOptions:
             return LogingSystemOptionsFile;
             break;
     }
     return LogingSystemOptionsFile;
 }
Exemplo n.º 3
0
        public TraceOptions(DataPersistency.BL.UserOptions.LoggingSystemOptions logingOptionsModelReferince)
        {
            this.logingOptionsModel = logingOptionsModelReferince;
            this.symbolCollection = symbolCollection;
            InitializeComponent();
            //bindingSourceOptionsTrace.ResetBindings(true);

            //logingOptionsModel.
            bindingSourceOptionsTrace.DataSource = logingOptionsModel;
            logingOptionsModelReferince.PropertyChanged += new PropertyChangedEventHandler(logingOptionsModelReferince_PropertyChanged);
        }
Exemplo n.º 4
0
        public static void RestoreModel(UserFile userFile, ref DataPersistency.BL.UserOptions.LoggingSystemOptions model)
        {
            DataPersistency.BL.UserOptions.UserOptions userOptions = new DataPersistency.BL.UserOptions.UserOptions();
            if (fileInfo == null)
            {
                fileInfo = userOptions.GetFileInfo(userFile);
            }
            if (streamWriter == null)
            {
                streamWriter = fileInfo.AppendText();
                streamWriter.AutoFlush = true;
            }
            DataPersistency.BL.UserOptions.LoggingSystemOptions mdl = (DataPersistency.BL.UserOptions.LoggingSystemOptions)model;
            List<string[]> filtredLines = new List<string[]>();
            if (streamWriter != null)
            {
                streamWriter.Close();
                streamWriter.Dispose();
                streamWriter = null;
            }
            streamReader = fileInfo.OpenText();
            string line = string.Empty;
            while ((line = streamReader.ReadLine()) != null)
            {
                filtredLines.Add(line.Split('\t'));
            }
            streamReader.Close();
            streamReader.Dispose();
            streamReader = null;

            mdl.LogNumbersNone = filtredLines[0][2].Equals("True") ? true : false;
            mdl.LogNumbersResults = filtredLines[1][2].Equals("True") ? true : false;
            mdl.LogNumbersParameters = filtredLines[2][2].Equals("True") ? true : false;
            mdl.LogNumbersCode = filtredLines[3][2].Equals("True") ? true : false;

            mdl.LogObjectsNone = filtredLines[4][2].Equals("True") ? true : false;
            mdl.LogObjectsResults = filtredLines[5][2].Equals("True") ? true : false;
            mdl.LogObjectsParameters = filtredLines[6][2].Equals("True") ? true : false;
            mdl.LogObjectsCode = filtredLines[7][2].Equals("True") ? true : false;

            mdl.LogRelationsNone = filtredLines[8][2].Equals("True") ? true : false;
            mdl.LogRelationsResults = filtredLines[9][2].Equals("True") ? true : false;
            mdl.LogRelationsParameters = filtredLines[10][2].Equals("True") ? true : false;
            mdl.LogRelationsCode = filtredLines[11][2].Equals("True") ? true : false;

            mdl.LogLogicsNone = filtredLines[12][2].Equals("True") ? true : false;
            mdl.LogLogicsResults = filtredLines[13][2].Equals("True") ? true : false;
            mdl.LogLogicsParameters = filtredLines[14][2].Equals("True") ? true : false;
            mdl.LogLogicsCode = filtredLines[15][2].Equals("True") ? true : false;

        }
Exemplo n.º 5
0
 public QueryEvaluator(DataPersistency.BL.UserOptions.LoggingSystemOptions logingOptions)
 {
     logingOptionsModel = logingOptions;
 }
Exemplo n.º 6
0
 public RelationCollection(ServerAccessInterface serverAccessReference, DataPersistency.BL.UserOptions.LoggingSystemOptions logingOptionsReferince)
 {
     logingOptions = logingOptionsReferince;
     serverAccess = serverAccessReference;
 }
Exemplo n.º 7
0
 public SymbolCollection(DataPersistency.DL.ServerAccess.ServerAccessInterface serverAccessReference, DataPersistency.BL.UserOptions.LoggingSystemOptions logingOptionsReferince)
 {
     logingOptions = logingOptionsReferince;
     ServerAccess = serverAccessReference;
 }
Exemplo n.º 8
0
        /// <summary>
        /// Initiate connection
        /// </summary>
        public ServerAccessOracle(DataPersistency.BL.UserOptions.LoggingSystemOptions logingOptionsReferince)
        {
            logingOptions = logingOptionsReferince;

            //=== CUSTOM LOGGER===================================================================================
            if (LoggingSystem.TraceCode)
            {
                System.Diagnostics.StackTrace stackTrace; System.Diagnostics.StackFrame fr; string myLog; System.IO.StreamWriter log; stackTrace = new System.Diagnostics.StackTrace(); fr = stackTrace.GetFrame(0);
                LoggingSystem.LogMessage = "<div>  " + this.GetType().Namespace + " <span style='color:green'> " + this.GetType().Name + " </span>&gt; " + stackTrace.GetFrame(0).GetMethod().ToString().Replace(stackTrace.GetFrame(0).GetMethod().Name, "<span style='color:blue'>" + stackTrace.GetFrame(0).GetMethod().Name + "</span>") + "</div>";
            }
            //====================================================================================================
            if (OracleConnection == null)
            {
                OracleConnection = getOracleConnection("" + OracleDB + "");
            }
            // TODO: Complete member initialization
        }