Skip to content

Commit

Permalink
Handled Issues with Dev time tracker and increased the new agent wiza…
Browse files Browse the repository at this point in the history
…rd window size
  • Loading branch information
Maheshkale447 committed Jul 19, 2024
1 parent 3bca5b6 commit 5b385d2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
14 changes: 12 additions & 2 deletions Ginger/Ginger/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,16 @@ private void PauseDevelopmentTimeTracker()
}
}
}
else if (modifiedFile is GingerCore.Activity activity)
else if (modifiedFile is GingerCore.Activity activity && activity.IsTimerRunning())
{
activity.StopTimer();
_itemsWithPausedDevelopmentTimeTracker.Add(activity);
}
else if (modifiedFile is ApplicationPOMModel applicationPOMModel && applicationPOMModel.IsTimerRunning())
{
applicationPOMModel.StopTimer();
_itemsWithPausedDevelopmentTimeTracker.Add(applicationPOMModel);
}
}
}
catch (Exception ex)
Expand All @@ -173,10 +178,14 @@ private void ResumeDevelopmentTimeTracker()
{
bf.StartTimer();
}
if (item is GingerCore.Activity activity)
else if (item is GingerCore.Activity activity)
{
activity.StartTimer();
}
else if (item is ApplicationPOMModel applicationPOMModel)
{
applicationPOMModel.StartTimer();
}
}
}
catch (Exception ex)
Expand All @@ -203,6 +212,7 @@ private void XVersionAndNewsIcon_MouseDown(object sender, MouseButtonEventArgs e
versionAndNewsPage.ShowAsWindow();
}


public void Init()
{
bool autoLoadSolDone = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public override ITreeViewItem GetTreeItem(object item)

internal void AddItemHandler(object sender, RoutedEventArgs e)
{
WizardWindow.ShowWizard(new AddAgentWizard(mAgentsFolder));
WizardWindow.ShowWizard(new AddAgentWizard(mAgentsFolder), 1100, 1100);
}

bool ITreeViewItem.IsExpandable()
Expand Down Expand Up @@ -124,7 +124,7 @@ void ITreeViewItem.SetTools(ITreeView TV)

public override void AddTreeItem()
{
WizardWindow.ShowWizard(new AddAgentWizard(mAgentsFolder));
WizardWindow.ShowWizard(new AddAgentWizard(mAgentsFolder),1100,1100);
}

private void RefreshApplicationAgents(object sender, System.Windows.RoutedEventArgs e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ public void StartTimer()
_stopwatch.Restart();
}
}

public bool IsTimerRunning()
{
return _stopwatch != null && _stopwatch.IsRunning;
}
public void StopTimer()
{
if (_stopwatch != null && _stopwatch.IsRunning)
Expand Down

0 comments on commit 5b385d2

Please sign in to comment.