Exemplo n.º 1
0
        private void Info(InfoMsg msg)
        {
            if (msgTime != null)
            {
                StopCoroutine(msgTime);
            }

            objText.SetActive(true);
            txtInfo.text = msg.msg;
            msgTime      = StartCoroutine(InfoClose());
        }
Exemplo n.º 2
0
        /// <summary>
        /// called when new notification round -> calls core / adds to db
        /// </summary>
        /// <param name="msg"></param>
        public new static void CallBack(ROSBridgeMsg msg)
        {
            Debug.Log("Found INFO Msg.");
            InfoMsg info      = (InfoMsg)msg;
            float   timeframe = info.GetTimeFrame();

            if (timeframe == 0) // if valid time frame
            {
                return;
            }
            if (Enum.IsDefined(typeof(DummyStates.State), info.GetCode())) // if valid error code
            {
                Notification note = VRUILogic.Instance.AddNewNotification(DummyStates.MessageType.INFO, (DummyStates.State)info.GetCode(),
                                                                          info.GetObject(), timeframe);
                note.AddAdditionalContent(info.GetExtra());
            }
        }
Exemplo n.º 3
0
        void updateNewAuditHistRow(DateTime auditTimeID, string mode)
        {
            using (var db = new A0DbContext())
            {
                var ah = db.AuditHists.FirstOrDefault(r => r.AuditTimeID == auditTimeID) ?? db.AuditHists.Local.FirstOrDefault(r => r.AuditTimeID == auditTimeID);
                if (ah == null)
                {
                    return;
                }

                ah.TotalAdded   = _TotalAdded;
                ah.TotalHashed  = _TotalHashed;
                ah.FoundRenamed = _TotalRenamed;

                InfoMsg += $"\r\n FINAL:  Found {_ah.TotalFound:N0},  Added {_TotalAdded:N0},  Hashed {_TotalHashed:N0},  Moved {_TotalRenamed:N0},  Updated {_TotalUpdated:N0},  Deleted {_TotalDeleted:N0} ({_TtlBytesDeleted / (1024 * 1024):N0} mb)";

                ah.Note = $"{mode}: {InfoMsg.Substring(8)} \r\n";

                SaveRpt += Environment.NewLine + db.TrySaveReport("r/s saved");
            }
        }
Exemplo n.º 4
0
 public ActionResult Contact(ContantViewModel contactModel)
 {
     //Todo Send Email message, add to DB message
     if (ModelState.IsValid)
     {
         using (portfolioEntities port = new portfolioEntities())
         {
             var msg = new InfoMsg()
             {
                 email   = contactModel.Email,
                 name    = contactModel.Name,
                 text    = contactModel.Messege,
                 phone   = contactModel.MobileNumber,
                 subject = contactModel.Subject,
             };
             repository.AddMessage(msg);
         }
         //for testing busy idicator
         //Thread.Sleep(2000);
         return(PartialView("~/Views/Partials/Partial_Success.cshtml", "Your message success sends!!"));
     }
     return(PartialView("~/Views/Partials/Partial_Error.cshtml", "Something Wrong!"));
 }
Exemplo n.º 5
0
        public Buttons1()
        {
            InitializeComponent();

            _infoMsg = MainPage.IMsg;
        }
Exemplo n.º 6
0
 public void AddMessage(InfoMsg msg)
 {
     context.InfoMsg.Add(msg);
     context.SaveChanges();
 }