private void PaintUser(UserProfile up) { PersonalDetails personalDetails = up.Details; ProfilePanel.Controls.Clear(); ProfilePanel.CreatePropertyRows(up); ProfilePanel.BindPropertyRows(up); TableLayoutPanel buttonPanel = new TableLayoutPanel(); buttonPanel.RowCount = 1; buttonPanel.ColumnCount = 2; RadButton modifica = new RadButton(); modifica.Text = "Modifica"; modifica.Click += ModifyClickHandler; RadButton elimina = new RadButton(); elimina.Text = "Elimina"; elimina.Click += DeleteClickHandler; modifica.Dock = DockStyle.Fill; elimina.Dock = DockStyle.Fill; buttonPanel.Controls.Add(modifica); buttonPanel.Controls.Add(elimina); buttonPanel.Dock = DockStyle.Fill; MenuPanel.Controls.Clear(); MenuPanel.Controls.Add(buttonPanel); RecalculateTargetWeight(); }
private void Awake() { StartCoroutine(OnGameWasOpened()); DontDestroyOnLoad(this); Background = new Background(); MainMenu = new UI.PanelMain(); Pause = new PausePanel(); PauseWindow = new PauseWindow(); ProfilePanel = new ProfilePanel(); SinglePanel = new SinglePanel(); ServerList = new ServerListPanel(); SettingsPanel = new SettingsPanel(); DebugPanel = new DebugPanel(); CharacterSelectionPanel = new CharacterSelectionPanel(); Chat = new Chat(); Log = new Log(); DontDestroyOnLoad(new GameObject("DiscordManager").AddComponent <Network.Discord.DiscordManager>()); DestroyMainScene(); GameModes.ResetOnLoad(); //Antis.Spam.EventsCounter.OnEventsSpamDetected += (sender, args) => //{ // if(args.SpammedObject == 200 || args.SpammedObject == 253 && args.Count < 130) // { // return; // } // PhotonPlayer player = PhotonPlayer.Find(args.Sender); // if (player.RCIgnored) // { // return; // } // Log.AddLine("eventSpam", args.SpammedObject.ToString(), args.Sender.ToString(), args.Count.ToString()); //}; //Antis.Spam.RPCCounter.OnRPCSpamDetected += (sender, args) => //{ // if(args.SpammedObject == "netPauseAnimation" || args.SpammedObject == "netCrossFade" && args.Count < 75) // { // return; // } // PhotonPlayer player = PhotonPlayer.Find(args.Sender); // if (player.RCIgnored) // { // return; // } // Log.AddLine("rpcSpam", args.SpammedObject.ToString(), args.Sender.ToString(), args.Count.ToString()); //}; //Antis.Spam.InstantiateCounter.OnInstantiateSpamDetected += (sender, args) => //{ // if (args.SpammedObject.Contains("TITAN") && args.Count <= 50) // { // return; // } // PhotonPlayer player = PhotonPlayer.Find(args.Sender); // if (player.RCIgnored) // { // return; // } // Log.AddLine("instantiateSpam", args.SpammedObject.ToString(), args.Sender.ToString(), args.Count.ToString()); //}; Network.BanList.Load(); }
private void Form2_Load(object sender, EventArgs e) { Connection conObj = new Connection(); try { SqlDataReader myReader = null; SqlCommand myCommand = new SqlCommand("select StNo,firstName,lastName,year,GPA,contactNo,email from STUDENT", conObj.connect()); myReader = myCommand.ExecuteReader(); while (myReader.Read()) { lblStNo.Text = myReader["StNo"].ToString(); lblFirstName.Text = myReader["firstName"].ToString(); lblLastName.Text = myReader["lastName"].ToString(); lblLevel.Text = myReader["year"].ToString(); lblGPA.Text = myReader["GPA"].ToString(); lblContactNo.Text = myReader["contactNo"].ToString(); lblEmail.Text = myReader["email"].ToString(); } } catch (Exception Ex) { MessageBox.Show(Ex.ToString()); } ProfilePanel.BringToFront(); }
public ForEmployee(string id) { InitializeComponent(); Settings.ForeColor = Color.FromArgb(227, 213, 212); Question.ForeColor = Color.FromArgb(227, 213, 212); Orders.ForeColor = Color.FromArgb(227, 213, 212); Help.ForeColor = Color.FromArgb(227, 213, 212); NavPanel.Height = NewDelivery.Height; NavPanel.Top = NewDelivery.Top; NavPanel.Left = NewDelivery.Left; NewDelivery.ForeColor = Color.FromArgb(217, 35, 73); NewDelivery.Image = Properties.Resources.NewDelivery_on; NamePanel.Text = "Новая доставка"; UserID = id; connection = new SqlConnection(connectionString); connection.Open(); string query = $"SELECT [id] FROM [Delivery service employee] WHERE [user id]={UserID}"; cmd = new SqlCommand(query, connection); empid = cmd.ExecuteScalar().ToString(); connection.Close(); UpdateProfile(); UpdateDelivery(); NewDeliveryPanel.Show(); NewDeliveryPanel.Location = loc; ProfilePanel.Hide(); QuestionPanel.Hide(); InfoPanel.Hide(); MyDeliveryPanel.Hide(); }
private void ModifyClickHandler(Object sender, EventArgs e) { ProfilePanel.EnablePropertyRows(); TableLayoutPanel buttonPanel = new TableLayoutPanel(); buttonPanel.RowCount = 1; buttonPanel.ColumnCount = 2; RadButton salva = new RadButton(); salva.Text = "Salva"; salva.Click += SaveClickHandler; RadButton annulla = new RadButton(); annulla.Text = "Annulla"; annulla.Click += CancelClickHandler; salva.Dock = DockStyle.Fill; annulla.Dock = DockStyle.Fill; buttonPanel.Controls.Add(salva, 0, 0); buttonPanel.Controls.Add(annulla, 1, 0); buttonPanel.Dock = DockStyle.Fill; for (int j = 0; j < buttonPanel.ColumnCount; j++) { buttonPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50)); } MenuPanel.Controls.Clear(); MenuPanel.Controls.Add(buttonPanel); Model.StartModify(); }
void ActivatePanel(string panelName) { if (string.IsNullOrEmpty(panelName)) return; HomePanel.SetActive(string.Equals(HomePanel.name, panelName)); ProfilePanel.SetActive(string.Equals(ProfilePanel.name, panelName)); }
// Use this for initialization void Start() { create(); _backButton.onClick.AddListener(onClick); CalendarPanel.Show(); ProfilePanel.Show(); CmdPanel.Show(); }
private void Awake() { if (instance != null && instance != this) { Destroy(this); return; } else { instance = this; } DontDestroyOnLoad(this); }
public MainWindow() { InitializeComponent(); BasePanel.MainWindow = this; BaseDocument.MainWindow = this; dockPanel = new DockPanel(); dockPanel.Dock = System.Windows.Forms.DockStyle.Fill; dockPanel.DockBackColor = System.Drawing.SystemColors.AppWorkspace; dockPanel.DockBottomPortion = 200D; dockPanel.DockLeftPortion = 350D; dockPanel.Name = "dockPanel"; Controls.Add(dockPanel); Controls.SetChildIndex(dockPanel, 0); Debugger = new Debugger((AsyncTask task) => { BeginInvoke(task); }); breakpointsPanel = new BreakpointsPanel(Debugger); callstackPanel = new CallstackPanel(Debugger); codeDocuments.Add(new CodeDocument(Debugger)); filesystemPanel = new FilesystemPanel(Debugger); functionsPanel = new FunctionsPanel(Debugger); heapDocument = new HeapDocument(Debugger); memoryDocuments.Add(new MemoryDocument(Debugger)); modulesPanel = new ModulesPanel(Debugger); profilePanel = new ProfilePanel(Debugger); registersPanels.Add(new RegistersPanel(Debugger, RegisterClass.GuestGeneralPurpose)); registersPanels.Add(new RegistersPanel(Debugger, RegisterClass.GuestFloatingPoint)); registersPanels.Add(new RegistersPanel(Debugger, RegisterClass.GuestVector)); statisticsDocument = new StatisticsDocument(Debugger); threadsPanel = new ThreadsPanel(Debugger); tracePanel = new TracePanel(Debugger); // deserializeDockContent = // new DeserializeDockContent(GetContentFromPersistString); SetupDefaultLayout(); // For hotkeys. KeyPreview = true; Debugger.StateChanged += Debugger_StateChanged; Debugger_StateChanged(this, Debugger.CurrentState); Debugger.CurrentContext.Changed += CurrentContext_Changed; CurrentContext_Changed(Debugger.CurrentContext); Debugger.Attach(); }
// Update is called once per frame public void Setup(int iconInd, bool unlocked, ProfilePanel panel, Sprite buttonSprite) { buttonComponent.image.overrideSprite = buttonSprite; buttonComponent.interactable = unlocked; if (unlocked) { lockImage.enabled = false; } if (Account.account.GetCurrentIcon() == iconInd) { buttonComponent.Select(); } this.iconInd = iconInd; this.panel = panel; // TODO: Edit size }
public void DisableAllPanels() { LoadingPanel.SetActive(false); AccountPanel.SetActive(false); ProcessPanel.SetActive(false); LobbyPanel.SetActive(false); CharacterSelectPanel.SetActive(false); ProfilePanel.SetActive(false); ShopPanel.SetActive(false); FriendsPanel.SetActive(false); GameModePanel.SetActive(false); SettingsPanel.SetActive(false); AboutPanel.SetActive(false); WaitingPanel.SetActive(false); }
private void Settings_Click(object sender, EventArgs e) { QuestionPanel.Hide(); MyDeliveryPanel.Hide(); ProfilePanel.Hide(); NewDeliveryPanel.Hide(); NamePanel.Text = "Настройки"; Question.ForeColor = Color.FromArgb(227, 213, 212); NewDelivery.ForeColor = Color.FromArgb(227, 213, 212); Orders.ForeColor = Color.FromArgb(227, 213, 212); Help.ForeColor = Color.FromArgb(227, 213, 212); NavPanel.Height = Settings.Height; NavPanel.Top = Settings.Top; NavPanel.Left = Settings.Left; Settings.ForeColor = Color.FromArgb(217, 35, 73); Settings.Image = Properties.Resources.Settings_on; NewDelivery.Image = Properties.Resources.NewDelivery; }
private void NewOrder_Click(object sender, EventArgs e) { UpdateDelivery(); QuestionPanel.Hide(); MyDeliveryPanel.Hide(); ProfilePanel.Hide(); NewDeliveryPanel.Show(); NewDeliveryPanel.Location = loc; NamePanel.Text = "Новая доставка"; Settings.ForeColor = Color.FromArgb(227, 213, 212); Question.ForeColor = Color.FromArgb(227, 213, 212); Orders.ForeColor = Color.FromArgb(227, 213, 212); Help.ForeColor = Color.FromArgb(227, 213, 212); NavPanel.Height = NewDelivery.Height; NavPanel.Top = NewDelivery.Top; NavPanel.Left = NewDelivery.Left; NewDelivery.ForeColor = Color.FromArgb(217, 35, 73); NewDelivery.Image = Properties.Resources.NewDelivery_on; }
private void Question_Click(object sender, EventArgs e) { QuestionPanel.Location = loc; QuestionPanel.Show(); UpdateQuestions(); MyDeliveryPanel.Hide(); ProfilePanel.Hide(); NewDeliveryPanel.Hide(); NamePanel.Text = "Задать вопрос"; Settings.ForeColor = Color.FromArgb(227, 213, 212); NewDelivery.ForeColor = Color.FromArgb(227, 213, 212); Orders.ForeColor = Color.FromArgb(227, 213, 212); Help.ForeColor = Color.FromArgb(227, 213, 212); NavPanel.Height = Question.Height; NavPanel.Top = Question.Top; NavPanel.Left = Question.Left; Question.ForeColor = Color.FromArgb(217, 35, 73); Question.Image = Properties.Resources.Question_on; NewDelivery.Image = Properties.Resources.NewDelivery; }
private void Help_Click(object sender, EventArgs e) { InfoPanel.Location = loc; InfoPanel.Show(); QuestionPanel.Hide(); MyDeliveryPanel.Hide(); ProfilePanel.Hide(); NewDeliveryPanel.Hide(); NamePanel.Text = "Помощь"; Settings.ForeColor = Color.FromArgb(227, 213, 212); NewDelivery.ForeColor = Color.FromArgb(227, 213, 212); Orders.ForeColor = Color.FromArgb(227, 213, 212); Question.ForeColor = Color.FromArgb(227, 213, 212); NavPanel.Height = Help.Height; NavPanel.Top = Help.Top; NavPanel.Left = Help.Left; Help.ForeColor = Color.FromArgb(217, 35, 73); Help.Image = Properties.Resources.Help_on; NewDelivery.Image = Properties.Resources.Company; }
private void Orders_Click(object sender, EventArgs e) { InfoPanel.Hide(); QuestionPanel.Hide(); UpdateDelivery(); MyDeliveryPanel.Location = loc; MyDeliveryPanel.Show(); ProfilePanel.Hide(); NewDeliveryPanel.Hide(); NamePanel.Text = "Наши доставки"; Settings.ForeColor = Color.FromArgb(227, 213, 212); NewDelivery.ForeColor = Color.FromArgb(227, 213, 212); Question.ForeColor = Color.FromArgb(227, 213, 212); Help.ForeColor = Color.FromArgb(227, 213, 212); NavPanel.Height = Orders.Height; NavPanel.Top = Orders.Top; NavPanel.Left = Orders.Left; Orders.ForeColor = Color.FromArgb(217, 35, 73); Orders.Image = Properties.Resources.MyDelivery_on; NewDelivery.Image = Properties.Resources.Company; }
async void Initialize() { officers = NetworkManager.GetOfficers(); await Task.Delay(3500); foreach (Officer officer in officers) { Debug.Log(officer.first_name); GameObject panel = Instantiate(prefabOfficerPanel, content.GetComponent <Transform>().position, content.GetComponent <Transform>().rotation, content.GetComponent <Transform>()); ProfilePanel profile = panel.GetComponent <ProfilePanel>(); profile.SetIdText(officer.id); profile.SetTempIdText(officer.temp_id.ToString()); profile.SetLastNameText(officer.last_name); profile.SetFirstNameText(officer.first_name); profile.NetworkManager = NetworkManager; } }
private void ProfilePic_Click(object sender, EventArgs e) { InfoPanel.Hide(); NewDeliveryPanel.Hide(); UpdateProfile(); NamePanel.Text = "Профиль"; ProfilePanel.Location = loc; ProfilePanel.Show(); Settings.ForeColor = Color.FromArgb(227, 213, 212); Question.ForeColor = Color.FromArgb(227, 213, 212); Orders.ForeColor = Color.FromArgb(227, 213, 212); Help.ForeColor = Color.FromArgb(227, 213, 212); NewDelivery.ForeColor = Color.FromArgb(227, 213, 212); NavPanel.Height = 0; NavPanel.Top = 0; NavPanel.Left = 0; Orders.Image = Properties.Resources.MyDelivery; Settings.Image = Properties.Resources.Settings; Question.Image = Properties.Resources.Question; Help.Image = Properties.Resources.Help; NewDelivery.Image = Properties.Resources.NewDelivery; }
private void create() { GameObject o = null; o = Instantiate(PrefMainCharacterPanel); _mainCharacterPanel = o.GetComponent <MainCharacterPanel>(); _mainCharacterPanel.transform.SetParent(transform, false); o = Instantiate(PrefBackButton); _backButton = o.GetComponent <Button>(); _backButton.transform.SetParent(transform, false); o = Instantiate(PrefCalendarPanel); _calendarPanel = o.GetComponent <CalendarPanel>(); _calendarPanel.transform.SetParent(transform, false); o = Instantiate(PrefProfilePanel); _profilePanel = o.GetComponent <ProfilePanel>(); _profilePanel.transform.SetParent(transform, false); o = Instantiate(PrefCmdPanel); _cmdPanel = o.GetComponent <CmdPanel>(); _cmdPanel.transform.SetParent(transform, false); }
private void profileToolStripMenuItem_Click(object sender, EventArgs e) { ProfilePanel.BringToFront(); }
private void Awake() { StartCoroutine(OnGameWasOpened()); DontDestroyOnLoad(this); Feed = new GameFeed(); Background = new Background(); MainMenu = new UI.PanelMain(); Pause = new PausePanel(); PauseWindow = new PauseWindow(); ProfilePanel = new ProfilePanel(); SinglePanel = new SinglePanel(); ServerList = new ServerListPanel(); SettingsPanel = new SettingsPanel(); DebugPanel = new DebugPanel(); CharacterSelectionPanel = new CharacterSelectionPanel(); Chat = new Chat(); Log = new Log(); ChatHistory = new ChatHistoryPanel(); StatsPanel = new SingleStatsPanel(); DontDestroyOnLoad(new GameObject("DiscordManager").AddComponent <Network.Discord.DiscordSDK>()); DestroyMainScene(); GameModes.ResetOnLoad(); //Antis.Spam.EventsCounter.OnEventsSpamDetected += (sender, args) => //{ // if (args.SpammedObject == 200 || args.SpammedObject == 253 && args.Count < 130) // { // return; // } // PhotonPlayer player = PhotonPlayer.Find(args.Sender); // if (player.RCIgnored) // { // return; // } // Log.AddLine("eventSpam", args.SpammedObject.ToString(), args.Sender.ToString(), args.Count.ToString()); //}; //Antis.Spam.RPCCounter.OnRPCSpamDetected += (sender, args) => //{ // if (args.SpammedObject == "netPauseAnimation" || args.SpammedObject == "netCrossFade" && args.Count < 75) // { // return; // } // PhotonPlayer player = PhotonPlayer.Find(args.Sender); // if (player.RCIgnored) // { // return; // } // Log.AddLine("rpcSpam", args.SpammedObject.ToString(), args.Sender.ToString(), args.Count.ToString()); //}; //Antis.Spam.InstantiateCounter.OnInstantiateSpamDetected += (sender, args) => //{ // if (args.SpammedObject.Contains("TITAN") && args.Count <= 50) // { // return; // } // PhotonPlayer player = PhotonPlayer.Find(args.Sender); // if (player.RCIgnored) // { // return; // } // Log.AddLine("instantiateSpam", args.SpammedObject.ToString(), args.Sender.ToString(), args.Count.ToString()); //}; //Antis.AntisManager.ResponseAction += (id, ban, reason) => //{ // var player = PhotonPlayer.Find(id); // if(player == null) // { // return; // } // Network.Antis.Kick(player, ban, reason); //}; Network.BanList.Load(); Antis.AntisManager.ResponseAction += (a, b, c) => { Network.Antis.Kick(PhotonPlayer.Find(a), b, c); }; Antis.AntisManager.OnResponseCallback += (id, banned, reason) => { Log.AddLineRaw($"Player [{id}] has been {(banned ? "banned" : "kicked")}. " + $"{(reason == "" ? "" : $"reason: {reason}")}"); }; }
private void frmstudents_Load(object sender, EventArgs e) { ProfilePanel.BringToFront(); }
private void ModifyClickHandler(Object sender, EventArgs e) { for (int i = 0; i < ProfilePanel.RowCount; i++) { Control control = ProfilePanel.GetControlFromPosition(1, i); if (control.GetType() == typeof(RadRating)) { ((RadRating)control).ReadOnly = false; } else if (control.GetType() == typeof(GroupBox)) { if (((PropertyInfo)control.Tag).PropertyType == typeof(Goal)) { if (ManagerProvider.getManager <VersionManager>().Allows(Feature.CHANGE_GOAL)) { (control.Controls.OfType <RadioButton>()).ToList <RadioButton>().ForEach(o => o.Enabled = true); } } else { (control.Controls.OfType <RadioButton>()).ToList <RadioButton>().ForEach(o => o.Enabled = true); } } else if (control.Tag is PropertyInfo && ((PropertyInfo)control.Tag).PropertyType.GetInterfaces().Contains(typeof(IList)) && ((PropertyInfo)control.Tag).PropertyType.IsGenericType) { if (ManagerProvider.getManager <VersionManager>().Allows(Feature.CHANGE_PREFERENCES)) { control.Click += ModificaPreferenzeClickHandler; control.BackColor = Color.White; } } else { control.Enabled = true; } } TableLayoutPanel buttonPanel = new TableLayoutPanel(); buttonPanel.RowCount = 1; buttonPanel.ColumnCount = 2; RadButton salva = new RadButton(); salva.Text = "Salva"; salva.Click += SaveClickHandler; salva.Enabled = false; RadButton annulla = new RadButton(); annulla.Text = "Annulla"; annulla.Click += CancelClickHandler; salva.Dock = DockStyle.Fill; annulla.Dock = DockStyle.Fill; buttonPanel.Controls.Add(salva, 0, 0); buttonPanel.Controls.Add(annulla, 1, 0); buttonPanel.Dock = DockStyle.Fill; for (int j = 0; j < buttonPanel.ColumnCount; j++) { buttonPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50)); } MenuPanel.Controls.Clear(); MenuPanel.Controls.Add(buttonPanel); FormChangedHandler(null, null); Model.StartModify(); }
private void Form1_Load(object sender, EventArgs e) { ProfilePanel.BringToFront(); this.Text = "IM/2014/027"; }
private void Form1_Load(object sender, EventArgs e) { ProfilePanel.BringToFront(); this.Text = "Dr. Chathura Rajapaksha"; }