private void MainForm_Load(object sender, EventArgs e) { lastClipboardText = Clipboard.GetText(); //I'm opinionated about fonts... if (IsFontInstalled("Source Code Pro")) { Default_Font = "Source Code Pro"; } SplitPanel.BringToFront(); // CREATE CONTROL TextArea = new ScintillaNET.Scintilla(); SplitPanel.Panel2.Controls.Add(TextArea); // BASIC CONFIG ClipTitle.Dock = DockStyle.Top; TextArea.Dock = DockStyle.Fill; TextArea.BringToFront(); TextArea.TextChanged += (this.OnTextChanged); TextArea.LostFocus += (this.OnLostFocus); // INITIAL VIEW CONFIG TextArea.WrapMode = WrapMode.None; TextArea.IndentationGuides = IndentView.LookBoth; TextArea.MarginClick += TextArea_MarginClick; SetSyntaxHilighting("C#"); // DRAG DROP InitDragDropFile(); // INIT HOTKEYS InitHotkeys(); Utils.ClipboardNotification.ClipboardUpdate += ClipboardNotification_ClipboardUpdate; _clipService = new ClipService(new DBContext()); var clips = _clipService.GetList(); foreach (var clip in clips) { ClipList.Rows.Insert(0, clip); } //IsStartup = false; ClipList.Rows[0].Selected = true; }
private void Window_Loaded(object sender, RoutedEventArgs e) { Left = -10000; taskbar = (TaskbarIcon)FindResource("Taskbar"); configService = new ConfigService(); config = configService.GetConfig(); clipService = new ClipService(config); //初始化浏览器 InitWebView(); //初始化托盘图标 InitialTray(); Task.Run(RegHotKey); }
public async Task <IActionResult> OnGetAsync(string userId, string clipId) { BlobClient clip = ClipService.GetBlobContainerClient(userId).GetBlobClient(clipId); try { BlobDownloadInfo download = await clip.DownloadAsync(); using MemoryStream data = new MemoryStream(); await download.Content.CopyToAsync(data); Clip = Encoding.UTF8.GetString(data.ToArray()); return(Page()); } catch { return(RedirectToPage("Error")); } }
public BatchController( IOptions <ManagerConfiguration> managerConfiguration, FileService fileService, PathService pathService, ModuleConfigurator moduleConfigurator, TranscriptService transcriptService, MediaService mediaService, ClipService clipService, FolderService folderService) { this.FileService = fileService; this.PathService = pathService; this.ManagerConfiguration = managerConfiguration; this.ModuleConfigurator = moduleConfigurator; this.TranscriptService = transcriptService; this.MediaService = mediaService; this.ClipService = clipService; this.FolderService = folderService; }