Esempio n. 1
0
 public DataSetDialog()
 {
     this.treeViewSCL      = new TreeViewSCL();
     this.objectManagement = new ObjectManagement();
     this.bandModify       = false;
     InitializeComponent();
 }
Esempio n. 2
0
 /// <summary>
 /// Description of the ContextMenuSCL component.
 /// </summary>
 public ContextMenuSCL(TreeViewSCL tvscl)
 {
     this.scl = tvscl.scl;
     this.contextMenuStrip = new ContextMenuStrip();
     this.treeViewSCL      = tvscl;
     this.objectManagement = new ObjectManagement();
 }
Esempio n. 3
0
        /// <summary>Update the components theme.</summary>
        /// <param name="component">The component to update.</param>
        public void UpdateComponent(IDisposable component)
        {
            if (component is IThemeSupport)
            {
                foreach (Type registeredTypes in ControlManager.ThemeSupportedTypes())
                {
                    if (ObjectManagement.HasMethod(component, SettingConstants.ComponentUpdateMethodName))
                    {
                        switch (component)
                        {
                        case Form form:
                        {
                            if (form.GetType().BaseType == registeredTypes)
                            {
                                if (registeredTypes != null)
                                {
                                    Theme.InvokeThemeUpdate(form, registeredTypes, _theme);
                                }
                            }
                            else
                            {
                                // Form not registered.
                            }

                            break;
                        }

                        case Control control:
                        {
                            if (control.GetType() == registeredTypes)
                            {
                                if (_formCollection[0] is VisualForm visualForm)
                                {
                                    control.BackColor = visualForm.Background;
                                }

                                Theme.InvokeThemeUpdate(control, registeredTypes, _theme);
                            }
                            else
                            {
                                // Control not registered.
                            }

                            break;
                        }
                        }
                    }
                    else
                    {
                        // The component does not contain method.
                    }
                }
            }
            else
            {
                // The component not supported.
            }
        }
Esempio n. 4
0
 public void Dispose()
 {
     foreach (var module in _modules.Values)
     {
         module.Stop();
         ObjectManagement.TryDispose(module);
     }
     _modules.Clear();
 }
Esempio n. 5
0
        public void Dispose()
        {
            _subscriptionDispatcher.Dispose();
            _requestDispatcher.Dispose();
            _participantDispatcher.Dispose();

            ObjectManagement.TryDispose(WorkerPool);
            ObjectManagement.TryDispose(Modules);
        }
Esempio n. 6
0
 public HistoryDialog(tHeader objectHeader)
 {
     this.objectHeader     = objectHeader;
     this.objectHitem      = new tHitem();
     this.objectManagement = new ObjectManagement();
     InitializeComponent();
     this.OkButton.DialogResult             = DialogResult.OK;
     this.AcceptButton                      = this.OkButton;
     this.tHitemPropertyGrid.SelectedObject = objectHitem;
 }
Esempio n. 7
0
 public PrivateDialog(tPrivate sCLPrivate)
 {
     // The InitializeComponent() call is required for Windows Forms designer support.
     InitializeComponent();
     this.objectManagement = new ObjectManagement();
     if (sCLPrivate.Any != null && sCLPrivate.Any.Length > 0)
     {
         this.elementsListBox.DataSource    = sCLPrivate.Any;
         this.elementsListBox.DisplayMember = "Name";
     }
     this.sCLPrivate    = sCLPrivate;
     this.privateObject = new Private();
 }
 /// <summary>
 /// This method inicializes the values.
 /// </summary>
 /// <param name="treeNodeLN">
 /// treeNode that contains the LN data that will be used to create them.
 /// </param>
 /// <param name="sCL">
 /// Main SCL class that will get the data selected.
 /// </param>
 /// <param name="lN">
 /// LN selected.
 /// </param>
 /// <param name="title">
 /// Title of the window.
 /// </param>
 public WindowTreeViewLNType(TreeNode treeNodeLN, SCL sCLObject, object lN, string title)
 {
     this.treeNodeLN        = treeNodeLN;
     this.scl.Configuration = sCLObject;
     this.lN = lN;
     // Calling InitializeComponent() is required for Windows Forms designer support.
     InitializeComponent();
     this.Text             = title;
     this.label1.ForeColor = Color.Blue;
     this.treeViewLNType   = new TreeViewLNType(this.treeNodeLN, this.scl.Configuration);
     this.treeLN.Nodes.Add(treeViewLNType.GetTreeNodeTypesLNs(this.lN));
     this.treeLN.Nodes[0].Expand();
     this.bandModify       = false;
     this.objectManagement = new ObjectManagement();
 }
Esempio n. 9
0
 public AutomataForValidateToTreeNode(TreeNode node, string keys)
 {
     this.ListErrors            = new List <ErrorsManagement>();
     this.node                  = node;
     this.keys                  = keys;
     this.index                 = 0;
     this.regularExpression     = new RegularExpression();
     this.property              = new ArrayList();
     this.valueProperties       = new ArrayList();
     this.objectManagement      = new ObjectManagement();
     this.objectSCL             = this.node.Tag;
     this.namesPropertiesObject = new ArrayList();
     this.flag                  = true;
     this.flags                 = new List <bool>();
     this.regularExpressionTree = new  RegularExpressionTree();
     this.selectNodeToDelete    = node;
 }
Esempio n. 10
0
        public override Exceptional<bool> Contains(ObjectManagement.DBObjectStream myDBObject, TypeManagement.GraphDBType myTypeOfDBObject, DBContext myDBContext)
        {
            var result =  GetIndexkeysFromDBObject(myDBObject, myTypeOfDBObject, myDBContext);
            if (result.Failed())
            {
                return result.Convert<bool>();
            }

            foreach (var aIndexKex in result.Value)
            {
                HashSet<ObjectUUID> values = null;
                if (_Index.TryGetValue(aIndexKex, out values))
                {
                    if (values.Contains(myDBObject.ObjectUUID))
                    {
                        return new Exceptional<bool>(true);
                    }
                }
            }

            return new Exceptional<bool>(false);
        }
Esempio n. 11
0
 /// <summary>Determines whether the object has the method.</summary>
 /// <param name="source">The object source.</param>
 /// <param name="methodName">The name of the method.</param>
 /// <returns>The <see cref="bool" />.</returns>
 public static bool HasMethod(this object source, string methodName)
 {
     return(ObjectManagement.HasMethod(source, methodName));
 }
 public Error_InvalidEdgeListOperation(EdgeList myEdgeList, ObjectManagement.EdgeKey myEdgeKey, string myOperation)
 {
     _EdgeList1 = myEdgeList;
     this._EdgeKey = myEdgeKey;
     this._Operation = myOperation;
 }
Esempio n. 13
0
        internal IObject SimpleExecution(ObjectManagement.DBObjectStream aDBObject, DBContext dbContext)
        {
            SubstituteAttributeNames(this, aDBObject, dbContext);

            return SimpleExecutionInternal().Value;
        }
 public AttributeReferences()
 {
     this.treeViewSCL      = new TreeViewSCL();
     this.objectManagement = new ObjectManagement();
 }
Esempio n. 15
0
 public void Dispose()
 {
     ObjectManagement.TryDispose(Outbox);
     ObjectManagement.TryDispose(Sender);
     _monitorToken?.Dispose();
 }
Esempio n. 16
0
        public override Lib.ErrorHandling.Exceptional Update(ObjectManagement.DBObjectStream myDBObject, TypeManagement.GraphDBType myTypeOfDBObject, DBContext myDBContext)
        {
            #region insert new values

            if (myDBObject.HasAtLeastOneAttribute(this.IndexKeyDefinition.IndexKeyAttributeUUIDs, myTypeOfDBObject, myDBContext.SessionSettings))
            {
                var result = GetIndexkeysFromDBObject(myDBObject, myTypeOfDBObject, myDBContext);
                if (result.Failed())
                {
                    return result;
                }
                //insert
                foreach (var aIndexKey in result.Value)
                {
                    SetIndexKeyAndValue(aIndexKey, myDBObject.ObjectUUID, IndexSetStrategy.MERGE);
                }
            }

            #endregion

            return Exceptional.OK;
        }
Esempio n. 17
0
        public override Lib.ErrorHandling.Exceptional Remove(ObjectManagement.DBObjectStream myDBObject, TypeManagement.GraphDBType myTypeOfDBObjects, DBContext myDBContext)
        {
            var result = GetIndexkeysFromDBObject(myDBObject, myTypeOfDBObjects, myDBContext);

            if (result.Failed())
            {
                return result;
            }

            foreach (var aIndexKey in result.Value)
            {
                HashSet<ObjectUUID> values = null;
                if (_Index.TryGetValue(aIndexKey, out values))
                {
                    values.Remove(myDBObject.ObjectUUID);
                    if (values.Count == 0)
                    {
                        _Index.Remove(aIndexKey);
                    }
                }
            }

            return Exceptional.OK;
        }
Esempio n. 18
0
        public override Lib.ErrorHandling.Exceptional Insert(ObjectManagement.DBObjectStream myDBObject, Lib.DataStructures.Indices.IndexSetStrategy myIndexSetStrategy, TypeManagement.GraphDBType myTypeOfDBObject, DBContext myDBContext)
        {
            var result = GetIndexkeysFromDBObject(myDBObject, myTypeOfDBObject, myDBContext);
            if (result.Failed())
            {
                return result;
            }

            foreach (var aIndexKex in result.Value)
            {
                #region Check for uniqueness - TODO: remove me as soon as we have a unique indexObject implementation

                if (IsUniqueAttributeIndex)
                {
                    if (_Index.ContainsKey(aIndexKex))
                    {
                        return new Exceptional(new Error_UniqueConstrainViolation(myTypeOfDBObject.Name, IndexName));
                    }
                }

                #endregion

                SetIndexKeyAndValue(aIndexKex, myDBObject.ObjectUUID, myIndexSetStrategy);
            }

            return Exceptional.OK;
        }
Esempio n. 19
0
 public override Lib.ErrorHandling.Exceptional Insert(ObjectManagement.DBObjectStream myDBObject, TypeManagement.GraphDBType myTypeOfDBobject, DBContext myDBContext)
 {
     return Insert(myDBObject, IndexSetStrategy.MERGE, myTypeOfDBobject, myDBContext);
 }
Esempio n. 20
0
 public void Dispose()
 {
     ObjectManagement.TryDispose(_store);
 }
Esempio n. 21
0
 public Utils()
 {
     this.objectManagement = new ObjectManagement();
     this.treeViewSCL      = new TreeViewSCL();
 }