Пример #1
0
        public MainPage()
        {
            InitializeComponent();

#if PRODUCTION
            string hosturl = HtmlPage.Document.DocumentUri.ToString();
            Guid  communicationid=this.ParseUrlForReceiverId(hosturl);
            ipc = new AlertsIpc(communicationid.ToString (), this);
#else
            this.LayoutRoot.DataContext = BCheck.Data.AlertsDataTransfer.CreateStub(5,0);    
#endif
        }
Пример #2
0
        public MainPage2()
        {
            try
            {
                string hosturl = HtmlPage.Document.DocumentUri.ToString();
                Guid communicationid = 
                        new Guid ( AlertsIpc.ParseUrlRequestVariable(hosturl,AlertsIpc.URLPARAMSENDERID ));
                BCheck.Data.AlertsCategory alertCategory =
                        (BCheck.Data.AlertsCategory )Enum.Parse(typeof(BCheck.Data.AlertsCategory), AlertsIpc.ParseUrlRequestVariable(hosturl, AlertsIpc.URLPARAMALERTSCATEGORY), true);
                ipc = new AlertsIpc(communicationid.ToString(),alertCategory , this);
                InitializeComponent();
            }

            catch (Exception ex)
            {
#if DEBUG
                MessageBox.Show(ex.ToString());
#endif
            }
        }