English 中文(简体)
页: 1 怎么说?
原标题:wp7: App failing! Can not figure out where?

我认为,我在启迪活动中将其缩小到这一法典:

...... 当我在这个法典中提出一个突破点时,一切都会奏效。 NOT的申请没有成功。 然而,当我走了一步的时候,它失败了。 我不理解的是,为什么审判/捕获物是发射的。

I should also note that I commented everything out of this event with no break point and the application worked fine. So it is something in this code...

www.un.org/Depts/DGACM/index_spanish.htm 难道“拯救活动”不是为未挖掘的物体而完成的,如果它试图重新启动启动活动实际上就是失败吗?

private void Application_Deactivated(object sender, DeactivatedEventArgs e)
{
    //MessageBox.Show("deactivated");
    try
    {
        //if ((Application.Current as App).infoSaved == false)
        //{
        unsaved unSavedPillInfo = new unsaved();
        unSavedPillInfo.RXName = (Application.Current as App).appRXName;
        unSavedPillInfo.RXNumber = (Application.Current as App).appRXNumber;
        unSavedPillInfo.DosageNotes = (Application.Current as App).appDosageNotes;
        unSavedPillInfo.Generic = (Application.Current as App).appGeneric;
        unSavedPillInfo.Instructions = (Application.Current as App).appInstructions;
        unSavedPillInfo.Reason = (Application.Current as App).appReason;

        unSavedPillInfo.Quantity = (Application.Current as App).appQuantity;
        unSavedPillInfo.Refills = (Application.Current as App).appRefills;

        unSavedPillInfo.Doctor = (Application.Current as App).appDoctor;
        unSavedPillInfo.DoctorNumber = (Application.Current as App).appDoctorNumber;
        unSavedPillInfo.Pharmacy = (Application.Current as App).appPharmacy;
        unSavedPillInfo.PharmacyNumber = (Application.Current as App).appPharmacyNumber;

        unSavedPillInfo.OrigDate = (Application.Current as App).appOrigDate;
        unSavedPillInfo.ReorderReminder = (Application.Current as App).appReorderReminder;
        unSavedPillInfo.ReorderDate = (Application.Current as App).appReorderDate;
        unSavedPillInfo.ConsumptionFrequency = (Application.Current as App).appConsumptionFrequency;

        unSavedPillInfo.PerscriptionUpdated = (Application.Current as App).perscriptionUpdated;
        unSavedPillInfo.PerscriptionUpdated = (Application.Current as App).doctorUpdated;
        unSavedPillInfo.PerscriptionUpdated = (Application.Current as App).detailsUpdated;
        unSavedPillInfo.PerscriptionUpdated = (Application.Current as App).pharmacyUpdated;

        unSavedPillInfo.Save();
        //}
    }
    catch (Exception ex)
    {
        MessageBox.Show(ex.Message.ToString());
    }

}
最佳回答

这并非完美无缺,而是试图将信息箱放在每一个活动手里。 这样,你就可以告诉谁是开枪的,看看一刀是否开枪。

此外,你还可能想不理会经常提出的清除废墟的申请。 众所周知,如果你继续在同一设施上运行,就会产生问题。

<><><>>>>>> 申请从Impat中删除。 也可以是独一无二的星号。 页: 1 ∗∗∗∗∗∗∗

<>>>> 你们应该做的是创造全球变量,称为无预言。 现在,当用户选择处方时,他们选择的全球变数“无动于衷”。 注:当评估活动发生时,你不应分配财产,因为完全节省费用,导致 app。 各位必须做的是,把选定的处方分配给全球变数,并将你在应用xaml.cs时的代码改为:

public unsaved unsavedPrescription {get; set;}

private void Application_Deactivated(object sender, DeactivatedEventArgs e)
{
    //Open up IsolatedStorageSettings
    IsolatedStorageSettings settings = Isolated StorageSettings.ApplicationSettings;

    //Use a model to save prescription
        //So create a name/value pair to store the prescription in isolatedstorage
    //Notice we used the global variable
    settings["UnsavedPrescription"] = unsavedPrescription;
}

private void Application_Activated(object sender, ActivatedEventArgs e)
{
    //Now you can easily load the prescription you saved
    //I m reassigning the global variable that will contain the savedprescription

    if(settings.TryGetValue("UnsavedPrescription", out prescription)
    {
        unsavedPrescription = prescription;
    }
}

这大大简化了你在装货和储蓄方面的法典。 另外,你也能够利用我前面所说的信息箱进行测试,该信箱是专业的,但运作得很出色。 另外,当你试图停止活动时,你还不能运行too。 THIS WAY WILL Work AS I TESTED IT。 你的上述方式看着你在服饰时的 running,这或许是其hang死的原因。 这也解释了为什么在你去除时,一切都奏效。

问题回答

I had a problem that seems similar to yours that wasn t actually related to the Saving/Loading from IsolatedStorage itself, but rather the property I was setting / getting had inifinite recursion. This caused the application to terminate before getting to Catch statements.

It might be worthwhile for you to turn off the Debugger stepping over Properties: Tools -> Options -> Debugger -> Step over Properties and Operators (Managed Only)

public Dictionary<string, object> Dictionary
        {
            get
            {
                if (_dictionary == null)
                    _dictionary = new Dictionary<string, object>();
                return _dictionary;
            }
            set
            {
                Dictionary = value;
            }
        }

申请 在Tombstoning之后,从未成功发射。 页: 1





相关问题
Best practices for Subversion and Visual Studio projects

I ve recently started working on various C# projects in Visual Studio as part of a plan for a large scale system that will be used to replace our current system that s built from a cobbling-together ...

Enable PHP highlights in VS 2010?

I ve heard that Visual Studio 2010 Beta 2 has support for PHP. When I load a PHP file though, it has nothing highlighted and is nothing more than a glorified text editor. Is there a way to enable it?...

Do I want Publish or Release Build in VB.net?

I wrote a little (like 40 lines little) Winforms application with VB.net in Visual Studio 2010. Now I ve released the code as a Google Code project. It s easy for a developer to get the source but I d ...

Unit Testing .NET 3.5 projects using MStest in VS2010

There s a bug/feature in Visual Studio 2010 where you can t create a unit test project with the 2.0 CLR. https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=483891&wa=...

热门标签