private void button_Click(object sender, RoutedEventArgs e)
        {
            button.IsEnabled             = false;
            buttonProgressBar.Visibility = System.Windows.Visibility.Visible;

            string    url = server.address + "/api/account/setdata";
            EditInput input;

            if (newPasswordBox.Password == repNewPasswordBox.Password)
            {
                if (newPasswordBox.Password == "")
                {
                    input = new EditInput(server.login, server.sid, nameBox.Text, mailBox.Text, null);
                }
                else
                {
                    input = new EditInput(server.login, server.sid, nameBox.Text, mailBox.Text, newPasswordBox.Password);
                }

                new HttpPostRequest <EditInput, EditOutput>(url, editCallback, input);
            }
            else
            {
                MessageBox.Show("These passwords are different.");
                newPasswordBox.Password = repNewPasswordBox.Password = "";
                button.IsEnabled        = true;
            }
        }
Exemplo n.º 2
0
        public void Edit(EditInput input)
        {
            var accessory = _accessoryRepository.Get(input.Id);

            accessory.Number = input.Number;
            accessory.Unit   = input.Unit;
            accessory.Name   = input.Name;
            accessory.Model  = input.Model;
        }
Exemplo n.º 3
0
        public override Empty Edit(EditInput input)
        {
            var setInfo = State.NovelSetInfos[input.SetId];

            if (setInfo == null)
            {
                throw new AssertionException($"Set with Id {input.SetId} not found.");
            }

            var novelInfo = State.NovelInfos[input.NovelId];

            novelInfo.Text                  = input.Text;
            novelInfo.NovelTextHash         = input.NovelTestHash;
            novelInfo.LatestEditTime        = Context.CurrentBlockTime;
            State.NovelInfos[input.NovelId] = novelInfo;

            return(new Empty());
        }
Exemplo n.º 4
0
        public override void OnSetAction()
        {
            if (defaultText == null)
            {
                text                = Text.Construct();
                text.TextString     = StringTable.GetString("Text.Default");
                text.LineDirection  = base.ActiveDrawingPlane.DirectionX;
                text.GlyphDirection = base.ActiveDrawingPlane.DirectionY;
                text.TextSize       = ConstrDefaults.DefaultTextSize;
                text.Font           = "Arial";
            }
            else
            {
                text = defaultText.Clone() as Text;
            }
            text.LineAlignment = Text.LineAlignMode.Center;
            text.Location      = ConstrDefaults.DefaultStartPoint;
            Plane pl = new Plane(text.Location, text.LineDirection, text.GlyphDirection);

            textDir2D = pl.Project(text.GlyphDirection);
            textLen   = text.LineDirection.Length;

            base.ActiveObject = text;

            gPoint = ActionFeedBack.FeedbackPoint(base.Frame);
            base.FeedBack.Add(gPoint);

            base.TitleId = "Constr.Text.2Points";

            startPointInput = new GeoPointInput("Text.StartPoint");
            startPointInput.DefaultGeoPoint   = ConstrDefaults.DefaultStartPoint;
            startPointInput.DefinesBasePoint  = true;
            startPointInput.SetGeoPointEvent += new ConstructAction.GeoPointInput.SetGeoPointDelegate(StartPoint);

            secondPointInput = new GeoPointInput("Text.SecondPoint");
            secondPointInput.SetGeoPointEvent += new ConstructAction.GeoPointInput.SetGeoPointDelegate(SecondPoint);

            EditInput editInput = new EditInput(text);

            base.SetInput(startPointInput, secondPointInput, editInput);
            base.ShowAttributes = true;

            base.OnSetAction();
        }
Exemplo n.º 5
0
        public override void OnSetAction()
        {
            if (defaultText == null)
            {
                text                = Text.Construct();
                text.TextString     = StringTable.GetString("Text.Default");
                text.LineDirection  = base.ActiveDrawingPlane.DirectionX;
                text.GlyphDirection = base.ActiveDrawingPlane.DirectionY;
                text.TextSize       = ConstrDefaults.DefaultTextSize;
                text.Font           = "Arial";
            }
            else
            {
                text = defaultText.Clone() as Text;
            }
            if (!Precision.IsPerpendicular(ActiveDrawingPlane.Normal, text.LineDirection, false) || !Precision.IsPerpendicular(ActiveDrawingPlane.Normal, text.GlyphDirection, false))
            {   // die DrawingPlane wurde seit dem letzten Text geändert
                text.LineDirection  = base.ActiveDrawingPlane.DirectionX;
                text.GlyphDirection = base.ActiveDrawingPlane.DirectionY;
            }

            base.ActiveObject = text;

            base.TitleId = "Constr.Text.1Point";

            GeoPointInput startPointInput = new GeoPointInput("Text.StartPoint");

            startPointInput.DefaultGeoPoint   = ConstrDefaults.DefaultStartPoint;
            startPointInput.DefinesBasePoint  = true;
            startPointInput.SetGeoPointEvent += new ConstructAction.GeoPointInput.SetGeoPointDelegate(StartPoint);

            EditInput editInput = new EditInput(text);

            base.SetInput(startPointInput, editInput);
            base.ShowAttributes = true;

            base.OnSetAction();
        }
Exemplo n.º 6
0
 public TaskItemEditVM()
 {
     Input = new EditInput();
 }
Exemplo n.º 7
0
 public MemberNoteEditVM()
 {
     Input = new EditInput();
 }
Exemplo n.º 8
0
        public void Edit(EditInput input)
        {
            var product = _faultRepository.Get(input.Id);

            product.Name = input.Name;
        }
Exemplo n.º 9
0
 public CorpEditVM()
 {
     Input = new EditInput();
 }
Exemplo n.º 10
0
 public UserEditVM()
 {
     Input = new EditInput();
 }
Exemplo n.º 11
0
 public DeptEditVM()
 {
     Input = new EditInput();
 }