예제 #1
0
 private void DisplayWelcomeScreen()
 {
     this.projectFilePath = null;
     this.logFilePath = null;
     this.currentBuild = null;
     Title = DefaultTitle;
     var welcomeScreen = new WelcomeScreen();
     SetContent(welcomeScreen);
     welcomeScreen.RecentLogSelected += log => OpenLogFile(log);
     welcomeScreen.RecentProjectSelected += project => BuildProject(project);
     welcomeScreen.OpenProjectRequested += () => OpenProjectOrSolution();
     welcomeScreen.OpenLogFileRequested += () => OpenLogFile();
     UpdateRecentItemsMenu();
 }
예제 #2
0
 private void TextBlock_MouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
     if (sender is TextBlock textBlock && textBlock.Tag is Block block)
     {
         if (isDoubleClick)
         {
             isDoubleClick = false;
             BuildControl.SelectItem(block.Node);
         }
         else
         {
             HighlightTextBlock(textBlock);
         }
     }
 }
예제 #3
0
        private void DisplayBuild(Build build)
        {
            currentBuild = build != null ? new BuildControl(build) : null;
            SetContent(currentBuild);

            GC.Collect();

            if (currentBuild != null && currentBuild.Name != null)
                this.dir.Text = Path.GetDirectoryName(build.Name);
        }
예제 #4
0
        private void SetContent(object content)
        {
            mainContent.Content = content;
            if (content == null)
            {
                logFilePath = null;
                projectFilePath = null;
                currentBuild = null;
            }

            if (content is BuildControl)
            {
                ReloadMenu.Visibility = logFilePath != null ? Visibility.Visible : Visibility.Collapsed;
                SaveAsMenu.Visibility = Visibility.Visible;
                EditMenu.Visibility = Visibility.Visible;
            }
            else
            {
                ReloadMenu.Visibility = Visibility.Collapsed;
                SaveAsMenu.Visibility = Visibility.Collapsed;
                EditMenu.Visibility = Visibility.Collapsed;
            }
        }