public async Task TestMethod2()
        {
            var test = @"
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Diagnostics;

    namespace ConsoleApplication1
    {
        class {|#0:TypeName|}
        {   
        }
    }";

            var fixtest = @"
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Diagnostics;

    namespace ConsoleApplication1
    {
        class TYPENAME
        {   
        }
    }";

            var expected = VerifyCS.Diagnostic("$saferootidentifiername$").WithLocation(0).WithArguments("TypeName");
            await VerifyCS.VerifyCodeFixAsync(test, expected, fixtest);
        }
        public void ShowForm(UIApplication uiapp)
        {
            if (_$safeprojectname$UserControl == null)
            {
                if (Instance == null)
                {
                    Instance = this;
                }

                // A new handler to handle request posting by the dialog
                RevitHandler handler = new RevitHandler();

                // External Event for the dialog to use (to post requests)
                ExternalEvent exEvent = ExternalEvent.Create(handler);

                // We give the objects to the new dialog;
                // The dialog becomes the owner responsible for disposing them, eventually.


                _$safeprojectname$UserControl = new $safeprojectname$UserControl(exEvent);
                BitmapImage pb1Image = new BitmapImage(new Uri("pack://application:,,,/$safeprojectname$;component/Resources/icon.ico"));

                Window.Content = _$safeprojectname$UserControl;
                Window.Icon    = pb1Image;
                Window.Title   = Util.ApplicationWindowTitle;
                Window.Height  = Util.ApplicationWindowHeight;
                Window.Topmost = Util.IsApplicationWindowTopMost;
                Window.Width   = Util.ApplicationWindowWidth;
                Window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                Window.Show();

                Window.Closed += OnClosing;
                App.$safeprojectname$Button.Enabled = false;
            }
        }
Beispiel #3
0
        /// <summary>
        /// Create a ribbon and panel and add a button for the revit DMS Plugin
        /// </summary>
        /// <param name="application"></param>
        private void OnButtonCreate(UIControlledApplication application)
        {
            string buttonText    = Util.AddinButtonText;
            string buttonTooltip = Util.AddinButtonTooltip;

            string executableLocation = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            string dllLocation        = Path.Combine(executableLocation, "$safeprojectname$.dll");

            // Create two push buttons

            PushButtonData buttondata = new PushButtonData("$safeprojectname$Btn", buttonText, dllLocation, "$safeprojectname$.Command");

            buttondata.ToolTip = buttonTooltip;

            BitmapImage pb1Image = new BitmapImage(new Uri("pack://application:,,,/$safeprojectname$;component/Resources/icon.ico"));

            buttondata.LargeImage = pb1Image;

            var ribbonPanel = RibbonPanel(application);


            $safeprojectname$Button = ribbonPanel.AddItem(buttondata) as PushButton;
        }
Beispiel #4
0
 private void SetDataContext($safeprojectname$Host host) => this.host = host;
		/// <summary>
		/// Ctor
		/// </summary>
		/// <param name="engine"></param>
		public $safeprojectname$Loader ( $safeprojectname$Client client, string serverInfo )
		{
			loadingTask	=	new Task( ()=>LoadingTask(serverInfo) );

			loadingTask.Start();
		}
Beispiel #6
0
 public ActionResult <UserWithToken> Login([FromBody] LoginModel loginModel)
 {
     return(_applicationService.Login(loginModel.UserName, loginModel.Password));
 }
Beispiel #7
0
 public static Guid $safeprojectname$        = new Guid($safeprojectname$String);
 private $safeprojectname$ConfigToken($safeprojectname$ConfigToken copyMe)
 {
     this.Amount1 = copyMe.Amount1;
 }
 public Result OnStartup(UIControlledApplication application)
 {
     _$safeprojectname$UserControl = null;
     return(Result.Succeeded);
 }
Beispiel #10
0
 protected override void LoadIntoTokenFromDialog($safeprojectname$ConfigToken writeValuesHere)
 {
     writeValuesHere.Amount1 = this.trackBar1.Value;
 }
Beispiel #11
0
 protected override void InitDialogFromToken($safeprojectname$ConfigToken effectTokenCopy)
 {
     this.trackBar1.Value = effectTokenCopy.Amount1;
 }
        public async Task TestMethod1()
        {
            var test = @"";

            await VerifyCS.VerifyAnalyzerAsync(test);
        }
 } = $"{nameof($safeprojectname$Accessors)}.CounterState";
Beispiel #14
0
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 /// <param name="accessors">A class containing <see cref="IStatePropertyAccessor{T}"/> used to manage state.</param>
 /// <param name="loggerFactory">A <see cref="ILoggerFactory"/> that is hooked to the Azure App Service provider.</param>
 /// <seealso cref="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging/?view=aspnetcore-2.1#windows-eventlog-provider"/>
 public $safeprojectname$Bot($safeprojectname$Accessors accessors, ILoggerFactory loggerFactory)
Beispiel #15
0
 } = $"{nameof($safeprojectname$Accessors)}.DialogState";