MapSuiteGisEditor/GisEditorInfrastructure/Plugins/Styles/StyleBuilder/StyleBuilderWindow.xaml.cs
/// <summary>
/// Initializes the DB click timer.
/// </summary>
Initializes the DB click timer.
Initializes the DB click timer .
private void InitializeDBClickTimer()
        {
            if (rootNodeClickTimer == null)
            {
                rootNodeClickTimer = new DispatcherTimer();
                rootNodeClickTimer.Interval = TimeSpan.FromMilliseconds(500);
                rootNodeClickTimer.Tick += (s, args) =>
                {
                    if (rootNodeMouseDownCount > 1)
                    {
                        StyleItemViewModel renamingItemViewModel = null;
                        if (styleBuilderViewModel.IsRootNodeSelected)
                        {
                            renamingItemViewModel = styleBuilderViewModel.RootStyleItem;
                        }
                        else if (styleBuilderViewModel.SelectedStyleItem != null)
                        {
                            renamingItemViewModel = styleBuilderViewModel.SelectedStyleItem;
                        }
                        if (renamingItemViewModel != null)
                        {
                            renamingItemViewModel.IsRenaming = true;
                        }
                    }
                    rootNodeMouseDownCount = 0;
                    rootNodeClickTimer.Stop();
                };
            }
        }
private void InitializeDBClickTimer ( ) { if ( rootNodeClickTimer == null ) { rootNodeClickTimer = new DispatcherTimer ( ) ; rootNodeClickTimer . Interval = TimeSpan . FromMilliseconds ( 500 ) ; rootNodeClickTimer . Tick += ( s , args ) => { if ( rootNodeMouseDownCount > 1 ) { StyleItemViewModel renamingItemViewModel = null ; if ( styleBuilderViewModel . IsRootNodeSelected ) { renamingItemViewModel = styleBuilderViewModel . RootStyleItem ; } else if ( styleBuilderViewModel . SelectedStyleItem != null ) { renamingItemViewModel = styleBuilderViewModel . SelectedStyleItem ; } if ( renamingItemViewModel != null ) { renamingItemViewModel . IsRenaming = true ; } } rootNodeMouseDownCount = 0 ; rootNodeClickTimer . Stop ( ) ; } ; } }
Initializes the DB click timer.
Initializes the DB click timer .