/* ----------------------------------------------------------------- */ /// /// 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, };
/* ----------------------------------------------------------------- */ /// /// 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(), };
/* ----------------------------------------------------------------- */ /// /// 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(), };
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++; } } }
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++; } } }
public AppHost(OpenFileCallback openFileCallback) : base("UnityMode Rest Service", typeof(RestService).Assembly) { this.openFileCallback = openFileCallback; }
public AppHost(OpenFileCallback openFileCallback) : base("UnityMode Rest Service", typeof(RestService).Assembly) { this.openFileCallback = openFileCallback; }
public Task <IListenerToken> OpenFileAsync(IDriveFile file, int i, OpenFileCallback callback) { return(OpenFile(file, i, callback).AsAsync <IListenerToken> ()); }