Esempio n. 1
0
        public ActionResult AddChannelList()
        {
            if (Session["Userid"] == null)
            {
                return(RedirectToAction("Login", "User"));
            }
            List <Channel> channelList = new List <Channel>();

            List <MarkerChannel> markerList    = new List <MarkerChannel>();
            MarkerChannel        markerChannel = new MarkerChannel();
            Channel ch = new Channel();

            ch.ChannelName        = Request.Form["Name"];
            ch.ChannelDescription = Request.Form["Description"];
            ch.CreationDate       = DateTime.Today;
            ch.Status             = false;
            ch.UserId             = Convert.ToInt32(Session["Userid"]);



            //rest are undone

            /*int len = Convert.ToInt16(Request.Form["len"]);
             * for (int i = 0; i < len; i++)
             * {
             *  markerChannel = new MarkerChannel();
             *  markerChannel.MarkerName = Request.Form["name[" + i + "]"];
             *  markerChannel.Lat = Convert.ToDouble(Request.Form["lat[" + i + "]"]);
             *  markerChannel.Longi = Convert.ToDouble(Request.Form["lng[" + i + "]"]);
             *  markerChannel.UserId = Convert.ToInt32(Session["Userid"]);
             *  markerList.Add(markerChannel);
             * }*/
            //return View(markerList);

            channelService.AddChannel(ch);
            channelList = channelService.GetAllChannel();

            return(RedirectToAction("MyChannel", "User", channelList));

            //return View();
        }
Esempio n. 2
0
        public string GenerateMarkerName(MarkerChannel channel)
        {
            Int32 timeStamp = (Int32)(DateTime.UtcNow.Subtract(new DateTime(2020, 08, 01))).TotalSeconds;

            return($"_USER_DEFINED #{playerDirectPlayID}/TC_{timeStamp}/{(int) channel}");
        }
Esempio n. 3
0
        public void SetForegroundChannel(MarkerChannel markerChannel)
        {
            foregroundChannel = markerChannel;

            UpdateForegroundChannelTransparency();
        }