Exemple #1
0
 private void TriggerWindowProfileMove(WindowProfile profile)
 {
     try
     {
         uDebugLogAdd($"Triggering Windows Profile Move: {profile.ToString()}");
         Actions.MoveProfileWindows(profile);
     }
     catch (Exception ex)
     {
         LogException(ex);
     }
 }
Exemple #2
0
 private void ChangeSelectedWindowProfile(ComboBoxItem selectedItem)
 {
     try
     {
         WindowProfile profile = WindowProfile.Profile1;
         if (selectedItem.Content.ToString() == Toolbox.settings.WindowProfileName1)
         {
             profile = WindowProfile.Profile1;
         }
         else if (selectedItem.Content.ToString() == Toolbox.settings.WindowProfileName2)
         {
             profile = WindowProfile.Profile2;
         }
         else if (selectedItem.Content.ToString() == Toolbox.settings.WindowProfileName3)
         {
             profile = WindowProfile.Profile3;
         }
         else if (selectedItem.Content.ToString() == Toolbox.settings.WindowProfileName4)
         {
             profile = WindowProfile.Profile4;
         }
         uDebugLogAdd($"Starting window profile change: [comboItem] {selectedItem.Content.ToString()} [profile] {profile.ToString()}");
         Toolbox.settings.ChangeWindowProfile(profile);
     }
     catch (Exception ex)
     {
         LogException(ex);
     }
 }
Exemple #3
0
        public void ChangeWindowProfile(WindowProfile windowProfile)
        {
            try
            {
                uDebugLogAdd($"Saving current window list for profile: {CurrentWindowProfile.ToString()}");
                switch (CurrentWindowProfile)
                {
                case WindowProfile.Profile1:
                    WindowProfile1 = ActiveWindowList;
                    break;

                case WindowProfile.Profile2:
                    WindowProfile2 = ActiveWindowList;
                    break;

                case WindowProfile.Profile3:
                    WindowProfile3 = ActiveWindowList;
                    break;

                case WindowProfile.Profile4:
                    WindowProfile4 = ActiveWindowList;
                    break;
                }
                uDebugLogAdd($"Moving from WindowProfile {CurrentWindowProfile.ToString()} to {windowProfile.ToString()}");
                CurrentWindowProfile = windowProfile;
                switch (windowProfile)
                {
                case WindowProfile.Profile1:
                    ActiveWindowList = WindowProfile1;
                    break;

                case WindowProfile.Profile2:
                    ActiveWindowList = WindowProfile2;
                    break;

                case WindowProfile.Profile3:
                    ActiveWindowList = WindowProfile3;
                    break;

                case WindowProfile.Profile4:
                    ActiveWindowList = WindowProfile4;
                    break;
                }
                uDebugLogAdd("Finished changing window profile");
                Events.TriggerWindowInfoChange();
            }
            catch (Exception ex)
            {
                Toolbox.LogException(ex);
            }
        }