Example #1
0
 public MessageFixture()
 {
     c  = new Commit();
     nv = new NewView();
     p  = new Prepare();
     pp = new PrePrepare();
     vc = new ViewChange();
 }
        /// <summary cref="IValueVisitor.Visit(NewView)"/>
        public void Visit(NewView value)
        {
            var pointer = LoadPrimitive(value.Pointer);
            var length  = LoadPrimitive(value.Length);

            var viewValue = new ViewImplementationRegister(
                value.Type as ViewType,
                pointer,
                length);

            Bind(value, viewValue);
        }
Example #3
0
        /// <summary cref="IValueVisitor.Visit(NewView)"/>
        public void Visit(NewView value)
        {
            var pointer = LoadAs <PointerVariable>(value.Pointer);
            var length  = LoadAs <PrimitiveVariable>(value.Length);

            var viewValue = new ViewVariable(
                value.Type as ViewType,
                pointer,
                length);

            Bind(value, viewValue);
        }
Example #4
0
        /// <summary>
        /// Lowers set field operations into separate SSA values.
        /// </summary>
        private static void Lower(
            RewriterContext context,
            TypeLowering <ViewType> _,
            NewView value)
        {
            var viewInstance = context.Builder.CreateDynamicStructure(
                value.Location,
                value.Pointer,
                value.Length);

            context.ReplaceAndRemove(value, viewInstance);
        }
Example #5
0
 private void vIewToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (Usermanager.Connection.CurrentUser.Database != null)
     {
         var form = new NewView(tool, Usermanager);
         form.Show();
     }
     else
     {
         MessageBox.Show("You must Login to a Database", "Error!", MessageBoxButtons.OK,
                         MessageBoxIcon.Error);
     }
 }
Example #6
0
        /// <summary>
        /// Converts a new view into an SSA value.
        /// </summary>
        private static void Convert <TConstructionData>(
            SSARewriterContext <Value> context,
            TConstructionData data,
            NewView newView)
            where TConstructionData : IConstructionData
        {
            if (!data.TryGetConverted(newView.Pointer, out var newViewRef))
            {
                return;
            }

            data.AddConverted(newView, newViewRef);
            context.Remove(newView);
        }
        /// <summary cref="IValueVisitor.Visit(NewView)"/>
        public void Visit(NewView value)
        {
            var target  = AllocateView(value);
            var pointer = LoadAs <PointerVariable>(value.Pointer);
            var length  = LoadAs <PrimitiveVariable>(value.Length);

            // Declare view
            Declare(target);

            // Assign pointer
            using (var statement = BeginStatement(target, target.PointerFieldIndex))
                statement.Append(pointer);

            // Assign length
            using (var statement = BeginStatement(target, target.LengthFieldIndex))
                statement.Append(length);
        }
Example #8
0
    static void BuildMapViews()
    {
        GameObject NewView;
        int        ViewCount = 0;

        foreach (MapView View in MapViews)
        {
            NewView = GameObject.CreatePrimitive(PrimitiveType.Cube);

            NewView.name                    = MapName + "_View_" + ViewCount;
            NewView.transform.parent        = MapContainer.transform;
            NewView.transform.localPosition = new Vector3(X + View.XStart + (View.XEnd / 2), Y + View.YStart + (View.YEnd / 2), 0);
            NewView.transform.localScale    = new Vector3(View.XEnd, View.YEnd, 20);

            NewView.AddComponent <MapViewController>();
            ViewCount++;
        }
    }
        // [ValidateAntiForgeryToken]
        public ActionResult Index(NewView newView)
        {
            string message = "";
            bool   status  = false;

            if (!ModelState.IsValid)
            {
                return(View());
            }

            using (UserDBEntities db = new UserDBEntities())

            {
                var s = db.Uses.Where(a => a.Username == newView.UserName).FirstOrDefault();
                if (s != null)
                {
                    if (newView.UserName.Trim() == "Admin")
                    {
                        message         = "User login Success";
                        status          = true;
                        ViewBag.Message = message;
                        ViewBag.Status  = status;
                        return(RedirectToAction("LogAndReg"));
                    }
                    else
                    {
                        message             = "Admin login Success";
                        status              = true;
                        ViewBag.Message     = message;
                        ViewBag.status      = status;
                        Session["UserName"] = newView.UserName.Trim();
                        return(RedirectToAction("ViewDatas"));
                    }
                }
                else
                {
                    message         = "You are not a Valid user please signup";
                    status          = false;
                    ViewBag.Message = message;
                    ViewBag.status  = status;
                    return(View());
                }
            }
        }
Example #10
0
 public void Visit(NewView value)
 {
 }
Example #11
0
 /// <summary cref="IValueVisitor.Visit(NewView)"/>
 public void Visit(NewView value) =>
 throw new InvalidCodeGenerationException();
Example #12
0
    public static void OpenWindow()
    {
        NewView view = new NewView();

        view.Show();
    }