public frmDashboard() { InitializeComponent(); // Initialize MaterialSkinManager materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT; materialSkinManager.ColorScheme = new ColorScheme(Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey500, Accent.LightBlue200, TextShade.WHITE); this.Dock = DockStyle.Fill; }
/* * [DllImport("Gdi32.dll", EntryPoint = "CreateRoundRectRgn")] * private static extern IntPtr CreateRoundRectRgn * ( * int nLeftRect, // x-coordinate of upper-left corner * int nTopRect, // y-coordinate of upper-left corner * int nRightRect, // x-coordinate of lower-right corner * int nBottomRect, // y-coordinate of lower-right corner * int nWidthEllipse, // height of ellipse * int nHeightEllipse // width of ellipse * ); * * [DllImport("dwmapi.dll")] * public static extern int DwmExtendFrameIntoClientArea(IntPtr hWnd, ref MARGINS pMarInset); * * [DllImport("dwmapi.dll")] * public static extern int DwmSetWindowAttribute(IntPtr hwnd, int attr, ref int attrValue, int attrSize); * * [DllImport("dwmapi.dll")] * public static extern int DwmIsCompositionEnabled(ref int pfEnabled); * * private bool m_aeroEnabled; // variables for box shadow * private const int CS_DROPSHADOW = 0x00050000; //0x00020000; * private const int WM_NCPAINT = 0x0085; * private const int WM_ACTIVATEAPP = 0x001C; * * public struct MARGINS // struct for box shadow * { * public int leftWidth; * public int rightWidth; * public int topHeight; * public int bottomHeight; * } * * private const int WM_NCHITTEST = 0x84; // variables for dragging the form * private const int HTCLIENT = 0x1; * private const int HTCAPTION = 0x2; * * protected override CreateParams CreateParams * { * get * { * m_aeroEnabled = CheckAeroEnabled(); * * CreateParams cp = base.CreateParams; * if (!m_aeroEnabled) * cp.ClassStyle |= CS_DROPSHADOW; * * return cp; * } * } * * private bool CheckAeroEnabled() * { * if (Environment.OSVersion.Version.Major >= 6) * { * int enabled = 0; * DwmIsCompositionEnabled(ref enabled); * return (enabled == 1) ? true : false; * } * return false; * } * * protected override void WndProc(ref Message m) * { * switch (m.Msg) * { * case WM_NCPAINT: // box shadow * if (m_aeroEnabled) * { * var v = 2; * DwmSetWindowAttribute(this.Handle, 2, ref v, 4); * MARGINS margins = new MARGINS() * { * bottomHeight = 10, * leftWidth = 10, * rightWidth = 10, * topHeight = 10 * }; * DwmExtendFrameIntoClientArea(this.Handle, ref margins); * * } * break; * default: * break; * } * base.WndProc(ref m); * * if (m.Msg == WM_NCHITTEST && (int)m.Result == HTCLIENT) // drag the form * m.Result = (IntPtr)HTCAPTION; * } */ #endregion public Form1() { /* #region Sombra ao form * m_aeroEnabled = true; #endregion */ InitializeComponent(); #region Skin manager do form skinManager = MaterialSkinManager.Instance; skinManager.AddFormToManage(this); skinManager.Theme = MaterialSkinManager.Themes.LIGHT; skinManager.ColorScheme = new ColorScheme(Primary.Blue400, Primary.Blue500, Primary.Blue500, Accent.LightBlue200, TextShade.WHITE); //Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey50, Accent.LightBlue200, TextShade.WHITE #endregion #region Configuração do browser da bíblia resBiblia.IsWebBrowserContextMenuEnabled = false; resBiblia.AllowWebBrowserDrop = false; #endregion }
public frm_admin(Employee user) { InitializeComponent(); // Create a material theme manager and add the form to manage (this) MaterialSkinManager materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT; // Configure color schema materialSkinManager.ColorScheme = new ColorScheme( Primary.BlueGrey800, Primary.BlueGrey800, Primary.BlueGrey800, Accent.LightBlue200, TextShade.WHITE ); // Modify the maxLenght of some textbox tbx_hireDateYear.MaxLength = 4; tbx_hireDateMonth.MaxLength = 2; tbx_hireDateDay.MaxLength = 2; tbx_phone.MaxLength = 10; }
public productDetail(Product.Product product, User.User loggedUser, userHome userForm) { this.userForm = userForm; this.product = product; this.loggedUser = loggedUser; InitializeComponent(); MaterialSkinManager materialUIManager = MaterialSkinManager.Instance; materialUIManager.AddFormToManage(this); materialUIManager.Theme = MaterialSkinManager.Themes.LIGHT; materialUIManager.ColorScheme = new ColorScheme( Primary.Blue400, Primary.Blue500, Primary.Blue500, Accent.Orange200, TextShade.WHITE ); namePlaceholder.Text = product.name; descriptionPlaceHolder.Text = product.description; pricePlaceHolder.Text = product.price.ToString() + " (" + product.tax.ToString() + "%)"; brandPlaceHolder.Text = product.brand.name; categoryPlaceHolder.Text = product.category.name; productImage.ImageLocation = product.image; }
public FormController Init <T>(T frm) where T : Form { frm.Icon = Icon.FromHandle(Resources.Active.GetHicon()); frm.StartPosition = FormStartPosition.CenterScreen; if (Themes == null) { Themes = MaterialSkinManager.Instance; Themes.ROBOTO_MEDIUM_12 = new Font("微软雅黑", 12f); Themes.ROBOTO_MEDIUM_10 = new Font("微软雅黑", 11f); Themes.ROBOTO_REGULAR_11 = new Font("微软雅黑", 11f); Themes.ROBOTO_MEDIUM_11 = new Font("微软雅黑", 11f); Themes.ColorScheme = new ColorScheme(Primary.Green600, Primary.Green700, Primary.Green200, Accent.Red100, TextShade.WHITE); } Themes.AddFormToManage(frm as MaterialForm); frm.Show(); frm.Activate(); frm.BringToFront(); return(this); }
int _clientAnticheat = 1; // Forced to BE, until added into Settings. #endregion #region Constructor Region public Gui(string formattedArguments = "") { InitializeComponent(); _skinManager = MaterialSkinManager.Instance; _skinManager.AddFormToManage(this); Configuration = new Configuration(); Configuration.Open(); // Settings form manages SkinManager _settings = new Settings(this); Text += $" [{App.Version}]"; materialSingleLineTextFieldEmail.Text = Configuration.Email; materialSingleLineTextFieldPassword.Text = Configuration.Password; _commonHeartbeat = new Thread(new ThreadStart(CommonHeartbeat)); _commonHeartbeat.IsBackground = true; _commonHeartbeat.Start(); #if ONLINE if (!Configuration.DisableOnline) { _onlineHeartbeat = new Thread(new ThreadStart(OnlineHeartbeat)); _onlineHeartbeat.IsBackground = true; _onlineHeartbeat.Start(); materialLabelOnline.Visible = true; } CheckUpdates(); #endif }
public AgregarUsuarioForm(string _cat) { InitializeComponent(); MaterialSkinManager MaterialSkinControl = MaterialSkinManager.Instance; MaterialSkinControl.AddFormToManage(this); MaterialSkinControl.Theme = MaterialSkinManager.Themes.LIGHT; MaterialSkinControl.ColorScheme = new ColorScheme( primary: Primary.Blue400, darkPrimary: Primary.Blue500, lightPrimary: Primary.Blue300, accent: Accent.LightBlue200, textShade: TextShade.WHITE ); cat = _cat; if (cat == "Adm" || cat == "Develop") { this.Size = new Size(497, 313); this.WindowState = FormWindowState.Maximized; if (cat != "Develop") { CBCat.Items.Remove("Develop"); } } else { this.Size = new Size(336, 313); LbCat.Hide(); CBCat.Hide(); cat = "User"; if (cat != "Develop") { CBCat.Items.Remove("Develop"); } } this.Sizable = false; this.MinimizeBox = false; this.MaximizeBox = false; }
Boolean mIsOpen = false; // is image currently open? public Form1() { InitializeComponent(); pictureBox1.Image = Properties.Resources.stock; pictureBox1.MouseDown += new MouseEventHandler(pictureBox1_MouseDown); pictureBox1.MouseUp += new MouseEventHandler(pictureBox1_MouseUp); pictureBox1.MouseMove += new MouseEventHandler(pictureBox1_MouseMove); pictureBox1.Paint += new PaintEventHandler(pictureBox1_Paint); MaterialSkinManager materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT; materialSkinManager.ColorScheme = new ColorScheme( Primary.Blue400, Primary.Blue500, Primary.Blue500, Accent.LightBlue200, TextShade.WHITE ); }
double Disp_H, Amp_H; //амплитуда и дисперсия для импульсной характеристики public Deconvolution() { MaterialSkinManager materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT; materialSkinManager.ColorScheme = new ColorScheme(Primary.Cyan800, Primary.Cyan900, Primary.Blue500, Accent.LightBlue200, TextShade.WHITE); //выделяем пасять под массивы данных с экрана ArrayAmplitude = new double[3]; ArrayCenters = new double[3]; ArrayDisp = new double[3]; //задаем степень точность Epsilon = Math.Pow(10, TAU); animation = initiate = true; iterate = 0; currentfunc = 0; square = 0; InitializeComponent(); }
/* * * Completley rewrote this help form. A lot better than it was before and plus, * it's using the materialform instead of the default windows form so it looks * a lot better. These pages work by moving other images off screen and when * we go to a different page we move previous page info off screen and move * new pictures to screen and change the info text boxes. * * ex: going from p1 to p2, move apple and ghost image off screen, then, move bonus and double point pic on screen, * finally, change the text box descriptions to fit the powerups on screen. * */ public HelpForm() { InitializeComponent(); //disable page1 button cus we are on that page by default. page1button.Enabled = false; //initialize materialform MaterialSkinManager materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); materialSkinManager.Theme = MaterialSkinManager.Themes.DARK; materialSkinManager.ColorScheme = new ColorScheme(Primary.Grey900, Primary.Grey900, Primary.Grey900, 0, TextShade.WHITE); //end //move all other page info off screen bonuspointInf.Top = 999; doublePointInfo.Top = 999; slowdownTimeBox.Top = 999; controlLabel.Top = 999; buttonWimage.Top = 999; buttonAimage.Top = 999; buttonSimage.Top = 999; buttonDimage.Top = 999; }
public DashBoard() { Thread thread = new Thread(new ThreadStart(LoadSplash)); thread.Start(); InitializeComponent(); for (int i = 0; i <= 1000; i++) { Thread.Sleep(10); } thread.Abort(); MaterialSkinManager materialSkin = MaterialSkinManager.Instance; materialSkin.AddFormToManage(this); materialSkin.Theme = MaterialSkinManager.Themes.LIGHT; materialSkin.ColorScheme = new ColorScheme(Primary.Pink400, Primary.Pink500, Primary.Pink500, Accent.LightBlue200, TextShade.WHITE); Essentials.HideControls(menuPic2); }
public MainForm() { InitializeComponent(); // Initialize MaterialSkinManager materialSkinManager = MaterialSkinManager.Instance; // Set this to false to disable backcolor enforcing on non-materialSkin components // This HAS to be set before the AddFormToManage() materialSkinManager.EnforceBackcolorOnAllComponents = true; // MaterialSkinManager properties materialSkinManager.AddFormToManage(this); materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT; materialSkinManager.ColorScheme = new ColorScheme(Primary.Indigo500, Primary.Indigo700, Primary.Indigo100, Accent.Pink200, TextShade.WHITE); dataManager = new DataManager(); //load it once loadChild(tabTimeline, new TimeLineForm(dataManager)); loadChild(PieChartWithCropsTab, new PieGraphicForm()); loadChild(consultTab, new Form1()); loadChild(cropsStackedtab, new StackedArea()); loadChild(barsTab, new BarGraph()); }
public EditarTrabajador(Trabajador mesero) { this.mesero = mesero; InitializeComponent(); MaterialSkinManager.AddFormToManage(this); var listaPuesto = ControlPuestos.Instance.GetLista(); if (listaPuesto == null) { MessageBox.Show("Revisa tu coneccion"); return; } if (listaPuesto.Count > 0) { foreach (Puesto puesto in listaPuesto) { cbPuestos.Items.Add(puesto); } } if (mesero != null) { btnBorrar.Visible = true; txtNombre.Text = mesero.nombre; txtApellidos.Text = mesero.apellidos; txtDireccion.Text = mesero.direccion; txtTelefono.Text = mesero.telefono; dateTimePicker.Value = mesero.fecha_nacimiento; pictureBox1.Image = mesero.TrabajadorImagen.Image; cbPuestos.SelectedItem = mesero.Puesto; ckAcceso.Visible = true; txtUser.Visible = false; txtPass.Visible = false; } }
public frmPainel(string usuario, string email, int id) { InitializeComponent(); // Criando um material theme manager e adicionando o formulário MaterialSkinManager materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT; // Definindo um esquema de Cor para formulário com tom Azul materialSkinManager.ColorScheme = new ColorScheme( Primary.Blue400, Primary.Blue500, Primary.Blue500, Accent.Orange100, TextShade.WHITE ); this._Myid = id; lblEmail.Text = email; lblUsuarioLogado.Text = usuario; lblStatus.ForeColor = Color.Green; lblStatus.Text = "Conectado"; }
// Constructor public frmDownload(string rccode) { // Draw frmDownload InitializeComponent(); MaterialSkinManager manager = MaterialSkinManager.Instance; manager.AddFormToManage(this); manager.Theme = MaterialSkinManager.Themes.DARK; manager.ColorScheme = new ColorScheme(Primary.DeepPurple400, Primary.Grey900, 0, Accent.DeepPurple200, TextShade.BLACK); // Setup CheckForIllegalCrossThreadCalls = false; download_name = File.ReadAllText("data\\" + rccode + "\\detail.txt"); download_rccode = rccode; comic_name.Font = new Font("Roboto", 13f, FontStyle.Regular); comic_name.Text = download_name; if (!File.Exists("data\\" + rccode + "\\desc.txt")) { comic_description.Text = ComicUtils.RetrieveDescription(rccode); File.WriteAllText("data\\" + rccode + "\\desc.txt", comic_description.Text); } else { comic_description.Text = File.ReadAllText("data\\" + rccode + "\\desc.txt"); } FileStream stream = new FileStream("data\\" + rccode + "\\banner.jpg", FileMode.Open, FileAccess.Read); comic_picture.BackgroundImage = Image.FromStream(stream); stream.Dispose(); autofindpages.Checked = true; comic_chapternum.KeyPress += comic_chapternum_KeyPress; comic_startpagenum.KeyPress += comic_startpagenum_KeyPress; comic_endpagenum.KeyPress += comic_endpagenum_KeyPress; bulk_chapternums.KeyPress += bulk_chapternums_KeyPress; }
public Form1() { InitializeComponent(); materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); materialSkinManager.Theme = MaterialSkinManager.Themes.DARK; materialSkinManager.ColorScheme = new ColorScheme(Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey500, Accent.LightBlue200, TextShade.WHITE); Text = "Wektor wersja " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; const string REGISTRY_KEY = @"HKEY_CURRENT_USER\Software\WektorApp"; const string REGISTY_VALUE = "FirstRun"; if (Convert.ToInt32(Microsoft.Win32.Registry.GetValue(REGISTRY_KEY, REGISTY_VALUE, 0)) == 0) { //komikat o potrzebie utworzenia nowego użytkownika MessageBox.Show("Teraz musisz utworzyć użytkownika i hasło!!!"); formsy.settings form = new formsy.settings(this); form.MdiParent = this; form.Show(); Microsoft.Win32.Registry.SetValue(REGISTRY_KEY, REGISTY_VALUE, 1, Microsoft.Win32.RegistryValueKind.DWord); } }
public MainForm() { InitializeComponent(); // Initialize MaterialSkinManager materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); materialSkinManager.Theme = MaterialSkinManager.Themes.DARK; //materialSkinManager.ColorScheme = new ColorScheme(Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey500, Accent.LightBlue200, TextShade.WHITE); materialSkinManager.ColorScheme = new ColorScheme(Primary.Red600, Primary.Red700, Primary.Red200, Accent.Red100, TextShade.WHITE); // Add dummy data to the listview data = new[] { new [] { "123456789", "111111111", "MG", "100" }, new [] { "123456789", "111111111", "MG", "200" }, new [] { "121212121", "222222222", "SP", "300" }, new [] { "102019100", "555555555", "MT", "10" }, new [] { "098765432", "666666666", "RS", "2000" } }; seedListView(); datePickerInit(); }
public MainForm() { InitializeComponent(); // Initialize MaterialSkinManager materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT; materialSkinManager.ColorScheme = new ColorScheme(Primary.Indigo500, Primary.Indigo700, Primary.Indigo100, Accent.Pink200, TextShade.WHITE); // Add dummy data to the listview //检测waifu2x是否存在 TabCon2.SelectedTab = PicFix; if (Directory.Exists(Application.StartupPath + "//Tools//waifu2x//waifu2x_ncnn")) { PicTab.SelectedTab = SelectPic; } else { PicTab.SelectedTab = Start; } seedListView(); }
public MainForm() { InitializeComponent(); var serial = SerialPort.GetPortNames(); cmbPorts.DataSource = serial; // Initialize MaterialSkinManager materialSkinManager = MaterialSkinManager.Instance; // Set this to false to disable backcolor enforcing on non-materialSkin components // This HAS to be set before the AddFormToManage() materialSkinManager.EnforceBackcolorOnAllComponents = true; // MaterialSkinManager properties materialSkinManager.AddFormToManage(this); materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT; materialSkinManager.ColorScheme = new ColorScheme(Primary.Indigo500, Primary.Indigo700, Primary.Indigo100, Accent.Pink200, TextShade.WHITE); materialLabel1.BackColor = Color.Transparent; materialLabel2.BackColor = Color.Transparent; materialLabel3.BackColor = Color.Transparent; }
public settingsForm() { InitializeComponent(); emuDir = Properties.Settings.Default.EmuDir; // Initialize MaterialSkinManager materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); if (Properties.Settings.Default.nightMode == true) { materialCheckBox1.Checked = true; } if (Properties.Settings.Default.doubleclick == true) { materialCheckBox2.Checked = true; } if (Properties.Settings.Default.showtitle == true) { showTitle.Checked = true; } if (Properties.Settings.Default.autoArt == true) { allowAutoDownload.Checked = true; } if (Properties.Settings.Default.dropautoart == true) { allowDropBoxArt.Checked = true; } }
public FormSetting(FormWallpaper wallpaper) { InitializeComponent(); this.wallpaper = wallpaper; materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT; materialSkinManager.ColorScheme = new ColorScheme(Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey500, Accent.LightBlue200, TextShade.WHITE); TextFieldImageLocation.Text = SettingData.BackgroundImagePos; listBox1.Items.AddRange(SettingData.PluginDataList.ToArray()); foreach (var pluginDataInfo in SettingData.PluginDataString) { var tmpStrings = pluginDataInfo.Value.Split('\\'); comboBox1.Items.Add($"{pluginDataInfo.Key} - {tmpStrings.Skip(tmpStrings.Length - 1).First()}"); } SetTreeViewData(null, wallpaper.controls); treeView1.ExpandAll(); listBox2.Items.Clear(); foreach (TreeNode node in treeView1.GetAllNodes()) { if (node.Tag is NanoD2dCollection collectionNode) { listBox2.Items.Add(node.Text); } } }
public MsgBox(string text, string caption, MaterialMessageBox.MessageBoxButtons buttons, MaterialMessageBox.MessageBoxIcon icon) { InitializeComponent(); __materialSkinManager = MaterialSkinManager.Instance; __materialSkinManager.AddFormToManage(this); __materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT; __materialSkinManager.ColorScheme = new ColorScheme(Primary.Blue800, Primary.Blue900, Primary.Blue500, Accent.LightBlue200, TextShade.WHITE); btn_No.AutoSize = false; btn_OK.AutoSize = false; btn_Yes.AutoSize = false; btn_Cancel.AutoSize = false; btn_No.Size = new Size(127, 36); btn_OK.Size = new Size(127, 36); btn_Yes.Size = new Size(127, 36); btn_Cancel.Size = new Size(127, 36); base.Text = caption; lbl_text.Text = text; switch (buttons) { case MaterialMessageBox.MessageBoxButtons.OK: btn_OK.Visible = true; btn_OK.Enabled = true; btn_OK.Location = new Point(base.Size.Width / 2 - btn_OK.Size.Width / 2, btn_OK.Location.Y); btn_Yes.Visible = false; btn_Yes.Enabled = false; btn_No.Visible = false; btn_No.Enabled = false; btn_Cancel.Visible = false; btn_Cancel.Enabled = false; break; case MaterialMessageBox.MessageBoxButtons.YesNo: btn_Yes.Visible = true; btn_Yes.Enabled = true; btn_No.Visible = true; btn_No.Enabled = true; btn_OK.Visible = false; btn_OK.Enabled = false; btn_Cancel.Enabled = false; btn_Cancel.Visible = false; break; case MaterialMessageBox.MessageBoxButtons.YesNoCancel: btn_Yes.Visible = true; btn_Yes.Enabled = true; btn_Cancel.Enabled = true; btn_Cancel.Visible = true; btn_No.Visible = true; btn_No.Enabled = true; break; default: break; } switch (icon) { case MaterialMessageBox.MessageBoxIcon.Error: pic_Icon.Image = Properties.Resources.icon_error_64x64; SystemSounds.Hand.Play(); break; case MaterialMessageBox.MessageBoxIcon.Information: pic_Icon.Image = Properties.Resources.icon_information_64x64; SystemSounds.Asterisk.Play(); break; case MaterialMessageBox.MessageBoxIcon.None: pic_Icon.Dispose(); lbl_text.Location = new Point(12, 74); lbl_text.Size = new Size(399, 131); break; case MaterialMessageBox.MessageBoxIcon.Question: pic_Icon.Image = Properties.Resources.icon_question_64x64; SystemSounds.Question.Play(); break; case MaterialMessageBox.MessageBoxIcon.Warning: pic_Icon.Image = Properties.Resources.icon_warning_64x64; SystemSounds.Exclamation.Play(); break; default: break; } }
private void materialRaisedButton3_Click(object sender, EventArgs e) { materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); materialSkinManager.Theme = MaterialSkinManager.Themes.DARK; }
public MaterialForm1() { BLIO.Log("=== Initializing RemindMe Version " + IOVariables.RemindMeVersion + " ==="); BLIO.CreateSettings(); AppDomain.CurrentDomain.SetData("DataDirectory", IOVariables.databaseFile); int tries = 0; bool done = false; while (!done || !BLLocalDatabase.HasAllTables()) { try { tries++; if (tries >= 4 || BLLocalDatabase.HasAllTables()) { done = true; if (tries >= 4) { BLIO.Log("something went terribly wrong... 4 tries and it still doesnt work.."); } } BLIO.Log("DB does not have all tables. Entered while loop to create."); BLIO.CreateDatabaseIfNotExist(); Thread.Sleep(500); } catch (Exception ex) { } } LogWindowsInfo(); //Windows version info etc LogCultureInfo(); //Datetime info in their country Cleanup(); this.Opacity = 0; InitializeComponent(); // Initialize MaterialSkinManager materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.ThemeChanged += UpdateTheme; materialSkinManager.AddFormToManage(this); instance = this; m_GlobalHook = Hook.GlobalEvents(); m_GlobalHook.KeyDown += GlobalKeyPressDown; m_GlobalHook.KeyUp += GlobalKeyPressUp; //Set the Renderer of the menustrip to our custom renderer, which sets the highlight and border collor to DimGray, which is the same //As the menu's themselves, which means you will not see any highlighting color or border. This renderer also makes the text of the selected //toolstrip items white. RemindMeTrayIconMenuStrip.Renderer = new MyToolStripMenuRenderer(); UpdateInformation.Initialize(); //dont show debug formLoad(); SystemEvents.PowerModeChanged += OnPowerChange; RemindMeIcon.Visible = true; //Update LastOnline every 5 minutes tmrPingActivity.Start(); tmrDumpLogTxtContents.Start(); tmrEnableDatabaseAccess.Start(); //workaround tmrRemoveDebug.Start(); tmrResetExceptionInserts.Start(); this.MaximumSize = this.Size; this.MinimumSize = this.Size; BLIO.Log("=== Initializing RemindMe Complete ==="); }
public ChangePassword() { InitializeComponent(); _materialSkinManager = DesignSettings.GetDesign(); _materialSkinManager.AddFormToManage(this); }
public Main_Form() { InitializeComponent(); materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); }
public void LoadDesign() { InitializeComponent(); _materialSkinManager = DesignSettings.GetDesign(); _materialSkinManager.AddFormToManage(this); }
public gameSettings() { InitializeComponent(); //Visual stuff boxArt.SizeMode = PictureBoxSizeMode.StretchImage; Text = "Editing - " + currentGame; if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + @"\resources\configs\" + currentGame + @"\art.jpg")) { boxArt.ImageLocation = AppDomain.CurrentDomain.BaseDirectory + @"\resources\configs\" + currentGame + @"\art.jpg"; } //Defines configration file location string cfgDir = AppDomain.CurrentDomain.BaseDirectory + @"\resources\configs\" + currentGame; //Reads the spectabis ini file var gameIni = new IniFile(cfgDir + @"\spectabis.ini"); var _nogui = gameIni.Read("nogui", "Spectabis"); var _fullscreen = gameIni.Read("fullscreen", "Spectabis"); var _fullboot = gameIni.Read("fullboot", "Spectabis"); var _nohacks = gameIni.Read("nohacks", "Spectabis"); var _isodir = gameIni.Read("isoDirectory", "Spectabis"); //Sets the values from spectabis ini if (_nogui == "1") { nogui.Checked = true; } if (_fullscreen == "1") { fullscreen.Checked = true; } if (_fullboot == "1") { fullboot.Checked = true; } if (_nohacks == "1") { nohacks.Checked = true; } isoDirBox.Text = _isodir; //Reads the PCSX2_ui ini file var uiIni = new IniFile(cfgDir + @"\PCSX2_ui.ini"); var _zoom = uiIni.Read("Zoom", "GSWindow"); var _aspectratio = uiIni.Read("AspectRatio", "GSWindow"); //Sets the values from PCSX2_ui ini zoom.Text = _zoom; if (_aspectratio == "4:3") { aspectratio.Text = "Letterbox"; } else if (_aspectratio == "16:9") { aspectratio.Text = "Widescreen"; } else { aspectratio.Text = "Stretched"; } //Reads RCSX2_vm file var vmIni = new IniFile(cfgDir + @"\PCSX2_vm.ini"); var _widescreen = vmIni.Read("EnableWideScreenPatches", "EmuCore"); //Sets the values from PCSX2_vm ini if (_widescreen == "enabled") { widescreen.Checked = true; } //GDSX file mipmap hack var gsdxIni = new IniFile(cfgDir + @"\GSdx.ini"); var _mipmaphack = gsdxIni.Read("UserHacks_mipmap", "Settings"); if (_mipmaphack == "1") { hwmipmap.Checked = true; } else { hwmipmap.Checked = false; } // Initialize MaterialSkinManager materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); }
public CoreMusicApp() { restoreMaxiState(); rolling_size = this.ClientSize; last_size = this.ClientSize; Icon = Properties.Resources.MainIcon; Text = "Google Music Player"; StartPosition = FormStartPosition.Manual; BackColor = Color.Black; // Stop the form disapearing MinimumSize = new Size(100, 100); // Initially Hide Opacity = 0; // Show Splash Screen splash = new SplashScreen(); splash.Show(); splash.Location = new Point(Location.X + (Width / 2) - (splash.Width / 2), Location.Y + (Height / 2) - (splash.Height / 2)); skin = MaterialSkinManager.Instance; skin.AddFormToManage(this); if (Properties.Settings.Default.CustomTheme) { darkTheme(); } else { lightTheme(); } // Handle smaller mini player by changing the browser zoom level ResizeEnd += new EventHandler(ResizeEnd_ZoomHandler); // Setup the Web Browser InitializeCEF(); // Don't forget to save all our settings FormClosed += (send, ev) => { if (mini) { saveMiniState(); } else { if (WindowState != FormWindowState.Normal) { WindowState = FormWindowState.Normal; } if (Maximized) { MaximizeWindow(false); } saveMaxiState(); } Properties.Settings.Default.Save(); }; // Check for updates on the Github Release API RegisterKeyHooks(); InitializeUpdater(); }
public UserInfoForm(string userid = "NaN") { InitializeComponent(); MaterialSkinManager materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); if (Environment.OSVersion.Platform == PlatformID.Unix) { materialTabControl1.Region = new Region(new RectangleF(materialTabControl1.Left, materialTabControl1.Top, materialTabControl1.Width, materialTabControl1.Height)); } if (userid == "NaN") { userid = User.uid; } uid = userid; Other.RefreshColorSceme(); if (userid == User.uid) { self = true; User.RefreshUserInfo(); UserNameBox.Text = User.name; pictureBox1.Image = Image.FromFile(User.face); UserLevel.Text = "LV" + User.UserJson.data.level; if (User.UserJson.data.vip.type == 2) { VipType.Text = "年度大会员"; } else if (User.UserJson.data.vip.type == 1) { VipType.Text = "大会员"; } else { VipType.Text = ""; } coinBox.Text = "硬币:" + User.UserJson.data.coins.ToString(); SlogenLabel.Text = User.UserJson.data.sign; RefreshBangumiData(); RefreshLikeList(); } else { self = false; JSONCallback.User.User user = User.GetUserInfo(userid); if (user == null) { Dispose(); } string _face = ""; string deerory = Environment.CurrentDirectory + "/temp/"; string fileName = "uid" + userid + ".png"; if (!File.Exists(deerory + fileName)) { WebRequest imgRequest = WebRequest.Create(user.data.face); HttpWebResponse res; try { res = (HttpWebResponse)imgRequest.GetResponse(); } catch (WebException ex) { res = (HttpWebResponse)ex.Response; } if (res.StatusCode.ToString() == "OK") { System.Drawing.Image downImage = System.Drawing.Image.FromStream(imgRequest.GetResponse().GetResponseStream()); if (!System.IO.Directory.Exists(deerory)) { System.IO.Directory.CreateDirectory(deerory); } downImage.Save(deerory + fileName); downImage.Dispose(); _face = deerory + fileName; } } else { _face = deerory + fileName; } pictureBox1.Image = Image.FromFile(_face); UserNameBox.Text = user.data.name; UserLevel.Text = "LV" + user.data.level; if (user.data.vip.type == 2) { VipType.Text = "年度大会员"; } else if (user.data.vip.type == 1) { VipType.Text = "大会员"; } else { VipType.Text = ""; } coinBox.Text = "硬币:" + user.data.coins.ToString(); SlogenLabel.Text = user.data.sign; RefreshBangumiData(); RefreshLikeList(); } }
public ChatForm(OneClient _user) { user = _user; InitializeComponent(); String styleOfwb = @"<style>body { margin: 0; padding: 0; display: block; position: relative; background-color: #353535; overflow: hiden; } document{ overflow: hiden; } .me { width: 30%; float: right; width: 60%; background-color: #252525; color: white; } .you { background-color: #e53935; width: 30%; float: left; width: 60%; } .message { margin: 0; word-wrap: break-word; width: 68%; font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; font-size: 2.8vw; float: left; margin-left: 2%; } .nick { margin: 0; margin-left: 2%; box-sizing: border-box; word-wrap: break-word; width: 30%; font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; font-size: 2.8vw; float: left; font-weight: bold; } .me, .you { box-sizing: border-box; margin: 1% 0; border: 0px solid; border-radius: 22px; padding: 8px; } .time { font-size: 1.5vw; font-family: monospace; width: 100%; text-align: center; font-weight: bold; } img{ width: 35px; height: 35px; } </style>"; wbMessages.DocumentText = styleOfwb; MaterialSkinManager materialManager = MaterialSkinManager.Instance; materialManager.AddFormToManage(this); materialManager.Theme = MaterialSkinManager.Themes.DARK; materialManager.ColorScheme = new ColorScheme(Primary.DeepPurple400, Primary.DeepPurple500, Primary.DeepPurple500, Accent.Pink400, TextShade.WHITE); materialManager.ColorScheme = new ColorScheme(Primary.Red600, Primary.Red800, Primary.Red400, Accent.Pink400, TextShade.WHITE); }