Exemple #1
0
        private void closeCIC(int duration = 300, bool triggerAnalytics = true)
        {
            CICOpen = false;
            if (SearchOpen)
            {
                closeSearch(duration / 3);
            }
            if (AdvancedOpen)
            {
                closeAdvancedSettings(duration / 3);
            }
            if (ToolInfoPanelOpen)
            {
                closeToolInfo();
            }
            if (PathsPanelOpen)
            {
                closeGamePaths();
            }

            if (triggerAnalytics)
            {
                Analytics.TrackEvent("CIC Window Size Changed", new Dictionary <string, string>()
                {
                    { "New State", "Minimized" }
                });
            }

            CICPanel.BeginDoubleAnimation(WidthProperty, 0, duration);
        }
 private void Logo_MouseDown(object sender, MouseButtonEventArgs e)
 {
     if (CICOpen)
     {
         closeCIC();
     }
     else
     {
         if (CreateModsOpen)
         {
             closeCreateMods(100);
         }
         if (UtilitiesOpen)
         {
             closeUtilities(100);
         }
         if (TaskPaneOpen)
         {
             closeTaskPane(100);
         }
         CICOpen     = true;
         Logo.Source = (ImageSource)Logo.FindResource("LogoOnImage");
         if (SearchBox.Text.Trim() != string.Empty)
         {
             SearchOpen = true;
             searchPanel.BeginDoubleAnimation(WidthProperty, 300, 200);
         }
         CICPanel.BeginDoubleAnimation(WidthProperty, 650, 300);
     }
 }
Exemple #3
0
 private void Logo_MouseDown(object sender, MouseButtonEventArgs e)
 {
     if (CICOpen)
     {
         closeCIC();
     }
     else
     {
         Analytics.TrackEvent("CIC Window Size Changed", new Dictionary <string, string>()
         {
             { "New State", "Maximized" }
         });
         if (CreateModsOpen)
         {
             closeCreateMods(100);
         }
         if (UtilitiesOpen)
         {
             closeUtilities(100);
         }
         if (TaskPaneOpen)
         {
             closeTaskPane(100);
         }
         CICOpen = true;
         if (SearchBox.Text.Trim() != string.Empty)
         {
             SearchOpen = true;
             searchPanel.BeginDoubleAnimation(WidthProperty, 300, 200);
         }
         CICPanel.BeginDoubleAnimation(WidthProperty, 650, 300);
     }
 }
 private void closeCIC(int duration = 300)
 {
     CICOpen     = false;
     Logo.Source = (ImageSource)Logo.FindResource("LogoOffImage");
     if (SearchOpen)
     {
         closeSearch(duration / 3);
     }
     if (AdvancedOpen)
     {
         closeAdvancedSettings(duration / 3);
     }
     if (ToolInfoPanelOpen)
     {
         closeToolInfo();
     }
     if (PathsPanelOpen)
     {
         closeGamePaths();
     }
     CICPanel.BeginDoubleAnimation(WidthProperty, 0, duration);
 }