コード例 #1
0
    // Start is called before the first frame update
    void Start()
    {
        testNotes = GameObject.FindWithTag("InfoUpdate");

        testScript = testNotes.GetComponent <UpdateNotes>();



        testName = "Security Scanner";
    }
コード例 #2
0
    // Use this for initialization
    void Start()
    {
        textStick = false;


        notesText = GameObject.FindWithTag("InfoUpdate");

        notesScript = notesText.GetComponent <UpdateNotes>();

        anchorID = 0;

        UnityARSessionNativeInterface.ARImageAnchorAddedEvent   += AddImageAnchor;
        UnityARSessionNativeInterface.ARImageAnchorUpdatedEvent += UpdateImageAnchor;
        UnityARSessionNativeInterface.ARImageAnchorRemovedEvent += RemoveImageAnchor;
    }
コード例 #3
0
        public ActionResult UpdateAppData(UpdateNotes update, HttpPostedFileBase file)
        {
            try
            {
                ApplicationDAO dao   = new ApplicationDAO();
                UpdateNotesDAO updao = new UpdateNotesDAO();
                Application    app   = dao.SearchById(update.ApplicationId);
                if (int.Parse(Session["DevId"].ToString()) == app.DeveloperId && update.Value != null)
                {
                    updao.Add(update);

                    //Delete File in Server
                    string p = app.Archive;
                    p = p.Replace("../../..", "..");
                    string fullPath = Request.MapPath(p);
                    if (System.IO.File.Exists(fullPath))
                    {
                        System.IO.File.Delete(fullPath);
                    }

                    //File
                    string filePath2 = Guid.NewGuid() + Path.GetExtension(file.FileName);
                    if (!Directory.Exists(Server.MapPath("~/apps/appfiles/" + app.Id)))
                    {
                        Directory.CreateDirectory(Server.MapPath("~/apps/appfiles/" + app.Id));
                    }
                    file.SaveAs(Path.Combine(Server.MapPath("~/apps/appfiles/" + app.Id), filePath2));
                    app.Archive = "../../../apps/appfiles/" + app.Id + "/" + filePath2;
                    dao.Update();
                    //
                    return(RedirectToAction("Summary", "Developer"));
                }
                return(RedirectToAction("Index", "Home"));
            }
            catch
            {
                return(RedirectToAction("Index", "Home"));
            }
        }
コード例 #4
0
 public void Remove(UpdateNotes update)
 {
     context.Updates.Remove(update);
     Update();
 }
コード例 #5
0
 public void Add(UpdateNotes update)
 {
     context.Updates.Add(update);
     Update();
 }
コード例 #6
0
        public UpdatesAvailableDialog(Image appIcon, string curVersion, string curChannel, string curBuild, string newVersion, string newChannel, string newBuild, UpdateNotes updateNotes, bool installAsAdmin)
        {
            InitializeComponent();
            StyleManager.UpdateAmbientColors(this);
            if (installAsAdmin)
            {
                ButtonX_Install.Image = BaseFeatures.GetUacShieldImage();
            }

            PictureBox_AppIcon.Image   = appIcon ?? Icon.ToBitmap();
            LabelX_CurrentVersion.Text = curVersion;
            LabelX_CurrentChannel.Text = curChannel;
            LabelX_CurrentBuild.Text   = curBuild;
            LabelX_NewVersion.Text     = newVersion;
            LabelX_NewChannel.Text     = newChannel;
            LabelX_NewBuild.Text       = newBuild;

            // Update Notes
            Control updateNotesControl = null;

            switch (updateNotes.ContentType)
            {
            case UpdateNotesContentType.PlainText:
                var newUpdateNotesControl = new DevComponents.DotNetBar.Controls.RichTextBoxEx
                {
                    Text = updateNotes.Content
                };
                newUpdateNotesControl.BackgroundStyle.Class = DevComponents.DotNetBar.Rendering.ElementStyleClassKeys.RichTextBoxBorderKey;
                updateNotesControl = newUpdateNotesControl;
                break;

            case UpdateNotesContentType.Markdown:
                updateNotesControl = new TheArtOfDev.HtmlRenderer.WinForms.HtmlPanel
                {
                    Text = CommonMark.CommonMarkConverter.Convert(updateNotes.Content)
                };
                break;

            case UpdateNotesContentType.HTML:
                updateNotesControl = new TheArtOfDev.HtmlRenderer.WinForms.HtmlPanel
                {
                    Text = updateNotes.Content
                };
                break;
            }
            if (updateNotesControl is object)
            {
                updateNotesControl.Dock = DockStyle.Fill;
                Panel_Changelog.Controls.Add(updateNotesControl);
            }
        }