コード例 #1
0
ファイル: DeskBandUI.cs プロジェクト: ryanbekabe/WinNetMeter
        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..");
        }
コード例 #2
0
 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();
 }
コード例 #3
0
        public Band_UserControl(CSDeskBand.CSDeskBandWin w)
        {
            InitializeComponent();
            Timer timer = new Timer();

            timer.Tick    += new EventHandler(timer_Tick);
            timer.Interval = 1000;
            timer.Start();
        }
コード例 #4
0
ファイル: UserControl1.cs プロジェクト: rexwulf/TomatoTimer
 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();
 }
コード例 #5
0
        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);
        }
コード例 #6
0
ファイル: DeskBandUI.cs プロジェクト: fanioz/WinNetMeter
 public DeskBandUI(CSDeskBand.CSDeskBandWin w)
 {
     InitializeComponent();
 }
コード例 #7
0
ファイル: UserControl1.cs プロジェクト: weinre/CSDeskBand
 public UserControl1(CSDeskBand.CSDeskBandWin w)
 {
     InitializeComponent();
     textBox1.GotFocus += (o, e) => w.UpdateFocus(true);
 }
コード例 #8
0
ファイル: MainWindow.cs プロジェクト: tashkerm/iSearch
 public MainWindow(CSDeskBand.CSDeskBandWin w)
 {
     InitializeComponent();
     tbSearchBox.GotFocus += (o, e) => w.UpdateFocus(true);
 }