public MainForm() { InitializeComponent(); var materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); Other.RefreshColorSceme(); Directory.CreateDirectory(Environment.CurrentDirectory + "/config"); Directory.CreateDirectory(Environment.CurrentDirectory + "/temp"); RefreshUserData(); Settings.ReadSettings(); materialSingleLineTextField2.Text = Settings.maxMission.ToString(); LowCache.Checked = Settings.lowcache; useoutland.Checked = Settings.outland; materialLabel2.BackColor = Other.GetBackGroundColor(); Tabs.Size = new Size(Tabs.Width, Tabs.Height + 30); if (Environment.OSVersion.Platform == PlatformID.Unix) { this.Tabs.Region = new Region(new RectangleF(this.Tabs.Left, this.Tabs.Top, this.Tabs.Width, this.Tabs.Height)); this.TabSelector.Location = new System.Drawing.Point(0, 64); materialLabel2.Location = new Point(411, 80); materialLabel2.Size = new Size(691, 25); videoList1.Size = new Size(1200, 650); videoList1.Location = new Point(-5, 70); panel3.Location = new Point(0, 5); } }
public MainForm() { InitializeComponent(); MaterialSkinManager materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); Other.RefreshColorSceme(); Directory.CreateDirectory(Environment.CurrentDirectory + "/config"); Directory.CreateDirectory(Environment.CurrentDirectory + "/temp"); RefreshUserData(); Settings.ReadSettings(); materialSingleLineTextField2.Text = Settings.maxMission.ToString(); LowCache.Checked = Settings.lowcache; APISelector.SelectedIndex = Settings.useapi; materialLabel2.BackColor = Other.GetBackGroundColor(); Tabs.Size = new Size(Tabs.Width, Tabs.Height + 30); materialCheckBox1.Checked = Settings.usearia2c; materialCheckBox2.Checked = Settings.downloaddanmaku; aria2cargu.Visible = materialCheckBox1.Checked; aria2cargu.Text = Settings.aria2cargument; materialFlatButton7.Visible = materialCheckBox1.Checked; if (Environment.OSVersion.Platform == PlatformID.Unix) { Tabs.Region = new Region(new RectangleF(Tabs.Left, Tabs.Top, Tabs.Width, Tabs.Height)); TabSelector.Location = new System.Drawing.Point(0, 64); materialLabel2.Location = new Point(411, 80); materialLabel2.Size = new Size(691, 25); videoList1.Size = new Size(1200, 650); videoList1.Location = new Point(-5, 70); panel3.Location = new Point(0, 5); } }
public void RefreshUserData() { User.RefreshUserInfo(); if (User.islogin) { LoginButton.Icon = Image.FromFile(User.face); LoginButton.Text = User.name; } LoginButton.BackColor = Other.GetBackGroundColor(); }
public MainForm() { InitializeComponent(); var materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); Other.RefreshColorSceme(); Directory.CreateDirectory(Environment.CurrentDirectory + "\\config"); Directory.CreateDirectory(Environment.CurrentDirectory + "\\temp"); RefreshUserData(); Settings.ReadSettings(); materialSingleLineTextField2.Text = Settings.maxMission.ToString(); LowCache.Checked = Settings.lowcache; useoutland.Checked = Settings.outland; materialLabel2.BackColor = Other.GetBackGroundColor(); }
public void RefreshUserData() { LoginButton.Text = "正在加载用户信息..."; Task.Run(() => { User.RefreshUserInfo(); if (User.islogin) { LoginButton.Icon = Image.FromFile(User.face); LoginButton.Text = User.name; } else { LoginButton.Icon = null; LoginButton.Text = "登录bilibili,开启新世界"; } LoginButton.BackColor = Other.GetBackGroundColor(); }); }
private void Initialize() { Directory.CreateDirectory(Environment.CurrentDirectory + "/config"); Directory.CreateDirectory(Environment.CurrentDirectory + "/temp"); RefreshUserData(); Settings.ReadSettings(); materialSingleLineTextField2.Text = Settings.maxMission.ToString(); LowCache.Checked = Settings.lowcache; materialLabel2.BackColor = Other.GetBackGroundColor(); Tabs.Size = new Size(Tabs.Width, Tabs.Height + 30); materialCheckBox1.Checked = Settings.usearia2c; materialCheckBox2.Checked = Settings.downloaddanmaku; materialCheckBox4.Checked = Settings.downloadcc; aria2cargu.Visible = materialCheckBox1.Checked; aria2cargu.Text = Settings.aria2cargument; materialFlatButton7.Visible = materialCheckBox1.Checked; APILink.Text = Settings.apilink; AreaSelector.SelectedIndex = Settings.area switch { "cn" => 0, "hk" => 1, "tw" => 2, "th" => 3, _ => 0 }; if (Environment.OSVersion.Platform == PlatformID.Unix) { Tabs.Region = new Region(new RectangleF(Tabs.Left, Tabs.Top, Tabs.Width, Tabs.Height)); TabSelector.Location = new System.Drawing.Point(0, 64); materialLabel2.Location = new Point(411, 80); materialLabel2.Size = new Size(691, 25); videoList1.Size = new Size(1200, 650); videoList1.Location = new Point(-5, 70); panel3.Location = new Point(0, 5); } checkUpdate(); }
public MainForm() { InitializeComponent(); var materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); if (Other.IsDarkMode()) {//Dark Mode materialSkinManager.ColorScheme = new ColorScheme(Primary.BlueGrey500, Primary.BlueGrey900, Primary.BlueGrey500, Accent.LightBlue200, TextShade.WHITE); materialSkinManager.Theme = MaterialSkinManager.Themes.DARK; } else { materialSkinManager.ColorScheme = new ColorScheme(Primary.Indigo500, Primary.Indigo500, Primary.Indigo500, Accent.LightBlue200, TextShade.WHITE); materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT; } RefreshUserData(); Settings.ReadSettings(); materialSingleLineTextField2.Text = Settings.maxMission.ToString(); materialLabel2.BackColor = Other.GetBackGroundColor(); }