public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) { Log.AppendLog(LogMessageType.INFO, "Started"); try { // (Konrad) We are gathering information about the addin use. This allows us to // better maintain the most used plug-ins or discontinue the unused ones. AddinUtilities.PublishAddinLog( new AddinLog("Feedback Tool", commandData.Application.Application.VersionNumber)); var title = "HOK Feedback Tool v." + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; var model = new FeedbackModel(); var viewModel = new FeedbackViewModel(model, title); var view = new FeedbackView { DataContext = viewModel }; var unused = new WindowInteropHelper(view) { Owner = Process.GetCurrentProcess().MainWindowHandle }; view.ShowDialog(); } catch (Exception e) { Log.AppendLog(LogMessageType.EXCEPTION, e.Message); } Log.AppendLog(LogMessageType.INFO, "Ended"); return(Result.Succeeded); }
public AttachmentViewModel(FeedbackViewModel vm) { ViewModel = vm; Delete = new GalaSoft.MvvmLight.Command.RelayCommand(OnDelete); }