Ejemplo n.º 1
0
        public MainWindow()
        {
            this.ShortcutList = new ShortcutList();

            InitializeComponent();

            this.ShortcutList.LoadShortcutsFromRegistry();

            this.timer.Tick     += TimerTicked;
            this.timer.IsEnabled = false;

            this.LoadPreferences();

            DispatcherTimer awd = new DispatcherTimer {
                Interval = new TimeSpan(0, 0, 0, 0, 200)
            };

            awd.Start();
            awd.Tick += (a, b) => {
                //this.ViewHelpExecuted (null, null);
                //NewFolderShortcutClicked (null, null);
                //new DeleteAppWindow (this.AppList [0]).ShowDialog ();
                //OpenShortcutWindow (this.AppList [0], false);
                awd.Stop();
            };
        }
Ejemplo n.º 2
0
        public void OnBeforeApply()
        {
            var sdata = ShortcutList
                        .Where(s => s.Key != AlephKey.None)
                        .Select(s => Tuple.Create(s.Identifier, new ShortcutDefinition(s.Scope, s.Modifiers, s.Key)));

            Settings.Shortcuts = new KeyValueFlatCustomList <ShortcutDefinition>(sdata, ShortcutDefinition.DEFAULT);

            Settings.Theme = SelectedTheme.SourceFilename;
        }
Ejemplo n.º 3
0
        private void UpdateShortcutConflicts()
        {
            foreach (var sc in ShortcutList)
            {
                sc.IsConflict = false;
            }

            foreach (var c in ShortcutManager.ListConflicts(ShortcutList.ToList()))
            {
                c.Item1.IsConflict = true;
                c.Item2.IsConflict = true;
            }
        }
Ejemplo n.º 4
0
        public void OnBeforeApply()
        {
            var sdata = ShortcutList
                        .Where(s => s.Key != AlephKey.None)
                        //.Where(s => !s.Identifier.StartsWith("Snippet::") || SnippetList.Any(sl => sl.ID == s.Identifier.Substring("Snippet::".Length)))
                        .Select(s => Tuple.Create(s.Identifier, new ShortcutDefinition(s.Scope, s.Modifiers, s.Key)))
                        .ToList();

            Settings.Shortcuts = new KeyValueFlatCustomList <ShortcutDefinition>(sdata, ShortcutDefinition.DEFAULT);

            Settings.Theme         = SelectedTheme.SourceFilename;
            Settings.ThemeModifier = new HashSet <string>(GetCheckedModifier().Select(p => p.SourceFilename));

            Settings.Snippets = new KeyValueCustomList <SnippetDefinition>(SnippetList.Select(p => Tuple.Create(p.ID, new SnippetDefinition(p.Name, p.Value))), SnippetDefinition.DEFAULT);
        }
Ejemplo n.º 5
0
		public MainWindow () {
			this.ShortcutList = new ShortcutList ();
			
			InitializeComponent ();
			
			this.ShortcutList.LoadShortcutsFromRegistry ();

			this.timer.Tick += TimerTicked;
			this.timer.IsEnabled = false;

			this.LoadPreferences ();

			DispatcherTimer awd = new DispatcherTimer { Interval = new TimeSpan (0, 0, 0, 0, 200) };
			awd.Start ();
			awd.Tick += (a, b) => {
				//this.ViewHelpExecuted (null, null);
				//NewFolderShortcutClicked (null, null);
				//new DeleteAppWindow (this.AppList [0]).ShowDialog ();
				//OpenShortcutWindow (this.AppList [0], false);
				awd.Stop ();
			};
		}