Skip to content

Commit

Permalink
Bug fixes, readme, screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
gotdibbs committed Feb 1, 2019
1 parent 25aa2ea commit 022d6d0
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 5 deletions.
12 changes: 9 additions & 3 deletions Models/Project.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
using Newtonsoft.Json;
using GalaSoft.MvvmLight;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using WebResourceManager.Data;
using WebResourceManager.Helpers;

namespace WebResourceManager.Models
{
public class Project
public class Project : ObservableObject
{
private const string OVERRIDE_FILE_NAME = ".webresourceoverrides";
private const string CONNECTION_KEY = "WebResourceManager";

public Guid Id { get; set; }

public string Name { get; set; }
private string _name;
public string Name
{
get { return _name; }
set { Set(ref _name, value); }
}

public string Path { get; set; }

Expand Down
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Web Resource Manager
A utility to improve your Dynamics 365 Web Resource workflow.

<img alt="ScreenShot" src="https://raw.github.com/gotdibbs/WebResourceManager/master/Screenshot.JPG" style="border: 1px solid #444;" />

# Key Features
- Upload and publish multiple files at a time
- Monitor the local file system for changes and automatically select the files for upload
- Monitor the remote system for changes to prevent conflicts with multiple devs and warn before upload
- View a Web Resource in Dynamics
- Quickly open a file in VS Code
- Quickly open a folder in VS Code (particularly useful for custom UI projects)
- Open a folder in Windows Explorer
- Integration with Imposter for Fiddler
- Diff local files vs. their remote counterparts
- Automatic "namespacing" for files (ex. c:\source\project\webresources\form\account.js becomes new_/form/account.js)
- View a list of all web resources in the target solution and their current status, mixed with all local files to see what's where at a glance
- Filtered the previously mentioned views further to just see remote, local, modified, etc.

# Optional "Requirements"
1. [Visual Studio Code](https://code.visualstudio.com/): Recommended editor/diff tool
2. [Fiddler](http://www.telerik.com/fiddler) 4.5+: For debugging without uploading over, and over, and over again
3. [Imposter for Fiddler](https://github.com/gotdibbs/Imposter.Fiddler): Similar to Fiddler's AutoResponder, but with more power

# Installation
Please see the [RELEASES](../../releases)

# Problems? Suggestions?
Pull requests speak louder than issues, but I'll take both.
31 changes: 29 additions & 2 deletions ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,12 @@ private void LoadSettings()
_settings = Settings.Load();
Profiles = new ObservableCollection<ImposterProfile>(ImposterSettings.Load().Profiles);

Projects = new ObservableCollection<Project>(_settings.Projects.OrderBy(p => p.Name));
Projects = new ObservableCollection<Project>();
Projects.CollectionChanged += Projects_CollectionChanged;
foreach (var project in _settings.Projects.OrderBy(p => p.Name))
{
Projects.Add(project);
}

if (Projects.Count > 0)
{
Expand All @@ -438,6 +443,28 @@ private void LoadSettings()
}
}

private void Projects_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
if (e.OldItems != null)
{
foreach (INotifyPropertyChanged item in e.OldItems)
item.PropertyChanged -= Project_PropertyChanged;
}
if (e.NewItems != null)
{
foreach (INotifyPropertyChanged item in e.NewItems)
item.PropertyChanged += Project_PropertyChanged;
}
}

private void Project_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == "Name")
{
RaisePropertyChanged(() => SelectedProjectName);
}
}

private async void LoadProject()
{
if (SelectedProject == null || string.IsNullOrEmpty(SelectedProject.ConnectionString))
Expand Down Expand Up @@ -908,7 +935,7 @@ private void StartTimer()

private async void Timer_Elapsed(object sender, ElapsedEventArgs e)
{
if (!IsConnected)
if (!IsConnected || IsSettingsVisible)
{
return;
}
Expand Down
Binary file added screenshot.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 022d6d0

Please sign in to comment.