コード例 #1
0
        /// <summary>
        /// The add children to collection.
        /// </summary>
        /// <param name="collection">
        /// The collection.
        /// </param>
        public override void AddChildrenToCollection(RevisionDefinitionItemCollection collection)
        {
            base.AddChildrenToCollection(collection);
            // There is not dictionary only the fields, etc. in the dict so do not add it the name of the dictionary.

            // now add all the fields.
        }
コード例 #2
0
        /// <summary>
        /// The add self.
        /// </summary>
        /// <param name="collection">
        /// The collection.
        /// </param>
        protected override void AddSelf(RevisionDefinitionItemCollection collection)
        {
            // Add all the screen items, if they exist.

            // Primary screen definition
            SBFile.ReadDictionaryItem(
                this.FileName,
                this.Name,
                new object[] { this.FileName, this.Name, collection },
                ReadDictItemCompleted);
            // .TXT
            SBFile.ReadDictionaryItem(
                this.FileName,
                this.Name + ".TXT",
                new object[] { this.FileName, this.Name + ".TXT", collection },
                ReadDictItemCompleted);
            // .GUI
            SBFile.ReadDictionaryItem(
                this.FileName,
                this.Name + ".GUI",
                new object[] { this.FileName, this.Name + ".GUI", collection },
                ReadDictItemCompleted);
            // .XUI
            SBFile.ReadDictionaryItem(
                this.FileName,
                this.Name + ".XUI",
                new object[] { this.FileName, this.Name + ".XUI", collection },
                ReadDictItemCompleted);

            foreach (var fieldDescription in this.FieldDescriptions)
            {
                fieldDescription.AddChildrenToCollection(collection);
            }

            // add the dictionary and data, if the process definition has the same data file, other wise add the dict and the different data file.
            if (DebugWindowManager.DebugConsoleWindow != null)
            {
                // Adding screen definition item from dictionary.
                JobManager.RunInDispatcherThread(
                    DebugWindowManager.DebugConsoleWindow.Dispatcher,
                    DispatcherPriority.Normal,
                    () =>
                    RevisionDefinitionViewModel.AddItemToDefinition(
                        collection,
                        new RevisionDefinitionItem
                            {
                                Action = "FC",
                                FileName =
                                    this.FileName.StartsWith("DICT ") ? this.FileName.Substring(5) : this.FileName,
                                Item = string.Empty,
                                Parameters = RevisionDefinitionViewModel.DictAndData
                            }));
            }
        }
コード例 #3
0
        /// <summary>
        /// The add children to collection.
        /// </summary>
        /// <param name="collection">
        /// The collection.
        /// </param>
        public override void AddChildrenToCollection(RevisionDefinitionItemCollection collection)
        {
            if (!this.IsError)
            {
                RevisionDefinitionViewModel.AddItemToDefinition(
                    collection,
                    new RevisionDefinitionItem()
                        {
                            Action = "IO",
                            FileName = this.FileName,
                            Item = this.Name,
                            Parameters = RevisionDefinitionViewModel.Data
                        });
            }

            base.AddChildrenToCollection(collection);
        }
コード例 #4
0
        /// <summary>
        /// The add self.
        /// </summary>
        /// <param name="collection">
        /// The collection.
        /// </param>
        protected override void AddSelf(RevisionDefinitionItemCollection collection)
        {
            if (!this.IsError)
            {
                RevisionDefinitionViewModel.AddItemToDefinition(
                    collection,
                    new RevisionDefinitionItem()
                        {
                            Action = "IO",
                            FileName = this.FileName,
                            Item = this.Name,
                            Parameters = RevisionDefinitionViewModel.Data
                        });

                var parameters = RevisionDefinitionViewModel.SourceAndObject;
                if (IsInclude)
                {
                    parameters += ",1,1";
                }

                RevisionDefinitionViewModel.AddItemToDefinition(
                    collection,
                    new RevisionDefinitionItem() { Action = "FC", FileName = this.FileName, Item = string.Empty, Parameters = parameters });

                if (!IsInclude)
                {
                    RevisionDefinitionViewModel.AddItemToDefinition(
                        collection,
                        new RevisionDefinitionItem()
                            {
                                Action = "FB",
                                FileName = this.FileName,
                                Item = string.Empty,
                                Parameters = string.Empty
                            });
                }
            }
        }
コード例 #5
0
 /// <summary>
 /// The add self.
 /// </summary>
 /// <param name="collection">
 /// The collection.
 /// </param>
 protected override void AddSelf(RevisionDefinitionItemCollection collection)
 {
     if (this.HasDictionary)
     {
         RevisionDefinitionViewModel.AddItemToDefinition(
             collection,
             new RevisionDefinitionItem()
                 {
                     Action = "IO",
                     FileName = this.FileName,
                     Item = this.Name,
                     Parameters = RevisionDefinitionViewModel.Dict
                 });
         // make sure the file is added.
         RevisionDefinitionViewModel.AddItemToDefinition(
             collection,
             new RevisionDefinitionItem()
                 {
                     Action = "FC",
                     FileName = this.FileName,
                     Item = string.Empty,
                     Parameters = RevisionDefinitionViewModel.DictAndData
                 });
     }
 }
コード例 #6
0
        /// <summary>
        /// The add children to collection.
        /// </summary>
        /// <param name="collection">
        /// The collection.
        /// </param>
        public override void AddChildrenToCollection(RevisionDefinitionItemCollection collection)
        {
            if (!this.IsError)
            {
                // First add this screen definition definition
                JobManager.RunInDispatcherThread(
                    DebugWindowManager.DebugConsoleWindow.Dispatcher,
                    DispatcherPriority.Normal,
                    () =>
                    RevisionDefinitionViewModel.AddItemToDefinition(
                        collection,
                        new RevisionDefinitionItem
                            {
                                Action = "IO",
                                FileName = this.FileName,
                                Item = this.Name,
                                Parameters = RevisionDefinitionViewModel.Data
                            }));
            }

            // Now add any definition calls.
            base.AddChildrenToCollection(collection);
        }
コード例 #7
0
 /// <summary>
 /// The add self.
 /// </summary>
 /// <param name="collection">
 /// The collection.
 /// </param>
 protected override void AddSelf(RevisionDefinitionItemCollection collection)
 {
     // I do not want to add the name of the dictionary. base.AddSelf(collection);
 }
コード例 #8
0
        /// <summary>
        /// The add self.
        /// </summary>
        /// <param name="collection">
        /// The collection.
        /// </param>
        protected override void AddSelf(RevisionDefinitionItemCollection collection)
        {
            if (!this.IsError)
            {
                if (!string.IsNullOrEmpty(this.CodeTable))
                {
                    JobManager.RunInUIThread(
                        DispatcherPriority.Normal,
                        delegate
                            {
                                var fileName = this.SystemId;
                                if (string.IsNullOrEmpty(fileName))
                                {
                                    fileName = SBPlusClient.Current.SystemId;
                                }

                                fileName = fileName + "DEFN";
                                JobManager.RunInDispatcherThread(
                                    DebugWindowManager.DebugConsoleWindow.Dispatcher,
                                    DispatcherPriority.Normal,
                                    () =>
                                    RevisionDefinitionViewModel.AddItemToDefinition(
                                        collection,
                                        new RevisionDefinitionItem()
                                            {
                                                Action = "IO",
                                                FileName = fileName,
                                                Item = this.CodeTable,
                                                Parameters = RevisionDefinitionViewModel.Data
                                            }));
                            });
                }
            }
        }
コード例 #9
0
 /// <summary>
 /// The add children to collection.
 /// </summary>
 /// <param name="collection">
 /// The collection.
 /// </param>
 public override void AddChildrenToCollection(RevisionDefinitionItemCollection collection)
 {
     base.AddChildrenToCollection(collection);
     foreach (var fieldDescription in this.FieldDescriptions)
     {
         fieldDescription.AddChildrenToCollection(collection);
     }
 }
コード例 #10
0
ファイル: TreeItem.cs プロジェクト: kendrewp/SBXAThemeSupport
 /// <summary>
 /// The add children to collection.
 /// </summary>
 /// <param name="collection">
 /// The collection.
 /// </param>
 public abstract void AddChildrenToCollection(RevisionDefinitionItemCollection collection);
コード例 #11
0
ファイル: TreeItem.cs プロジェクト: kendrewp/SBXAThemeSupport
 /// <summary>
 /// The add children to collection.
 /// </summary>
 /// <param name="collection">
 /// The collection.
 /// </param>
 public override void AddChildrenToCollection(RevisionDefinitionItemCollection collection)
 {
     foreach (var item in this.children)
     {
         RevisionDefinitionViewModel.AddItemToDefinition(
             collection,
             new RevisionDefinitionItem()
                 {
                     Action = "1",
                     FileName = "fileName",
                     Item = item.GetType().Name,
                     Parameters = "parameters"
                 });
     }
 }
コード例 #12
0
        /// <summary>
        /// The add item to definition.
        /// </summary>
        /// <param name="collection">
        /// The collection.
        /// </param>
        /// <param name="item">
        /// The item.
        /// </param>
        internal static void AddItemToDefinition(RevisionDefinitionItemCollection collection, RevisionDefinitionItem item)
        {
            if (string.IsNullOrEmpty(item.FileName))
            {
                // do not add items that do not have a file name.
                return;
            }

            if (item.Action.Equals("IO") && (string.IsNullOrEmpty(item.FileName) || string.IsNullOrEmpty(item.Item)))
            {
                // do not add items that do not have a file name and item name if the action is IO.
                return;
            }

            if (ProcessAnalysisViewModel.IsExcludeFile(item.FileName))
            {
                // do not include SB/XA program files.
                return;
            }

            if (!collection.ContainsItem(item.Action, item.FileName, item.Item))
            {
                collection.Add(item);
            }
        }