public DeskBandUI(CSDeskBand.CSDeskBandWin w) { InitializeComponent(); RegistryProvider.Init(); SerilogProvider.Initialize(); // var logPath = Settings.AppDirectory + @"\Storage\Logs\activity-.log"; // // Log.Logger = new LoggerConfiguration() .MinimumLevel.Debug() .WriteTo.File(logPath, // rollingInterval: RollingInterval.Day, // flushToDiskInterval: TimeSpan.FromSeconds(1), // shared: true) .CreateLogger(); Log.Information("Starting NetMeter shell.."); SqliteProvider.DbPath = Settings.AppDirectory + @"\Storage\Common\LocalStorage.db"; DownloadLabel = this.LblDownload; UploadLabel = this.LblUpload; UploadIcon = this.pictUpload; DownloadIcon = this.pictDownload; deskUI = this; Log.Information("NetMeter started successfully.."); }
public Band_UserControl(CSDeskBand.CSDeskBandWin w) { InitializeComponent(); System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer(); p.init(); timer.Tick += new EventHandler(timer_Tick); timer.Interval = 1000; timer.Start(); }
public Band_UserControl(CSDeskBand.CSDeskBandWin w) { InitializeComponent(); Timer timer = new Timer(); timer.Tick += new EventHandler(timer_Tick); timer.Interval = 1000; timer.Start(); }
public UserControl1(CSDeskBand.CSDeskBandWin w) { InitializeComponent(); textBox1.GotFocus += (o, e) => w.UpdateFocus(true); //this.AutoSize = false; //this.Anchor = AnchorStyles.Right; //this.Width = 30; //this.Height = 30; //this.ResizeRedraw = false; //this.AutoScaleMode = AutoScaleMode.None; //this.AutoScroll = false; //this.AutoSize = false; // this.Hide(); }
public StockPreviewControl(CSDeskBand.CSDeskBandWin w) { CheckForIllegalCrossThreadCalls = false; InitializeComponent(); this.ContextMenu = new ContextMenu(new MenuItem[] { //new MenuItem("联系作者", new EventHandler((s, e) => //{ // Util.Info($"QQ: 491217650\r\nGithub: https://github.com/mrhuo\r\nEmail: [email protected]", "联系作者"); //})), new MenuItem("设置", new EventHandler((s, e) => { new frmSetting(this).ShowDialog(); })), }); ResetTimer(); w?.ShowDW(true); }
public DeskBandUI(CSDeskBand.CSDeskBandWin w) { InitializeComponent(); }
public UserControl1(CSDeskBand.CSDeskBandWin w) { InitializeComponent(); textBox1.GotFocus += (o, e) => w.UpdateFocus(true); }
public MainWindow(CSDeskBand.CSDeskBandWin w) { InitializeComponent(); tbSearchBox.GotFocus += (o, e) => w.UpdateFocus(true); }