Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ABOUT aBOUT = db.ABOUTs.Find(id);

            db.ABOUTs.Remove(aBOUT);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 public ActionResult Edit(ABOUT About, int id)
 {
     if (aboutModels.Edit(id, About) > 0)
     {
         Session["mes"] = "Sửa thành công";
     }
     else
     {
         Session["mes_er"] = "Sửa thất bại";
     }
     return(Redirect(Request.UrlReferrer.ToString()));
 }
Exemple #3
0
        // GET: ABOUTs/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ABOUT aBOUT = db.ABOUTs.Find(id);

            if (aBOUT == null)
            {
                return(HttpNotFound());
            }
            return(View(aBOUT));
        }
Exemple #4
0
        public ActionResult editabout(ABOUT model)
        {
            ABOUT pro = db.ABOUTs.Find(model.ID);

            pro.Title      = model.Title;
            pro.CEO        = model.CEO;
            pro.About_us   = model.About_us;
            pro.Our_Team   = model.Our_Team;
            pro.Decription = model.Decription;

            db.Entry(pro).State = System.Data.Entity.EntityState.Modified;
            db.SaveChanges();
            return(RedirectToAction("About"));
        }
Exemple #5
0
        /// <summary>
        ///     Implements the OnDisconnection method of the IDTExtensibility2 interface.
        ///     Receives notification that the Add-in is being unloaded.
        /// </summary>
        /// <param term='disconnectMode'>
        ///      Describes how the Add-in is being unloaded.
        /// </param>
        /// <param term='custom'>
        ///      Array of parameters that are host application specific.
        /// </param>
        /// <seealso class='IDTExtensibility2' />
        public void OnDisconnection(Extensibility.ext_DisconnectMode disconnectMode, ref System.Array custom)
        {
            addInInstance = null;
            PLACES.Destroy();
            MAPS.Destroy();
            PROJECTS.Destroy();
            ABOUT.Destroy();
            DocumentStorage.Destroy();
            MMUtils.MindManager = null;
            m_myTab.Delete();
            m_myTab = null;

            System.GC.Collect();
        }
Exemple #6
0
 internal int Edit(int id, ABOUT About)
 {
     using (DbContextTransaction transaction = db.Database.BeginTransaction())
     {
         try
         {
             ABOUT AboutE = db.ABOUTS.Find(id);
             AboutE.CONTENTS        = About.CONTENTS;
             db.Entry(AboutE).State = EntityState.Modified;
             transaction.Commit();
             return(db.SaveChanges());
         }
         catch
         {
             transaction.Rollback();
             return(0);
         }
     }
 }
Exemple #7
0
        public ActionResult Edit()
        {
            // Show message
            if (Session["mes"] != null)
            {
                ViewBag.message = Session["mes"];
                Session.Remove("mes");
            }
            if (Session["mes_er"] != null)
            {
                ViewBag.message_er = Session["mes_er"];
                Session.Remove("mes_er");
            }

            ABOUT About = aboutModels.GetItem();

            ViewBag.Active = "manager";
            return(View(About));
        }
Exemple #8
0
 public int Add(ABOUT About)
 {
     db.ABOUTS.Add(About);
     return(db.SaveChanges());
 }
Exemple #9
0
 public ActionResult Edit([Bind(Include = "aboutID,about1")] ABOUT aBOUT)
 {
     db.Entry(aBOUT).State = EntityState.Modified;
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }
Exemple #10
0
 public ActionResult Create([Bind(Include = "aboutID,about1")] ABOUT aBOUT)
 {
     db.ABOUTs.Add(aBOUT);
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }
Exemple #11
0
        public ActionResult editabout(int id)
        {
            ABOUT edit = db.ABOUTs.Find(id);

            return(View(edit));
        }
        public MainPage()
        {
            this.InitializeComponent();

            sourcesize = Window.Current.CoreWindow.Bounds;

            GlobalNodeHandler.standardtextFormat = new CanvasTextFormat();

            MyFontPicker = new List <FontClass>();
            MyFontPicker.Add(new FontClass()
            {
                MyFontFamily = new FontFamily("Arial"), FontFamilyValue = "Arial"
            });
            MyFontPicker.Add(new FontClass()
            {
                MyFontFamily = new FontFamily("Times New Roman"), FontFamilyValue = "Times New Roman"
            });
            MyFontPicker.Add(new FontClass()
            {
                MyFontFamily = new FontFamily("Verdana"), FontFamilyValue = "Verdana"
            });
            MyFontPicker.Add(new FontClass()
            {
                MyFontFamily = new FontFamily("Calibri"), FontFamilyValue = "Calibri"
            });
            MyFontPicker.Add(new FontClass()
            {
                MyFontFamily = new FontFamily("Rockwell"), FontFamilyValue = "Rockwell"
            });
            MyFontPicker.Add(new FontClass()
            {
                MyFontFamily = new FontFamily("Twentieth Century"), FontFamilyValue = "Twentieth Century"
            });
            MyFontPicker.Add(new FontClass()
            {
                MyFontFamily = new FontFamily("Helvetica"), FontFamilyValue = "Helvetica"
            });
            MyFontPicker.Add(new FontClass()
            {
                MyFontFamily = new FontFamily("Trajan"), FontFamilyValue = "Trajan"
            });
            MyFontPicker.Add(new FontClass()
            {
                MyFontFamily = new FontFamily("Optima Std"), FontFamilyValue = "Optima Std"
            });
            MyFontPicker.Add(new FontClass()
            {
                MyFontFamily = new FontFamily("Franklin Gothic"), FontFamilyValue = "Franklin Gothic"
            });
            MyFontPicker.Add(new FontClass()
            {
                MyFontFamily = new FontFamily("Futura"), FontFamilyValue = "Futura"
            });
            MyFontPicker.Add(new FontClass()
            {
                MyFontFamily = new FontFamily("Bickham Script"), FontFamilyValue = "Bickham Script"
            });
            MyFontPicker.Add(new FontClass()
            {
                MyFontFamily = new FontFamily("Gill Sans"), FontFamilyValue = "Gill Sans"
            });
            MyFontPicker.Add(new FontClass()
            {
                MyFontFamily = new FontFamily("Sans Serif"), FontFamilyValue = "Sans Serif"
            });
            MyFontPicker.Add(new FontClass()
            {
                MyFontFamily = new FontFamily("Gotham"), FontFamilyValue = "Gotham"
            });
            FontStyleBox.ItemsSource = MyFontPicker;


            MyFontSizePicker = new List <int>();
            for (int i = 6; i < 45; i++)
            {
                MyFontSizePicker.Add(i);
            }
            FontSizeBox.ItemsSource = MyFontSizePicker;

            GlobalNodeHandler.standardtextFormat.FontSize   = 18;
            GlobalNodeHandler.standardtextFormat.FontStyle  = FontStyle.Normal;
            GlobalNodeHandler.standardtextFormat.FontFamily = new FontFamily("Arial").Source;
            FontSizeBox.SelectedItem   = 18;
            FontStyleBox.SelectedIndex = 0;

            GlobalNodeHandler.pick1 = new ColorPicker(5, 5, new Rect(1920 - 200, 50, 200, 260));

            AttributePanel.Margin = new Thickness(0, 260, refwidth - sourcesize.Width, 0);
            UseModePanel.Margin   = new Thickness(0, 0, refwidth - sourcesize.Width, 0);

            //AttributePanel.Margin = new Thickness(0, 260, refwidth - sourcesize.Width, 0);
            GlobalNodeHandler.pick1.boundingbox.X = refwidth - (refwidth - sourcesize.Width) - GlobalNodeHandler.pick1.boundingbox.Width;
            repaint(this, new EventArgs());

            /*var picker = new Windows.Storage.Pickers.FileOpenPicker();
             * picker.ViewMode = Windows.Storage.Pickers.PickerViewMode.Thumbnail;
             * picker.SuggestedStartLocation =
             *  Windows.Storage.Pickers.PickerLocationId.PicturesLibrary;
             * picker.FileTypeFilter.Add(".jpg");
             * picker.FileTypeFilter.Add(".jpeg");
             * picker.FileTypeFilter.Add(".png");
             *
             * Windows.Storage.StorageFile file = await picker.PickSingleFileAsync();
             * if (file != null)
             * {
             *  // Application now has read/write access to the picked file
             *  this.textBlock.Text = "Picked photo: " + file.Name;
             * }
             * else
             * {
             *  this.textBlock.Text = "Operation cancelled.";
             * }*/

            GlobalNodeHandler.masterNode = new MindNode(GlobalNodeHandler.id, 0, 0, 0, 0, false);
            GlobalNodeHandler.id++;
            GlobalNodeHandler.masterNode.text = "masterNode";

            GlobalNodeHandler.viewNode = GlobalNodeHandler.masterNode;

            Application.Current.DebugSettings.EnableFrameRateCounter = false;

            activetext.KeyDown   += new KeyEventHandler(activeTextfield_KeyDown);
            activetext.Visibility = Visibility.Collapsed;

            DispatcherTimer timer1 = new DispatcherTimer();

            timer1.Interval = new TimeSpan(1000 / 8);
            timer1.Start();
            timer1.Tick += this.timer1_Tick;


            mouse            = new MouseHandler(activetext);
            mouse.repainted += this.repaint;

            keymanager            = new KeyHandler(activetext);
            keymanager.repainted += this.repaint;

            btnMngr = new ButtonManager();

            viewPane.PointerPressed  += this.viewPane_MouseDown;
            viewPane.PointerReleased += this.viewPane_MouseUp;

            AddNode.AddHandler(PointerPressedEvent, new PointerEventHandler(AddNode_PointerPressed), true);
            ConnectNodes.AddHandler(PointerPressedEvent, new PointerEventHandler(ConnectNodes_PointerPressed), true);
            DeConnectNodes.AddHandler(PointerPressedEvent, new PointerEventHandler(DeConnectNodes_PointerPressed), true);
            TransformNode.AddHandler(PointerPressedEvent, new PointerEventHandler(TransformNode_PointerPressed), true);
            MoveNodes.AddHandler(PointerPressedEvent, new PointerEventHandler(MoveNodes_PointerPressed), true);
            DeleteNode.AddHandler(PointerPressedEvent, new PointerEventHandler(DeleteNode_PointerPressed), true);
            SelectNodes.AddHandler(PointerPressedEvent, new PointerEventHandler(SelectNodes_PointerPressed), true);
            UnDo.AddHandler(PointerPressedEvent, new PointerEventHandler(UnDo_PointerPressed), true);
            ReDo.AddHandler(PointerPressedEvent, new PointerEventHandler(ReDo_PointerPressed), true);
            Copy.AddHandler(PointerPressedEvent, new PointerEventHandler(Copy_PointerPressed), true);
            Cut.AddHandler(PointerPressedEvent, new PointerEventHandler(Cut_PointerPressed), true);
            Paste.AddHandler(PointerPressedEvent, new PointerEventHandler(Paste_PointerPressed), true);
            PlaceLabel.AddHandler(PointerPressedEvent, new PointerEventHandler(PlaceLabel_PointerPressed), true);
            JumpInto.AddHandler(PointerPressedEvent, new PointerEventHandler(JumpInto_PointerPressed), true);
            JumpOutof.AddHandler(PointerPressedEvent, new PointerEventHandler(JumpOutof_PointerPressed), true);
            ColorNode.AddHandler(PointerPressedEvent, new PointerEventHandler(ColorNode_PointerPressed), true);

            UNDOMENU.AddHandler(PointerPressedEvent, new PointerEventHandler(UnDo_PointerPressed), true);
            REDOMENU.AddHandler(PointerPressedEvent, new PointerEventHandler(ReDo_PointerPressed), true);
            CUTMENU.AddHandler(PointerPressedEvent, new PointerEventHandler(Cut_PointerPressed), true);
            COPYMENU.AddHandler(PointerPressedEvent, new PointerEventHandler(Copy_PointerPressed), true);
            PASTEMENU.AddHandler(PointerPressedEvent, new PointerEventHandler(Paste_PointerPressed), true);
            TRANSFORMMENU.AddHandler(PointerPressedEvent, new PointerEventHandler(TransformNode_PointerPressed), true);
            EDITMENU.AddHandler(PointerPressedEvent, new PointerEventHandler(PlaceLabel_PointerPressed), true);
            JUMPINMENU.AddHandler(PointerPressedEvent, new PointerEventHandler(JumpInto_PointerPressed), true);
            JUMPOUTMENU.AddHandler(PointerPressedEvent, new PointerEventHandler(JumpOutof_PointerPressed), true);
            CHANGECOLORMENU.AddHandler(PointerPressedEvent, new PointerEventHandler(ColorNode_PointerPressed), true);

            //FileButtonFlyout.AddHandler(PointerPressedEvent, new PointerEventHandler(FileButton_PointerPressed), true);
            this.NEW.AddHandler(PointerPressedEvent, new PointerEventHandler(NEW_PointerPressed), true);
            this.OPEN.AddHandler(PointerPressedEvent, new PointerEventHandler(OPEN_PointerPressed), true);
            this.SAVE.AddHandler(PointerPressedEvent, new PointerEventHandler(SAVE_PointerPressed), true);
            this.SAVEAS.AddHandler(PointerPressedEvent, new PointerEventHandler(SAVEAS_PointerPressed), true);
            this.EXPORT.AddHandler(PointerPressedEvent, new PointerEventHandler(EXPORT_PointerPressed), true);
            this.CLOSE.AddHandler(PointerPressedEvent, new PointerEventHandler(CLOSE_PointerPressed), true);
            this.EXIT.AddHandler(PointerPressedEvent, new PointerEventHandler(EXIT_PointerPressed), true);

            Application.Current.Suspending += AppSuspending;

            STYLESBAR.AddHandler(PointerPressedEvent, new PointerEventHandler(STYLESBAR_PointerPressed), true);
            ZOOMIN.AddHandler(PointerPressedEvent, new PointerEventHandler(ZOOMIN_PointerPressed), true);
            ZOOMOUT.AddHandler(PointerPressedEvent, new PointerEventHandler(ZOOMOUT_PointerPressed), true);

            ABOUT.AddHandler(PointerPressedEvent, new PointerEventHandler(ABOUT_PointerPressed), true);
            DOCU.AddHandler(PointerPressedEvent, new PointerEventHandler(DOCU_PointerPressed), true);

            BoldText.AddHandler(PointerPressedEvent, new PointerEventHandler(UpdateFontStyle), true);
            ItalicText.AddHandler(PointerPressedEvent, new PointerEventHandler(UpdateFontStyle), true);
            UnderlineText.AddHandler(PointerPressedEvent, new PointerEventHandler(UpdateFontStyle), true);

            AboutButton.AddHandler(PointerPressedEvent, new PointerEventHandler(AboutButton_PointerPressed), true);


            viewPane.PointerMoved        += viewPane_UpdateMousePos;
            viewPane.PointerWheelChanged += OnMouseScroll;

            timer1.Tick += mouse.timer1_Tick;

            OpenAutoSave();

            repaint(this, new EventArgs());

            /*Random r = new Random();
             *
             * for (int x = 0; x < 100; x++) {
             *  for (int y = 0; y < 100; y++)
             *  {
             *      //mouse.CreateNewNode((int)(r.NextDouble() * 1000), (int)(r.NextDouble() * 1000), true);
             *
             *      GlobalNodeHandler.CreateNewNode((int)(y * 50), (int)(x * 30), true);
             *
             *      mouse.activetext.Text = "n:";
             *      keymanager.EnterTextBox();
             *      repaint(this,new EventArgs());
             *  }
             * }*/

            GlobalNodeHandler.TabletSelected = true;
            this.Focus(FocusState.Keyboard);
        }