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

            return(symbol.Substring(0, bracketPosition));
        }
Beispiel #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]);
                    }
                });
            }
        }
Beispiel #3
0
 void ValidateCanExecute(IValueTag sender, ValueChangedEventArgs args)
 {
     TcoAppDomain.Current.Dispatcher.Invoke(() =>
     {
         CanExecuteChanged(sender, args);
     });
 }
Beispiel #4
0
 public void ValidateCanExecute(IValueTag sender, ValueChangedEventArgs args)
 {
     Dispatcher.Get.Invoke(() =>
     {
         CanExecuteChanged?.Invoke(sender, args);
     });
 }
Beispiel #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
            });
        }
Beispiel #6
0
 private void AddToFavourites(IValueTag valueTag) => DataContext.FavouriteCommand.Execute(valueTag);
Beispiel #7
0
 private void TcoToggleTask_StateChanged(IValueTag sender, ValueChangedEventArgs args)
 {
     UpdateCaption();
 }
Beispiel #8
0
 public void AddValueTag(IValueTag valueTag)
 {
     _valueTags.Add(valueTag);
 }
 public void AddValueTag(IValueTag valueTag)
 {
     _obj.AddValueTag(valueTag);
 }
Beispiel #10
0
 public ValueItemDescriptor(IValueTag valueTag)
 {
     this.HumanReadable = valueTag.HumanReadable;
     this.Symbol        = valueTag.Symbol;
 }
 private void AddNewItem(IValueTag valueTag) => Tree.Add(new TreeItem(valueTag));
Beispiel #12
0
 public TreeItem(IValueTag tag)
 {
     Header = tag.Symbol;
     Item   = tag;
 }
Beispiel #13
0
 private void TaskStateChanged(IValueTag sender, ValueChangedEventArgs args)
 {
     ButtonState   = ViewModel.Component.StateToButtonClass();
     IsTaskRunning = ViewModel.Component.GetTaskState();
 }
Beispiel #14
0
 internal void AddItem(IValueTag valueTag) => Children.Add(new TreeItem(valueTag));
Beispiel #15
0
 internal void RemoveFavourite(IValueTag valueTag) => Favourites.Remove(valueTag);
Beispiel #16
0
 internal void AddFavourite(IValueTag valueTag) => Favourites.Add(valueTag);
Beispiel #17
0
 public void ValidateCanExecuteAbortRestore(IValueTag sender, ValueChangedEventArgs args)
 {
     Abort.ValidateCanExecute(sender, args);
     Restore.ValidateCanExecute(sender, args);
 }
Beispiel #18
0
 private void AddNewItem(IValueTag tag) => DataContext.AddItemCommand.Execute(parameter: tag);
Beispiel #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 });
 }