public void openDeckNameInput() { if (OrganizeTaskManager.Instance.GetDetailTask().CheckBtnEnabled() && base.isRun) { SoundUtils.PlaySE(SEFIleInfos.SE_001); _state = OrganizeState.System; controlState = "system"; BannerIndex = 0; SystemIndex = 2; UpdateSystemButtons(); UpdateChangeBanner(); App.OnlyController = KeyController; KeyController.IsRun = false; SingletonMonoBehaviour <UIShortCutMenu> .Instance.LockTouchControl(isEnable : true); this.DelayActionFrame(1, delegate { Ime.OnGotIMEDialogResult += OnGotIMEDialogResult; Ime.Open(new Ime.ImeDialogParams { supportedLanguages = (Ime.FlagsSupportedLanguages.LANGUAGE_JAPANESE | Ime.FlagsSupportedLanguages.LANGUAGE_ENGLISH_GB), languagesForced = true, type = Ime.EnumImeDialogType.TYPE_DEFAULT, option = Ime.FlagsTextBoxOption.OPTION_DEFAULT, canCancel = true, textBoxMode = Ime.FlagsTextBoxMode.TEXTBOX_MODE_WITH_CLEAR, enterLabel = Ime.EnumImeDialogEnterLabel.ENTER_LABEL_DEFAULT, maxTextLength = 12, title = "艦隊名を入力してください。(12文字まで)", initialText = mEditName }); }); } }
public async Task Submit() { if (validacija()) { var korisnik = await korisniciService.GetById <Korisnici>(korisnikId); Models.KorisniciInsertRequest request = new Models.KorisniciInsertRequest { Ime = Ime, Prezime = Prezime, Spol = korisnik.Spol, Adresa = Adresa, DatumRodjenja = datumRodjenja, Password = Password, Email = Email, Telefon = Telefon, Jmbg = "111", KorisnickoIme = Ime.ToLower() + "." + Prezime.ToLower(), gradId = SelectedGrad.Id }; await korisniciService.Update <Models.KorisniciInsertRequest>(korisnikId, request); await Application.Current.MainPage.DisplayAlert("Pozor", "Podaci uspjesno izmijenjeni", "OK"); Application.Current.MainPage = new LoginPage(); } }
private void PrijaviSe_Click(object sender, EventArgs e) { string sqlUpit = "SELECT KorisničkoIme, Lozinka FROM Skrbitelji WHERE KorisničkoIme = '" + Ime.Text + "' AND Lozinka = '" + Lozinka.Text + "'"; if (SQLServer.Instance.DohvatiVrijednost(sqlUpit) == null || Ime.Text == "" || Lozinka.Text == "") { Pogreska.Visible = true; } else { string sqlUpit1 = "SELECT Administrator FROM Skrbitelji WHERE KorisničkoIme = '" + Ime.Text + "' AND Lozinka = '" + Lozinka.Text + "'"; if (bool.Parse(SQLServer.Instance.DohvatiVrijednost(sqlUpit1).ToString()) == true) { TrenutniKorisnik.Korisnik = "admin"; } else { TrenutniKorisnik.Korisnik = "skrbitelj"; } string sqlUpit2 = "SELECT OIB_Skrbitelja FROM Skrbitelji WHERE KorisničkoIme = '" + Ime.Text + "' AND Lozinka = '" + Lozinka.Text + "'"; TrenutniKorisnik.OIBKorisnika = SQLServer.Instance.DohvatiVrijednost(sqlUpit2).ToString(); Pogreska.Visible = false; GlavnaForma glavnaForma = new GlavnaForma(); glavnaForma.Show(); glavnaForma.RefPrijava = this; Ime.Clear(); Lozinka.Clear(); this.Hide(); } }
public void openDeckNameInput() { if (OrganizeTaskManager.Instance.GetDetailTask().CheckBtnEnabled() && base.isRun) { SoundUtils.PlaySE(SEFIleInfos.SE_001); this._state = TaskOrganizeTop.OrganizeState.System; TaskOrganizeTop.controlState = "system"; TaskOrganizeTop.BannerIndex = 0; TaskOrganizeTop.SystemIndex = 2; this.UpdateSystemButtons(); this.UpdateChangeBanner(); App.OnlyController = TaskOrganizeTop.KeyController; TaskOrganizeTop.KeyController.IsRun = false; SingletonMonoBehaviour <UIShortCutMenu> .Instance.LockTouchControl(true); this.DelayActionFrame(1, delegate { Ime.add_OnGotIMEDialogResult(new Messages.EventHandler(this.OnGotIMEDialogResult)); Ime.ImeDialogParams imeDialogParams = new Ime.ImeDialogParams(); imeDialogParams.supportedLanguages = 270336; imeDialogParams.languagesForced = true; imeDialogParams.type = 0; imeDialogParams.option = 0; imeDialogParams.canCancel = true; imeDialogParams.textBoxMode = 2; imeDialogParams.enterLabel = 0; imeDialogParams.maxTextLength = 12; imeDialogParams.set_title("艦隊名を入力してください。(12文字まで)"); imeDialogParams.set_initialText(this.mEditName); Ime.Open(imeDialogParams); }); } }
private bool Init(Action onCancel) { this._actOnCancel = onCancel; this._strEditName = string.Empty; Ime.add_OnGotIMEDialogResult(new Messages.EventHandler(this.OnGotIMEDialogResult)); Main.Initialise(); return(true); }
private bool SodrziZbor(string zbor) { if (Ime.ToLower().Contains(zbor.ToLower())) { return(true); } return(false); }
// izmena detalja o korisniku private void Button_Click(object sender, RoutedEventArgs e) { if ((Ime != null && !Ime.Equals(Korisnik.Ime)) || (Prezime != null && !Prezime.Equals(Korisnik.Prezime)) || (Kompanija != null && !Kompanija.Equals(Korisnik.Kompanija))) { // ako je bilo promene u detaljima onda treba novi da se usnime DetaljiIliSifra = true; this.DialogResult = true; } }
public override int GetHashCode() { unchecked { int result = 14; result = 29 * result + Ime.GetHashCode(); result = 29 * result + Prezime.GetHashCode(); return(result); } }
public override int GetHashCode() { unchecked { var hashCode = Ime != null?Ime.GetHashCode() : 0; hashCode = (hashCode * 397) ^ (Password != null ? Password.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Admin.GetHashCode(); return(hashCode); } }
private void btnDodaj_Click(object sender, RoutedEventArgs e) { Contacts.Add(new Contact { Ime = Ime.Text, Priimek = Priimek.Text, AvatarPot = ((Icon)Avatar.SelectedValue).IconPath }); Ime.Text = ""; Priimek.Text = ""; Avatar.SelectedIndex = -1; Ime.Focus(FocusState.Programmatic); }
private void Start() { this.StateControllerDic = new Dictionary <string, TaskOrganizeTop.StateController>(); this.StateControllerDic.Add("banner", new TaskOrganizeTop.StateController(this.StateKeyControl_Banner)); this.StateControllerDic.Add("system", new TaskOrganizeTop.StateController(this.StateKeyControl_System)); this.StateControllerDic.Add("tender", new TaskOrganizeTop.StateController(base.StateKeyControl_Tender)); base.currentDeck = EscortOrganizeTaskManager.GetEscortManager().EditDeck; this.StartRefGet(); this._fleetNameLabel.text = ((EscortDeckModel)base.currentDeck).Name; this._fleetNameLabel.supportEncoding = false; this.mEditName = ((EscortDeckModel)base.currentDeck).Name; Ime.add_OnGotIMEDialogResult(new Messages.EventHandler(base.OnGotIMEDialogResult)); Main.Initialise(); }
private void OnGotIMEDialogResult(Messages.PluginMessage msg) { Ime.ImeDialogResult result = Ime.GetResult(); if (result.result == Ime.EnumImeDialogResult.RESULT_OK) { string text = result.text; if (Utils.ChkNGWard(text) || Utils.ChkNGWard(result.text)) { text = string.Empty; _animFeather.Play(); } _strEditName = text; _uiNameInput.value = _strEditName; } }
private void OnGotIMEDialogResult(Messages.PluginMessage msg) { Ime.ImeDialogResult result = Ime.GetResult(); if (result.result == null) { string text = result.get_text(); if (Utils.ChkNGWard(text) || Utils.ChkNGWard(result.get_text())) { text = string.Empty; this._animFeather.Play(); } this._strEditName = text; this._uiNameInput.value = this._strEditName; } }
protected override bool Run() { KeyControl keyControl = StartupTaskManager.GetKeyControl(); Main.Update(); if (Ime.get_IsDialogOpen()) { return(true); } if (!keyControl.GetDown(KeyControl.KeyName.SELECT)) { if (keyControl.GetDown(KeyControl.KeyName.MARU)) { this.OnClickInputLabel(); } else if (keyControl.GetDown(KeyControl.KeyName.START)) { if (this._uiNameInput.value == string.Empty || this._uiNameInput.value.Replace(" ", string.Empty).Replace("\u3000", string.Empty) == string.Empty) { return(true); } if (Utils.ChkNGWard(this._uiNameInput.value)) { this._ANI.Play("feather_ng"); return(true); } this._uiNameInput.isSelected = false; this._onNameSubmit(); return(false); } else if (keyControl.GetDown(KeyControl.KeyName.BATU) && !StartupTaskManager.IsInheritStartup()) { this._uiNameInput.isSelected = false; SingletonMonoBehaviour <FadeCamera> .Instance.FadeOut(0.2f, delegate { Application.LoadLevel(Generics.Scene.Title.ToString()); this.DelayActionFrame(2, delegate { SingletonMonoBehaviour <FadeCamera> .Instance.FadeIn(0.2f, null); }); }); return(true); } } return(StartupTaskManager.GetMode() == StartupTaskManager.StartupTaskManagerMode.StartupTaskManagerMode_BEF || StartupTaskManager.GetMode() == StartupTaskManager.StartupTaskManagerMode.StartupTaskManagerMode_ST); }
public override int GetHashCode() { unchecked { int result = 14; result = 29 * result + Ime.GetHashCode(); result = 29 * result + Prezime.GetHashCode(); if (!string.IsNullOrEmpty(SrednjeIme)) { result = 29 * result + SrednjeIme.GetHashCode(); } if (DatumRodjenja != null) { result = 29 * result + DatumRodjenja.GetHashCode(); } return(result); } }
public void OnClickInputLabel() { if (_uiNameInput.isSelected) { Ime.ImeDialogParams imeDialogParams = new Ime.ImeDialogParams(); imeDialogParams.supportedLanguages = (Ime.FlagsSupportedLanguages.LANGUAGE_JAPANESE | Ime.FlagsSupportedLanguages.LANGUAGE_ENGLISH_GB); imeDialogParams.languagesForced = true; imeDialogParams.type = Ime.EnumImeDialogType.TYPE_DEFAULT; imeDialogParams.option = Ime.FlagsTextBoxOption.OPTION_DEFAULT; imeDialogParams.canCancel = true; imeDialogParams.textBoxMode = Ime.FlagsTextBoxMode.TEXTBOX_MODE_WITH_CLEAR; imeDialogParams.enterLabel = Ime.EnumImeDialogEnterLabel.ENTER_LABEL_DEFAULT; imeDialogParams.maxTextLength = 12; imeDialogParams.title = " 貴官の提督名をお知らせ下さい。(" + 12 + "文字まで入力可能です)"; imeDialogParams.initialText = _strEditName; Ime.Open(imeDialogParams); } }
public Tabela(List <string> Imena, List <int> Bodovi) { InitializeComponent(); this._Imena = Imena; this._Bodovi = Bodovi; this._Runda++; for (int i = 0; i < Imena.Count(); i++) { Ime.Add(new ViewCell { View = new Label { Text = Imena.ElementAt(i) + ": " + Bodovi.ElementAt(i) } }); } Runda.Text = "Runda: " + _Runda.ToString(); }
public void OnClickInputLabel() { if (!this._uiNameInput.isSelected) { return; } Ime.ImeDialogParams imeDialogParams = new Ime.ImeDialogParams(); imeDialogParams.supportedLanguages = 270336; imeDialogParams.languagesForced = true; imeDialogParams.type = 0; imeDialogParams.option = 0; imeDialogParams.canCancel = true; imeDialogParams.textBoxMode = 2; imeDialogParams.enterLabel = 0; imeDialogParams.maxTextLength = 12; imeDialogParams.set_title(" 貴官の提督名をお知らせ下さい。(" + 12 + "文字まで入力可能です)"); imeDialogParams.set_initialText(this._strEditName); Ime.Open(imeDialogParams); }
protected override bool Init() { Ime.add_OnGotIMEDialogResult(new Messages.EventHandler(this.OnGotIMEDialogResult)); Main.Initialise(); Utils.PlayAdmiralNameVoice(); UIStartupNavigation navigation = StartupTaskManager.GetNavigation(); navigation.SetNavigationInAdmiralInfo(StartupTaskManager.IsInheritStartup()); Util.FindParentToChild <UIPanel>(ref this._uiPanel, base.scenePrefab, "InfoPanel"); if (this._uiNameInput.onSubmit != null) { this._uiNameInput.onSubmit.Clear(); } EventDelegate.Add(this._uiNameInput.onSubmit, new EventDelegate.Callback(this._onNameSubmit)); if (this._uiNameInput.onChange != null) { this._uiNameInput.onChange.Clear(); } this._uiNameInput.onChange.Add(new EventDelegate(delegate { this.ChkButtonState(); })); if (this._uiDecideButton.onClick != null) { this._uiDecideButton.onClick.Clear(); } this._uiDecideButton.onClick.Add(new EventDelegate(delegate { this._onNameSubmit(); })); this._uiDecideButton.state = ((!(this._uiNameInput.value == string.Empty)) ? UIButtonColor.State.Normal : UIButtonColor.State.Disabled); this._uiPanel.SetActive(true); this._ANI = GameObject.Find("AdmiralInfoScene/InfoPanel/anchor/Feather").GetComponent <Animation>(); this._shipSelected = false; this._shipCancelled = false; this.ChkButtonState(); StartupTaskManager.GetStartupHeader().SetMessage("提督名入力"); this._uiNameInput.isSelected = true; return(true); }
public bool Sodrzi(String zbor) { String z = zbor.ToLower(); if (Ime.ToLower().Contains(z)) { return(true); } if (Grad.ToLower().Contains(z)) { return(true); } if (Kategorija.ToLower().Contains(z)) { return(true); } if (Ulica.ToLower().Contains(z)) { return(true); } return(false); }
protected void OnGotIMEDialogResult(Messages.PluginMessage msg) { Ime.remove_OnGotIMEDialogResult(new Messages.EventHandler(this.OnGotIMEDialogResult)); Ime.ImeDialogResult result = Ime.GetResult(); DebugUtils.SLog("OnGotIMEDialogResult2"); DebugUtils.SLog("OnGotIMEDialogResult3"); if (result.result == null) { DebugUtils.SLog("OnGotIMEDialogResult4"); DebugUtils.SLog("★ IME から得た名前: result.text: " + result.get_text()); DebugUtils.SLog(" 名前の長さ:result.text.Length: " + result.get_text().get_Length()); DebugUtils.SLog("OnGotIMEDialogResult5"); this.mEditName = result.get_text(); this._fleetNameLabel.text = this.mEditName; DebugUtils.SLog("OnGotIMEDialogResult6"); OrganizeTaskManager.Instance.GetLogicManager().ChangeDeckName(this.GetDeckID(), result.get_text()); DebugUtils.SLog("OnGotIMEDialogResult7"); } DebugUtils.SLog("OnGotIMEDialogResult8"); App.OnlyController = null; TaskOrganizeTop.KeyController.IsRun = true; SingletonMonoBehaviour <UIShortCutMenu> .Instance.LockTouchControl(false); }
protected void OnGotIMEDialogResult(Messages.PluginMessage msg) { Ime.OnGotIMEDialogResult -= OnGotIMEDialogResult; Ime.ImeDialogResult result = Ime.GetResult(); DebugUtils.SLog("OnGotIMEDialogResult2"); DebugUtils.SLog("OnGotIMEDialogResult3"); if (result.result == Ime.EnumImeDialogResult.RESULT_OK) { DebugUtils.SLog("OnGotIMEDialogResult4"); DebugUtils.SLog("★ IME から得た名前: result.text: " + result.text); DebugUtils.SLog(" 名前の長さ:result.text.Length: " + result.text.Length); DebugUtils.SLog("OnGotIMEDialogResult5"); mEditName = result.text; _fleetNameLabel.text = mEditName; DebugUtils.SLog("OnGotIMEDialogResult6"); OrganizeTaskManager.Instance.GetLogicManager().ChangeDeckName(GetDeckID(), result.text); DebugUtils.SLog("OnGotIMEDialogResult7"); } DebugUtils.SLog("OnGotIMEDialogResult8"); App.OnlyController = null; KeyController.IsRun = true; SingletonMonoBehaviour <UIShortCutMenu> .Instance.LockTouchControl(isEnable : false); }
public Tabela(List <string> Imena) { InitializeComponent(); this._Runda = 1; this._Imena = Imena; this._Bodovi = new List <int>(); foreach (var i in Imena) { this._Bodovi.Add(0); } foreach (var i in Imena) { Ime.Add(new ViewCell { View = new Label { Text = i + ":" + " 0" } }); } Runda.Text = "Runda: " + _Runda.ToString(); }
public KeyboardInputRoot(Ime.ImeContext imeContext) { KeyboardInputManager = new UI.KeyboardInputManager(imeContext); }
public override int GetHashCode() { return(Id.GetHashCode() ^ Ime.GetHashCode() ^ Prezime.GetHashCode()); }
public override int GetHashCode() { return(Ime.GetHashCode() ^ Adresa.GetHashCode() ^ Telefon.GetHashCode()); }
protected override bool UnInit() { Ime.remove_OnGotIMEDialogResult(new Messages.EventHandler(this.OnGotIMEDialogResult)); return(true); }
void ITextReceiver.OnCandidateListUpdate(Ime.CandidateListData data) { m_candidateListData = data; if (m_candidateListData.IsOpened) { StringBuilder sb = new StringBuilder(); sb.Append("[color:!"); sb.Append(ImeCandidateListForeColor.ToHex(true)); sb.Append("]"); for (int i = 0; i < data.Candidates.Length; ++i) { sb.Append(i + 1); sb.Append(" "); if (i == data.Selection) { sb.Append("[color:!"); sb.Append(ImeCandidateListSelectionForeColor.ToHex(true)); sb.Append("]"); } sb.Append(data.Candidates[i]); if (i == data.Selection) { sb.Append("[/color]"); } sb.Append("\n"); } if (!data.HasNextPage && !data.HasPreviousPage) { sb.Remove(sb.Length - 1, 1); } else { if (data.HasPreviousPage) { sb.Append("<- "); } if (data.HasNextPage) { sb.Append("->"); } } sb.Append("[/color]"); // get the target clause var candTarget = m_compositionData.Attributes.FindIndex( attr => attr == Ime.ClauseAttribute.TargetConverted || attr == Ime.ClauseAttribute.TargetNotConverted); if (candTarget == -1) { candTarget = 0; } var candListLeft = m_allText.MeasureLeft(m_caretPosition) + m_compositionString.MeasureLeft(candTarget) - m_scrollPosition; m_candidateListText = GameApp.Service<TextRenderer>().FormatText(sb.ToString(), m_candidateListFormatOptions); m_candidateListLabel.FormattedText = m_candidateListText; m_candidateListLabel.Transform = MatrixHelper.Translate(candListLeft - 2, Height) * Transform; m_candidateListLabel.Dispatcher = Dispatcher; } else { m_candidateListText = null; m_candidateListLabel.FormattedText = null; m_candidateListLabel.Dispatcher = null; } }
private void Button_Click(object sender, RoutedEventArgs e) { double max, min; double d; if (Max.Equals("")) { max = double.MaxValue; } else if (!(double.TryParse(Max, out d))) { return; } else { max = d; } if (Min.Equals("")) { min = double.MinValue; } else if (!(double.TryParse(Min, out d))) { return; } else { min = d; } List <Res> l = new List <Res>( ); listRes.Clear( ); for (int i = 0; i < MainWindow.Resources.Len( ); i++) { WpfApp3.Res r = MainWindow.Resources.GetResourceAtI(i); String ek = r.eksploatisanje ? "DA" : "NE"; String o = r.obnovljiv ? "DA" : "NE"; String s = r.strateskiVazan ? "DA" : "NE"; Regex match = new Regex(Ime, RegexOptions.IgnoreCase); Match mIme = match.Match(r.ime); match = new Regex(Oznaka, RegexOptions.IgnoreCase); Match mOznaka = match.Match(r.oznaka); String etiketeStr = ""; for (int j = 0; j < r.etikete.Count; j++) { etiketeStr += r.etikete[j].oznaka + " "; } Double cena = double.Parse(r.cena); if (((mIme.Success && mIme.Value.Length == r.ime.Length) || Ime.Equals("")) && ((mOznaka.Success && mOznaka.Value.Length == r.oznaka.Length) || Oznaka.Equals("")) && (Tip.Equals("") || Tip.Equals(r.tip)) && cena <= max && cena >= min) { l.Add(new Res( ) { Ime = r.ime, Opis = r.opis, Oznaka = r.oznaka, Tip = r.tip, Slika = r.tipImg, Frekvencija = r.frekvencija, Ikonica = r.oznaka, Obnovljiv = o, Eksploatisanje = ek, StrateskiVazan = s, Mera = r.mera, Cena = r.cena, Datum = r.datum, Etikete = etiketeStr }); listRes.Add(new Res( ) { Ime = r.ime, Opis = r.opis, Oznaka = r.oznaka, Tip = r.tip, Slika = r.tipImg, Frekvencija = r.frekvencija, Ikonica = r.oznaka, Obnovljiv = o, Eksploatisanje = ek, StrateskiVazan = s, Mera = r.mera, Cena = r.cena, Datum = r.datum, Etikete = etiketeStr }); } } /*this.Close( ); * var tablefil = new Table(l); * tablefil.ShowDialog( );*/ }
private async Task <bool> Validacija() { if (Ime == string.Empty) { ImeError = "Ime je obavezno!"; VisibleIme = true; VisiblePrezime = false; VisibleAdresa = false; VisibleGrad = false; VisibleKors = false; VisiblePass = false; Visible2Pass = false; VisibleTel = false; return(true); } else if (Ime.Length < 4) { ImeError = "Ime mora sadržavati barem 4 karaktera!"; VisibleIme = true; VisiblePrezime = false; VisibleAdresa = false; VisibleGrad = false; VisibleKors = false; VisiblePass = false; Visible2Pass = false; VisibleTel = false; return(true); } else if (Ime.Any(char.IsDigit)) { ImeError = "Ime ne smije sadržavati brojeve!"; VisibleIme = true; VisiblePrezime = false; VisibleAdresa = false; VisibleGrad = false; VisibleKors = false; VisiblePass = false; Visible2Pass = false; VisibleTel = false; return(true); } else if (Prezime == string.Empty) { PrezimeError = "Prezime je obavezno!"; VisibleIme = false; VisiblePrezime = true; VisibleAdresa = false; VisibleGrad = false; VisibleKors = false; VisiblePass = false; Visible2Pass = false; VisibleTel = false; return(true); } else if (Prezime.Length < 4) { PrezimeError = "Prezime mora sadržavati barem 4 karaktera!"; VisibleIme = false; VisiblePrezime = true; VisibleAdresa = false; VisibleGrad = false; VisibleKors = false; VisiblePass = false; Visible2Pass = false; VisibleTel = false; return(true); } else if (Prezime.Any(char.IsDigit)) { PrezimeError = "Prezime ne smije sadržavati brojeve!"; VisibleIme = false; VisiblePrezime = true; VisibleAdresa = false; VisibleGrad = false; VisibleKors = false; VisiblePass = false; Visible2Pass = false; VisibleTel = false; return(true); } else if (Adresa == string.Empty) { AdresaError = "Adresa je obavezna!"; VisibleIme = false; VisiblePrezime = false; VisibleAdresa = true; VisibleGrad = false; VisibleKors = false; VisiblePass = false; Visible2Pass = false; VisibleTel = false; return(true); } else if (Adresa.Length < 10) { AdresaError = "Adresa mora sadržavati barem 10 karaktera!"; VisibleIme = false; VisiblePrezime = false; VisibleAdresa = true; VisibleGrad = false; VisibleKors = false; VisiblePass = false; Visible2Pass = false; VisibleTel = false; return(true); } else if (Grad == null) { GradError = "Grad je obavezan!"; VisibleIme = false; VisiblePrezime = false; VisibleAdresa = false; VisibleGrad = true; VisibleKors = false; VisiblePass = false; Visible2Pass = false; VisibleTel = false; return(true); } else if (KorsIme == string.Empty) { KorsError = "Korisničko ime je obavezno!"; VisibleIme = false; VisiblePrezime = false; VisibleAdresa = false; VisibleGrad = false; VisibleKors = true; VisiblePass = false; Visible2Pass = false; VisibleTel = false; return(true); } else if (KorsIme.Length < 4) { KorsError = "Korisničko ime mora sadržavati barem 4 karaktera!"; VisibleIme = false; VisiblePrezime = false; VisibleAdresa = false; VisibleGrad = false; VisibleKors = true; VisiblePass = false; Visible2Pass = false; VisibleTel = false; return(true); } if (KorsIme.Length >= 4) { var lista = await _klijent.Get <List <Model.Uposlenici> >(null); foreach (var item in lista) { if (KorsIme == item.KorisnickoIme) { KorsError = "Korisničko ime zauzeto, odaberite drugo!"; VisibleIme = false; VisiblePrezime = false; VisibleAdresa = false; VisibleGrad = false; VisibleKors = true; VisiblePass = false; Visible2Pass = false; VisibleTel = false; return(true); } } } if (Lozinka1 == string.Empty) { PassError = "Lozinka je obavezna!"; VisibleIme = false; VisiblePrezime = false; VisibleAdresa = false; VisibleGrad = false; VisibleKors = false; VisiblePass = true; Visible2Pass = false; VisibleTel = false; return(true); } else if (Lozinka1.Length < 6) { PassError = "Lozinka mora sadržavati barem 6 karatera!"; VisibleIme = false; VisiblePrezime = false; VisibleAdresa = false; VisibleGrad = false; VisibleKors = false; VisiblePass = true; Visible2Pass = false; VisibleTel = false; return(true); } else if (Lozinka2 == string.Empty) { Pass1Error = "Potvrda lozinke je obavezna!"; VisibleIme = false; VisiblePrezime = false; VisibleAdresa = false; VisibleGrad = false; VisibleKors = false; VisiblePass = false; Visible2Pass = true; VisibleTel = false; return(true); } if (Telefon == string.Empty) { TelError = "Telefon je obavezan!"; VisibleIme = false; VisiblePrezime = false; VisibleAdresa = false; VisibleGrad = false; VisibleKors = false; VisiblePass = false; Visible2Pass = false; VisibleTel = true; return(true); } else if (Telefon.Any(char.IsLetter)) { TelError = "Telefon ne može sadržavati slova!"; VisibleIme = false; VisiblePrezime = false; VisibleAdresa = false; VisibleGrad = false; VisibleKors = false; VisiblePass = false; Visible2Pass = false; VisibleTel = true; return(true); } else if (Telefon.Length < 9) { TelError = "Telefon mora sadržavati minimalno 9 brojeva!"; VisibleIme = false; VisiblePrezime = false; VisibleAdresa = false; VisibleGrad = false; VisibleKors = false; VisiblePass = false; Visible2Pass = false; VisibleTel = true; return(true); } if (Telefon == string.Empty) { TelError = "Telefon je obavezan!"; VisibleIme = false; VisiblePrezime = false; VisibleAdresa = false; VisibleGrad = false; VisibleKors = false; VisiblePass = false; Visible2Pass = false; VisibleTel = true; return(true); } else if (Telefon.Any(char.IsLetter)) { TelError = "Telefon ne može sadržavati slova!"; VisibleIme = false; VisiblePrezime = false; VisibleAdresa = false; VisibleGrad = false; VisibleKors = false; VisiblePass = false; Visible2Pass = false; VisibleTel = true; return(true); } else if (Telefon.Length < 9) { TelError = "Telefon mora sadržavati minimalno 9 brojeva!"; VisibleIme = false; VisiblePrezime = false; VisibleAdresa = false; VisibleGrad = false; VisibleKors = false; VisiblePass = false; Visible2Pass = false; VisibleTel = true; return(true); } if (KorsIme.Length >= 4) { var lista = await _uposlenik.Get <List <Model.Uposlenici> >(null); foreach (var item in lista) { if (KorsIme == item.KorisnickoIme) { KorsError = "Korisničko ime zauzeto, odaberite drugo!"; VisibleIme = false; VisiblePrezime = false; VisibleAdresa = false; VisibleGrad = false; VisibleKors = true; VisiblePass = false; Visible2Pass = false; VisibleTel = false; return(true); } } } return(false); }
public string Username() { return((Ime.Substring(0, 1) + Prezime).ToLower()); }
private void filter() { if (chack_filter.IsChecked.Equals(true)) { double max, min; double d; if (Max.Equals("")) { max = double.MaxValue; } else if (!(double.TryParse(Max, out d))) { return; } else { max = d; } if (Min.Equals("")) { min = double.MinValue; } else if (!(double.TryParse(Min, out d))) { return; } else { min = d; } List <Res> l = new List <Res>( ); listRes.Clear( ); for (int i = 0; i < MainWindow.Resources.Len( ); i++) { WpfApp3.Res r = MainWindow.Resources.GetResourceAtI(i); String ek = r.eksploatisanje ? "DA" : "NE"; String o = r.obnovljiv ? "DA" : "NE"; String s = r.strateskiVazan ? "DA" : "NE"; Regex match = new Regex(Ime, RegexOptions.IgnoreCase); Match mIme = match.Match(r.ime); match = new Regex(Oznaka, RegexOptions.IgnoreCase); Match mOznaka = match.Match(r.oznaka); String etiketeStr = ""; for (int j = 0; j < r.etikete.Count; j++) { etiketeStr += r.etikete[j].oznaka + " "; } Double cena = double.Parse(r.cena); if ((r.ime.StartsWith(Ime) || Ime.Equals("")) && (r.oznaka.StartsWith(Oznaka) || Oznaka.Equals("")) && (Tip.Equals("") || Tip.Equals(r.tip)) && cena <= max && cena >= min) { l.Add(new Res( ) { Ime = r.ime, Opis = r.opis, Oznaka = r.oznaka, Tip = r.tip, Slika = r.tipImg, Frekvencija = r.frekvencija, Ikonica = r.oznaka, Obnovljiv = o, Eksploatisanje = ek, StrateskiVazan = s, Mera = r.mera, Cena = r.cena, Datum = r.datum, Etikete = etiketeStr }); listRes.Add(new Res( ) { Ime = r.ime, Opis = r.opis, Oznaka = r.oznaka, Tip = r.tip, Slika = r.tipImg, Frekvencija = r.frekvencija, Ikonica = r.oznaka, Obnovljiv = o, Eksploatisanje = ek, StrateskiVazan = s, Mera = r.mera, Cena = r.cena, Datum = r.datum, Etikete = etiketeStr }); } } } }
void ITextReceiver.OnCompositionUpdate(Ime.CompositionData data) { m_compositionData = data; if (m_compositionData.InComposition) { if (m_compositionString == null || m_compositionString.Text != m_compositionData.Text) { m_compositionString = GameApp.Service<TextRenderer>().FormatText(m_compositionData.Text, m_textFormatOptions); } } else { m_compositionString = null; } MakeVisible(); }