Ejemplo n.º 1
0
 /* ----------------------------------------------------------------- */
 ///
 /// Import
 ///
 /// <summary>
 /// インポート用メッセージを生成します。
 /// </summary>
 ///
 /// <param name="e">コールバック関数</param>
 ///
 /// <returns>OpenFileDialogMessage オブジェクト</returns>
 ///
 /* ----------------------------------------------------------------- */
 public static OpenFileMessage Import(OpenFileCallback e) =>
 new OpenFileMessage(e)
 {
     CheckPathExists = true,
     Multiselect     = false,
     Title           = Properties.Resources.MessageImport,
     Filter          = Properties.Resources.FilterOpml,
 };
Ejemplo n.º 2
0
 /* ----------------------------------------------------------------- */
 ///
 /// InsertMessage
 ///
 /// <summary>
 /// Creates a message to show the OpenFileDialog.
 /// </summary>
 ///
 /// <param name="callback">
 /// Callback action when terminating the user operation.
 /// </param>
 ///
 /// <returns>OpenFileMessage object.</returns>
 ///
 /* ----------------------------------------------------------------- */
 public static OpenFileMessage InsertMessage(OpenFileCallback callback) =>
 new OpenFileMessage(callback)
 {
     Title           = Properties.Resources.TitleOpen,
     CheckPathExists = true,
     Multiselect     = true,
     Filter          = new []
     {
         new ExtensionFilter(Properties.Resources.FilterInsertable, true, ".pdf", ".png", ".jpg", ".jpeg", ".bmp"),
         new ExtensionFilter(Properties.Resources.FilterAll, true, ".*"),
     }.GetFilter(),
 };
Ejemplo n.º 3
0
 /* ----------------------------------------------------------------- */
 ///
 /// OpenMessage
 ///
 /// <summary>
 /// Creates a message to show the OpenFileDialog.
 /// </summary>
 ///
 /// <param name="callback">
 /// Callback action when terminating the user operation.
 /// </param>
 ///
 /// <returns>OpenFileMessage object.</returns>
 ///
 /* ----------------------------------------------------------------- */
 public static OpenFileMessage OpenMessage(OpenFileCallback callback) =>
 new OpenFileMessage(callback)
 {
     Title           = Properties.Resources.TitleOpen,
     CheckPathExists = true,
     Multiselect     = false,
     Filter          = new []
     {
         new ExtensionFilter(Properties.Resources.FilterPdf, true, ".pdf"),
         new ExtensionFilter(Properties.Resources.FilterAll, true, ".*"),
     }.GetFilter(),
 };
Ejemplo n.º 4
0
		public RestService (OpenFileCallback openFileCallback)
		{
			var appHost = new AppHost (openFileCallback);
			appHost.Init ();

			int port = 40000;
			int timeout = 20;

			while (timeout-- > 0)
			{
				try
				{
					Url = "http://localhost:" + port + "/";
					appHost.Start(Url);
					break;
				}
				catch (Exception exception)
				{
					port++;
				}
			}			
		}
Ejemplo n.º 5
0
        public RestService(OpenFileCallback openFileCallback)
        {
            var appHost = new AppHost(openFileCallback);

            appHost.Init();

            int port    = 40000;
            int timeout = 20;

            while (timeout-- > 0)
            {
                try
                {
                    Url = "http://localhost:" + port + "/";
                    appHost.Start(Url);
                    break;
                }
                catch (Exception exception)
                {
                    port++;
                }
            }
        }
Ejemplo n.º 6
0
			public AppHost(OpenFileCallback openFileCallback)
				: base("UnityMode Rest Service", typeof(RestService).Assembly)
			{
				this.openFileCallback = openFileCallback;
			}
Ejemplo n.º 7
0
 public AppHost(OpenFileCallback openFileCallback)
     : base("UnityMode Rest Service", typeof(RestService).Assembly)
 {
     this.openFileCallback = openFileCallback;
 }
Ejemplo n.º 8
0
 public Task <IListenerToken> OpenFileAsync(IDriveFile file, int i, OpenFileCallback callback)
 {
     return(OpenFile(file, i, callback).AsAsync <IListenerToken> ());
 }