当前位置: 首页>>代码示例>>C#>>正文


C# Utils类代码示例

本文整理汇总了C#中Utils的典型用法代码示例。如果您正苦于以下问题:C# Utils类的具体用法?C# Utils怎么用?C# Utils使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Utils类属于命名空间,在下文中一共展示了Utils类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: frmTermoNovo

 public frmTermoNovo(Usuario user, String terId)
 {
     InitializeComponent();
     ter = new Termo();
     util = new Utils();
     this.user = user;
     lblUserOn.Text = user.Login;
     alu = new Aluno();
     if (terId != "") //atualizar
     {
         lblUltimaAlter.Visible = true;
         lblUltimaAlter1.Visible = true;
         ter.TerId = terId;
         ter = ter.getTermoById();
         userTermo = new Usuario();
         userTermo.Id = Convert.ToInt32(ter.TerQuemCadastrou);
         userTermo = userTermo.getUserById();
         lblUltimaAlter.Text = userTermo.Login;
         btnSelecionar.Visible = false;
         alu.TerId = terId;
         ttbAluno.Text = alu.getAlunoByTermo();
         pictureBox1.ImageLocation = fotoPath + "" + ter.TerId + ".jpg";
     }
     else
     {
         lblUltimaAlter.Visible = false;
         lblUltimaAlter1.Visible = false;
     }
 }
开发者ID:4nub1s,项目名称:infoGym,代码行数:29,代码来源:frmTermoNovo.cs

示例2: SetContent

        public void SetContent(Utils.PatientNote[] patientNotesArray, int aTotalNrofVisits, int aNrofFreecards, int aNrofPatientPays, int aNrofYouths)
        {
            StringBuilder s = new StringBuilder();
            StringBuilder footer = new StringBuilder();

            footer.Append("\n\nTotalt antal besök: " + aTotalNrofVisits);
            footer.Append("\nAntal frikkortsbesök: " + aNrofFreecards);
            footer.Append("\nAntal besök där patienten betlat själv: " + aNrofPatientPays);
            footer.Append("\nAntal besök barn och ungdom: " + aNrofYouths);

            foreach(Utils.PatientNote patientNote in patientNotesArray)
            {
                Charge tmpCharge = patientNote.charge;
                Note tmpNote = patientNote.note;
                Patient tmpPatient = patientNote.patient;

                s.Append("\n" + tmpNote.VisitDateTime.ToShortDateString());
                s.Append("\t" + tmpPatient.Surname + " " + tmpPatient.Firstname);
                s.Append("\t" + tmpPatient.Personnumber);
                s.Append("\t" + tmpNote.PatientFee + " kr");
                s.Append("\t" + tmpCharge.PrimulaCharachter);

                //TODO: Make sure that if one row is longer than the width of the page, cut some chars from the name
            }

            contentString = s.ToString();
            contentFooter = footer.ToString();
        }
开发者ID:andersruberg,项目名称:RehabLight,代码行数:28,代码来源:PrintPrimula.cs

示例3: BinaryTreeLexMethod

  public static int    curLine, curCol;     // position of curCh


  public static void BinaryTreeLexMethod(Utils.ModuleAction action, out String moduleName) {
  //-----------------------------------|----------------------------------------
    moduleName = MODULENAME;
    switch (action) {
      case Utils.ModuleAction.getModuleName:
        return;
      case Utils.ModuleAction.initModule:
        caseSensitive = true;
        lt            = new LexicalTable();
        tokenStrArr   = new char[256];
        kwHt          = CreateHashtable();
        nHt           = CreateHashtable();
        nl            = new ArrayList();
        break;
      case Utils.ModuleAction.resetModule:
        kwHt.Clear();
        nHt.Clear();
        nl.Clear();
        break;
      case Utils.ModuleAction.cleanupModule:
        lt            = null;
        tokenStrArr   = null;
        kwHt          = null;
        nHt           = null;
        nl            = null;
        break;
    } // switch
  } // BinaryTreeLexMethod
开发者ID:adinauer,项目名称:fh_hagenberg,代码行数:31,代码来源:BinaryTreeLex.cs

示例4: frmDespesaNova

 public frmDespesaNova(Usuario user, String despId)
 {
     InitializeComponent();
     this.user = user;
     desp = new Despesa();
     util = new Utils();
     util.moneyMaskFormata(ttbValorPgmto);
     util.moneyMaskFormata(ttbValor);
     if (despId != "")
     {
         this.Text = "Alterar Despesa";
         desp.Id = despId;
         desp = desp.getById();
         ttbDesc.Text = desp.Desc;
         ttbValor.Text = desp.Valor;
         if (desp.DtPgmto != "")
         {
             rbPaga.Checked = true;
             gpbPagamento.Enabled = true;
             ttbValorPgmto.Text = desp.ValorPg;
             dtpPagamento.Value = DateTime.Parse(desp.DtPgmto);
         }
         else
             rbApagar.Checked = true;
         dtpVcmto.Value = DateTime.Parse(desp.DtVcmto);
     }
     else
         rbApagar.Checked = true;
     util.setCamposObrigatorios(Controls);
 }
开发者ID:4nub1s,项目名称:infoGym,代码行数:30,代码来源:frmDespesaNova.cs

示例5: SignRequst

 public static string SignRequst(HttpWebRequest request, Utils.RequestHeadType type, string bucket, string key)
 {
     string Authorization = string.Empty;
     string StringToSign = string.Empty;
     switch (type) {
     case Utils.RequestHeadType.HEAD_FIELD_CHECK:
         Authorization += "UCloud ";
         Authorization += Config.UCLOUD_PUBLIC_KEY;
         Authorization += ":";
         StringToSign = request.Method + "\n" + request.Headers.Get ("Content-MD5") + "\n";
         StringToSign += request.ContentType;
         StringToSign += "\n";
         /*
         StringToSign += DateTime.Now.ToString ();
         */
         StringToSign += "\n";
         StringToSign += CanonicalizedUCloudHeaders (request.Headers);
         StringToSign += CanonicalizedResource (bucket, key);
             break;
         default:
             break;
     }
     HMACSHA1 hmac = new HMACSHA1 (Encoding.ASCII.GetBytes (Config.UCLOUD_PRIVATE_KEY));
     Byte[] hashValue = hmac.ComputeHash(Encoding.UTF8.GetBytes(StringToSign));
     string Signature = Convert.ToBase64String (hashValue);
     return Authorization + Signature;
 }
开发者ID:hsiun,项目名称:yoyo,代码行数:27,代码来源:Digest.cs

示例6: buttonOk_Click

 /// <summary>
 /// Ao clicar no botão ok mando a informação para o form stoploss
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void buttonOk_Click(object sender, EventArgs e)
 {
     Int64 hand = new Utils().stringtoInt64(textBoxStopHand.Text);
     Double loss = new Utils().stringtoDouble(textBoxStopLoss.Text);
     Int32 time = new Utils().stringtoInt32(textBoxStopTime.Text);
     Double win = new Utils().stringtoDouble(textBoxStopWin.Text);
     Double losspeak = new Utils().stringtoDouble(textBoxStopLossPeak.Text);
     Double peakover = new Utils().stringtoDouble(textBoxPeakOver.Text);
     Double wininter = new Utils().stringtoDouble(textBoxStopWinIntermediate.Text);
     Double lossinter = new Utils().stringtoDouble(textBoxStopLossIntermediate.Text);
     Boolean continu = true;
     if (wininter >= win && wininter != 0)
     {
         labelAlertIntermediate.Text = "Stopwin intermediate don't superior at stopwin final";
         continu = false;
     }
     if (lossinter >= loss && lossinter != 0 && continu)
     {
         labelAlertIntermediate.Text = "StopLoss intermediate don't superior at stopLoss final";
         continu = false;
     }
     if(continu)
     {
         sl.setNewValue(hand, loss, time, win, losspeak, peakover, checkBoxHideBbbs.Checked, wininter, lossinter);
         this.Close();
     }
 }
开发者ID:ricain59,项目名称:fortaff,代码行数:32,代码来源:FormSet.cs

示例7: frmErga_Single

 public frmErga_Single(long fldProjectID, long fldParentProjectID, Utils.enums.formState inState)
 {
     InitializeComponent();
     _fldProjectID = fldProjectID;
     _fldParentProjectID = fldParentProjectID;
     fState = inState;
 }
开发者ID:htsavdaris,项目名称:eProtocol,代码行数:7,代码来源:frmErga_Single.cs

示例8: BuildGrammar

        public void BuildGrammar()
        {
            var utils = new Utils();

            var builder = new Builder();

            var text = GetDef<Core.GrammarDef.Parser>();

            Core.GrammarDef.Parser parser = new Core.GrammarDef.Parser();

            Node<Core.GrammarDef.NodeType> root = parser.Parse(text);

            builder.PreProcess(root);

            File.WriteAllText(@"C:\temp\node.txt", utils.NodeToString(root));

            Grammar grammar = builder.BuildGrammar(root);

            var actual = utils.GrammarToDefString(grammar);

            Assert.That(actual, Is.EqualTo(text));

            File.WriteAllText(@"C:\temp\parser.cs", builder.BuildParser2(grammar));

            //var parser2 = builder.CreateParser(grammar);
            //
            //var root2 = parser2.GetType().GetMethod("Parse").Invoke(parser2, new object[] { text });
        }
开发者ID:danthomas,项目名称:Parsing,代码行数:28,代码来源:BuilderTests.cs

示例9: Game_OnGameLoad

        public static void Game_OnGameLoad()
        {
            if (Player.ChampionName != ChampionName)
                return;

            Spells.Initiate();

            Config = MainMenu.AddMenu(string.Format("xQx | {0}", ChampionName), ChampionName);

            PlayerSpells.Initialize();

            DamageCalc = new DamageCalc();
            Utils = new Utils();
            Menu = new Menu();
            Items = new Items();

            Draws = new Draws();
            Combo = new Combo();
            Harass = new Harass();
            LaneClear = new LaneClear();
            JungleClear = new JungleClear();
            OnUpdate = new OnUpdate();
            LogicW.Initiate();

            Config.Add("GameMode", new ComboBox("Game Mode:", 0, "AP", "AD", "Hybrid", "Tanky"));

            Chat.Print(
                "Mordekasier</font> <font color='#ff3232'> How to Train Your Dragon </font> <font color='#FFFFFF'>Loaded!</font>");
        }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:29,代码来源:Program.cs

示例10:

 void IPersistNode.SetState(object state, Utils.Logger logger)
 {
     if (state is DynamicConfigObject)
     {
         _config = (DynamicConfigObject)state;
     }
 }
开发者ID:michyer,项目名称:canape,代码行数:7,代码来源:BaseDynamicPipelineNode.cs

示例11: agregar

        public double[,] agregar(List<KRankPonderado> listaKRanking)
        {
            Utils utils= new Utils();

            normalizarPesos(listaKRanking);

            int dimension = listaKRanking[1].KRanking.GetLength(0);

            double[,] rankAgregado = new double[dimension, 1];

               // utils.Cerar(rankAgregado, dimension);

            foreach (var kRankPonderado in listaKRanking)
            {

                for (int i = 0; i < dimension; i++)
                {

                        rankAgregado[i, 0] += kRankPonderado.KRanking[i, 0]*kRankPonderado.PesoPonderado;

                }

            }
            return rankAgregado;
        }
开发者ID:mrno,项目名称:AHP,代码行数:25,代码来源:AgregacionPonderada.cs

示例12: ActionParameters_MethodCall

 public void ActionParameters_MethodCall()
 {
     Expression<Action<string>> a = s => s.Replace("a", GetString());
     IDictionary d = new Utils().GetActionParameters(a);
     Assert.AreEqual("a", d["oldValue"]);
     Assert.AreEqual("something", d["newValue"]);
 }
开发者ID:ruanzx,项目名称:mausch,代码行数:7,代码来源:UtilsTests.cs

示例13: ErrorsMethod

 public static void ErrorsMethod(Utils.ModuleAction action, out String moduleName) {
   //-----------------------------------|----------------------------------------
   moduleName = MODULENAME;
   switch (action) {
     case Utils.ModuleAction.getModuleName:
       return;
     case Utils.ModuleAction.initModule:
       aps = new AbortMethod[MAXABORTPROCS];
       sp = 0;
       PushAbortMethod(DefaultAbort);
       stopParsing = null;
       eowCnt = new int[4];
       curEoW = new ErrorWarn[4];
       break;
     case Utils.ModuleAction.resetModule:
       break;
     case Utils.ModuleAction.cleanupModule:
       eowl = null;
       eowCnt = null;
       curEoW = null;
       return;
   } // switch
   // --- for initModule and resetModule ---
   eowl = null;
   numOfErrs = 0;
   numOfWarns = 0;
   for (int i = 0; i < 4; i++)
     eowCnt[i] = 0;
 } // ErrorsMethod
开发者ID:adinauer,项目名称:fh_hagenberg,代码行数:29,代码来源:Errors.cs

示例14: MakeXMLSAT

 public MakeXMLSAT(DadosSAT _dtSAT, Utils.ConfigureXml _config)
 {
     config = _config;
     dtSAT = _dtSAT;
     
     processXml();
 }
开发者ID:rnmoge,项目名称:nfce-Sat,代码行数:7,代码来源:MakeXMLSAT.cs

示例15: Run

 public override void Run(DataAdapters.IDataAdapter adapter, Utils.Logger logger)
 {
     while (adapter.Read() != null)
     {
         // Do not alot
     }
 }
开发者ID:michyer,项目名称:canape,代码行数:7,代码来源:NullDataEndpoint.cs


注:本文中的Utils类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。