private string RemoveArrayBrackets(IValueTag vortexObject)
        {
            var symbol          = vortexObject.Symbol;
            var bracketPosition = symbol.IndexOf('[');

            return(symbol.Substring(0, bracketPosition));
        }
Exemple #2
0
        private void ChangeImage(IValueTag sender, ValueChangedEventArgs args)
        {
            var scrollPosition = new Dictionary <short, double>()
            {
                { 100, 0.0 },
                { 200, 220 },
                { 300, 524 },
                { 400, 819 },
                { 500, 1011 },
                { 600, 1203 },
                { 700, 1395 },
                { 800, 1504 }
            };
            var fileName = $@"{rootPath.DirectoryName}\Tutorial\401_ConnectingDots\Images\100-800.png";

            if (File.Exists(fileName))
            {
                this.Dispatcher.Invoke(() =>
                {
                    if (scrollPosition.ContainsKey((dynamic)args.NewValue))
                    {
                        scrollImage.ScrollToVerticalOffset(scrollPosition[(dynamic)args.NewValue]);
                    }
                });
            }
        }
Exemple #3
0
 void ValidateCanExecute(IValueTag sender, ValueChangedEventArgs args)
 {
     TcoAppDomain.Current.Dispatcher.Invoke(() =>
     {
         CanExecuteChanged(sender, args);
     });
 }
Exemple #4
0
 public void ValidateCanExecute(IValueTag sender, ValueChangedEventArgs args)
 {
     Dispatcher.Get.Invoke(() =>
     {
         CanExecuteChanged?.Invoke(sender, args);
     });
 }
Exemple #5
0
        private void LogShadowChanges(IValueTag valueTag, object original, object newValue)
        {
            var userName = "";

            try
            {
                userName = TcOpen.Inxton.Local.Security.SecurityManager.Manager.Principal.Identity.Name;
            }
            catch
            {
                userName = "******";
            }


            Changes.Add(new ValueChangeItem()
            {
                ValueTag = new ValueItemDescriptor(valueTag),
                OldValue = original,
                NewValue = newValue,
                DateTime = DateTime.Now,
                UserName = userName
            });
        }
Exemple #6
0
 private void AddToFavourites(IValueTag valueTag) => DataContext.FavouriteCommand.Execute(valueTag);
Exemple #7
0
 private void TcoToggleTask_StateChanged(IValueTag sender, ValueChangedEventArgs args)
 {
     UpdateCaption();
 }
Exemple #8
0
 public void AddValueTag(IValueTag valueTag)
 {
     _valueTags.Add(valueTag);
 }
 public void AddValueTag(IValueTag valueTag)
 {
     _obj.AddValueTag(valueTag);
 }
Exemple #10
0
 public ValueItemDescriptor(IValueTag valueTag)
 {
     this.HumanReadable = valueTag.HumanReadable;
     this.Symbol        = valueTag.Symbol;
 }
 private void AddNewItem(IValueTag valueTag) => Tree.Add(new TreeItem(valueTag));
Exemple #12
0
 public TreeItem(IValueTag tag)
 {
     Header = tag.Symbol;
     Item   = tag;
 }
Exemple #13
0
 private void TaskStateChanged(IValueTag sender, ValueChangedEventArgs args)
 {
     ButtonState   = ViewModel.Component.StateToButtonClass();
     IsTaskRunning = ViewModel.Component.GetTaskState();
 }
Exemple #14
0
 internal void AddItem(IValueTag valueTag) => Children.Add(new TreeItem(valueTag));
Exemple #15
0
 internal void RemoveFavourite(IValueTag valueTag) => Favourites.Remove(valueTag);
Exemple #16
0
 internal void AddFavourite(IValueTag valueTag) => Favourites.Add(valueTag);
Exemple #17
0
 public void ValidateCanExecuteAbortRestore(IValueTag sender, ValueChangedEventArgs args)
 {
     Abort.ValidateCanExecute(sender, args);
     Restore.ValidateCanExecute(sender, args);
 }
Exemple #18
0
 private void AddNewItem(IValueTag tag) => DataContext.AddItemCommand.Execute(parameter: tag);
Exemple #19
0
 internal static void EditValueChange(IValueTag valueTag, dynamic original, dynamic newValue)
 {
     TcoAppDomain.Current.Logger.Information($"'{valueTag.Symbol}' value changed from '{original}' to '{newValue}' {{@payload}}",
                                             new { Path = valueTag.HumanReadable, Symbol = valueTag.Symbol });
 }